Data

Gad

GadPosition

class GadPosition : public OxTS::Gal_Cpp::Gad

Generic Aiding position.

Public Functions

explicit GadPosition(const uint8_t stream_id)

Constructor

Parameters:

stream_id – Stream ID for the position aiding source. Must be unique 129-254.

void SetPosGeodetic(const double_t lat, const double_t lon, const double_t alt)

Set the aiding position in the WGS84 coordinate frame.

Parameters:
  • lat – Latitude of the position estimate (deg).

  • lon – Longitude of the position estimate (deg).

  • alt – Altitude of the position estimate (deg).

void SetPosLocal(const double_t x, const double_t y, const double_t z)

Set the aiding position in the user-defined local coordinate frame.

Parameters:
  • x – Position in the x axis of the local frame (m).

  • y – Position in the y axis of the local frame (m).

  • z – Position in the z axis of the local frame (m).

const container_double3_t &GetPos() const

Get the aiding position.

void SetPosGeodeticVar(const double_t var_north, const double_t var_east, const double_t var_down)

Set the variance aiding position in the coordinate frame.

Parameters:
  • var_north – Variance of the position estimate (m^2).

  • var_east – Variance of the position estimate (m^2).

  • var_down – Variance of the position estimate (m^2).

void SetPosGeodeticVar(const double_t v_00, const double_t v_11, const double_t v_22, const double_t v_01, const double_t v_02, const double_t v_12)

Set the full covariance matrix of aiding position in the geodetic coordinate frame. Only six values required due to the symmetry of covariance matrices. (Indices row major)

Parameters:
  • v_00 – Variance of the position estimate (m^2).

  • v_11 – Variance of the position estimate (m^2).

  • v_22 – Variance of the position estimate (m^2).

  • v_01 – Variance of the position estimate (m^2).

  • v_02 – Variance of the position estimate (m^2).

  • v_12 – Variance of the position estimate (m^2).

void SetPosLocalVar(const double_t var_local_x, const double_t var_local_y, const double_t var_local_z)

Set the variance aiding position in the coordinate frame.

Parameters:
  • var_local_x – Variance of the position estimate (m^2).

  • var_local_y – Variance of the position estimate (m^2).

  • var_local_z – Variance of the position estimate (m^2).

void SetPosLocalVar(const double_t v_xx, const double_t v_yy, const double_t v_zz, const double_t v_xy, const double_t v_xz, const double_t v_yz)

Set the full covariance matrix of aiding position in the local coordinate frame. Only six values required due to the symmetry of covariance matrices. (Indices row major)

Parameters:
  • v_00 – Variance of the position estimate (m^2).

  • v_11 – Variance of the position estimate (m^2).

  • v_22 – Variance of the position estimate (m^2).

  • v_01 – Variance of the position estimate (m^2).

  • v_02 – Variance of the position estimate (m^2).

  • v_12 – Variance of the position estimate (m^2).

const container_double6_t &GetPosVar() const

Get the aiding position variance.

void SetAidingLeverArmFixed(const double_t x, const double_t y, const double_t z)

Set lever arm from the INS to the aiding source. This lever arm will not be optimised by the Kalman Filter.

Parameters:
  • x – Offset from INS to aiding source in the x axis of the IMU frame (m).

  • y – Offset from INS to aiding source in the y axis of the IMU frame (m).

  • z – Offset from INS to aiding source in the z axis of the IMU frame (m).

const container_double3_t &GetAidingLeverArm() const
void SetAidingLeverArmOptimising()

Set lever arm from the INS to the position aiding source. to be optimised by the Kalman Filter during navigation.

void SetAidingLeverArmConfig()

Indicate that lever arm will be configured in the configuration file on the INS.

void SetAidingLeverArmVar(const double_t x, const double_t y, const double_t z)

Set the variance (accuracy) of the lever arm measurements from the INS to the aiding source. Only required for fixed lever-arm.

Parameters:
  • x – Variance on the lever arm from INS to aiding source in the x axis of the IMU frame.

  • y – Variance on the lever arm from INS to aiding source in the y axis of the IMU frame.

  • z – Variance on the lever arm from INS to aiding source in the z axis of the IMU frame.

const container_double6_t &GetAidingLeverArmVar() const

GadVelocity

class GadVelocity : public OxTS::Gal_Cpp::Gad

Generic Aiding velocity.

Public Functions

explicit GadVelocity(const uint8_t stream_id)

Constructor

Parameters:

stream_id – Stream ID for the velocity aiding source. Must be unique 129-254.

void SetVelNed(const double_t vel_north, const double_t vel_east, const double_t vel_down)

Set the aiding velocity estimate in the local NED coordinate frame.

Parameters:
  • vel_east – Velocity estimate in the East direction (m/s).

  • vel_north – Velocity estimate in the North direction (m/s).

  • vel_down – Velocity estimate in the Down direction (m/s).

void SetVelOdom(const double_t vel_x, const double_t vel_y, const double_t vel_z)

Set the aiding velocity estimate in the odometry frame.

Parameters:
  • vel_x – Velocity estimate in the x direction (m/s).

  • vel_y – Velocity estimate in the y direction (m/s).

  • vel_z – Velocity estimate in the z direction (m/s).

void SetVelLocal(const double_t vel_local_x, const double_t vel_local_y, const double_t vel_local_z)

Set the aiding velocity estimate in the user-defined local coordinate frame.

Parameters:
  • vel_local_x – Velocity estimate in the x direction (m/s).

  • vel_local_y – Velocity estimate in the y direction (m/s).

  • vel_local_z – Velocity estimate in the z direction (m/s).

const container_double3_t &GetVel() const

Get the aiding velocity estimate.

void SetVelNedVar(const double_t var_north, const double_t var_east, const double_t var_down)

Set the aiding velocity variance estimate in the local NED coordinate frame.

Parameters:
  • var_north – Velocity variance estimate in the North direction (m/s)^2.

  • var_east – Velocity variance estimate in the East direction (m/s)^2.

  • var_down – Velocity variance estimate in the Down direction (m/s)^2.

void SetVelNedVar(const double_t v_nn, const double_t v_ee, const double_t v_dd, const double_t v_ne, const double_t v_nd, const double_t v_ed)

Set the full covariance matrix of aiding velocity in the NED frame. Only six values required due to the symmetry of covariance matrices. (Indices row major)

Parameters:
  • v_nn – Variance of the position estimate (m/s)^2.

  • v_ee – Variance of the position estimate (m/s)^2.

  • v_uu – Variance of the position estimate (m/s)^2.

  • v_ne – Variance of the position estimate (m/s)^2.

  • v_nu – Variance of the position estimate (m/s)^2.

  • v_eu – Variance of the position estimate (m/s)^2.

void SetVelOdomVar(const double_t v_x, const double_t v_y, const double_t v_z)

Set the aiding velocity variance estimate in the local NED coordinate frame.

Parameters:
  • v_x – Velocity variance estimate in the x direction (m/s)^2.

  • v_y – Velocity variance estimate in the y direction (m/s)^2.

  • v_z – Velocity variance estimate in the z direction (m/s)^2.

void SetVelOdomVar(const double_t v_xx, const double_t v_yy, const double_t v_zz, const double_t v_xy, const double_t v_xz, const double_t v_yz)

Set the full covariance matrix of aiding velocity in the odometry frame. Only six values required due to the symmetry of covariance matrices. (Indices row major)

Parameters:
  • v_xx – Variance of the position estimate (m/s)^2.

  • v_yy – Variance of the position estimate (m/s)^2.

  • v_zz – Variance of the position estimate (m/s)^2.

  • v_xy – Variance of the position estimate (m/s)^2.

  • v_xz – Variance of the position estimate (m/s)^2.

  • v_yz – Variance of the position estimate (m/s)^2.

void SetVelLocalVar(const double_t v_x, const double_t v_y, const double_t v_z)

Set the aiding velocity variance estimate in the local NED coordinate frame.

Parameters:
  • v_x – Velocity variance estimate in the x direction (m/s)^2.

  • v_y – Velocity variance estimate in the y direction (m/s)^2.

  • v_z – Velocity variance estimate in the z direction (m/s)^2.

void SetVelLocalVar(const double_t v_xx, const double_t v_yy, const double_t v_zz, const double_t v_xy, const double_t v_xz, const double_t v_yz)

Set the full covariance matrix of aiding velocity in the local coordinate frame. Only six values required due to the symmetry of covariance matrices. (Indices row major)

Parameters:
  • v_xx – Variance of the position estimate (m^2).

  • v_yy – Variance of the position estimate (m^2).

  • v_zz – Variance of the position estimate (m^2).

  • v_xy – Variance of the position estimate (m^2).

  • v_xz – Variance of the position estimate (m^2).

  • v_yz – Variance of the position estimate (m^2).

const container_double6_t &GetVelVar() const

Get the aiding velocity variance estimate.

void SetAidingLeverArmFixed(const double_t x, const double_t y, const double_t z)

Set lever arm from the INS to the aiding source. This lever arm will not be optimised by the Kalman Filter.

Parameters:
  • x – Offset from INS to aiding source in the x axis of the IMU frame (m).

  • y – Offset from INS to aiding source in the y axis of the IMU frame (m).

  • z – Offset from INS to aiding source in the z axis of the IMU frame (m).

const container_double3_t &GetAidingLeverArm() const
void SetAidingLeverArmOptimising()

Set lever arm from the INS to the aiding source to be taken from the .gap file. This lever arm will be optimised by the Kalman Filter during navigation. Note that if using this, the GNSS antenna lever arm must be set in mobile.cfg.

void SetAidingLeverArmConfig()

Indicate that lever arm will be configured in the configuration file on the INS.

Todo:

Remove and set this mode to be default

void SetAidingLeverArmVar(const double_t x, const double_t y, const double_t z)

Set the variance (accuracy) of the lever arm measurements from the INS to the aiding source.

Parameters:
  • x – Variance on the lever arm from INS to aiding source in the x axis of the IMU frame.

  • y – Variance on the lever arm from INS to aiding source in the y axis of the IMU frame.

  • z – Variance on the lever arm from INS to aiding source in the z axis of the IMU frame.

const container_double6_t &GetAidingLeverArmVar() const

GadAttitude

class GadAttitude : public OxTS::Gal_Cpp::Gad

Generic Aiding attitude.

Public Functions

GadAttitude()

Default constructor

explicit GadAttitude(const uint8_t stream_id)

Constructor.

Parameters:

stream_id – Stream ID for the attitude aiding source. Must be unique 129-254.

const container_double3_t &GetAtt() const
void SetAtt(const double_t heading, const double_t pitch, const double_t roll)

Set the aiding attitude measurement relative to the NED coordinate frame.

Note

All parameters are in degrees. Roll is not yet used!

Parameters:
  • heading

  • pitch

  • roll

void SetAttLocal(const double_t heading, const double_t pitch, const double_t roll)

Set the aiding attitude measurement relative to the local coordinate frame.

Note

All parameters are in degrees. Roll is not yet used!

Parameters:
  • heading

  • pitch

  • roll

void SetAttVar(const double_t v_h, const double_t v_p, const double_t v_r)

Set the estimated variance on the aiding attitude measurement.

Parameters:
  • v_h – Variance estimate on the heading angle (deg)^2

  • v_p – Variance estimate on the pitch angle (deg)^2

  • v_r – Variance estimate on the roll angle (deg)^2

const container_double6_t &GetAttVar() const
void SetAidingAlignmentFixed(const double_t x, const double_t y, const double_t z)
const container_double3_t &GetAidingAlignment() const
void SetAidingAlignmentOptimising()

Set alignment to be optimised by the INS. The alignment values will be read from the mobile.att file, so are not set here.

void SetAidingAlignmentConfig()

Indicate that alignment will be configured in the configuration file on the INS.

void SetAidingAlignmentVar(const double_t x, const double_t y, const double_t z)

Set the estimated variance (error) on the alignment angles between the IMU and aiding sensor frames.

Parameters:
  • x

  • y

  • z

const container_double6_t &GetAidingAlignmentVar() const

GadHeading

class GadHeading : public OxTS::Gal_Cpp::Gad

Generic Aiding Heading.

Public Functions

GadHeading()

Default constructor

explicit GadHeading(const uint8_t stream_id)

Constructor.

Parameters:

stream_id – Stream ID for the attitude aiding source. Must be unique 128-254.

double_t GetHeading() const
void SetHeading(const double_t heading)

Set the aiding heading measurement relative to the NED coordinate frame.

Parameters:

heading

void SetHeadingLocal(const double_t heading)

Set the aiding heading measurement relative to the local coordinate frame.

Parameters:

heading

void SetHeadingVar(const double_t v_h)

Set the estimated variance on the aiding attitude measurement.

Parameters:

v_h – Variance estimate on the heading angle (deg)^2

double_t GetHeadingVar() const
void SetAidingAlignmentFixed(const double_t h, const double_t p, const double_t r)

Set the angles which specify the rotation required to align the IMU and aiding sensor frames. This alignment will not be optimised by the INS.

Parameters:
  • h

  • p

  • r

const container_double3_t &GetAidingAlignment() const
void SetAidingAlignmentConfig()

Indicate that alignment will be configured in the configuration file on the INS.

void SetAidingAlignmentVar(const double_t h_v, const double_t p_v, const double_t r_v)

Set the estimated variance (error) on the alignment angles between the IMU and aiding sensor frames.

Parameters:
  • h_v

  • h_p

  • h_r

const container_double6_t &GetAidingAlignmentVar() const

GadSpeed

class GadSpeed : public OxTS::Gal_Cpp::Gad

Generic Aiding speed.

Public Functions

explicit GadSpeed(const uint8_t stream_id)
void SetSpeedFwMs(const double_t speed)

Set the forward speed aiding estimate.

Parameters:

speed – Forward speed estimate in the vehicle frame (m/s).

void SetSpeedBwMs(const double_t speed)

Set the backward speed aiding estimate.

Parameters:

speed – Backward speed estimate in the vehicle frame (m/s).

void SetSpeedUnMs(const double_t speed)

Set an unsigned speed aiding estimate.

Parameters:

speed – Unsigned speed estimate in the vehicle frame (m/s).

void SetSpeedFwPulsed(const double_t frequency, const double_t scale_factor, const double_t period = 0.0)

Set the forward pulsed speed aiding estimate.

Parameters:
  • frequency – Pulse frequency in the forward vehicle direction (counts/s).

  • scale_factor – Scale factor converting counts to m, e.g. 0.01 for 100 counts/m. (m)

  • (optional) – period Time over which the speed measurement is taken (if known) (s).

void SetSpeedBwPulsed(const double_t frequency, const double_t scale_factor, const double_t period = 0.0)

Set the backward pulsed speed aiding estimate.

Parameters:
  • frequency – Pulse frequency in the backward vehicle direction (counts/s).

  • scale_factor – Scale factor converting counts to m, e.g. 0.01 for 100 counts/m. (m)

  • (optional) – period Time over which the speed measurement is taken (if known) (s).

void SetSpeedUnPulsed(const double_t frequency, const double_t scale_factor, const double_t period = 0.0)

Set an unsigned pulsed speed aiding estimate.

Parameters:
  • frequency – Unsigned pulse frequency (counts/s).

  • scale_factor – Scale factor converting counts to m, e.g. 0.01 for 100 counts/m. (m)

  • (optional) – period Time over which the speed measurement is taken (if known) (s).

const container_double3_t &GetSpeed() const

Get the aiding speed estimate.

void SetSpeedMsVar(const double_t v_s)

Set estimated variance on the speed aiding measurement.

Parameters:

v_s – Estimated variance on the speed measurement ((m/s)^2).

void SetSpeedPulsedVar(const double_t v_s, const double_t v_sf)

Set the aiding speed variance estimate including scale factor and period

Parameters:
  • v_s – Pulse frequency variance estimate (variance on the measurement) (s^-2).

  • v_sf – Scale factor variance estimate (m^-2).

void SetSpeedPulsedVarPeriod(const double_t v_s, const double_t v_sf, const double_t v_p)

Set the aiding speed variance estimate including scale factor and period

Parameters:
  • v_s – Pulse frequency variance estimate (variance on the measurement) (s^-2).

  • v_sf – Scale factor variance estimate (m^-2).

  • v_p – Period variance estimate (s^2).

const container_double6_t &GetSpeedVar() const

Get the aiding speed variance estimate.

void SetAidingLeverArmFixed(const double_t x, const double_t y, const double_t z)

Set lever arm from the INS to the aiding source. This lever arm will not be optimised by the Kalman Filter.

Parameters:
  • x – Offset from INS to aiding source in the x axis of the IMU frame (m).

  • y – Offset from INS to aiding source in the y axis of the IMU frame (m).

  • z – Offset from INS to aiding source in the z axis of the IMU frame (m).

const container_double3_t &GetAidingLeverArm() const
void SetAidingLeverArmConfig()

Indicate that lever arm will be configured in the configuration file on the INS.

Todo:

Remove and set this mode to be default

void SetAidingLeverArmVar(const double_t x, const double_t y, const double_t z)

Set the variance (accuracy) of the lever arm measurements from the INS to the aiding source.

Parameters:
  • x – Variance on the lever arm from INS to aiding source in the x axis of the IMU frame.

  • y – Variance on the lever arm from INS to aiding source in the y axis of the IMU frame.

  • z – Variance on the lever arm from INS to aiding source in the z axis of the IMU frame.

const container_double6_t &GetAidingLeverArmVar() const

GadHandler

class GadHandler

Class to handle encoding and sending Generic Aiding packets. This can be to an INS in real time via UDP or to a .gad csv file.

Public Functions

GadHandler()

Constructor

void SetEncoderToBin()

Set the output encoder to binary.

void SetEncoderToCsv()

Set the output encoder to csv.

void SetOutputModeToFile(const std::string &file_path)

Set Generic Aiding output to file

Parameters:

file_path – Absolute path to the file to output the data to. Will be created if it does not already exist.

void SetOutputModeToUdp(const std::string &ip)

Set Generic Aiding output to UDP.

Parameters:

ip – The IPv4 address of the OxTS INS to send the data to.

void SendPacket(const Gad &g)

Send packet via pre-configured output method.

Parameters:

g – Generic Aiding data to be encoded and sent

Encoding

class GadEncoder

Interface class to bring together GAD encoding to binary (for UDP output) and string (for csv output).

Subclassed by OxTS::Gal_Cpp::GadEncoderBin, OxTS::Gal_Cpp::GadEncoderCsv

Public Functions

inline virtual ~GadEncoder()

Virtual Destructor.

virtual void EncodePacket(const Gad &g) = 0

Encode data in the Gad class to either binary or csv string

virtual const uint8_t *GetPacket() = 0

Get the encoded packet.

Returns:

The packet as an unsigned char array

virtual std::size_t GetPacketSize() = 0

Get the size of the encoded packet (bytes).

Returns:

Size of the packet.

class GadEncoderBin : public OxTS::Gal_Cpp::GadEncoder

Wrapper for C Generic Aiding binary encoding functionality.

Public Functions

GadEncoderBin()

Constructor

virtual void EncodePacket(const Gad &g) override

Override of EncodePacket function to encode data from Gad class to a binary CCom packet for transmission to an OxTS INS.

virtual const std::uint8_t *GetPacket() override

Override of the GetPacket function to retrieve the CCom message to be sent to an INS.

virtual std::size_t GetPacketSize() override

Override of the GetPacketSize function, to retrieve the size of the generic aiding packet (wrapped in CCom) to be transmitted to an INS.

class GadEncoderCsv : public OxTS::Gal_Cpp::GadEncoder

Wrapper for C Generic Aiding csv encoding functionality.

Todo:

Implement this csv encoding wrapper.

Public Functions

GadEncoderCsv()

Constructor

virtual void EncodePacket(const Gad &g) override

Encode the generic aiding packet to csv format.

Parameters:

g – Reference to the Gad data to be encoded.

virtual const uint8_t *GetPacket() override

Retrieve the encoded packet

Returns:

Char array containing the packet encoded in csv form.

virtual std::size_t GetPacketSize() override
Returns:

The encoded packet size (bytes)