compositedata.h
#ifndef _VNCOMPOSITEDATA_H_
#define _VNCOMPOSITEDATA_H_
#include "vn/bool.h"
#include "vn/xplat/criticalsection.h"
#include "vn/enum.h"
#include "vn/int.h"
#include "vn/math/vector.h"
#include "vn/math/matrix.h"
#include "vn/protocol/upack.h"
#include "vn/math/vector.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#pragma warning(push)
#pragma warning(disable : 4820)
#endif
typedef struct
{
vec3f yawPitchRoll;
vec4f quaternion;
mat3f directionCosineMatrix;
vec3d positionGpsLla;
vec3d positionGpsEcef;
vec3d positionEstimatedLla;
vec3d positionEstimatedEcef;
VelocityType velocityType;
vec3f velocityGpsNed;
vec3f velocityGpsEcef;
vec3f velocityEstimatedBody;
vec3f velocityEstimatedNed;
vec3f velocityEstimatedEcef;
vec3f magnetic;
vec3f magneticUncompensated;
vec3f magneticNed;
vec3f magneticEcef;
#ifdef EXTRA
vec3f magneticRaw;
#endif
vec3f acceleration;
vec3f accelerationUncompensated;
vec3f accelerationNed;
vec3f accelerationEcef;
vec3f accelerationLinearBody;
vec3f accelerationLinearNed;
vec3f accelerationLinearEcef;
#ifdef EXTRA
vec3f accelerationRaw;
#endif
vec3f angularRate;
vec3f angularRateUncompensated;
#ifdef EXTRA
vec3f angularRateRaw;
#endif
float temperature;
#ifdef EXTRA
float temperatureRaw;
#endif
float pressure;
uint64_t timeStartup;
float deltaTime;
vec3f deltaTheta;
vec3f deltaVelocity;
double tow;
uint16_t week;
uint8_t gpsFix;
uint8_t numSats;
uint64_t timeGps;
uint64_t timeGpsPps;
uint64_t gpsTow;
vec3f attitudeUncertainty;
vec3f positionUncertaintyGpsNed;
vec3f positionUncertaintyGpsEcef;
float positionUncertaintyEstimated;
float velocityUncertaintyGps;
float velocityUncertaintyEstimated;
uint32_t timeUncertainty;
uint16_t vpeStatus;
uint16_t insStatus;
uint64_t timeSyncIn;
uint32_t syncInCnt;
uint16_t sensSat;
#ifdef EXTRA
vec3f yprRates;
#endif
} VnCompositeData;
#ifdef _WIN32
#pragma warning(pop)
#endif
bool VnCompositeData_hasCourseOverGround(VnCompositeData* compositeData);
bool VnCompositeData_courseOverGround(VnCompositeData* compositeData, float* courseOverGroundOut);
bool VnCompositeData_hasSpeedOverGround(VnCompositeData* compositeData);
bool VnCompositeData_speedOverGround(VnCompositeData* compositeData, float* speedOverGroundOut);
void VnCompositeData_initialize(VnCompositeData* compositeData);
void VnCompositeData_processBinaryPacket(VnCompositeData* compositeData, VnUartPacket* packet, VnCriticalSection* criticalSection);
void VnCompositeData_processAsciiAsyncPacket(VnCompositeData* compositeData, VnUartPacket* packet, VnCriticalSection* criticalSection);
void VnCompositeData_processBinaryPacketCommonGroup(
VnCompositeData* compositeData,
VnUartPacket* packet,
CommonGroup groupFlags);
void VnCompositeData_processBinaryPacketTimeGroup(
VnCompositeData* compositeData,
VnUartPacket* packet,
TimeGroup groupFlags);
void VnCompositeData_processBinaryPacketImuGroup(
VnCompositeData* compositeData,
VnUartPacket* packet,
ImuGroup groupFlags);
void VnCompositeData_processBinaryPacketGpsGroup(
VnCompositeData* compositeData,
VnUartPacket* packet,
GpsGroup groupFlags);
void VnCompositeData_processBinaryPacketAttitudeGroup(
VnCompositeData* compositeData,
VnUartPacket* packet,
AttitudeGroup groupFlags);
void VnCompositeData_processBinaryPacketInsGroup(
VnCompositeData* compositeData,
VnUartPacket* packet,
InsGroup groupFlags);
#ifdef __cplusplus
}
#endif
#endif
VnCompositeData::deltaTime
float deltaTime
Definition: compositedata.h:66
VnCompositeData::attitudeUncertainty
vec3f attitudeUncertainty
Definition: compositedata.h:76
VnCompositeData::velocityEstimatedNed
vec3f velocityEstimatedNed
Definition: compositedata.h:36
VnCompositeData::accelerationLinearNed
vec3f accelerationLinearNed
Definition: compositedata.h:50
VnCompositeData::directionCosineMatrix
mat3f directionCosineMatrix
Definition: compositedata.h:27
VnCompositeData::deltaVelocity
vec3f deltaVelocity
Definition: compositedata.h:68
VnCompositeData::angularRate
vec3f angularRate
Definition: compositedata.h:55
VnCompositeData::numSats
uint8_t numSats
Definition: compositedata.h:72
VnCompositeData::quaternion
vec4f quaternion
Definition: compositedata.h:26
VnUartPacket
Structure representing a UART packet received from a VectorNav sensor.
Definition: upack.h:34
VnCompositeData::positionUncertaintyEstimated
float positionUncertaintyEstimated
Definition: compositedata.h:79
VnCompositeData::yawPitchRoll
vec3f yawPitchRoll
Definition: compositedata.h:25
VnCompositeData::insStatus
uint16_t insStatus
Definition: compositedata.h:84
VnCompositeData::timeUncertainty
uint32_t timeUncertainty
Definition: compositedata.h:82
VnCompositeData::accelerationUncompensated
vec3f accelerationUncompensated
Definition: compositedata.h:46
VnCompositeData::week
uint16_t week
Definition: compositedata.h:70
VnCompositeData::velocityUncertaintyGps
float velocityUncertaintyGps
Definition: compositedata.h:80
VnCompositeData::gpsTow
uint64_t gpsTow
Definition: compositedata.h:75
VnCompositeData::accelerationLinearEcef
vec3f accelerationLinearEcef
Definition: compositedata.h:51
VnCompositeData::positionEstimatedEcef
vec3d positionEstimatedEcef
Definition: compositedata.h:31
VnCompositeData::velocityUncertaintyEstimated
float velocityUncertaintyEstimated
Definition: compositedata.h:81
VnCompositeData::timeStartup
uint64_t timeStartup
Definition: compositedata.h:65
VnCompositeData::magneticUncompensated
vec3f magneticUncompensated
Definition: compositedata.h:39
VnCompositeData::temperature
float temperature
Definition: compositedata.h:60
vec4f
Represents a 4 component vector with an underlying data type of float.
Definition: vector.h:68
vec3d
Represents a 3 component vector with an underlying data type of double.
Definition: vector.h:41
VnCompositeData::magneticNed
vec3f magneticNed
Definition: compositedata.h:40
VnCompositeData::positionGpsEcef
vec3d positionGpsEcef
Definition: compositedata.h:29
VnCompositeData::positionUncertaintyGpsNed
vec3f positionUncertaintyGpsNed
Definition: compositedata.h:77
VnCompositeData::gpsFix
uint8_t gpsFix
Definition: compositedata.h:71
VnCompositeData::timeGpsPps
uint64_t timeGpsPps
Definition: compositedata.h:74
VnCompositeData::deltaTheta
vec3f deltaTheta
Definition: compositedata.h:67
VnCompositeData::magnetic
vec3f magnetic
Definition: compositedata.h:38
VnCompositeData::positionUncertaintyGpsEcef
vec3f positionUncertaintyGpsEcef
Definition: compositedata.h:78
criticalsection.h
VnCriticalSection
Definition: criticalsection.h:38
VnCompositeData::accelerationNed
vec3f accelerationNed
Definition: compositedata.h:47
VnCompositeData
Composite structure of all available data types from VectorNav sensors.
Definition: compositedata.h:23
VnCompositeData::sensSat
uint16_t sensSat
Definition: compositedata.h:87
VnCompositeData::accelerationLinearBody
vec3f accelerationLinearBody
Definition: compositedata.h:49
VnCompositeData::angularRateUncompensated
vec3f angularRateUncompensated
Definition: compositedata.h:56
VnCompositeData::velocityType
VelocityType velocityType
Definition: compositedata.h:32
mat3f
Represents a 3x3 matrix with an underlying data type of float.
Definition: matrix.h:11
VnCompositeData::acceleration
vec3f acceleration
Definition: compositedata.h:45
VnCompositeData::positionGpsLla
vec3d positionGpsLla
Definition: compositedata.h:28
VnCompositeData::velocityEstimatedEcef
vec3f velocityEstimatedEcef
Definition: compositedata.h:37
VnCompositeData::tow
double tow
Definition: compositedata.h:69
VnCompositeData::velocityEstimatedBody
vec3f velocityEstimatedBody
Definition: compositedata.h:35
VnCompositeData::timeGps
uint64_t timeGps
Definition: compositedata.h:73
VnCompositeData::velocityGpsEcef
vec3f velocityGpsEcef
Definition: compositedata.h:34
vec3f
Various vector types and operations.
Definition: vector.h:14
VnCompositeData::vpeStatus
uint16_t vpeStatus
Definition: compositedata.h:83
VnCompositeData::syncInCnt
uint32_t syncInCnt
Definition: compositedata.h:86
VnCompositeData::velocityGpsNed
vec3f velocityGpsNed
Definition: compositedata.h:33
VnCompositeData::positionEstimatedLla
vec3d positionEstimatedLla
Definition: compositedata.h:30
VnCompositeData::magneticEcef
vec3f magneticEcef
Definition: compositedata.h:41
VnCompositeData::timeSyncIn
uint64_t timeSyncIn
Definition: compositedata.h:85
VnCompositeData::accelerationEcef
vec3f accelerationEcef
Definition: compositedata.h:48
VnCompositeData::pressure
float pressure
Definition: compositedata.h:64