Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
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 71 of file ahrs_chimu_spi.c.

Referenced by 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 37 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. Does nothing if not implemented by specific AHRS algorithm.

Definition at line 134 of file ahrs_chimu_spi.c.

Referenced by 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. Does nothing if not implemented by specific AHRS algorithm.

Definition at line 137 of file ahrs_chimu_spi.c.

Referenced by on_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. Does nothing if not implemented by specific AHRS algorithm.

Definition at line 112 of file ahrs_chimu_spi.c.

Referenced by on_gps_event(), and on_gps_solution().

+ Here is the caller graph for this function:

static void parse_ins_msg ( void  )
inline

Definition at line 76 of file ahrs_chimu_spi.c.

Variable Documentation

CHIMU_PARSER_DATA CHIMU_DATA

Definition at line 32 of file ahrs_chimu_spi.c.

INS_FORMAT ins_pitch_neutral

Definition at line 35 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 34 of file ahrs_chimu_spi.c.

Referenced by ahrs_init().