Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ahrs_chimu_spi.c File Reference
#include <stdbool.h>
#include "mcu_periph/spi.h"
#include "mcu_periph/spi_slave_hs_arch.h"
#include "state.h"
#include "subsystems/gps.h"
#include "subsystems/ahrs.h"
#include "generated/airframe.h"
#include "ins_module.h"
#include "imu_chimu.h"
#include "led.h"
+ Include dependency graph for ahrs_chimu_spi.c:

Go to the source code of this file.

Functions

void ahrs_init (void)
 AHRS initialization. More...
 
void ahrs_align (void)
 Aligns the AHRS. More...
 
void parse_ins_msg (void)
 
void ahrs_update_gps (void)
 Update AHRS state with GPS measurements. More...
 
void ahrs_propagate (void)
 Propagation. More...
 
void ahrs_update_accel (void)
 Update AHRS state with accerleration measurements. More...
 

Variables

CHIMU_PARSER_DATA CHIMU_DATA
 
INS_FORMAT ins_roll_neutral
 
INS_FORMAT ins_pitch_neutral
 

Function Documentation

void ahrs_align ( void  )

Aligns the AHRS.

Called after ahrs_aligner has run to set initial attitude and biases. Must set the ahrs status to AHRS_RUNNING. Needs to be implemented by each AHRS algorithm.

Definition at line 74 of file ahrs_chimu_spi.c.

Referenced by on_gyro_accel_event(), and on_gyro_event().

+ Here is the caller graph for this function:

void ahrs_init ( void  )

AHRS initialization.

Called at startup. Needs to be implemented by each AHRS algorithm.

Definition at line 40 of file ahrs_chimu_spi.c.

Referenced by init_ap(), and main_init().

+ Here is the caller graph for this function:

void ahrs_propagate ( void  )

Propagation.

Usually integrates the gyro rates to angles. Reads the global imu data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 137 of file ahrs_chimu_spi.c.

Referenced by on_gyro_accel_event(), on_gyro_event(), and sensors_task().

+ Here is the caller graph for this function:

void ahrs_update_accel ( void  )

Update AHRS state with accerleration measurements.

Reads the global imu data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 140 of file ahrs_chimu_spi.c.

Referenced by on_accel_event(), on_gyro_accel_event(), and on_gyro_event().

+ Here is the caller graph for this function:

void ahrs_update_gps ( void  )

Update AHRS state with GPS measurements.

Reads the global gps data struct. Needs to be implemented by each AHRS algorithm.

Definition at line 115 of file ahrs_chimu_spi.c.

Referenced by on_gps_solution().

+ Here is the caller graph for this function:

static void parse_ins_msg ( void  )
inline

Definition at line 79 of file ahrs_chimu_spi.c.

Variable Documentation

CHIMU_PARSER_DATA CHIMU_DATA

Definition at line 35 of file ahrs_chimu_spi.c.

INS_FORMAT ins_pitch_neutral

Definition at line 38 of file ahrs_chimu_spi.c.

Referenced by ahrs_init().

INS_FORMAT ins_roll_neutral
Todo:
harmonize infrared neutrals with ins_neutrals or get rid of ins neutrals this ins only needed for sim right now

Definition at line 37 of file ahrs_chimu_spi.c.

Referenced by ahrs_init().