Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ins_xsens.c File Reference
#include "ins_xsens.h"
#include "subsystems/ins.h"
#include "generated/airframe.h"
#include "mcu_periph/sys_time.h"
#include "subsystems/abi.h"
#include "state.h"
+ Include dependency graph for ins_xsens.c:

Go to the source code of this file.

Macros

#define INS_XSENS_GPS_ID   GPS_MULTI_ID
 ABI binding for gps data. More...
 

Functions

static void handle_ins_msg (void)
 
static void update_state_interface (void)
 
static void gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
 
void ins_xsens_init (void)
 
void ins_xsens_event (void)
 

Variables

static abi_event gps_ev
 
float ins_pitch_neutral
 
float ins_roll_neutral
 

Detailed Description

Xsens as a full INS solution

Definition in file ins_xsens.c.

Macro Definition Documentation

◆ INS_XSENS_GPS_ID

#define INS_XSENS_GPS_ID   GPS_MULTI_ID

ABI binding for gps data.

Used for GPS ABI messages.

Definition at line 49 of file ins_xsens.c.

Function Documentation

◆ gps_cb()

static void gps_cb ( uint8_t  sender_id,
uint32_t  stamp,
struct GpsState gps_s 
)
static

Definition at line 87 of file ins_xsens.c.

References UtmCoor_f::alt, GpsState::hmsl, nav_utm_zone0, GpsState::ned_vel, stateSetPositionUtm_f(), stateSetSpeedNed_f(), utm_float_from_gps(), NedCoor_i::x, NedCoor_i::y, and NedCoor_i::z.

Referenced by ins_xsens_init().

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

◆ handle_ins_msg()

static void handle_ins_msg ( void  )
static

Definition at line 154 of file ins_xsens.c.

References FLOAT_VECT2_NORM, float_vect3_norm(), GPS_FIX_3D, GPS_VALID_COURSE_BIT, Xsens::new_attitude, new_ins_attitude, update_state_interface(), Xsens::vel, FloatVect3::x, xsens, and FloatVect3::y.

Referenced by ins_xsens_event().

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

◆ ins_xsens_event()

void ins_xsens_event ( void  )

Definition at line 77 of file ins_xsens.c.

References FALSE, handle_ins_msg(), XsensParser::msg_received, parse_xsens_msg(), Xsens::parser, xsens, and xsens_parser_event().

+ Here is the call graph for this function:

◆ ins_xsens_init()

◆ update_state_interface()

static void update_state_interface ( void  )
static

Definition at line 127 of file ins_xsens.c.

References Xsens::euler, Xsens::gyro, ins_pitch_neutral, ins_roll_neutral, FloatRates::p, FloatEulers::phi, FloatEulers::psi, FloatRates::q, FloatRates::r, stateSetBodyRates_f(), stateSetNedToBodyEulers_f(), FloatEulers::theta, and xsens.

Referenced by handle_ins_msg().

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

Variable Documentation

◆ gps_ev

abi_event gps_ev
static

Definition at line 52 of file ins_xsens.c.

Referenced by ins_xsens_init().

◆ ins_pitch_neutral

float ins_pitch_neutral

Definition at line 54 of file ins_xsens.c.

Referenced by ins_xsens_init(), and update_state_interface().

◆ ins_roll_neutral

float ins_roll_neutral

Definition at line 55 of file ins_xsens.c.

Referenced by ins_xsens_init(), and update_state_interface().