Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::NAS Class Reference

#include <NAS.h>

Public Member Functions

 NAS (NASConfig config)
 
void predictAcc (const Eigen::Vector3f &acceleration)
 Prediction with accelerometer data.
 
void predictAcc (const AccelerometerData &acceleration)
 Prediction with accelerometer data.
 
void predictGyro (const Eigen::Vector3f &angularSpeed)
 Prediction with gyroscope data.
 
void predictGyro (const GyroscopeData &angularSpeed)
 Prediction with gyroscope data.
 
void correctBaro (const float pressure)
 Correction with barometer data.
 
void correctGPS (const Eigen::Vector4f &gps)
 Correction with gps data.
 
void correctGPS (const GPSData &gps)
 Correction with gps data only if fix is acquired.
 
void correctMag (const Eigen::Vector3f &mag)
 Correction with magnetometer data.
 
void correctMag (const MagnetometerData &mag)
 Correction with magnetometer data.
 
void correctAcc (const Eigen::Vector3f &acc)
 Correction with accelerometer data.
 
void correctAcc (const AccelerometerData &acc)
 Correction with accelerometer data.
 
void correctPitot (const float staticPressure, const float dynamicPressure)
 Correction with pitot pressures.
 
NASState getState () const
 
Eigen::Matrix< float, 13, 1 > getX () const
 
void setState (const NASState &state)
 
void setX (const Eigen::Matrix< float, 13, 1 > &x)
 
void setReferenceValues (const ReferenceValues reference)
 Changes the reference values.
 
ReferenceValues getReferenceValues ()
 Returns the current reference values.
 

Static Public Attributes

static constexpr uint16_t IDX_POS = 0
 < Index of position elements in the state.
 
static constexpr uint16_t IDX_VEL = 3
 Index of quaternions elements in the state.
 
static constexpr uint16_t IDX_QUAT = 6
 Index of bias elements in the state.
 
static constexpr uint16_t IDX_BIAS = 10
 

Detailed Description

Definition at line 38 of file NAS.h.

Constructor & Destructor Documentation

◆ NAS()

Boardcore::NAS::NAS ( NASConfig config)
explicit

Definition at line 37 of file NAS.cpp.

Member Function Documentation

◆ correctAcc() [1/2]

void Boardcore::NAS::correctAcc ( const AccelerometerData & acc)

Correction with accelerometer data.

Parameters
uAcceleration data [m/s^2].

Definition at line 331 of file NAS.cpp.

◆ correctAcc() [2/2]

void Boardcore::NAS::correctAcc ( const Eigen::Vector3f & acc)

Correction with accelerometer data.

Parameters
uNormalized vector with acceleration data [x y z][m/s^2].

◆ correctBaro()

void Boardcore::NAS::correctBaro ( const float pressure)

Correction with barometer data.

Parameters
pressurePressure read from the barometer [Pa].

Definition at line 157 of file NAS.cpp.

◆ correctGPS() [1/2]

void Boardcore::NAS::correctGPS ( const Eigen::Vector4f & gps)

Correction with gps data.

Parameters
gpsVector of the gps readings [n e vn ve][m m m/s m/s].

◆ correctGPS() [2/2]

void Boardcore::NAS::correctGPS ( const GPSData & gps)

Correction with gps data only if fix is acquired.

Parameters
gpsGPS data.

Definition at line 247 of file NAS.cpp.

◆ correctMag() [1/2]

void Boardcore::NAS::correctMag ( const Eigen::Vector3f & mag)

Correction with magnetometer data.

Parameters
magNormalized vector of the magnetometer readings [x y z][uT].

◆ correctMag() [2/2]

void Boardcore::NAS::correctMag ( const MagnetometerData & mag)

Correction with magnetometer data.

Parameters
magMagnetometer data [uT].

Definition at line 289 of file NAS.cpp.

◆ correctPitot()

void Boardcore::NAS::correctPitot ( const float staticPressure,
const float dynamicPressure )

Correction with pitot pressures.

Warning
Do not call this function after apogee!
Parameters
staticPressureIs the static pressure measured from the pitot sensor.
dynamicPressureIs the dynamic pressure measured from the pitot sensor (difference pressure between total pressure and static pressure).

Definition at line 337 of file NAS.cpp.

◆ getReferenceValues()

ReferenceValues Boardcore::NAS::getReferenceValues ( )

Returns the current reference values.

Definition at line 395 of file NAS.cpp.

◆ getState()

NASState Boardcore::NAS::getState ( ) const
Returns
EKF state.

Definition at line 379 of file NAS.cpp.

◆ getX()

Matrix< float, 13, 1 > Boardcore::NAS::getX ( ) const
Returns
State vector [n e d vn ve vd qx qy qz qw bx by bz].

Definition at line 384 of file NAS.cpp.

◆ predictAcc() [1/2]

void Boardcore::NAS::predictAcc ( const AccelerometerData & acceleration)

Prediction with accelerometer data.

Parameters
accelerationAccelerometer data [m/s^2].

Definition at line 116 of file NAS.cpp.

◆ predictAcc() [2/2]

void Boardcore::NAS::predictAcc ( const Eigen::Vector3f & acceleration)

Prediction with accelerometer data.

Parameters
accelerationVector with acceleration data [x y z][m/s^2].

◆ predictGyro() [1/2]

void Boardcore::NAS::predictGyro ( const Eigen::Vector3f & angularSpeed)

Prediction with gyroscope data.

Parameters
angularSpeedVector with angular velocity data [x y z][rad/s].

◆ predictGyro() [2/2]

void Boardcore::NAS::predictGyro ( const GyroscopeData & angularSpeed)

Prediction with gyroscope data.

Parameters
angularSpeedGyroscope data [rad/s].

Definition at line 151 of file NAS.cpp.

◆ setReferenceValues()

void Boardcore::NAS::setReferenceValues ( const ReferenceValues reference)

Changes the reference values.

Definition at line 390 of file NAS.cpp.

◆ setState()

void Boardcore::NAS::setState ( const NASState & state)
Parameters
stateEKF state.

Definition at line 386 of file NAS.cpp.

◆ setX()

void Boardcore::NAS::setX ( const Eigen::Matrix< float, 13, 1 > & x)
Parameters
stateState vector [n e d vn ve vd qx qy qz qw bx by bz].

Definition at line 388 of file NAS.cpp.

Member Data Documentation

◆ IDX_BIAS

constexpr uint16_t Boardcore::NAS::IDX_BIAS = 10
staticconstexpr

Definition at line 51 of file NAS.h.

◆ IDX_POS

constexpr uint16_t Boardcore::NAS::IDX_POS = 0
staticconstexpr

< Index of position elements in the state.

Index of velocity elements in the state.

Definition at line 42 of file NAS.h.

◆ IDX_QUAT

constexpr uint16_t Boardcore::NAS::IDX_QUAT = 6
staticconstexpr

Index of bias elements in the state.

Definition at line 48 of file NAS.h.

◆ IDX_VEL

constexpr uint16_t Boardcore::NAS::IDX_VEL = 3
staticconstexpr

Index of quaternions elements in the state.

Definition at line 45 of file NAS.h.


The documentation for this class was generated from the following files: