# VectorNav C++ Library: include/vn/compositedata.h Source File

compositedata.h
#ifndef _VNSENSORS_COMPOSITEDATA_H_
#define _VNSENSORS_COMPOSITEDATA_H_
#include <vector>
#include "vn/export.h"
#include "vn/packet.h"
#include "vn/attitude.h"
#include "vn/position.h"
namespace vn {
namespace sensors {
class vn_proglib_DLLEXPORT CompositeData
{
public:
CompositeData();
CompositeData(const CompositeData& cd);
~CompositeData();
CompositeData& operator=(const CompositeData& RHS);
static CompositeData parse(protocol::uart::Packet& p);
static void parse(protocol::uart::Packet& p, CompositeData& o);
static void parse(protocol::uart::Packet& p, std::vector<CompositeData*>& o);
void reset();
bool hasAnyAttitude();
math::AttitudeF anyAttitude();
bool hasYawPitchRoll();
math::vec3f yawPitchRoll();
bool hasQuaternion();
math::vec4f quaternion();
bool hasDirectionCosineMatrix();
math::mat3f directionCosineMatrix();
bool hasAnyMagnetic();
math::vec3f anyMagnetic();
bool hasMagnetic();
math::vec3f magnetic();
bool hasMagneticUncompensated();
math::vec3f magneticUncompensated();
bool hasMagneticNed();
math::vec3f magneticNed();
bool hasMagneticEcef();
math::vec3f magneticEcef();
bool hasAnyAcceleration();
math::vec3f anyAcceleration();
bool hasAcceleration();
math::vec3f acceleration();
bool hasAccelerationLinearBody();
math::vec3f accelerationLinearBody();
bool hasAccelerationUncompensated();
math::vec3f accelerationUncompensated();
bool hasAccelerationLinearNed();
math::vec3f accelerationLinearNed();
bool hasAccelerationLinearEcef();
math::vec3f accelerationLinearEcef();
bool hasAccelerationNed();
math::vec3f accelerationNed();
bool hasAccelerationEcef();
math::vec3f accelerationEcef();
bool hasAnyAngularRate();
math::vec3f anyAngularRate();
bool hasAngularRate();
math::vec3f angularRate();
bool hasAngularRateUncompensated();
math::vec3f angularRateUncompensated();
bool hasAnyTemperature();
float anyTemperature();
bool hasTemperature();
float temperature();
bool hasAnyPressure();
float anyPressure();
bool hasPressure();
float pressure();
bool hasAnyPosition();
math::PositionD anyPosition();
bool hasPositionGpsLla();
math::vec3d positionGpsLla();
bool hasPositionGpsEcef();
math::vec3d positionGpsEcef();
bool hasPositionEstimatedLla();
math::vec3d positionEstimatedLla();
bool hasPositionEstimatedEcef();
math::vec3d positionEstimatedEcef();
bool hasAnyVelocity();
math::vec3f anyVelocity();
bool hasVelocityGpsNed();
math::vec3f velocityGpsNed();
bool hasVelocityGpsEcef();
math::vec3f velocityGpsEcef();
bool hasVelocityEstimatedNed();
math::vec3f velocityEstimatedNed();
bool hasVelocityEstimatedEcef();
math::vec3f velocityEstimatedEcef();
bool hasVelocityEstimatedBody();
math::vec3f velocityEstimatedBody();
bool hasDeltaTime();
float deltaTime();
bool hasDeltaTheta();
math::vec3f deltaTheta();
bool hasDeltaVelocity();
math::vec3f deltaVelocity();
bool hasTimeStartup();
uint64_t timeStartup();
bool hasTimeGps();
uint64_t timeGps();
bool hasTow();
double tow();
bool hasWeek();
uint16_t week();
bool hasNumSats();
uint8_t numSats();
bool hasTimeSyncIn();
uint64_t timeSyncIn();
bool hasVpeStatus();
protocol::uart::VpeStatus vpeStatus();
bool hasInsStatus();
protocol::uart::InsStatus insStatus();
bool hasSyncInCnt();
uint32_t syncInCnt();
bool hasTimeGpsPps();
uint64_t timeGpsPps();
bool hasGpsTow();
uint64_t gpsTow();
bool hasTimeUtc();
protocol::uart::TimeUtc timeUtc();
bool hasSensSat();
protocol::uart::SensSat sensSat();
bool hasFix();
protocol::uart::GpsFix fix();
bool hasAnyPositionUncertainty();
math::vec3f anyPositionUncertainty();
bool hasPositionUncertaintyGpsNed();
math::vec3f positionUncertaintyGpsNed();
bool hasPositionUncertaintyGpsEcef();
math::vec3f positionUncertaintyGpsEcef();
bool hasPositionUncertaintyEstimated();
float positionUncertaintyEstimated();
bool hasAnyVelocityUncertainty();
float anyVelocityUncertainty();
bool hasVelocityUncertaintyGps();
float velocityUncertaintyGps();
bool hasVelocityUncertaintyEstimated();
float velocityUncertaintyEstimated();
bool hasTimeUncertainty();
uint32_t timeUncertainty();
bool hasAttitudeUncertainty();
math::vec3f attitudeUncertainty();
bool hasCourseOverGround();
float courseOverGround();
bool hasSpeedOverGround();
float speedOverGround();
private:
static void parseBinary(protocol::uart::Packet& p, std::vector<CompositeData*>& o);
static void parseAscii(protocol::uart::Packet& p, std::vector<CompositeData*>& o);
static void parseBinaryPacketCommonGroup(protocol::uart::Packet& p, protocol::uart::CommonGroup gf, std::vector<CompositeData*>& o);
static void parseBinaryPacketTimeGroup(protocol::uart::Packet& p, protocol::uart::TimeGroup gf, std::vector<CompositeData*>& o);
static void parseBinaryPacketImuGroup(protocol::uart::Packet& p, protocol::uart::ImuGroup gf, std::vector<CompositeData*>& o);
static void parseBinaryPacketGpsGroup(protocol::uart::Packet& p, protocol::uart::GpsGroup gf, std::vector<CompositeData*>& o);
static void parseBinaryPacketAttitudeGroup(protocol::uart::Packet& p, protocol::uart::AttitudeGroup gf, std::vector<CompositeData*>& o);
static void parseBinaryPacketInsGroup(protocol::uart::Packet& p, protocol::uart::InsGroup gf, std::vector<CompositeData*>& o);
private:
struct Impl;
Impl* _i;
template<typename T>
static void setValues(T val, std::vector<CompositeData*>& o, void (Impl::* function)(T))
{
for (std::vector<CompositeData*>::iterator i = o.begin(); i != o.end(); ++i)
(*((*i)->_i).*function)(val);
}
};
}
}
#endif
vn::math::vec
Template for a Euclidean vector.
Definition: vector.h:22
vn::sensors::CompositeData
Composite structure of all data types available from VectorNav sensors.
Definition: compositedata.h:15
vn::math::mat
Template for a matrix.
Definition: matrix.h:20
vn::math::PositionD
Representation of a position/location.
Definition: position.h:10
vn
Definition: attitude.h:8
vn::protocol::uart::TimeUtc
UTC time as represented by the VectorNav sensor.
Definition: types.h:550
vn::protocol::uart::VpeStatus
Status indicators for VPE.
Definition: types.h:499
vn::protocol::uart::Packet
Structure representing a UART packet received from the VectorNav sensor.
Definition: packet.h:16
vn::math::AttitudeF
Representation of an orientation/attitude.
Definition: attitude.h:12