VectorNav C Library
Data Structures | Typedefs | Functions
sensors.h File Reference
#include <stddef.h>
#include "vn/int.h"
#include "vn/error.h"
#include "vn/enum.h"
#include "vn/bool.h"
#include "vn/protocol/upack.h"
#include "vn/protocol/upackf.h"
#include "vn/xplat/serialport.h"
#include "vn/xplat/event.h"

Go to the source code of this file.

Data Structures

struct  BinaryOutputRegister
 Structure representing a Binary Output register. More...
 
struct  QuaternionMagneticAccelerationAndAngularRatesRegister
 Structure representing the Quaternion, Magnetic, Acceleration and Angular Rates register. More...
 
struct  MagneticAccelerationAndAngularRatesRegister
 Structure representing the Magnetic, Acceleration and Angular Rates register. More...
 
struct  MagneticAndGravityReferenceVectorsRegister
 Structure representing the Magnetic and Gravity Reference Vectors register. More...
 
struct  FilterMeasurementsVarianceParametersRegister
 Structure representing the Filter Measurements Variance Parameters register. More...
 
struct  MagnetometerCompensationRegister
 Structure representing the Magnetometer Compensation register. More...
 
struct  FilterActiveTuningParametersRegister
 Structure representing the Filter Active Tuning Parameters register. More...
 
struct  AccelerationCompensationRegister
 Structure representing the Acceleration Compensation register. More...
 
struct  YawPitchRollMagneticAccelerationAndAngularRatesRegister
 Structure representing the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates register. More...
 
struct  CommunicationProtocolControlRegister
 Structure representing the Communication Protocol Control register. More...
 
struct  SynchronizationControlRegister
 Structure representing the Synchronization Control register. More...
 
struct  SynchronizationStatusRegister
 Structure representing the Synchronization Status register. More...
 
struct  FilterBasicControlRegister
 Structure representing the Filter Basic Control register. More...
 
struct  VpeBasicControlRegister
 Structure representing the VPE Basic Control register. More...
 
struct  VpeMagnetometerBasicTuningRegister
 Structure representing the VPE Magnetometer Basic Tuning register. More...
 
struct  VpeMagnetometerAdvancedTuningRegister
 Structure representing the VPE Magnetometer Advanced Tuning register. More...
 
struct  VpeAccelerometerBasicTuningRegister
 Structure representing the VPE Accelerometer Basic Tuning register. More...
 
struct  VpeAccelerometerAdvancedTuningRegister
 Structure representing the VPE Accelerometer Advanced Tuning register. More...
 
struct  VpeGyroBasicTuningRegister
 Structure representing the VPE Gyro Basic Tuning register. More...
 
struct  MagnetometerCalibrationControlRegister
 Structure representing the Magnetometer Calibration Control register. More...
 
struct  CalculatedMagnetometerCalibrationRegister
 Structure representing the Calculated Magnetometer Calibration register. More...
 
struct  VelocityCompensationControlRegister
 Structure representing the Velocity Compensation Control register. More...
 
struct  VelocityCompensationStatusRegister
 Structure representing the Velocity Compensation Status register. More...
 
struct  ImuMeasurementsRegister
 Structure representing the IMU Measurements register. More...
 
struct  GpsConfigurationRegister
 Structure representing the GPS Configuration register. More...
 
struct  GpsSolutionLlaRegister
 Structure representing the GPS Solution - LLA register. More...
 
struct  GpsSolutionEcefRegister
 Structure representing the GPS Solution - ECEF register. More...
 
struct  InsSolutionLlaRegister
 Structure representing the INS Solution - LLA register. More...
 
struct  InsSolutionEcefRegister
 Structure representing the INS Solution - ECEF register. More...
 
struct  InsBasicConfigurationRegisterVn200
 Structure representing the INS Basic Configuration register for a VN-200 sensor. More...
 
struct  InsBasicConfigurationRegisterVn300
 Structure representing the INS Basic Configuration register for a VN-300 sensor. More...
 
struct  InsAdvancedConfigurationRegister
 Structure representing the INS Advanced Configuration register. More...
 
struct  InsStateLlaRegister
 Structure representing the INS State - LLA register. More...
 
struct  InsStateEcefRegister
 Structure representing the INS State - ECEF register. More...
 
struct  StartupFilterBiasEstimateRegister
 Structure representing the Startup Filter Bias Estimate register. More...
 
struct  DeltaThetaAndDeltaVelocityRegister
 Structure representing the Delta Theta and Delta Velocity register. More...
 
struct  DeltaThetaAndDeltaVelocityConfigurationRegister
 Structure representing the Delta Theta and Delta Velocity Configuration register. More...
 
struct  ReferenceVectorConfigurationRegister
 Structure representing the Reference Vector Configuration register. More...
 
struct  GyroCompensationRegister
 Structure representing the Gyro Compensation register. More...
 
struct  ImuFilteringConfigurationRegister
 Structure representing the IMU Filtering Configuration register. More...
 
struct  GpsCompassBaselineRegister
 Structure representing the GPS Compass Baseline register. More...
 
struct  GpsCompassEstimatedBaselineRegister
 Structure representing the GPS Compass Estimated Baseline register. More...
 
struct  ImuRateConfigurationRegister
 Structure representing the IMU Rate Configuration register. More...
 
struct  YawPitchRollTrueBodyAccelerationAndAngularRatesRegister
 Structure representing the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates register. More...
 
struct  YawPitchRollTrueInertialAccelerationAndAngularRatesRegister
 Structure representing the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates register. More...
 
struct  VnSensor
 Helpful structure for working with VectorNav sensors. More...
 

Typedefs

typedef void(* VnSensor_PacketFoundHandler) (void *userData, VnUartPacket *packet, size_t runningIndex)
 

Functions

void BinaryOutputRegister_initialize (BinaryOutputRegister *reg, AsyncMode asyncMode, uint32_t rateDivisor, CommonGroup commonField, TimeGroup timeField, ImuGroup imuField, GpsGroup gpsField, AttitudeGroup attitudeField, InsGroup insField)
 Initializes a BinaryOutputRegister structure. More...
 
VnError VnSensor_initialize (VnSensor *sensor)
 Initializes a VnSensor structure. More...
 
VnError VnSensor_connect (VnSensor *sensor, const char *portName, uint32_t baudrate)
 Connects to a VectorNav sensor. More...
 
VnError VnSensor_disconnect (VnSensor *sensor)
 Disconnects from a VectorNav sensor. More...
 
VnError VnSensor_changeBaudrate (VnSensor *sensor, uint32_t baudrate)
 Issues a change baudrate to the VectorNav sensor and then reconnectes the attached serial port at the new baudrate. More...
 
VnError VnSensor_transaction (VnSensor *sensor, char *toSend, size_t toSendLength, char *response, size_t *responseLength)
 Sends the provided command and returns the response from the sensor. More...
 
bool VnSensor_isConnected (VnSensor *sensor)
 Indicates if the VnSensor is connected. More...
 
VnError VnSensor_writeSettings (VnSensor *sensor, bool waitForReply)
 Issues a Write Settings command to the VectorNav Sensor. More...
 
VnError VnSensor_restoreFactorySettings (VnSensor *sensor, bool waitForReply)
 Issues a Restore Factory Settings command to the VectorNav sensor. More...
 
VnError VnSensor_reset (VnSensor *sensor, bool waitForReply)
 Issues a Reset command to the VectorNav sensor. More...
 
VnError VnSensor_tare (VnSensor *sensor, bool waitForReply)
 Issues a tare command to the VectorNav Sensor. More...
 
VnError VnSensor_setGyroBias (VnSensor *sensor, bool waitForReply)
 Issues a command to the VectorNav Sensor to set the Gyro's bias. More...
 
VnError VnSensor_magneticDisturbancePresent (VnSensor *sensor, bool disturbancePresent, bool waitForReply)
 Command to inform the VectorNav Sensor if there is a magnetic disturbance present. More...
 
VnError VnSensor_accelerationDisturbancePresent (VnSensor *sensor, bool disturbancePresent, bool waitForReply)
 Command to inform the VectorNav Sensor if there is an acceleration disturbance present. More...
 
bool VnSensor_verifySensorConnectivity (VnSensor *sensor)
 Checks if we are able to send and receive communication with a sensor. More...
 
uint16_t VnSensor_getResponseTimeoutMs (VnSensor *sensor)
 Returns the current response timeout value in milliseconds used for communication with a sensor. More...
 
VnError VnSensor_setResponseTimeoutMs (VnSensor *sensor, uint16_t reponseTimeoutMs)
 Sets the current response timeout value in milliseconds used for communication with a sensor. More...
 
uint16_t VnSensor_getRetransmitDelayMs (VnSensor *sensor)
 Gets the current retransmit delay used for communication with a sensor. More...
 
VnError VnSensor_setRetransmitDelayMs (VnSensor *sensor, uint16_t retransmitDelayMs)
 Sets the current retransmit delay used for communication with a sensor. More...
 
VnError VnSensor_registerAsyncPacketReceivedHandler (VnSensor *sensor, VnSensor_PacketFoundHandler handler, void *userData)
 Allows registering a callback for notification of when an asynchronous data packet is received. More...
 
VnError VnSensor_unregisterAsyncPacketReceivedHandler (VnSensor *sensor)
 Allows unregistering from callback notifications when asynchronous data packets are received. More...
 
VnError VnSensor_registerErrorPacketReceivedHandler (VnSensor *sensor, VnSensor_PacketFoundHandler handler, void *userData)
 Allows registering a callback for notification of when a sensor error message is received. More...
 
VnError VnSensor_unregisterErrorPacketReceivedHandler (VnSensor *sensor)
 Allows unregistering callbacks for notifications of when a sensor error message is recieved. More...
 
VnError VnSensor_readBinaryOutput1 (VnSensor *sensor, BinaryOutputRegister *fields)
 Reads the Binary Output 1 register. More...
 
VnError VnSensor_writeBinaryOutput1 (VnSensor *sensor, BinaryOutputRegister *fields, bool waitForReply)
 Writes to the Binary Output 1 register. More...
 
VnError VnSensor_readBinaryOutput2 (VnSensor *sensor, BinaryOutputRegister *fields)
 Reads the Binary Output 2 register. More...
 
VnError VnSensor_writeBinaryOutput2 (VnSensor *sensor, BinaryOutputRegister *fields, bool waitForReply)
 Writes to the Binary Output 2 register. More...
 
VnError VnSensor_readBinaryOutput3 (VnSensor *sensor, BinaryOutputRegister *fields)
 Reads the Binary Output 3 register. More...
 
VnError VnSensor_writeBinaryOutput3 (VnSensor *sensor, BinaryOutputRegister *fields, bool waitForReply)
 Writes to the Binary Output 3 register. More...
 
VnError VnSensor_readUserTag (VnSensor *sensor, char *tagBuffer, size_t tagBufferLength)
 Reads the User Tag register. More...
 
VnError VnSensor_writeUserTag (VnSensor *sensor, char *tag, bool waitForReply)
 Writes to the User Tag register. More...
 
VnError VnSensor_readModelNumber (VnSensor *sensor, char *productNameBuffer, size_t productNameBufferLength)
 Reads the Model Number register. More...
 
VnError VnSensor_readHardwareRevision (VnSensor *sensor, uint32_t *revision)
 Reads the Hardware Revision register. More...
 
VnError VnSensor_readSerialNumber (VnSensor *sensor, uint32_t *serialNum)
 Reads the Serial Number register. More...
 
VnError VnSensor_readFirmwareVersion (VnSensor *sensor, char *firmwareVersionBuffer, size_t firmwareVersionBufferLength)
 Reads the Firmware Version register. More...
 
VnError VnSensor_readSerialBaudRate (VnSensor *sensor, uint32_t *baudrate)
 Reads the Serial Baud Rate register. More...
 
VnError VnSensor_writeSerialBaudRate (VnSensor *sensor, uint32_t baudrate, bool waitForReply)
 Writes to the Serial Baud Rate register. More...
 
VnError VnSensor_readAsyncDataOutputType (VnSensor *sensor, VnAsciiAsync *ador)
 Reads the Async Data Output Type register. More...
 
VnError VnSensor_writeAsyncDataOutputType (VnSensor *sensor, VnAsciiAsync ador, bool waitForReply)
 Writes to the Async Data Output Type register. More...
 
VnError VnSensor_readAsyncDataOutputFrequency (VnSensor *sensor, uint32_t *adof)
 Reads the Async Data Output Frequency register. More...
 
VnError VnSensor_writeAsyncDataOutputFrequency (VnSensor *sensor, uint32_t adof, bool waitForReply)
 Writes to the Async Data Output Frequency register. More...
 
VnError VnSensor_readYawPitchRoll (VnSensor *sensor, vec3f *yawPitchRoll)
 Reads the Yaw Pitch Roll register. More...
 
VnError VnSensor_readAttitudeQuaternion (VnSensor *sensor, vec4f *quat)
 Reads the Attitude Quaternion register. More...
 
VnError VnSensor_readQuaternionMagneticAccelerationAndAngularRates (VnSensor *sensor, QuaternionMagneticAccelerationAndAngularRatesRegister *fields)
 Reads the Quaternion, Magnetic, Acceleration and Angular Rates register. More...
 
VnError VnSensor_readMagneticMeasurements (VnSensor *sensor, vec3f *mag)
 Reads the Magnetic Measurements register. More...
 
VnError VnSensor_readAccelerationMeasurements (VnSensor *sensor, vec3f *accel)
 Reads the Acceleration Measurements register. More...
 
VnError VnSensor_readAngularRateMeasurements (VnSensor *sensor, vec3f *gyro)
 Reads the Angular Rate Measurements register. More...
 
VnError VnSensor_readMagneticAccelerationAndAngularRates (VnSensor *sensor, MagneticAccelerationAndAngularRatesRegister *fields)
 Reads the Magnetic, Acceleration and Angular Rates register. More...
 
VnError VnSensor_readMagneticAndGravityReferenceVectors (VnSensor *sensor, MagneticAndGravityReferenceVectorsRegister *fields)
 Reads the Magnetic and Gravity Reference Vectors register. More...
 
VnError VnSensor_writeMagneticAndGravityReferenceVectors (VnSensor *sensor, MagneticAndGravityReferenceVectorsRegister fields, bool waitForReply)
 Writes to the Magnetic and Gravity Reference Vectors register. More...
 
VnError VnSensor_readMagnetometerCompensation (VnSensor *sensor, MagnetometerCompensationRegister *fields)
 Reads the Magnetometer Compensation register. More...
 
VnError VnSensor_writeMagnetometerCompensation (VnSensor *sensor, MagnetometerCompensationRegister fields, bool waitForReply)
 Writes to the Magnetometer Compensation register. More...
 
VnError VnSensor_readAccelerationCompensation (VnSensor *sensor, AccelerationCompensationRegister *fields)
 Reads the Acceleration Compensation register. More...
 
VnError VnSensor_writeAccelerationCompensation (VnSensor *sensor, AccelerationCompensationRegister fields, bool waitForReply)
 Writes to the Acceleration Compensation register. More...
 
VnError VnSensor_readReferenceFrameRotation (VnSensor *sensor, mat3f *c)
 Reads the Reference Frame Rotation register. More...
 
VnError VnSensor_writeReferenceFrameRotation (VnSensor *sensor, mat3f c, bool waitForReply)
 Writes to the Reference Frame Rotation register. More...
 
VnError VnSensor_readYawPitchRollMagneticAccelerationAndAngularRates (VnSensor *sensor, YawPitchRollMagneticAccelerationAndAngularRatesRegister *fields)
 Reads the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates register. More...
 
VnError VnSensor_readCommunicationProtocolControl (VnSensor *sensor, CommunicationProtocolControlRegister *fields)
 Reads the Communication Protocol Control register. More...
 
VnError VnSensor_writeCommunicationProtocolControl (VnSensor *sensor, CommunicationProtocolControlRegister fields, bool waitForReply)
 Writes to the Communication Protocol Control register. More...
 
VnError VnSensor_readSynchronizationControl (VnSensor *sensor, SynchronizationControlRegister *fields)
 Reads the Synchronization Control register. More...
 
VnError VnSensor_writeSynchronizationControl (VnSensor *sensor, SynchronizationControlRegister fields, bool waitForReply)
 Writes to the Synchronization Control register. More...
 
VnError VnSensor_readSynchronizationStatus (VnSensor *sensor, SynchronizationStatusRegister *fields)
 Reads the Synchronization Status register. More...
 
VnError VnSensor_writeSynchronizationStatus (VnSensor *sensor, SynchronizationStatusRegister fields, bool waitForReply)
 Writes to the Synchronization Status register. More...
 
VnError VnSensor_readVpeBasicControl (VnSensor *sensor, VpeBasicControlRegister *fields)
 Reads the VPE Basic Control register. More...
 
VnError VnSensor_writeVpeBasicControl (VnSensor *sensor, VpeBasicControlRegister fields, bool waitForReply)
 Writes to the VPE Basic Control register. More...
 
VnError VnSensor_readVpeMagnetometerBasicTuning (VnSensor *sensor, VpeMagnetometerBasicTuningRegister *fields)
 Reads the VPE Magnetometer Basic Tuning register. More...
 
VnError VnSensor_writeVpeMagnetometerBasicTuning (VnSensor *sensor, VpeMagnetometerBasicTuningRegister fields, bool waitForReply)
 Writes to the VPE Magnetometer Basic Tuning register. More...
 
VnError VnSensor_readVpeAccelerometerBasicTuning (VnSensor *sensor, VpeAccelerometerBasicTuningRegister *fields)
 Reads the VPE Accelerometer Basic Tuning register. More...
 
VnError VnSensor_writeVpeAccelerometerBasicTuning (VnSensor *sensor, VpeAccelerometerBasicTuningRegister fields, bool waitForReply)
 Writes to the VPE Accelerometer Basic Tuning register. More...
 
VnError VnSensor_readMagnetometerCalibrationControl (VnSensor *sensor, MagnetometerCalibrationControlRegister *fields)
 Reads the Magnetometer Calibration Control register. More...
 
VnError VnSensor_writeMagnetometerCalibrationControl (VnSensor *sensor, MagnetometerCalibrationControlRegister fields, bool waitForReply)
 Writes to the Magnetometer Calibration Control register. More...
 
VnError VnSensor_readCalculatedMagnetometerCalibration (VnSensor *sensor, CalculatedMagnetometerCalibrationRegister *fields)
 Reads the Calculated Magnetometer Calibration register. More...
 
VnError VnSensor_readVelocityCompensationMeasurement (VnSensor *sensor, vec3f *velocity)
 Reads the Velocity Compensation Measurement register. More...
 
VnError VnSensor_writeVelocityCompensationMeasurement (VnSensor *sensor, vec3f velocity, bool waitForReply)
 Writes to the Velocity Compensation Measurement register. More...
 
VnError VnSensor_readVelocityCompensationControl (VnSensor *sensor, VelocityCompensationControlRegister *fields)
 Reads the Velocity Compensation Control register. More...
 
VnError VnSensor_writeVelocityCompensationControl (VnSensor *sensor, VelocityCompensationControlRegister fields, bool waitForReply)
 Writes to the Velocity Compensation Control register. More...
 
VnError VnSensor_readImuMeasurements (VnSensor *sensor, ImuMeasurementsRegister *fields)
 Reads the IMU Measurements register. More...
 
VnError VnSensor_readGpsConfiguration (VnSensor *sensor, GpsConfigurationRegister *fields)
 Reads the GPS Configuration register. More...
 
VnError VnSensor_writeGpsConfiguration (VnSensor *sensor, GpsConfigurationRegister fields, bool waitForReply)
 Writes to the GPS Configuration register. More...
 
VnError VnSensor_readGpsAntennaOffset (VnSensor *sensor, vec3f *position)
 Reads the GPS Antenna Offset register. More...
 
VnError VnSensor_writeGpsAntennaOffset (VnSensor *sensor, vec3f position, bool waitForReply)
 Writes to the GPS Antenna Offset register. More...
 
VnError VnSensor_readGpsSolutionLla (VnSensor *sensor, GpsSolutionLlaRegister *fields)
 Reads the GPS Solution - LLA register. More...
 
VnError VnSensor_readGpsSolutionEcef (VnSensor *sensor, GpsSolutionEcefRegister *fields)
 Reads the GPS Solution - ECEF register. More...
 
VnError VnSensor_readInsSolutionLla (VnSensor *sensor, InsSolutionLlaRegister *fields)
 Reads the INS Solution - LLA register. More...
 
VnError VnSensor_readInsSolutionEcef (VnSensor *sensor, InsSolutionEcefRegister *fields)
 Reads the INS Solution - ECEF register. More...
 
VnError VnSensor_readInsBasicConfigurationVn200 (VnSensor *sensor, InsBasicConfigurationRegisterVn200 *fields)
 Reads the INS Basic Configuration register for a VN-200 sensor. More...
 
VnError VnSensor_writeInsBasicConfigurationVn200 (VnSensor *sensor, InsBasicConfigurationRegisterVn200 fields, bool waitForReply)
 Writes to the INS Basic Configuration register for a VN-200 sensor. More...
 
VnError VnSensor_readInsBasicConfigurationVn300 (VnSensor *sensor, InsBasicConfigurationRegisterVn300 *fields)
 Reads the INS Basic Configuration register for a VN-300 sensor. More...
 
VnError VnSensor_writeInsBasicConfigurationVn300 (VnSensor *sensor, InsBasicConfigurationRegisterVn300 fields, bool waitForReply)
 Writes to the INS Basic Configuration register for a VN-300 sensor. More...
 
VnError VnSensor_readInsStateLla (VnSensor *sensor, InsStateLlaRegister *fields)
 Reads the INS State - LLA register. More...
 
VnError VnSensor_readInsStateEcef (VnSensor *sensor, InsStateEcefRegister *fields)
 Reads the INS State - ECEF register. More...
 
VnError VnSensor_readStartupFilterBiasEstimate (VnSensor *sensor, StartupFilterBiasEstimateRegister *fields)
 Reads the Startup Filter Bias Estimate register. More...
 
VnError VnSensor_writeStartupFilterBiasEstimate (VnSensor *sensor, StartupFilterBiasEstimateRegister fields, bool waitForReply)
 Writes to the Startup Filter Bias Estimate register. More...
 
VnError VnSensor_readDeltaThetaAndDeltaVelocity (VnSensor *sensor, DeltaThetaAndDeltaVelocityRegister *fields)
 Reads the Delta Theta and Delta Velocity register. More...
 
VnError VnSensor_readDeltaThetaAndDeltaVelocityConfiguration (VnSensor *sensor, DeltaThetaAndDeltaVelocityConfigurationRegister *fields)
 Reads the Delta Theta and Delta Velocity Configuration register. More...
 
VnError VnSensor_writeDeltaThetaAndDeltaVelocityConfiguration (VnSensor *sensor, DeltaThetaAndDeltaVelocityConfigurationRegister fields, bool waitForReply)
 Writes to the Delta Theta and Delta Velocity Configuration register. More...
 
VnError VnSensor_readReferenceVectorConfiguration (VnSensor *sensor, ReferenceVectorConfigurationRegister *fields)
 Reads the Reference Vector Configuration register. More...
 
VnError VnSensor_writeReferenceVectorConfiguration (VnSensor *sensor, ReferenceVectorConfigurationRegister fields, bool waitForReply)
 Writes to the Reference Vector Configuration register. More...
 
VnError VnSensor_readGyroCompensation (VnSensor *sensor, GyroCompensationRegister *fields)
 Reads the Gyro Compensation register. More...
 
VnError VnSensor_writeGyroCompensation (VnSensor *sensor, GyroCompensationRegister fields, bool waitForReply)
 Writes to the Gyro Compensation register. More...
 
VnError VnSensor_readImuFilteringConfiguration (VnSensor *sensor, ImuFilteringConfigurationRegister *fields)
 Reads the IMU Filtering Configuration register. More...
 
VnError VnSensor_writeImuFilteringConfiguration (VnSensor *sensor, ImuFilteringConfigurationRegister fields, bool waitForReply)
 Writes to the IMU Filtering Configuration register. More...
 
VnError VnSensor_readGpsCompassBaseline (VnSensor *sensor, GpsCompassBaselineRegister *fields)
 Reads the GPS Compass Baseline register. More...
 
VnError VnSensor_writeGpsCompassBaseline (VnSensor *sensor, GpsCompassBaselineRegister fields, bool waitForReply)
 Writes to the GPS Compass Baseline register. More...
 
VnError VnSensor_readGpsCompassEstimatedBaseline (VnSensor *sensor, GpsCompassEstimatedBaselineRegister *fields)
 Reads the GPS Compass Estimated Baseline register. More...
 
VnError VnSensor_readYawPitchRollTrueBodyAccelerationAndAngularRates (VnSensor *sensor, YawPitchRollTrueBodyAccelerationAndAngularRatesRegister *fields)
 Reads the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates register. More...
 
VnError VnSensor_readYawPitchRollTrueInertialAccelerationAndAngularRates (VnSensor *sensor, YawPitchRollTrueInertialAccelerationAndAngularRatesRegister *fields)
 Reads the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates register. More...
 
void strFromSensorError (char *out, SensorError val)
 Converts a sensor error into a string. More...
 
void strFromSyncInMode (char *out, VnSyncInMode val)
 Converts a SyncInMode into a string. More...
 
void strFromSyncInEdge (char *out, VnSyncInEdge val)
 Converts a SyncInEdge into a string. More...
 
void strFromSyncOutMode (char *out, VnSyncOutMode val)
 Converts a SyncOutMode into a string. More...
 
void strFromSyncOutPolarity (char *out, VnSyncOutPolarity val)
 Converts a SyncOutPolarity into a string. More...
 
void strFromCountMode (char *out, VnCountMode val)
 Converts a CountMode into a string. More...
 
void strFromStatusMode (char *out, VnStatusMode val)
 Converts a StatusMode into a string. More...
 
void strFromChecksumMode (char *out, VnChecksumMode val)
 Converts a ChecksumMode into a string. More...
 
void strFromErrorMode (char *out, VnErrorMode val)
 Converts a ErrorMode into a string. More...
 
void strFromFilterMode (char *out, VnFilterMode val)
 Converts a FilterMode into a string. More...
 
void strFromIntegrationFrame (char *out, VnIntegrationFrame val)
 Converts a IntegrationFrame into a string. More...
 
void strFromCompensationMode (char *out, VnCompensationMode val)
 Converts a CompensationMode into a string. More...
 
void strFromGpsFix (char *out, VnGpsFix val)
 Converts a GpsFix into a string. More...
 
void strFromGpsMode (char *out, VnGpsMode val)
 Converts a GpsMode into a string. More...
 
void strFromPpsSource (char *out, VnPpsSource val)
 Converts a PpsSource into a string. More...
 
void strFromVpeEnable (char *out, VnVpeEnable val)
 Converts a VpeEnable into a string. More...
 
void strFromHeadingMode (char *out, VnHeadingMode val)
 Converts a HeadingMode into a string. More...
 
void strFromVpeMode (char *out, VnVpeMode val)
 Converts a VpeMode into a string. More...
 
void strFromScenario (char *out, VnScenario val)
 Converts a Scenario into a string. More...
 
void strFromHsiMode (char *out, VnHsiMode val)
 Converts a HsiMode into a string. More...
 
void strFromHsiOutput (char *out, VnHsiOutput val)
 Converts a HsiOutput into a string. More...
 
void strFromVelocityCompensationMode (char *out, VnVelocityCompensationMode val)
 Converts a VelocityCompensationMode into a string. More...
 
void strFromMagneticMode (char *out, VnMagneticMode val)
 Converts a MagneticMode into a string. More...
 
void strFromExternalSensorMode (char *out, VnExternalSensorMode val)
 Converts a ExternalSensorMode into a string. More...
 
void strFromFoamInit (char *out, VnFoamInit val)
 Converts a FoamInit into a string. More...
 

Detailed Description

{COMMON_HEADER}

Description

This header file contains declarations for using VectorNav sensors.

Function Documentation

void strFromChecksumMode ( char *  out,
VnChecksumMode  val 
)

Converts a ChecksumMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe ChecksumMode value to convert to string.
void strFromCompensationMode ( char *  out,
VnCompensationMode  val 
)

Converts a CompensationMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe CompensationMode value to convert to string.
void strFromCountMode ( char *  out,
VnCountMode  val 
)

Converts a CountMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe CountMode value to convert to string.
void strFromErrorMode ( char *  out,
VnErrorMode  val 
)

Converts a ErrorMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe ErrorMode value to convert to string.
void strFromExternalSensorMode ( char *  out,
VnExternalSensorMode  val 
)

Converts a ExternalSensorMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe ExternalSensorMode value to convert to string.
void strFromFilterMode ( char *  out,
VnFilterMode  val 
)

Converts a FilterMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe FilterMode value to convert to string.
Examples:
getting_started/main.c.
void strFromFoamInit ( char *  out,
VnFoamInit  val 
)

Converts a FoamInit into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe FoamInit value to convert to string.
void strFromGpsFix ( char *  out,
VnGpsFix  val 
)

Converts a GpsFix into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe GpsFix value to convert to string.
void strFromGpsMode ( char *  out,
VnGpsMode  val 
)

Converts a GpsMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe GpsMode value to convert to string.
void strFromHeadingMode ( char *  out,
VnHeadingMode  val 
)

Converts a HeadingMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe HeadingMode value to convert to string.
Examples:
getting_started/main.c, and sensor/main.c.
void strFromHsiMode ( char *  out,
VnHsiMode  val 
)

Converts a HsiMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe HsiMode value to convert to string.
void strFromHsiOutput ( char *  out,
VnHsiOutput  val 
)

Converts a HsiOutput into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe HsiOutput value to convert to string.
void strFromIntegrationFrame ( char *  out,
VnIntegrationFrame  val 
)

Converts a IntegrationFrame into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe IntegrationFrame value to convert to string.
void strFromMagneticMode ( char *  out,
VnMagneticMode  val 
)

Converts a MagneticMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe MagneticMode value to convert to string.
void strFromPpsSource ( char *  out,
VnPpsSource  val 
)

Converts a PpsSource into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe PpsSource value to convert to string.
void strFromScenario ( char *  out,
VnScenario  val 
)

Converts a Scenario into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe Scenario value to convert to string.
void strFromSensorError ( char *  out,
SensorError  val 
)

Converts a sensor error into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe SensorError value to convert to string.
Returns
The converted value.
Examples:
getting_started/main.c.
void strFromStatusMode ( char *  out,
VnStatusMode  val 
)

Converts a StatusMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe StatusMode value to convert to string.
void strFromSyncInEdge ( char *  out,
VnSyncInEdge  val 
)

Converts a SyncInEdge into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe SyncInEdge value to convert to string.
void strFromSyncInMode ( char *  out,
VnSyncInMode  val 
)

Converts a SyncInMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe SyncInMode value to convert to string.
void strFromSyncOutMode ( char *  out,
VnSyncOutMode  val 
)

Converts a SyncOutMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe SyncOutMode value to convert to string.
void strFromSyncOutPolarity ( char *  out,
VnSyncOutPolarity  val 
)

Converts a SyncOutPolarity into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe SyncOutPolarity value to convert to string.
void strFromVelocityCompensationMode ( char *  out,
VnVelocityCompensationMode  val 
)

Converts a VelocityCompensationMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe VelocityCompensationMode value to convert to string.
void strFromVpeEnable ( char *  out,
VnVpeEnable  val 
)

Converts a VpeEnable into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe VpeEnable value to convert to string.
void strFromVpeMode ( char *  out,
VnVpeMode  val 
)

Converts a VpeMode into a string.

Parameters
[out]outThe buffer to place the string in.
[in]valThe VpeMode value to convert to string.
VnError VnSensor_accelerationDisturbancePresent ( VnSensor sensor,
bool  disturbancePresent,
bool  waitForReply 
)

Command to inform the VectorNav Sensor if there is an acceleration disturbance present.

Parameters
[in]sensorThe associated VnSensor.
[in]disturbancePresentIndicates the presense of a disturbance.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered
VnError VnSensor_changeBaudrate ( VnSensor sensor,
uint32_t  baudrate 
)

Issues a change baudrate to the VectorNav sensor and then reconnectes the attached serial port at the new baudrate.

Parameters
[in]sensorThe VnSensor structure.
[in]baudrateThe new sensor baudrate.
Returns
Any errors encountered.
VnError VnSensor_connect ( VnSensor sensor,
const char *  portName,
uint32_t  baudrate 
)

Connects to a VectorNav sensor.

Parameters
[in]sensorThe VnSensor structure.
[in]portNameThe name of the serial port to connect to.
[in]baudrateThe baudrate to connect at.
Returns
Any errors encountered.
Examples:
sensor/main.c.
VnError VnSensor_disconnect ( VnSensor sensor)

Disconnects from a VectorNav sensor.

Parameters
[in]sensorThe associated sensor.
Returns
Any errors encountered.
Examples:
sensor/main.c.
uint16_t VnSensor_getResponseTimeoutMs ( VnSensor sensor)

Returns the current response timeout value in milliseconds used for communication with a sensor.

The response timeout is used on commands that require a response to be received from the sensor. If a response has not been received from the sensor in the amount of time specified by this value, the called function will return an E_TIMEOUT error.

Parameters
[in]sensorThe associated VnSensor.
Returns
The current response timeout value in milliseconds.
uint16_t VnSensor_getRetransmitDelayMs ( VnSensor sensor)

Gets the current retransmit delay used for communication with a sensor.

During the time that the VnSensor is awaiting a response from a sensor, the command will be retransmitted to the sensor at the interval specified by this value.

Parameters
[in]sensorThe associated VnSensor.
Returns
The current retransmit delay value in milliseconds.
VnError VnSensor_initialize ( VnSensor sensor)

Initializes a VnSensor structure.

Parameters
[in]sensorThe structure to initialize.
Returns
Any errors encountered.
Examples:
sensor/main.c.
bool VnSensor_isConnected ( VnSensor sensor)

Indicates if the VnSensor is connected.

Parameters
[in]sensorThe associated VnSensor.
Returns
true if the VnSensor is connected; otherwise false.
VnError VnSensor_magneticDisturbancePresent ( VnSensor sensor,
bool  disturbancePresent,
bool  waitForReply 
)

Command to inform the VectorNav Sensor if there is a magnetic disturbance present.

Parameters
[in]sensorThe associated VnSensor.
[in]disturbancePresentIndicates the presense of a disturbance.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered
VnError VnSensor_registerAsyncPacketReceivedHandler ( VnSensor sensor,
VnSensor_PacketFoundHandler  handler,
void *  userData 
)

Allows registering a callback for notification of when an asynchronous data packet is received.

Parameters
[in]sensorThe associated VnSensor.
[in]handlerThe callback handler.
[in]userDataData which will be provided with all callbacks.
Returns
Any errors encountered.
Examples:
sensor/main.c.
VnError VnSensor_registerErrorPacketReceivedHandler ( VnSensor sensor,
VnSensor_PacketFoundHandler  handler,
void *  userData 
)

Allows registering a callback for notification of when a sensor error message is received.

Parameters
[in]sensorThe associated VnSensor.
[in]handlerThe callback handler.
[in]userDataData which will be provided with all callbacks.
Returns
Any errors encountered.
VnError VnSensor_reset ( VnSensor sensor,
bool  waitForReply 
)

Issues a Reset command to the VectorNav sensor.

Parameters
[in]sensorThe associated VnSensor.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered
VnError VnSensor_restoreFactorySettings ( VnSensor sensor,
bool  waitForReply 
)

Issues a Restore Factory Settings command to the VectorNav sensor.

Parameters
[in]sensorThe associated VnSensor.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered
VnError VnSensor_setGyroBias ( VnSensor sensor,
bool  waitForReply 
)

Issues a command to the VectorNav Sensor to set the Gyro's bias.

Parameters
[in]sensorThe associated VnSensor.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered
VnError VnSensor_setResponseTimeoutMs ( VnSensor sensor,
uint16_t  reponseTimeoutMs 
)

Sets the current response timeout value in milliseconds used for communication with a sensor.

The response timeout is used on commands that require a response to be received from the sensor. If a response has not been received from the sensor in the amount of time specified by this value, the called function will return an E_TIMEOUT error.

Parameters
[in]sensorThe associated VnSensor.
[in]responseTimeoutMsThe new value for the response timeout in milliseconds.
Returns
Any errors encountered.
VnError VnSensor_setRetransmitDelayMs ( VnSensor sensor,
uint16_t  retransmitDelayMs 
)

Sets the current retransmit delay used for communication with a sensor.

During the time that the VnSensor is awaiting a response from a sensor, the command will be retransmitted to the sensor at the interval specified by this value.

Parameters
[in]sensorThe associated VnSensor.
[in]retransmitDelayMsThe new value for the retransmit delay in milliseconds.
Returns
Any errors encountered.
VnError VnSensor_tare ( VnSensor sensor,
bool  waitForReply 
)

Issues a tare command to the VectorNav Sensor.

Parameters
[in]sensorThe associated VnSensor.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered
VnError VnSensor_transaction ( VnSensor sensor,
char *  toSend,
size_t  toSendLength,
char *  response,
size_t *  responseLength 
)

Sends the provided command and returns the response from the sensor.

If the command does not have an asterisk '*', the a checksum will be performed and appended based on the current error detection mode. Also, if the line-ending \r\n is not present, these will be added also.

Parameters
[in]sensorThe associated VnSensor.
[in]toSendThe command to send to the sensor.
[in]toSendLengthThe number of bytes provided in the toSend buffer.
[out]responseThe response received from the sensor.
[in,out]responseLengthThe size of the provided response buffer and will be set with the returned response length.
Returns
Any errors encountered.
VnError VnSensor_unregisterAsyncPacketReceivedHandler ( VnSensor sensor)

Allows unregistering from callback notifications when asynchronous data packets are received.

Parameters
[in]sensorThe associated sensor.
Examples:
sensor/main.c.
VnError VnSensor_unregisterErrorPacketReceivedHandler ( VnSensor sensor)

Allows unregistering callbacks for notifications of when a sensor error message is recieved.

Parameters
[in]sensorThe associated VnSensor.
Returns
Any errors encountered.
bool VnSensor_verifySensorConnectivity ( VnSensor sensor)

Checks if we are able to send and receive communication with a sensor.

Parameters
[in]sensorThe associated sensor.
Returns
true if we can communicate with a sensor; otherwise false.
VnError VnSensor_writeSettings ( VnSensor sensor,
bool  waitForReply 
)

Issues a Write Settings command to the VectorNav Sensor.

Parameters
[in]sensorThe associated VnSensor.
[in]waitForReplyIndicates if the method should wait for a response from the sensor.
Returns
Any errors encountered