beautypg.com

PNI CompassPoint V2Xe User Manual

Page 17

background image

PNI Sensor Corporation

DOC#1017814 r01

V2Xe User Manual

– May 2012

Page 15

By performing a calibration, the V2Xe identifies local sources of distortion and negates their

effects from the overall reading to provide an accurate heading. For more on magnetic

distortion and calibration, see PNI’s white paper “Local Magnetic Distortion Effects on 3-
Axis Compassing” at PNI’s website (

http://www.pnicorp.com/technology/papers

).

Follow the steps below to perform a calibration:

Mount the V2Xe in the host system in its operating position and as level as possible.

Set the period select value (kPeriod) to 4 or higher using kSetConfig.

Send the kStartCal command.

Rotate the unit through two 360º circles while maintaining a level position. The

rotations should be no faster than 30 seconds each.

Send the kStopCal command.

Send the kSaveConfig command to save the calibration data to the V2Xe.

When the V2Xe modules is not calibrated, or the calibration did not allow for valid samples,

the reported heading will be -1.00 degree.

kStartCal (frame ID 0x0A)

This frame commands the module to start a user field calibration. The calibration

sampling frequency is set with the kCalSampleFreq identifier in the kSetConfig

command. To query raw X & Y counts during calibration, make sure to send

kSetDataComponents with XRaw & YRaw as requested data components prior to

calibration and then send kGetData at a proper interval to get calibration output. This

command has no parameters.

kStopCal (frame ID 0x0B)

This command stops the V2Xe calibration process, and the calibration coefficients are

calculated. However, the calibration data is not saved until the V2Xe receives the

kSaveConfig command. This command has no parameters.

kGetCalData (frame ID 0x0C)

This command queries the V2Xe for its calibration data. The V2Xe will respond with

the frame kCalDataResp. The command has no parameters.

kCalDataResp (frame ID 0x0D)

kCalDataResp is the response to kGetCalData. It contains the calibration data. The

structure looks like:

Byte Count

UInt8

Payload

Float32

Cal Magnitude

X Offset

SInt32

X Gain

SInt32

Phi

Float32

X Offset

SInt32

Y Gain

SInt32