beautypg.com

Kgetdata (frame id 4, Kdataresp (frame id 5, 4 kgetdata (frame id 4 – PNI CompassPoint Prime User Manual

Page 42: 5 kdataresp (frame id 5, Kdistortion (component id 8, Component ids 24

background image

PNI Sensor Corporation

DOC# 1014177 r08

Prime User Manual

– July 2011

Page 36

kDistortion (Component ID 8

d

)

Read only flag that indicates that at least one magnetic sensor axis reading is beyond

±100 µT.

kCalStatus (Component ID 9

d

)

Read only flag that indicates field calibration status. False (Default) = Not calibrated.

kPAligned, kRAligned & kIZAligned (Component IDs 21

d

, 22

d

, 23

d

)

User calibrated Earth’s gravity vector (G) component output.

kPAngle, kRAngle

(Component IDs 24

d

, 25

d

)

The outputs provide pitch and roll angles. The pitch range is -90.0˚ to 90.0˚ and the

roll range is -180.0˚ to +180.0˚. See Figure 4-1 for the pitch and roll conventions.

kXAligned, kYAligned, kZAligned (Component IDs 27

d

, 28

d

, 29

d

)

Represent the field calibration Earth’s magnetic field (M) vector components.

7.3.4

kGetData (frame ID 4

d

)

This frame queries the module for data as established in kSetDataComponents. The

frame has no payload. The complete packet for the kGetModInfo command would be:

00 05

04

BF71

Where “00 05” is the byte count, “04” is the kGetData command, and “BF 71” is the
CRC-16 checksum.

7.3.5

kDataResp (frame ID 5

d

)

This frame is the response to kGetData frame. The first byte of the payload indicates the

number of data components, followed by the component ID-value pairs. The sequence of

the components IDs follows the sequence set in the kSetDataComponents frame.

Count

ID

1

Value

ID1

ID

2

Value

ID2

UInt8

UInt8

ID

Specific

UInt8

ID

Specific

ID

Count

Value

IDCount

UInt8

ID

Specific

Payload

Example:

If the response contains the heading and pitch, the payload would look like:

2

5

359.9

24

10.5

ID Count

Heading ID

Heading

Output

(Float32)

Pitch ID

Pitch

Output

(Float32)