NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Instruments_Main
Collaboration diagram for Instruments_Main:

Enumerations

enum  { INS_USE_SENSOR_GYRO = (1 << 0), INS_USE_SENSOR_ACC = (1 << 1), INS_USE_SENSOR_MAG = (1 << 2) }
 

Functions

void ins_init (struct instruments *self, const struct config *config)
 Initializes all instruments using specified configuration. More...
 
bool ins_is_calibrated (struct instruments *self)
 
void ins_start_acc_calibration (struct instruments *self)
 
void ins_start_gyro_calibration (struct instruments *self)
 
void ins_start_mag_calibration (struct instruments *self)
 
void ins_process_gyro (struct instruments *self, int32_t x, int32_t y, int32_t z)
 
void ins_process_acc (struct instruments *self, int32_t x, int32_t y, int32_t z)
 
void ins_process_mag (struct instruments *self, int32_t x, int32_t y, int32_t z)
 
void ins_update (struct instruments *self, float dt)
 
uint32_t ins_get_altitude_cm (struct instruments *self)
 returns estimated altitude above sea level in cm More...
 
int16_t ins_get_vertical_speed_cms (struct instruments *self)
 returns vertical speed in cm/s More...
 

Detailed Description

The purpose of this module is to maintain a filtered state of all flight instruments that are available to the pilot. Instrumentation shall report data in SI units or multiples of such (for example decidegrees for represetnting fractions of degrees when not using floating point).

Instruments object accepts raw sensor data as input and maintains estimated state that can be directly used by other parts of the flight controller. This module also handles sensor alignment.

Currently supported input sensors include:

Estimated quantities include:

Enumeration Type Documentation

anonymous enum
Enumerator
INS_USE_SENSOR_GYRO 
INS_USE_SENSOR_ACC 
INS_USE_SENSOR_MAG 

Function Documentation

uint32_t ins_get_altitude_cm ( struct instruments self)

returns estimated altitude above sea level in cm

int16_t ins_get_vertical_speed_cms ( struct instruments self)

returns vertical speed in cm/s

void ins_init ( struct instruments self,
const struct config config 
)

Initializes all instruments using specified configuration.

Here is the call graph for this function:

bool ins_is_calibrated ( struct instruments self)

Here is the call graph for this function:

void ins_process_acc ( struct instruments self,
int32_t  x,
int32_t  y,
int32_t  z 
)

Here is the call graph for this function:

void ins_process_gyro ( struct instruments self,
int32_t  x,
int32_t  y,
int32_t  z 
)

Here is the call graph for this function:

void ins_process_mag ( struct instruments self,
int32_t  x,
int32_t  y,
int32_t  z 
)

Here is the call graph for this function:

void ins_start_acc_calibration ( struct instruments self)

Here is the call graph for this function:

void ins_start_gyro_calibration ( struct instruments self)

Here is the call graph for this function:

void ins_start_mag_calibration ( struct instruments self)

Here is the call graph for this function:

void ins_update ( struct instruments self,
float  dt 
)

Here is the call graph for this function: