Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
ahrs.h File Reference

Dispatcher to register actual AHRS implementations. More...

#include "std.h"
+ Include dependency graph for ahrs.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AHRS_COMP_ID_NONE   0
 
#define AHRS_COMP_ID_GENERIC   1
 
#define AHRS_COMP_ID_IR   2
 
#define AHRS_COMP_ID_ICQ   3
 
#define AHRS_COMP_ID_ICE   4
 
#define AHRS_COMP_ID_FC   4
 
#define AHRS_COMP_ID_DCM   6
 
#define AHRS_COMP_ID_FINV   7
 
#define AHRS_COMP_ID_MLKF   8
 
#define AHRS_COMP_ID_GX3   9
 
#define AHRS_COMP_ID_CHIMU   10
 
#define AHRS_COMP_ID_VECTORNAV   11
 
#define AHRS_COMP_ID_EKF2   12
 
#define AHRS_COMP_ID_MADGWICK   13
 
#define AHRS_COMP_ID_FLOW   14
 

Typedefs

typedef bool(* AhrsEnableOutput) (bool)
 

Functions

void ahrs_register_impl (AhrsEnableOutput enable)
 Register an AHRS implementation. More...
 
void ahrs_init (void)
 AHRS initialization. More...
 
int ahrs_switch (uint8_t idx)
 Switch to the output of another AHRS impl. More...
 

Variables

uint8_t ahrs_output_idx
 

Detailed Description

Dispatcher to register actual AHRS implementations.

Definition in file ahrs.h.

Macro Definition Documentation

◆ AHRS_COMP_ID_CHIMU

#define AHRS_COMP_ID_CHIMU   10

Definition at line 42 of file ahrs.h.

◆ AHRS_COMP_ID_DCM

#define AHRS_COMP_ID_DCM   6

Definition at line 38 of file ahrs.h.

◆ AHRS_COMP_ID_EKF2

#define AHRS_COMP_ID_EKF2   12

Definition at line 44 of file ahrs.h.

◆ AHRS_COMP_ID_FC

#define AHRS_COMP_ID_FC   4

Definition at line 37 of file ahrs.h.

◆ AHRS_COMP_ID_FINV

#define AHRS_COMP_ID_FINV   7

Definition at line 39 of file ahrs.h.

◆ AHRS_COMP_ID_FLOW

#define AHRS_COMP_ID_FLOW   14

Definition at line 46 of file ahrs.h.

◆ AHRS_COMP_ID_GENERIC

#define AHRS_COMP_ID_GENERIC   1

Definition at line 33 of file ahrs.h.

◆ AHRS_COMP_ID_GX3

#define AHRS_COMP_ID_GX3   9

Definition at line 41 of file ahrs.h.

◆ AHRS_COMP_ID_ICE

#define AHRS_COMP_ID_ICE   4

Definition at line 36 of file ahrs.h.

◆ AHRS_COMP_ID_ICQ

#define AHRS_COMP_ID_ICQ   3

Definition at line 35 of file ahrs.h.

◆ AHRS_COMP_ID_IR

#define AHRS_COMP_ID_IR   2

Definition at line 34 of file ahrs.h.

◆ AHRS_COMP_ID_MADGWICK

#define AHRS_COMP_ID_MADGWICK   13

Definition at line 45 of file ahrs.h.

◆ AHRS_COMP_ID_MLKF

#define AHRS_COMP_ID_MLKF   8

Definition at line 40 of file ahrs.h.

◆ AHRS_COMP_ID_NONE

#define AHRS_COMP_ID_NONE   0

Definition at line 32 of file ahrs.h.

◆ AHRS_COMP_ID_VECTORNAV

#define AHRS_COMP_ID_VECTORNAV   11

Definition at line 43 of file ahrs.h.

Typedef Documentation

◆ AhrsEnableOutput

typedef bool(* AhrsEnableOutput) (bool)

Definition at line 58 of file ahrs.h.

Function Documentation

◆ ahrs_init()

void ahrs_init ( void  )

AHRS initialization.

Called at startup. Registers/initializes the default AHRS.

Definition at line 73 of file ahrs.c.

References ahrs_aligner_init(), ahrs_impls, AHRS_NB_IMPL, ahrs_switch(), AhrsImpl::enable, PRIMARY_AHRS, and RegisterAhrs.

Referenced by main_init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ahrs_register_impl()

void ahrs_register_impl ( AhrsEnableOutput  enable)

Register an AHRS implementation.

Adds it to an internal list.

Parameters
enablepointer to function to enable/disable the output of registering AHRS

Definition at line 62 of file ahrs.c.

References ahrs_impls, AHRS_NB_IMPL, and AhrsImpl::enable.

Referenced by ahrs_chimu_register(), ahrs_dcm_register(), ahrs_fc_register(), ahrs_float_invariant_register(), ahrs_icq_register(), ahrs_madgwick_register(), ahrs_mlkf_register(), ahrs_sim_register(), and ahrs_vectornav_register().

+ Here is the caller graph for this function:

◆ ahrs_switch()

int ahrs_switch ( uint8_t  idx)

Switch to the output of another AHRS impl.

Parameters
idxindex of the AHRS impl (0 = PRIMARY_AHRS, 1 = SECONDARY_AHRS).

Definition at line 93 of file ahrs.c.

References ahrs_impls, AHRS_NB_IMPL, ahrs_output_idx, AhrsImpl::enable, FALSE, idx, and TRUE.

Referenced by ahrs_init().

+ Here is the caller graph for this function:

Variable Documentation

◆ ahrs_output_idx

uint8_t ahrs_output_idx
extern

Definition at line 60 of file ahrs.c.

Referenced by ahrs_switch().