1 #ifndef VNUPACK_H_INCLUDED
2 #define VNUPACK_H_INCLUDED
10 #include "vn/error_detection.h"
11 #include "vn/math/matrix.h"
12 #include "vn/math/vector.h"
13 #include "vn/protocol/common.h"
15 #ifndef VNUART_PROTOCOL_BUFFER_SIZE
17 #define VNUART_PROTOCOL_BUFFER_SIZE 256
20 #define VN_BINARY_START_CHAR 0xFA
21 #define VN_ASCII_START_CHAR '$'
30 typedef void(*vnuart_sensor_error_received)(VnError error);
52 void VnUartPacket_initialize(
VnUartPacket* packet, uint8_t* data,
size_t len);
58 void VnUartPacket_initializeFromStr(
VnUartPacket* packet,
char* data);
100 bool VnUartPacket_isErrorRaw(uint8_t *packet);
115 VnError VnUartPacket_finalizeCommand(VnErrorDetectionMode errorDetectionMode, uint8_t *packet,
size_t *length);
128 uint16_t VnUartPacket_groupField(
VnUartPacket* packet,
size_t groupIndex);
141 size_t VnUartPacket_computeBinaryPacketLength(uint8_t
const *startOfPossibleBinaryPacket);
149 size_t VnUartPacket_computeNumOfBytesForBinaryGroupPayload(BinaryGroupType groupType, uint16_t groupField);
164 bool VnUartPacket_isCompatible(
166 CommonGroup commonGroup,
170 AttitudeGroup attitudeGroup,
264 VnAsciiAsync VnUartPacket_determineAsciiAsyncType(
VnUartPacket* packet);
552 void VnUartPacket_parseVNRAW(
VnUartPacket* packet,
vec3f *magneticVoltage,
vec3f *accelerationVoltage,
vec3f *angularRateVoltage,
float *temperatureVoltage);
562 void VnUartPacket_parseVNCMV(
VnUartPacket* packet,
vec3f *magneticUncompensated,
vec3f *accelerationUncompensated,
vec3f *angularRateUncompensated,
float *temperature);
578 void VnUartPacket_parseVNCOV(
VnUartPacket* packet,
vec3f *attitudeVariance,
vec3f *angularRateBiasVariance);
618 VnError vnuart_genread(
621 VnErrorDetectionMode errorDetectionMode,
652 VnErrorDetectionMode errorDetectionMode,
666 VnErrorDetectionMode errorDetectionMode,
680 VnErrorDetectionMode errorDetectionMode,
693 VnError VnUartPacket_genReadBinaryOutput4(
696 VnErrorDetectionMode errorDetectionMode,
707 VnError VnUartPacket_genReadBinaryOutput5(
710 VnErrorDetectionMode errorDetectionMode,
726 VnErrorDetectionMode errorDetectionMode,
740 VnErrorDetectionMode errorDetectionMode,
754 VnErrorDetectionMode errorDetectionMode,
768 VnErrorDetectionMode errorDetectionMode,
782 VnErrorDetectionMode errorDetectionMode,
797 VnErrorDetectionMode errorDetectionMode,
798 bool disturbancePresent,
813 VnErrorDetectionMode errorDetectionMode,
814 bool disturbancePresent,
828 VnErrorDetectionMode errorDetectionMode,
842 VnErrorDetectionMode errorDetectionMode,
856 VnErrorDetectionMode errorDetectionMode,
870 VnErrorDetectionMode errorDetectionMode,
884 VnErrorDetectionMode errorDetectionMode,
898 VnErrorDetectionMode errorDetectionMode,
912 VnErrorDetectionMode errorDetectionMode,
926 VnErrorDetectionMode errorDetectionMode,
940 VnErrorDetectionMode errorDetectionMode,
954 VnErrorDetectionMode errorDetectionMode,
968 VnErrorDetectionMode errorDetectionMode,
982 VnErrorDetectionMode errorDetectionMode,
996 VnErrorDetectionMode errorDetectionMode,
1010 VnErrorDetectionMode errorDetectionMode,
1024 VnErrorDetectionMode errorDetectionMode,
1038 VnErrorDetectionMode errorDetectionMode,
1052 VnErrorDetectionMode errorDetectionMode,
1066 VnErrorDetectionMode errorDetectionMode,
1080 VnErrorDetectionMode errorDetectionMode,
1094 VnErrorDetectionMode errorDetectionMode,
1108 VnErrorDetectionMode errorDetectionMode,
1122 VnErrorDetectionMode errorDetectionMode,
1136 VnErrorDetectionMode errorDetectionMode,
1150 VnErrorDetectionMode errorDetectionMode,
1164 VnErrorDetectionMode errorDetectionMode,
1178 VnErrorDetectionMode errorDetectionMode,
1192 VnErrorDetectionMode errorDetectionMode,
1206 VnErrorDetectionMode errorDetectionMode,
1220 VnErrorDetectionMode errorDetectionMode,
1234 VnErrorDetectionMode errorDetectionMode,
1248 VnErrorDetectionMode errorDetectionMode,
1262 VnErrorDetectionMode errorDetectionMode,
1276 VnErrorDetectionMode errorDetectionMode,
1290 VnErrorDetectionMode errorDetectionMode,
1304 VnErrorDetectionMode errorDetectionMode,
1318 VnErrorDetectionMode errorDetectionMode,
1332 VnErrorDetectionMode errorDetectionMode,
1346 VnErrorDetectionMode errorDetectionMode,
1360 VnErrorDetectionMode errorDetectionMode,
1374 VnErrorDetectionMode errorDetectionMode,
1388 VnErrorDetectionMode errorDetectionMode,
1402 VnErrorDetectionMode errorDetectionMode,
1416 VnErrorDetectionMode errorDetectionMode,
1430 VnErrorDetectionMode errorDetectionMode,
1444 VnErrorDetectionMode errorDetectionMode,
1458 VnErrorDetectionMode errorDetectionMode,
1472 VnErrorDetectionMode errorDetectionMode,
1486 VnErrorDetectionMode errorDetectionMode,
1500 VnErrorDetectionMode errorDetectionMode,
1514 VnErrorDetectionMode errorDetectionMode,
1528 VnErrorDetectionMode errorDetectionMode,
1578 VnError VnUartPacket_genWrite(
1581 VnErrorDetectionMode errorDetectionMode,
1582 uint16_t registerId,
1630 VnErrorDetectionMode errorDetectionMode,
1633 uint16_t rateDivisor,
1634 uint16_t commonField,
1638 uint16_t attitudeField,
1660 VnErrorDetectionMode errorDetectionMode,
1663 uint16_t rateDivisor,
1664 uint16_t commonField,
1668 uint16_t attitudeField,
1690 VnErrorDetectionMode errorDetectionMode,
1693 uint16_t rateDivisor,
1694 uint16_t commonField,
1698 uint16_t attitudeField,
1719 VnError VnUartPacket_genWriteBinaryOutput4(
1722 VnErrorDetectionMode errorDetectionMode,
1725 uint16_t rateDivisor,
1726 uint16_t commonField,
1730 uint16_t attitudeField,
1749 VnError VnUartPacket_genWriteBinaryOutput5(
1752 VnErrorDetectionMode errorDetectionMode,
1755 uint16_t rateDivisor,
1756 uint16_t commonField,
1760 uint16_t attitudeField,
1776 VnErrorDetectionMode errorDetectionMode,
1791 VnErrorDetectionMode errorDetectionMode,
1806 VnErrorDetectionMode errorDetectionMode,
1821 VnErrorDetectionMode errorDetectionMode,
1836 VnErrorDetectionMode errorDetectionMode,
1851 VnErrorDetectionMode errorDetectionMode,
1866 VnErrorDetectionMode errorDetectionMode,
1882 VnErrorDetectionMode errorDetectionMode,
1899 VnErrorDetectionMode errorDetectionMode,
1916 VnErrorDetectionMode errorDetectionMode,
1932 VnErrorDetectionMode errorDetectionMode,
1953 VnErrorDetectionMode errorDetectionMode,
1955 uint8_t serialCount,
1956 uint8_t serialStatus,
1959 uint8_t serialChecksum,
1960 uint8_t spiChecksum,
1982 VnErrorDetectionMode errorDetectionMode,
1986 uint16_t syncInSkipFactor,
1988 uint8_t syncOutMode,
1989 uint8_t syncOutPolarity,
1990 uint16_t syncOutSkipFactor,
1991 uint32_t syncOutPulseWidth,
1992 uint32_t reserved2);
2007 VnErrorDetectionMode errorDetectionMode,
2009 uint32_t syncInCount,
2010 uint32_t syncInTime,
2011 uint32_t syncOutCount);
2027 VnErrorDetectionMode errorDetectionMode,
2030 uint8_t headingMode,
2031 uint8_t filteringMode,
2032 uint8_t tuningMode);
2047 VnErrorDetectionMode errorDetectionMode,
2050 vec3f adaptiveTuning,
2051 vec3f adaptiveFiltering);
2066 VnErrorDetectionMode errorDetectionMode,
2069 vec3f adaptiveTuning,
2070 vec3f adaptiveFiltering);
2085 VnErrorDetectionMode errorDetectionMode,
2089 uint8_t convergeRate);
2102 VnErrorDetectionMode errorDetectionMode,
2119 VnErrorDetectionMode errorDetectionMode,
2122 float velocityTuning,
2140 VnErrorDetectionMode errorDetectionMode,
2159 VnErrorDetectionMode errorDetectionMode,
2177 VnErrorDetectionMode errorDetectionMode,
2181 uint8_t estBaseline,
2197 VnErrorDetectionMode errorDetectionMode,
2201 float pressureBias);
2218 VnErrorDetectionMode errorDetectionMode,
2220 uint8_t integrationFrame,
2221 uint8_t gyroCompensation,
2222 uint8_t accelCompensation,
2224 uint16_t reserved2);
2243 VnErrorDetectionMode errorDetectionMode,
2245 uint8_t useMagModel,
2246 uint8_t useGravityModel,
2249 uint32_t recalcThreshold,
2265 VnErrorDetectionMode errorDetectionMode,
2290 VnErrorDetectionMode errorDetectionMode,
2292 uint16_t magWindowSize,
2293 uint16_t accelWindowSize,
2294 uint16_t gyroWindowSize,
2295 uint16_t tempWindowSize,
2296 uint16_t presWindowSize,
2297 uint8_t magFilterMode,
2298 uint8_t accelFilterMode,
2299 uint8_t gyroFilterMode,
2300 uint8_t tempFilterMode,
2301 uint8_t presFilterMode);
2315 VnErrorDetectionMode errorDetectionMode,
2349 uint16_t* asyncMode,
2350 uint16_t* rateDivisor,
2351 uint16_t* outputGroup,
2352 uint16_t* commonField,
2353 uint16_t* timeField,
2356 uint16_t* attitudeField,
2357 uint16_t* insField);
2374 uint16_t* asyncMode,
2375 uint16_t* rateDivisor,
2376 uint16_t* outputGroup,
2377 uint16_t* commonField,
2378 uint16_t* timeField,
2381 uint16_t* attitudeField,
2382 uint16_t* insField);
2765 void VnUartPacket_parseSynchronizationControl(
VnUartPacket *packet, uint8_t* syncInMode, uint8_t* syncInEdge, uint16_t* syncInSkipFactor, uint32_t* reserved1, uint8_t* syncOutMode, uint8_t* syncOutPolarity, uint16_t* syncOutSkipFactor, uint32_t* syncOutPulseWidth, uint32_t* reserved2);
2780 void VnUartPacket_parseSynchronizationControlRaw(
char *packet, uint8_t* syncInMode, uint8_t* syncInEdge, uint16_t* syncInSkipFactor, uint32_t* reserved1, uint8_t* syncOutMode, uint8_t* syncOutPolarity, uint16_t* syncOutSkipFactor, uint32_t* syncOutPulseWidth, uint32_t* reserved2);
3273 void VnUartPacket_parseInsAdvancedConfiguration(
VnUartPacket *packet, uint8_t* useMag, uint8_t* usePres, uint8_t* posAtt, uint8_t* velAtt, uint8_t* velBias, uint8_t* useFoam, uint8_t* gpsCovType, uint8_t* velCount,
float* velInit,
float* moveOrigin,
float* gpsTimeout,
float* deltaLimitPos,
float* deltaLimitVel,
float* minPosUncertainty,
float* minVelUncertainty);
3294 void VnUartPacket_parseInsAdvancedConfigurationRaw(
char *packet, uint8_t* useMag, uint8_t* usePres, uint8_t* posAtt, uint8_t* velAtt, uint8_t* velBias, uint8_t* useFoam, uint8_t* gpsCovType, uint8_t* velCount,
float* velInit,
float* moveOrigin,
float* gpsTimeout,
float* deltaLimitPos,
float* deltaLimitVel,
float* minPosUncertainty,
float* minVelUncertainty);
3454 void VnUartPacket_parseImuFilteringConfiguration(
VnUartPacket *packet, uint16_t* magWindowSize, uint16_t* accelWindowSize, uint16_t* gyroWindowSize, uint16_t* tempWindowSize, uint16_t* presWindowSize, uint8_t* magFilterMode, uint8_t* accelFilterMode, uint8_t* gyroFilterMode, uint8_t* tempFilterMode, uint8_t* presFilterMode);
3470 void VnUartPacket_parseImuFilteringConfigurationRaw(
char *packet, uint16_t* magWindowSize, uint16_t* accelWindowSize, uint16_t* gyroWindowSize, uint16_t* tempWindowSize, uint16_t* presWindowSize, uint8_t* magFilterMode, uint8_t* accelFilterMode, uint8_t* gyroFilterMode, uint8_t* tempFilterMode, uint8_t* presFilterMode);
3573 void strFromVnAsciiAsync(
char *out, VnAsciiAsync val);
VnError VnUartPacket_genReadMagneticAccelerationAndAngularRates(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Magnetic, Acceleration and Angular Rates register on a VectorNav sens...
void VnUartPacket_parseSynchronizationControlRaw(char *packet, uint8_t *syncInMode, uint8_t *syncInEdge, uint16_t *syncInSkipFactor, uint32_t *reserved1, uint8_t *syncOutMode, uint8_t *syncOutPolarity, uint16_t *syncOutSkipFactor, uint32_t *syncOutPulseWidth, uint32_t *reserved2)
Parses a response from reading the Synchronization Control register.
void VnUartPacket_parseAsyncDataOutputType(VnUartPacket *packet, uint32_t *ador)
Parses a response from reading the Async Data Output Type register.
VnError VnUartPacket_genWriteVpeAccelerometerBasicTuning(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f baseTuning, vec3f adaptiveTuning, vec3f adaptiveFiltering)
Generates a command to write to the VPE Accelerometer Basic Tuning register on a VectorNav sensor...
void VnUartPacket_parseGpsConfiguration(VnUartPacket *packet, uint8_t *mode, uint8_t *ppsSource, uint8_t *reserved1, uint8_t *reserved2, uint8_t *reserved3)
Parses a response from reading the GPS Configuration register.
void VnUartPacket_parseInsBasicConfigurationRaw(char *packet, uint8_t *scenario, uint8_t *ahrsAiding, uint8_t *estBaseline, uint8_t *resv2)
Parses a response from reading the INS Basic Configuration register.
void VnUartPacket_parseIndoorHeadingModeControl(VnUartPacket *packet, float *maxRateError, uint8_t *reserved1)
Parses a response from reading the Indoor Heading Mode Control register.
void VnUartPacket_parseVelocityCompensationStatus(VnUartPacket *packet, float *x, float *xDot, vec3f *accelOffset, vec3f *omega)
Parses a response from reading the Velocity Compensation Status register.
VnError VnUartPacket_genWriteDeltaThetaAndDeltaVelocityConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t integrationFrame, uint8_t gyroCompensation, uint8_t accelCompensation, uint8_t reserved1, uint16_t reserved2)
Generates a command to write to the Delta Theta and Delta Velocity Configuration register on a Vector...
VnError VnUartPacket_genReadAccelerationMeasurements(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Acceleration Measurements register on a VectorNav sensor...
VnError VnUartPacket_genCmdTare(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to tare the sensor.
void VnUartPacket_parseAccelerationCompensation(VnUartPacket *packet, mat3f *c, vec3f *b)
Parses a response from reading the Acceleration Compensation register.
void VnUartPacket_parseFilterBasicControlRaw(char *packet, uint8_t *magMode, uint8_t *extMagMode, uint8_t *extAccMode, uint8_t *extGyroMode, vec3f *gyroLimit)
Parses a response from reading the Filter Basic Control register.
VnError VnUartPacket_genWriteSerialBaudRate(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t baudrate)
Generates a command to write to the Serial Baud Rate register on a VectorNav sensor.
void VnUartPacket_parseReferenceVectorConfigurationRaw(char *packet, uint8_t *useMagModel, uint8_t *useGravityModel, uint8_t *resv1, uint8_t *resv2, uint32_t *recalcThreshold, float *year, vec3d *position)
Parses a response from reading the Reference Vector Configuration register.
VnError VnUartPacket_genWriteMagnetometerCalibrationControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t hsiMode, uint8_t hsiOutput, uint8_t convergeRate)
Generates a command to write to the Magnetometer Calibration Control register on a VectorNav sensor...
VnError VnUartPacket_parseVNYMR(VnUartPacket *packet, vec3f *yawPitchRoll, vec3f *magnetic, vec3f *acceleration, vec3f *angularRate)
Parses a VNYMR asynchronous packet.
void VnUartPacket_parseCommunicationProtocolControlRaw(char *packet, uint8_t *serialCount, uint8_t *serialStatus, uint8_t *spiCount, uint8_t *spiStatus, uint8_t *serialChecksum, uint8_t *spiChecksum, uint8_t *errorMode)
Parses a response from reading the Communication Protocol Control register.
void VnUartPacket_parseVNGYR(VnUartPacket *packet, vec3f *angularRate)
Parses a VNGYR asynchronous packet.
void VnUartPacket_parseUserTagRaw(char *packet, char *tag)
Parses a response from reading the User Tag register.
VnError VnUartPacket_genReadInsSolutionLla(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the INS Solution - LLA register on a VectorNav sensor.
void VnUartPacket_parseGpsAntennaOffsetRaw(char *packet, vec3f *position)
Parses a response from reading the GPS Antenna Offset register.
VnError VnUartPacket_genWriteSerialBaudRateWithOptions(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t baudrate)
Generates a command to write to the Serial Baud Rate register on a VectorNav sensor.
VnError VnUartPacket_genReadBinaryOutput2(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Binary Output 2 register on a VectorNav sensor.
void VnUartPacket_parseErrorRaw(uint8_t *packet, uint8_t *error)
Parses an error packet to get the error type.
void VnUartPacket_parseInsStateLla(VnUartPacket *packet, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, vec3f *accel, vec3f *angularRate)
Parses a response from reading the INS State - LLA register.
VnError VnUartPacket_genWriteAsyncDataOutputType(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t ador)
Generates a command to write to the Async Data Output Type register on a VectorNav sensor...
void VnUartPacket_parseDeltaThetaAndDeltaVelocity(VnUartPacket *packet, float *deltaTime, vec3f *deltaTheta, vec3f *deltaVelocity)
Parses a response from reading the Delta Theta and Delta Velocity register.
VnError VnUartPacket_genWriteSynchronizationStatus(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t syncInCount, uint32_t syncInTime, uint32_t syncOutCount)
Generates a command to write to the Synchronization Status register on a VectorNav sensor...
void VnUartPacket_parseGpsConfigurationRaw(char *packet, uint8_t *mode, uint8_t *ppsSource, uint8_t *reserved1, uint8_t *reserved2, uint8_t *reserved3)
Parses a response from reading the GPS Configuration register.
void VnUartPacket_parseImuMeasurementsRaw(char *packet, vec3f *mag, vec3f *accel, vec3f *gyro, float *temp, float *pressure)
Parses a response from reading the IMU Measurements register.
VnError VnUartPacket_genWriteSynchronizationControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t syncInMode, uint8_t syncInEdge, uint16_t syncInSkipFactor, uint32_t reserved1, uint8_t syncOutMode, uint8_t syncOutPolarity, uint16_t syncOutSkipFactor, uint32_t syncOutPulseWidth, uint32_t reserved2)
Generates a command to write to the Synchronization Control register on a VectorNav sensor...
Structure representing a UART packet received from a VectorNav sensor.
Definition: upack.h:34
VnError VnUartPacket_genReadImuFilteringConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the IMU Filtering Configuration register on a VectorNav sensor...
VnError VnUartPacket_genReadReferenceFrameRotation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Reference Frame Rotation register on a VectorNav sensor.
VnError VnUartPacket_genWriteInsBasicConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t scenario, uint8_t ahrsAiding, uint8_t estBaseline, uint8_t resv2)
Generates a command to write to the INS Basic Configuration register on a VectorNav sensor...
void VnUartPacket_parseVpeGyroBasicTuning(VnUartPacket *packet, vec3f *angularWalkVariance, vec3f *baseTuning, vec3f *adaptiveTuning)
Parses a response from reading the VPE Gyro Basic Tuning register.
void VnUartPacket_parseQuaternionMagneticAccelerationAndAngularRatesRaw(char *packet, vec4f *quat, vec3f *mag, vec3f *accel, vec3f *gyro)
Parses a response from reading the Quaternion, Magnetic, Acceleration and Angular Rates register...
VnError VnUartPacket_genReadAsyncDataOutputFrequency(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Async Data Output Frequency register on a VectorNav sensor...
void VnUartPacket_parseInsBasicConfiguration(VnUartPacket *packet, uint8_t *scenario, uint8_t *ahrsAiding, uint8_t *estBaseline, uint8_t *resv2)
Parses a response from reading the INS Basic Configuration register.
VnError VnUartPacket_genReadBinaryOutput3(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Binary Output 3 register on a VectorNav sensor.
void VnUartPacket_parseMagneticMeasurementsRaw(char *packet, vec3f *mag)
Parses a response from reading the Magnetic Measurements register.
VnError VnUartPacket_genReadDeltaThetaAndDeltaVelocityConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Delta Theta and Delta Velocity Configuration register on a VectorNav ...
void VnUartPacket_parseMagneticAccelerationAndAngularRates(VnUartPacket *packet, vec3f *mag, vec3f *accel, vec3f *gyro)
Parses a response from reading the Magnetic, Acceleration and Angular Rates register.
void VnUartPacket_parseMagnetometerCalibrationControl(VnUartPacket *packet, uint8_t *hsiMode, uint8_t *hsiOutput, uint8_t *convergeRate)
Parses a response from reading the Magnetometer Calibration Control register.
VnError VnUartPacket_genReadAsyncDataOutputType(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Async Data Output Type register on a VectorNav sensor.
void VnUartPacket_parseVpeMagnetometerAdvancedTuning(VnUartPacket *packet, vec3f *minFiltering, vec3f *maxFiltering, float *maxAdaptRate, float *disturbanceWindow, float *maxTuning)
Parses a response from reading the VPE Magnetometer Advanced Tuning register.
VnError VnUartPacket_genWriteAsyncDataOutputFrequency(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t adof)
Generates a command to write to the Async Data Output Frequency register on a VectorNav sensor...
VnError VnUartPacket_genReadGyroCompensation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Gyro Compensation register on a VectorNav sensor. ...
void VnUartPacket_parseVpeBasicControlRaw(char *packet, uint8_t *enable, uint8_t *headingMode, uint8_t *filteringMode, uint8_t *tuningMode)
Parses a response from reading the VPE Basic Control register.
VnError VnUartPacket_genWriteGpsConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t mode, uint8_t ppsSource, uint8_t reserved1, uint8_t reserved2, uint8_t reserved3)
Generates a command to write to the GPS Configuration register on a VectorNav sensor.
VnError VnUartPacket_genReadInsSolutionEcef(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the INS Solution - ECEF register on a VectorNav sensor.
VnError VnUartPacket_genWriteVelocityCompensationMeasurement(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f velocity)
Generates a command to write to the Velocity Compensation Measurement register on a VectorNav sensor...
VnError VnUartPacket_genReadGpsCompassBaseline(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the GPS Compass Baseline register on a VectorNav sensor.
void VnUartPacket_parseAccelerationCompensationRaw(char *packet, mat3f *c, vec3f *b)
Parses a response from reading the Acceleration Compensation register.
void VnUartPacket_parseSerialBaudRateRaw(char *packet, uint32_t *baudrate)
Parses a response from reading the Serial Baud Rate register.
void VnUartPacket_parseCalculatedMagnetometerCalibration(VnUartPacket *packet, mat3f *c, vec3f *b)
Parses a response from reading the Calculated Magnetometer Calibration register.
void VnUartPacket_parseVelocityCompensationMeasurement(VnUartPacket *packet, vec3f *velocity)
Parses a response from reading the Velocity Compensation Measurement register.
void VnUartPacket_parseBinaryOutput(VnUartPacket *packet, uint16_t *asyncMode, uint16_t *rateDivisor, uint16_t *outputGroup, uint16_t *commonField, uint16_t *timeField, uint16_t *imuField, uint16_t *gpsField, uint16_t *attitudeField, uint16_t *insField)
Parses a response from reading any of the Binary Output registers.
void VnUartPacket_parseReferenceFrameRotation(VnUartPacket *packet, mat3f *c)
Parses a response from reading the Reference Frame Rotation register.
void VnUartPacket_parseFilterMeasurementsVarianceParametersRaw(char *packet, float *angularWalkVariance, vec3f *angularRateVariance, vec3f *magneticVariance, vec3f *accelerationVariance)
Parses a response from reading the Filter Measurements Variance Parameters register.
void VnUartPacket_parseVNMAR(VnUartPacket *packet, vec3f *magnetic, vec3f *acceleration, vec3f *angularRate)
Parses a VNMAR asynchronous packet.
uint8_t * data
Definition: upack.h:43
void VnUartPacket_parseVNISE(VnUartPacket *packet, vec3f *ypr, vec3d *position, vec3f *velocity, vec3f *acceleration, vec3f *angularRate)
Parse a VNISE asynchronous packet.
void VnUartPacket_parseVNDTV(VnUartPacket *packet, float *deltaTime, vec3f *deltaTheta, vec3f *deltaVelocity)
Parses a VNDTV asynchronous packet.
VnError VnUartPacket_genReadAngularRateMeasurements(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Angular Rate Measurements register on a VectorNav sensor...
void VnUartPacket_parseAngularRateMeasurementsRaw(char *packet, vec3f *gyro)
Parses a response from reading the Angular Rate Measurements register.
void VnUartPacket_parseUserTag(VnUartPacket *packet, char *tag)
Parses a response from reading the User Tag register.
void VnUartPacket_parseGyroCompensation(VnUartPacket *packet, mat3f *c, vec3f *b)
Parses a response from reading the Gyro Compensation register.
VnError VnUartPacket_genReadStartupFilterBiasEstimate(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Startup Filter Bias Estimate register on a VectorNav sensor...
void VnUartPacket_parseImuFilteringConfigurationRaw(char *packet, uint16_t *magWindowSize, uint16_t *accelWindowSize, uint16_t *gyroWindowSize, uint16_t *tempWindowSize, uint16_t *presWindowSize, uint8_t *magFilterMode, uint8_t *accelFilterMode, uint8_t *gyroFilterMode, uint8_t *tempFilterMode, uint8_t *presFilterMode)
Parses a response from reading the IMU Filtering Configuration register.
void VnUartPacket_parseQuaternionMagneticAccelerationAndAngularRates(VnUartPacket *packet, vec4f *quat, vec3f *mag, vec3f *accel, vec3f *gyro)
Parses a response from reading the Quaternion, Magnetic, Acceleration and Angular Rates register...
void VnUartPacket_parseSerialNumber(VnUartPacket *packet, uint32_t *serialNum)
Parses a response from reading the Serial Number register.
VnError VnUartPacket_genReadYawPitchRoll(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Yaw Pitch Roll register on a VectorNav sensor.
void VnUartPacket_parseHardwareRevisionRaw(char *packet, uint32_t *revision)
Parses a response from reading the Hardware Revision register.
VnError VnUartPacket_genWriteMagnetometerCompensation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, mat3f c, vec3f b)
Generates a command to write to the Magnetometer Compensation register on a VectorNav sensor...
VnError VnUartPacket_genCmdWriteSettings(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to write sensor settings to non-volitile memory.
VnError VnUartPacket_genReadInsStateEcef(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the INS State - ECEF register on a VectorNav sensor.
VnError VnUartPacket_genReadMagneticMeasurements(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Magnetic Measurements register on a VectorNav sensor.
void VnUartPacket_parseVNGPS(VnUartPacket *packet, double *time, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vec3d *lla, vec3f *nedVel, vec3f *nedAcc, float *speedAcc, float *timeAcc)
Parses a VNGPS asynchronous packet.
void VnUartPacket_parseSynchronizationStatusRaw(char *packet, uint32_t *syncInCount, uint32_t *syncInTime, uint32_t *syncOutCount)
Parses a response from reading the Synchronization Status register.
VnError VnUartPacket_genReadVelocityCompensationControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Velocity Compensation Control register on a VectorNav sensor...
void VnUartPacket_parseVpeBasicControl(VnUartPacket *packet, uint8_t *enable, uint8_t *headingMode, uint8_t *filteringMode, uint8_t *tuningMode)
Parses a response from reading the VPE Basic Control register.
void VnUartPacket_parseSerialBaudRate(VnUartPacket *packet, uint32_t *baudrate)
Parses a response from reading the Serial Baud Rate register.
void VnUartPacket_parseAngularRateMeasurements(VnUartPacket *packet, vec3f *gyro)
Parses a response from reading the Angular Rate Measurements register.
void VnUartPacket_parseFilterActiveTuningParameters(VnUartPacket *packet, float *magneticDisturbanceGain, float *accelerationDisturbanceGain, float *magneticDisturbanceMemory, float *accelerationDisturbanceMemory)
Parses a response from reading the Filter Active Tuning Parameters register.
VnError VnUartPacket_genWriteVpeBasicControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t enable, uint8_t headingMode, uint8_t filteringMode, uint8_t tuningMode)
Generates a command to write to the VPE Basic Control register on a VectorNav sensor.
void VnUartPacket_parseAsyncDataOutputFrequencyRaw(char *packet, uint32_t *adof)
Parses a response from reading the Async Data Output Frequency register.
void VnUartPacket_parseFilterStartupGyroBiasRaw(char *packet, vec3f *bias)
Parses a response from reading the Filter Startup Gyro Bias register.
void VnUartPacket_parseVNGPE(VnUartPacket *packet, double *tow, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vec3d *position, vec3f *velocity, vec3f *posAcc, float *speedAcc, float *timeAcc)
Parses a VNGPE asynchronous packet.
VnError VnUartPacket_genReadGpsAntennaOffset(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the GPS Antenna Offset register on a VectorNav sensor.
void VnUartPacket_parseVpeAccelerometerBasicTuningRaw(char *packet, vec3f *baseTuning, vec3f *adaptiveTuning, vec3f *adaptiveFiltering)
Parses a response from reading the VPE Accelerometer Basic Tuning register.
VnError VnUartPacket_genWriteVelocityCompensationControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t mode, float velocityTuning, float rateTuning)
Generates a command to write to the Velocity Compensation Control register on a VectorNav sensor...
void VnUartPacket_parseVpeAccelerometerAdvancedTuning(VnUartPacket *packet, vec3f *minFiltering, vec3f *maxFiltering, float *maxAdaptRate, float *disturbanceWindow, float *maxTuning)
Parses a response from reading the VPE Accelerometer Advanced Tuning register.
void VnUartPacket_parseAttitudeQuaternion(VnUartPacket *packet, vec4f *quat)
Parses a response from reading the Attitude Quaternion register.
void VnUartPacket_parseVNINE(VnUartPacket *packet, double *time, uint16_t *week, uint16_t *status, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, float *attUncertainty, float *posUncertainty, float *velUncertainty)
Parses a VNINE asynchronous packet.
void VnUartPacket_parseGpsCompassBaseline(VnUartPacket *packet, vec3f *position, vec3f *uncertainty)
Parses a response from reading the GPS Compass Baseline register.
void VnUartPacket_parseFilterStartupGyroBias(VnUartPacket *packet, vec3f *bias)
Parses a response from reading the Filter Startup Gyro Bias register.
VnError VnUartPacket_genWriteAsyncDataOutputTypeWithOptions(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t ador)
Generates a command to write to the Async Data Output Type register on a VectorNav sensor...
void VnUartPacket_parseFilterActiveTuningParametersRaw(char *packet, float *magneticDisturbanceGain, float *accelerationDisturbanceGain, float *magneticDisturbanceMemory, float *accelerationDisturbanceMemory)
Parses a response from reading the Filter Active Tuning Parameters register.
VnError VnUartPacket_genWriteReferenceVectorConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t useMagModel, uint8_t useGravityModel, uint8_t resv1, uint8_t resv2, uint32_t recalcThreshold, float year, vec3d position)
Generates a command to write to the Reference Vector Configuration register on a VectorNav sensor...
void VnUartPacket_parseMagneticAndGravityReferenceVectorsRaw(char *packet, vec3f *magRef, vec3f *accRef)
Parses a response from reading the Magnetic and Gravity Reference Vectors register.
void VnUartPacket_parseVelocityCompensationControl(VnUartPacket *packet, uint8_t *mode, float *velocityTuning, float *rateTuning)
Parses a response from reading the Velocity Compensation Control register.
void VnUartPacket_parseInsSolutionEcef(VnUartPacket *packet, double *time, uint16_t *week, uint16_t *status, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, float *attUncertainty, float *posUncertainty, float *velUncertainty)
Parses a response from reading the INS Solution - ECEF register.
VnError VnUartPacket_genWriteUserTag(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, char *tag)
Generates a command to write to the User Tag register on a VectorNav sensor.
void VnUartPacket_parseGpsSolutionEcefRaw(char *packet, double *tow, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vec3d *position, vec3f *velocity, vec3f *posAcc, float *speedAcc, float *timeAcc)
Parses a response from reading the GPS Solution - ECEF register.
void VnUartPacket_parseSynchronizationStatus(VnUartPacket *packet, uint32_t *syncInCount, uint32_t *syncInTime, uint32_t *syncOutCount)
Parses a response from reading the Synchronization Status register.
VnError VnUartPacket_genWriteAsyncDataOutputFrequencyWithOptions(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint32_t adof)
Generates a command to write to the Async Data Output Frequency register on a VectorNav sensor...
void VnUartPacket_parseAsyncDataOutputTypeRaw(char *packet, uint32_t *ador)
Parses a response from reading the Async Data Output Type register.
Represents a 4 component vector with an underlying data type of float.
Definition: vector.h:68
Represents a 3 component vector with an underlying data type of double.
Definition: vector.h:41
void VnUartPacket_parseVNYIA(VnUartPacket *packet, vec3f *yawPitchRoll, vec3f *accelerationInertial, vec3f *angularRate)
Parses a VNYIA asynchronous packet.
VnError VnUartPacket_genReadMagnetometerCalibrationControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Magnetometer Calibration Control register on a VectorNav sensor...
VnError VnUartPacket_genReadAccelerationCompensation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Acceleration Compensation register on a VectorNav sensor...
VnError VnUartPacket_genReadYawPitchRollTrueBodyAccelerationAndAngularRates(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates register o...
VnError VnUartPacket_genReadMagnetometerCompensation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Magnetometer Compensation register on a VectorNav sensor...
void VnUartPacket_parseReferenceVectorConfiguration(VnUartPacket *packet, uint8_t *useMagModel, uint8_t *useGravityModel, uint8_t *resv1, uint8_t *resv2, uint32_t *recalcThreshold, float *year, vec3d *position)
Parses a response from reading the Reference Vector Configuration register.
VnError VnUartPacket_genReadQuaternionMagneticAccelerationAndAngularRates(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Quaternion, Magnetic, Acceleration and Angular Rates register on a Ve...
VnError VnUartPacket_genWriteGpsCompassBaseline(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f position, vec3f uncertainty)
Generates a command to write to the GPS Compass Baseline register on a VectorNav sensor.
void VnUartPacket_parseInsSolutionLla(VnUartPacket *packet, double *time, uint16_t *week, uint16_t *status, vec3f *yawPitchRoll, vec3d *position, vec3f *nedVel, float *attUncertainty, float *posUncertainty, float *velUncertainty)
Parses a response from reading the INS Solution - LLA register.
VnError VnUartPacket_genWriteMagneticAndGravityReferenceVectors(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f magRef, vec3f accRef)
Generates a command to write to the Magnetic and Gravity Reference Vectors register on a VectorNav se...
void VnUartPacket_parseYawPitchRollMagneticAccelerationAndAngularRates(VnUartPacket *packet, vec3f *yawPitchRoll, vec3f *mag, vec3f *accel, vec3f *gyro)
Parses a response from reading the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates registe...
VnError VnUartPacket_genReadVpeBasicControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the VPE Basic Control register on a VectorNav sensor. ...
void VnUartPacket_parseInsStateLlaRaw(char *packet, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, vec3f *accel, vec3f *angularRate)
Parses a response from reading the INS State - LLA register.
void VnUartPacket_parseIndoorHeadingModeControlRaw(char *packet, float *maxRateError, uint8_t *reserved1)
Parses a response from reading the Indoor Heading Mode Control register.
void VnUartPacket_parseFilterBasicControl(VnUartPacket *packet, uint8_t *magMode, uint8_t *extMagMode, uint8_t *extAccMode, uint8_t *extGyroMode, vec3f *gyroLimit)
Parses a response from reading the Filter Basic Control register.
VnError VnUartPacket_genReadYawPitchRollMagneticAccelerationAndAngularRates(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates register o...
void VnUartPacket_parseYawPitchRollMagneticAccelerationAndAngularRatesRaw(char *packet, vec3f *yawPitchRoll, vec3f *mag, vec3f *accel, vec3f *gyro)
Parses a response from reading the Yaw, Pitch, Roll, Magnetic, Acceleration and Angular Rates registe...
VnError VnUartPacket_genReadBinaryOutput1(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Binary Output 1 register on a VectorNav sensor.
void VnUartPacket_parseReferenceFrameRotationRaw(char *packet, mat3f *c)
Parses a response from reading the Reference Frame Rotation register.
VnError VnUartPacket_genReadImuMeasurements(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the IMU Measurements register on a VectorNav sensor.
void VnUartPacket_parseGpsCompassEstimatedBaselineRaw(char *packet, uint8_t *estBaselineUsed, uint8_t *resv, uint16_t *numMeas, vec3f *position, vec3f *uncertainty)
Parses a response from reading the GPS Compass Estimated Baseline register.
void VnUartPacket_parseVelocityCompensationControlRaw(char *packet, uint8_t *mode, float *velocityTuning, float *rateTuning)
Parses a response from reading the Velocity Compensation Control register.
void VnUartPacket_parseYawPitchRollTrueBodyAccelerationAndAngularRates(VnUartPacket *packet, vec3f *yawPitchRoll, vec3f *bodyAccel, vec3f *gyro)
Parses a response from reading the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates registe...
VnError VnUartPacket_genReadVpeAccelerometerBasicTuning(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the VPE Accelerometer Basic Tuning register on a VectorNav sensor...
VnError VnUartPacket_genReadSynchronizationStatus(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Synchronization Status register on a VectorNav sensor.
VnError VnUartPacket_genReadGpsConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the GPS Configuration register on a VectorNav sensor. ...
void VnUartPacket_parseVNACC(VnUartPacket *packet, vec3f *acceleration)
Parses a VNACC asynchronous packet.
void VnUartPacket_parseYawPitchRollTrueBodyAccelerationAndAngularRatesRaw(char *packet, vec3f *yawPitchRoll, vec3f *bodyAccel, vec3f *gyro)
Parses a response from reading the Yaw, Pitch, Roll, True Body Acceleration and Angular Rates registe...
void VnUartPacket_parseGpsAntennaOffset(VnUartPacket *packet, vec3f *position)
Parses a response from reading the GPS Antenna Offset register.
void VnUartPacket_parseGpsSolutionLla(VnUartPacket *packet, double *time, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vec3d *lla, vec3f *nedVel, vec3f *nedAcc, float *speedAcc, float *timeAcc)
Parses a response from reading the GPS Solution - LLA register.
VnError VnUartPacket_genCmdKnownAccelerationDisturbance(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, bool disturbancePresent, size_t *cmdSize)
Generates a command to alert the sensor of a known acceleration disturbance.
VnError VnUartPacket_genCmdReset(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to reset the sensor.
void VnUartPacket_parseBinaryOutputRaw(uint8_t *packet, uint16_t *asyncMode, uint16_t *rateDivisor, uint16_t *outputGroup, uint16_t *commonField, uint16_t *timeField, uint16_t *imuField, uint16_t *gpsField, uint16_t *attitudeField, uint16_t *insField)
Parses a response from reading any of the Binary Output registers.
void VnUartPacket_parseAsyncDataOutputFrequency(VnUartPacket *packet, uint32_t *adof)
Parses a response from reading the Async Data Output Frequency register.
void VnUartPacket_parseMagneticAccelerationAndAngularRatesRaw(char *packet, vec3f *mag, vec3f *accel, vec3f *gyro)
Parses a response from reading the Magnetic, Acceleration and Angular Rates register.
void VnUartPacket_parseMagnetometerCalibrationControlRaw(char *packet, uint8_t *hsiMode, uint8_t *hsiOutput, uint8_t *convergeRate)
Parses a response from reading the Magnetometer Calibration Control register.
void VnUartPacket_parseSynchronizationControl(VnUartPacket *packet, uint8_t *syncInMode, uint8_t *syncInEdge, uint16_t *syncInSkipFactor, uint32_t *reserved1, uint8_t *syncOutMode, uint8_t *syncOutPolarity, uint16_t *syncOutSkipFactor, uint32_t *syncOutPulseWidth, uint32_t *reserved2)
Parses a response from reading the Synchronization Control register.
VnError VnUartPacket_genWriteBinaryOutput3(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint16_t asyncMode, uint16_t rateDivisor, uint16_t commonField, uint16_t timeField, uint16_t imuField, uint16_t gpsField, uint16_t attitudeField, uint16_t insField)
Generates a command to write to the Binary Output 3 register.
VnError VnUartPacket_genWriteVpeMagnetometerBasicTuning(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f baseTuning, vec3f adaptiveTuning, vec3f adaptiveFiltering)
Generates a command to write to the VPE Magnetometer Basic Tuning register on a VectorNav sensor...
VnError VnUartPacket_genReadSynchronizationControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Synchronization Control register on a VectorNav sensor.
void VnUartPacket_parseYawPitchRoll(VnUartPacket *packet, vec3f *yawPitchRoll)
Parses a response from reading the Yaw Pitch Roll register.
VnError VnUartPacket_genReadInsStateLla(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the INS State - LLA register on a VectorNav sensor.
void VnUartPacket_parseYawPitchRollTrueInertialAccelerationAndAngularRates(VnUartPacket *packet, vec3f *yawPitchRoll, vec3f *inertialAccel, vec3f *gyro)
Parses a response from reading the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates reg...
void VnUartPacket_parseFirmwareVersionRaw(char *packet, char *firmwareVersion)
Parses a response from reading the Firmware Version register.
VnError VnUartPacket_genWriteBinaryOutput2(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint16_t asyncMode, uint16_t rateDivisor, uint16_t commonField, uint16_t timeField, uint16_t imuField, uint16_t gpsField, uint16_t attitudeField, uint16_t insField)
Generates a command to write to the Binary Output 2 register.
void VnUartPacket_parseVpeAccelerometerBasicTuning(VnUartPacket *packet, vec3f *baseTuning, vec3f *adaptiveTuning, vec3f *adaptiveFiltering)
Parses a response from reading the VPE Accelerometer Basic Tuning register.
void VnUartPacket_parseInsSolutionEcefRaw(char *packet, double *time, uint16_t *week, uint16_t *status, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, float *attUncertainty, float *posUncertainty, float *velUncertainty)
Parses a response from reading the INS Solution - ECEF register.
VnError VnUartPacket_genReadHardwareRevision(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Hardware Revision register on a VectorNav sensor. ...
void VnUartPacket_parseCalculatedMagnetometerCalibrationRaw(char *packet, mat3f *c, vec3f *b)
Parses a response from reading the Calculated Magnetometer Calibration register.
void VnUartPacket_parseInsSolutionLlaRaw(char *packet, double *time, uint16_t *week, uint16_t *status, vec3f *yawPitchRoll, vec3d *position, vec3f *nedVel, float *attUncertainty, float *posUncertainty, float *velUncertainty)
Parses a response from reading the INS Solution - LLA register.
void VnUartPacket_parseInsAdvancedConfiguration(VnUartPacket *packet, uint8_t *useMag, uint8_t *usePres, uint8_t *posAtt, uint8_t *velAtt, uint8_t *velBias, uint8_t *useFoam, uint8_t *gpsCovType, uint8_t *velCount, float *velInit, float *moveOrigin, float *gpsTimeout, float *deltaLimitPos, float *deltaLimitVel, float *minPosUncertainty, float *minVelUncertainty)
Parses a response from reading the INS Advanced Configuration register.
VnError VnUartPacket_genReadYawPitchRollTrueInertialAccelerationAndAngularRates(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates regist...
void VnUartPacket_parseVpeMagnetometerBasicTuningRaw(char *packet, vec3f *baseTuning, vec3f *adaptiveTuning, vec3f *adaptiveFiltering)
Parses a response from reading the VPE Magnetometer Basic Tuning register.
VnError VnUartPacket_genReadCommunicationProtocolControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Communication Protocol Control register on a VectorNav sensor...
void VnUartPacket_parseImuRateConfiguration(VnUartPacket *packet, uint16_t *imuRate, uint16_t *navDivisor, float *filterTargetRate, float *filterMinRate)
Parses a response from reading the IMU Rate Configuration register.
VnError VnUartPacket_genReadGpsSolutionLla(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the GPS Solution - LLA register on a VectorNav sensor.
void VnUartPacket_parseVNQTN(VnUartPacket *packet, vec4f *quaternion)
Parses a VNQTN asynchronous packet.
void VnUartPacket_parseVelocityCompensationStatusRaw(char *packet, float *x, float *xDot, vec3f *accelOffset, vec3f *omega)
Parses a response from reading the Velocity Compensation Status register.
void VnUartPacket_parseDeltaThetaAndDeltaVelocityConfiguration(VnUartPacket *packet, uint8_t *integrationFrame, uint8_t *gyroCompensation, uint8_t *accelCompensation, uint8_t *reserved1, uint16_t *reserved2)
Parses a response from reading the Delta Theta and Delta Velocity Configuration register.
VnError VnUartPacket_genReadAttitudeQuaternion(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Attitude Quaternion register on a VectorNav sensor.
void VnUartPacket_parseGpsCompassBaselineRaw(char *packet, vec3f *position, vec3f *uncertainty)
Parses a response from reading the GPS Compass Baseline register.
void VnUartPacket_parseInsAdvancedConfigurationRaw(char *packet, uint8_t *useMag, uint8_t *usePres, uint8_t *posAtt, uint8_t *velAtt, uint8_t *velBias, uint8_t *useFoam, uint8_t *gpsCovType, uint8_t *velCount, float *velInit, float *moveOrigin, float *gpsTimeout, float *deltaLimitPos, float *deltaLimitVel, float *minPosUncertainty, float *minVelUncertainty)
Parses a response from reading the INS Advanced Configuration register.
void VnUartPacket_parseImuRateConfigurationRaw(char *packet, uint16_t *imuRate, uint16_t *navDivisor, float *filterTargetRate, float *filterMinRate)
Parses a response from reading the IMU Rate Configuration register.
VnError VnUartPacket_genReadVelocityCompensationMeasurement(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Velocity Compensation Measurement register on a VectorNav sensor...
void VnUartPacket_parseGpsCompassEstimatedBaseline(VnUartPacket *packet, uint8_t *estBaselineUsed, uint8_t *resv, uint16_t *numMeas, vec3f *position, vec3f *uncertainty)
Parses a response from reading the GPS Compass Estimated Baseline register.
VnError VnUartPacket_genWriteGyroCompensation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, mat3f c, vec3f b)
Generates a command to write to the Gyro Compensation register on a VectorNav sensor.
void VnUartPacket_parseMagneticAndGravityReferenceVectors(VnUartPacket *packet, vec3f *magRef, vec3f *accRef)
Parses a response from reading the Magnetic and Gravity Reference Vectors register.
void VnUartPacket_parseVNQMR(VnUartPacket *packet, vec4f *quaternion, vec3f *magnetic, vec3f *acceleration, vec3f *angularRate)
Parses a VNQMR asynchronous packet.
VnError VnUartPacket_genCmdRestoreFactorySettings(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to restore the sensor to factory settings.
void VnUartPacket_parseVNYPR(VnUartPacket *packet, vec3f *yawPitchRoll)
Parses a VNYPR asynchronous packet.
void VnUartPacket_parseImuFilteringConfiguration(VnUartPacket *packet, uint16_t *magWindowSize, uint16_t *accelWindowSize, uint16_t *gyroWindowSize, uint16_t *tempWindowSize, uint16_t *presWindowSize, uint8_t *magFilterMode, uint8_t *accelFilterMode, uint8_t *gyroFilterMode, uint8_t *tempFilterMode, uint8_t *presFilterMode)
Parses a response from reading the IMU Filtering Configuration register.
void VnUartPacket_parseVNISL(VnUartPacket *packet, vec3f *ypr, vec3d *lla, vec3f *velocity, vec3f *acceleration, vec3f *angularRate)
Parse a VNISL asynchronous packet.
VnError VnUartPacket_genCmdSetGyroBias(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to set the gyro bias.
VnError VnUartPacket_genReadSerialBaudRate(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Serial Baud Rate register on a VectorNav sensor.
VnError VnUartPacket_genWriteImuFilteringConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint16_t magWindowSize, uint16_t accelWindowSize, uint16_t gyroWindowSize, uint16_t tempWindowSize, uint16_t presWindowSize, uint8_t magFilterMode, uint8_t accelFilterMode, uint8_t gyroFilterMode, uint8_t tempFilterMode, uint8_t presFilterMode)
Generates a command to write to the IMU Filtering Configuration register on a VectorNav sensor...
VnError VnUartPacket_genWriteReferenceFrameRotation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, mat3f c)
Generates a command to write to the Reference Frame Rotation register on a VectorNav sensor...
VnError VnUartPacket_genCmdKnownMagneticDisturbance(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, bool disturbancePresent, size_t *cmdSize)
Generates a command to alert the sensor of a known magnetic disturbance.
void VnUartPacket_parseVNMAG(VnUartPacket *packet, vec3f *magnetic)
Parses a VNMAG asynchronous packet.
VnError VnUartPacket_genReadFirmwareVersion(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Firmware Version register on a VectorNav sensor.
void VnUartPacket_parseVNIMU(VnUartPacket *packet, vec3f *magneticUncompensated, vec3f *accelerationUncompensated, vec3f *angularRateUncompensated, float *temperature, float *pressure)
Parses a VNIMU asynchronous packet.
VnError VnUartPacket_genReadDeltaThetaAndDeltaVelocity(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Delta Theta and Delta Velocity register on a VectorNav sensor...
void VnUartPacket_parseStartupFilterBiasEstimateRaw(char *packet, vec3f *gyroBias, vec3f *accelBias, float *pressureBias)
Parses a response from reading the Startup Filter Bias Estimate register.
VnError VnUartPacket_genReadUserTag(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the User Tag register on a VectorNav sensor.
void VnUartPacket_parseVpeAccelerometerAdvancedTuningRaw(char *packet, vec3f *minFiltering, vec3f *maxFiltering, float *maxAdaptRate, float *disturbanceWindow, float *maxTuning)
Parses a response from reading the VPE Accelerometer Advanced Tuning register.
void VnUartPacket_parseImuMeasurements(VnUartPacket *packet, vec3f *mag, vec3f *accel, vec3f *gyro, float *temp, float *pressure)
Parses a response from reading the IMU Measurements register.
Represents a 3x3 matrix with an underlying data type of float.
Definition: matrix.h:11
void VnUartPacket_parseAccelerationMeasurementsRaw(char *packet, vec3f *accel)
Parses a response from reading the Acceleration Measurements register.
void VnUartPacket_parseAccelerationMeasurements(VnUartPacket *packet, vec3f *accel)
Parses a response from reading the Acceleration Measurements register.
VnError VnUartPacket_genWriteCommunicationProtocolControl(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint8_t serialCount, uint8_t serialStatus, uint8_t spiCount, uint8_t spiStatus, uint8_t serialChecksum, uint8_t spiChecksum, uint8_t errorMode)
Generates a command to write to the Communication Protocol Control register on a VectorNav sensor...
void VnUartPacket_parseFirmwareVersion(VnUartPacket *packet, char *firmwareVersion)
Parses a response from reading the Firmware Version register.
void VnUartPacket_parseYawPitchRollTrueInertialAccelerationAndAngularRatesRaw(char *packet, vec3f *yawPitchRoll, vec3f *inertialAccel, vec3f *gyro)
Parses a response from reading the Yaw, Pitch, Roll, True Inertial Acceleration and Angular Rates reg...
VnError VnUartPacket_genReadGpsCompassEstimatedBaseline(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the GPS Compass Estimated Baseline register on a VectorNav sensor...
VnError VnUartPacket_genReadInsBasicConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the INS Basic Configuration register on a VectorNav sensor.
VnError VnUartPacket_genReadReferenceVectorConfiguration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Reference Vector Configuration register on a VectorNav sensor...
void VnUartPacket_parseMagnetometerCompensationRaw(char *packet, mat3f *c, vec3f *b)
Parses a response from reading the Magnetometer Compensation register.
void VnUartPacket_parseGpsSolutionEcef(VnUartPacket *packet, double *tow, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vec3d *position, vec3f *velocity, vec3f *posAcc, float *speedAcc, float *timeAcc)
Parses a response from reading the GPS Solution - ECEF register.
VnError VnUartPacket_genWriteStartupFilterBiasEstimate(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f gyroBias, vec3f accelBias, float pressureBias)
Generates a command to write to the Startup Filter Bias Estimate register on a VectorNav sensor...
VnError VnUartPacket_genWriteAccelerationCompensation(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, mat3f c, vec3f b)
Generates a command to write to the Acceleration Compensation register on a VectorNav sensor...
void VnUartPacket_parseMagneticMeasurements(VnUartPacket *packet, vec3f *mag)
Parses a response from reading the Magnetic Measurements register.
VnError VnUartPacket_genReadVpeMagnetometerBasicTuning(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the VPE Magnetometer Basic Tuning register on a VectorNav sensor...
void VnUartPacket_parseYawPitchRollRaw(char *packet, vec3f *yawPitchRoll)
Parses a response from reading the Yaw Pitch Roll register.
void VnUartPacket_parseGpsSolutionLlaRaw(char *packet, double *time, uint16_t *week, uint8_t *gpsFix, uint8_t *numSats, vec3d *lla, vec3f *nedVel, vec3f *nedAcc, float *speedAcc, float *timeAcc)
Parses a response from reading the GPS Solution - LLA register.
VnError VnUartPacket_genReadSerialNumber(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Serial Number register on a VectorNav sensor.
void VnUartPacket_parseVNYBA(VnUartPacket *packet, vec3f *yawPitchRoll, vec3f *accelerationBody, vec3f *angularRate)
Parses a VNYMR asynchronous packet.
VnError VnUartPacket_genReadCalculatedMagnetometerCalibration(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Calculated Magnetometer Calibration register on a VectorNav sensor...
void VnUartPacket_parseModelNumberRaw(char *packet, char *productName)
Parses a response from reading the Model Number register.
void VnUartPacket_parseFilterMeasurementsVarianceParameters(VnUartPacket *packet, float *angularWalkVariance, vec3f *angularRateVariance, vec3f *magneticVariance, vec3f *accelerationVariance)
Parses a response from reading the Filter Measurements Variance Parameters register.
void VnUartPacket_parseGyroCompensationRaw(char *packet, mat3f *c, vec3f *b)
Parses a response from reading the Gyro Compensation register.
void VnUartPacket_parseVelocityCompensationMeasurementRaw(char *packet, vec3f *velocity)
Parses a response from reading the Velocity Compensation Measurement register.
void VnUartPacket_parseAttitudeQuaternionRaw(char *packet, vec4f *quat)
Parses a response from reading the Attitude Quaternion register.
void VnUartPacket_parseStartupFilterBiasEstimate(VnUartPacket *packet, vec3f *gyroBias, vec3f *accelBias, float *pressureBias)
Parses a response from reading the Startup Filter Bias Estimate register.
VnError VnUartPacket_genReadMagneticAndGravityReferenceVectors(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Magnetic and Gravity Reference Vectors register on a VectorNav sensor...
void VnUartPacket_parseInsStateEcefRaw(char *packet, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, vec3f *accel, vec3f *angularRate)
Parses a response from reading the INS State - ECEF register.
Various vector types and operations.
Definition: vector.h:14
void VnUartPacket_parseError(VnUartPacket *packet, uint8_t *error)
Parses an error packet to get the error type.
void VnUartPacket_parseDeltaThetaAndDeltaVelocityRaw(char *packet, float *deltaTime, vec3f *deltaTheta, vec3f *deltaVelocity)
Parses a response from reading the Delta Theta and Delta Velocity register.
void VnUartPacket_parseVpeGyroBasicTuningRaw(char *packet, vec3f *angularWalkVariance, vec3f *baseTuning, vec3f *adaptiveTuning)
Parses a response from reading the VPE Gyro Basic Tuning register.
void VnUartPacket_parseVpeMagnetometerAdvancedTuningRaw(char *packet, vec3f *minFiltering, vec3f *maxFiltering, float *maxAdaptRate, float *disturbanceWindow, float *maxTuning)
Parses a response from reading the VPE Magnetometer Advanced Tuning register.
void VnUartPacket_parseInsStateEcef(VnUartPacket *packet, vec3f *yawPitchRoll, vec3d *position, vec3f *velocity, vec3f *accel, vec3f *angularRate)
Parses a response from reading the INS State - ECEF register.
size_t curExtractLoc
Definition: upack.h:37
VnError VnUartPacket_genReadGpsSolutionEcef(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the GPS Solution - ECEF register on a VectorNav sensor.
void VnUartPacket_parseCommunicationProtocolControl(VnUartPacket *packet, uint8_t *serialCount, uint8_t *serialStatus, uint8_t *spiCount, uint8_t *spiStatus, uint8_t *serialChecksum, uint8_t *spiChecksum, uint8_t *errorMode)
Parses a response from reading the Communication Protocol Control register.
void VnUartPacket_parseHardwareRevision(VnUartPacket *packet, uint32_t *revision)
Parses a response from reading the Hardware Revision register.
void VnUartPacket_parseDeltaThetaAndDeltaVelocityConfigurationRaw(char *packet, uint8_t *integrationFrame, uint8_t *gyroCompensation, uint8_t *accelCompensation, uint8_t *reserved1, uint16_t *reserved2)
Parses a response from reading the Delta Theta and Delta Velocity Configuration register.
void VnUartPacket_parseSerialNumberRaw(char *packet, uint32_t *serialNum)
Parses a response from reading the Serial Number register.
void VnUartPacket_parseMagnetometerCompensation(VnUartPacket *packet, mat3f *c, vec3f *b)
Parses a response from reading the Magnetometer Compensation register.
void VnUartPacket_parseVNINS(VnUartPacket *packet, double *time, uint16_t *week, uint16_t *status, vec3f *yawPitchRoll, vec3d *lla, vec3f *nedVel, float *attUncertainty, float *posUncertainty, float *velUncertainty)
Parses a VNINS asynchronous packet.
VnError VnUartPacket_genWriteBinaryOutput1(uint8_t *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, uint16_t asyncMode, uint16_t rateDivisor, uint16_t commonField, uint16_t timeField, uint16_t imuField, uint16_t gpsField, uint16_t attitudeField, uint16_t insField)
Generates a command to write to the Binary Output 1 register.
VnError VnUartPacket_genReadModelNumber(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize)
Generates a command to read the Model Number register on a VectorNav sensor.
VnError VnUartPacket_genWriteGpsAntennaOffset(char *buffer, size_t bufferSize, VnErrorDetectionMode errorDetectionMode, size_t *cmdSize, vec3f position)
Generates a command to write to the GPS Antenna Offset register on a VectorNav sensor.
size_t length
Definition: upack.h:40
void VnUartPacket_parseVpeMagnetometerBasicTuning(VnUartPacket *packet, vec3f *baseTuning, vec3f *adaptiveTuning, vec3f *adaptiveFiltering)
Parses a response from reading the VPE Magnetometer Basic Tuning register.
void VnUartPacket_parseModelNumber(VnUartPacket *packet, char *productName)
Parses a response from reading the Model Number register.