![]() |
Hummingbird Flight Software
Flight software for the Hummingbird FCU quadcopter flight controller. Designed to run on the Teensy 4.1. Developed with VSCode+PlatformIO.
|
Constructor for the InertialNavSystem class. More...
#include <inertial_nav_system.h>
Public Member Functions | |
InertialNavSystem () | |
The inertial sensor software system brings together the accelerometer and gyro, sensors to form the Inertial Navigation System. More... | |
~InertialNavSystem () | |
InertialNavSystem (const InertialNavSystem &)=delete | |
InertialNavSystem & | operator= (const InertialNavSystem &)=delete |
void | SetSampleRate (float fs_hz) |
bool | Initialize () |
Initialize the INS. More... | |
bool | Update () |
Record accelerometer and gyro measurements, apply noise filters, and update accel. More... | |
float | GetAccelPitch () |
float | GetAccelRoll () |
Static Public Member Functions | |
static InertialNavSystem & | GetInstance () |
Public Attributes | |
Vectorf | Gyro |
Vectorf | GyroRaw |
Vectorf | GyroTOBias |
Vectorf | Accel |
Vectorf | AccelRaw |
Vectorf | AccelTOBias |
uint32_t | prevUpdateMicros |
Private Member Functions | |
void | UpdateAccelAngles () |
Compute accelerometer roll and pitch angles. More... | |
bool | MeasureInitGyroBiases (uint32_t samplePeriod) |
Measure initial gyro turn-on biases. More... | |
bool | MeasureInitAccelBiases (uint32_t samplePeriod) |
Measure initial accelerometer turn-on bias. More... | |
Private Attributes | |
float | roll |
float | pitch |
FXOS8700AccelMag | AccelMagSensor |
FXAS21002Gyro | GyroSensor |
LowPassFilter | AxLPF |
LowPassFilter | AyLPF |
LowPassFilter | AzLPF |
Constructor for the InertialNavSystem class.
This system provides an interface to manage sensor readings, filtering raw measurements for noise, and applying calibration parameters.
InertialNavSystem::InertialNavSystem | ( | ) |
The inertial sensor software system brings together the accelerometer
and gyro, sensors to form the Inertial Navigation System.
This system provides an interface to manage sensor readings, filtering raw measurements for noise, and applying calibration parameters. Constructor for the InertialNavSystem class. This system provides an interface to manage sensor readings, filtering raw measurements for noise, and applying calibration parameters.
InertialNavSystem::~InertialNavSystem | ( | ) |
|
delete |
float InertialNavSystem::GetAccelPitch | ( | ) |
float InertialNavSystem::GetAccelRoll | ( | ) |
|
static |
bool InertialNavSystem::Initialize | ( | ) |
Initialize the INS.
This function connects to the gyro and accelerometer, and measures gyro and accelerometer turn-on biases (used to initialize the EKF).
|
private |
Measure initial accelerometer turn-on bias.
samplePeriod | [ms] Sample period/delay between samples. Use this to set sample rate for recording turn-on biases. |
|
private |
Measure initial gyro turn-on biases.
samplePeriod | [ms] Sample period/delay between samples. Use this to set sample rate for recording turn-on biases. |
|
delete |
void InertialNavSystem::SetSampleRate | ( | float | fs_hz | ) |
bool InertialNavSystem::Update | ( | ) |
Record accelerometer and gyro measurements, apply noise filters, and update accel.
roll/pitch angles.
|
private |
Compute accelerometer roll and pitch angles.
Vectorf InertialNavSystem::Accel |
|
private |
Vectorf InertialNavSystem::AccelRaw |
Vectorf InertialNavSystem::AccelTOBias |
|
private |
|
private |
|
private |
Vectorf InertialNavSystem::Gyro |
Vectorf InertialNavSystem::GyroRaw |
|
private |
Vectorf InertialNavSystem::GyroTOBias |
|
private |
uint32_t InertialNavSystem::prevUpdateMicros |
|
private |