Paparazzi UAS  v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ins_module.h File Reference

Device independent INS code. More...

#include "std.h"
#include "subsystems/ins.h"
#include "mcu_periph/link_device.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/spi.h"
+ Include dependency graph for ins_module.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define INS_FORMAT   float
 
#define InsLinkDevice   (&((INS_LINK).device))
 
#define InsSend1(c)   InsLinkDevice->put_byte(InsLinkDevice->periph, c)
 
#define InsUartSend1(c)   InsSend1(c)
 
#define InsSend(_dat, _len)   { for (uint8_t i = 0; i< (_len); i++) InsSend1(_dat[i]); };
 
#define InsUartSetBaudrate(_b)   uart_periph_set_baudrate(INS_LINK, _b)
 

Functions

void handle_ins_msg (void)
 
void parse_ins_msg (void)
 
void parse_ins_buffer (uint8_t)
 
static void ins_event_check_and_handle (void(*handler)(void))
 !SITL More...
 

Variables

INS_FORMAT ins_x
 
INS_FORMAT ins_y
 
INS_FORMAT ins_z
 
INS_FORMAT ins_vx
 
INS_FORMAT ins_vy
 
INS_FORMAT ins_vz
 
INS_FORMAT ins_phi
 
INS_FORMAT ins_theta
 
INS_FORMAT ins_psi
 
INS_FORMAT ins_p
 
INS_FORMAT ins_q
 
INS_FORMAT ins_r
 
INS_FORMAT ins_ax
 
INS_FORMAT ins_ay
 
INS_FORMAT ins_az
 
INS_FORMAT ins_mx
 
INS_FORMAT ins_my
 
INS_FORMAT ins_mz
 
volatile uint8_t ins_msg_received
 
volatile uint8_t new_ins_attitude
 

Detailed Description

Device independent INS code.

Definition in file ins_module.h.

Macro Definition Documentation

#define INS_FORMAT   float

Definition at line 35 of file ins_module.h.

Referenced by parse_ins_msg().

#define InsLinkDevice   (&((INS_LINK).device))

Definition at line 76 of file ins_module.h.

Referenced by ins_event_check_and_handle(), and parse_ins_msg().

#define InsSend (   _dat,
  _len 
)    { for (uint8_t i = 0; i< (_len); i++) InsSend1(_dat[i]); };

Definition at line 84 of file ins_module.h.

Referenced by ahrs_chimu_init(), and ahrs_chimu_update_gps().

#define InsSend1 (   c)    InsLinkDevice->put_byte(InsLinkDevice->periph, c)

Definition at line 82 of file ins_module.h.

Referenced by ahrs_chimu_init().

#define InsUartSend1 (   c)    InsSend1(c)

Definition at line 83 of file ins_module.h.

Referenced by ahrs_chimu_init().

#define InsUartSetBaudrate (   _b)    uart_periph_set_baudrate(INS_LINK, _b)

Definition at line 85 of file ins_module.h.

Function Documentation

static void ins_event_check_and_handle ( void(*)(void)  handler)
inlinestatic

!SITL

Definition at line 89 of file ins_module.h.

References link_device::char_available, dev, FALSE, link_device::get_byte, ins_msg_received, InsLinkDevice, parse_ins_buffer(), parse_ins_msg(), and link_device::periph.

+ Here is the call graph for this function:

void parse_ins_buffer ( uint8_t  )

Definition at line 714 of file ins_xsens.c.

References ck, GOT_BID, GOT_DATA, GOT_LEN, GOT_MID, GOT_START, ins_msg_received, TRUE, UNINIT, xsens_id, xsens_len, XSENS_MAX_PAYLOAD, xsens_msg_buf, xsens_msg_idx, and xsens_status.

Referenced by ins_event_check_and_handle().

+ Here is the caller graph for this function:

void parse_ins_msg ( void  )
inline

Definition at line 100 of file ahrs_chimu_spi.c.

References ImuXsens::accel_available, ahrs_chimu, ahrs_chimu_id, LlaCoor_i::alt, UtmCoor_i::alt, link_device::char_available, CHIMU_Msg_3_IMU_Attitude, CHIMU_Parse(), SVinfo::cno, XsensTime::day, DefaultChannel, DefaultDevice, dev, UtmCoor_f::east, UtmCoor_i::east, CHIMU_attitude_data::euler, GpsState::fix, SVinfo::flags, link_device::get_byte, gps, GPS_FIX_2D, GPS_FIX_3D, GPS_FIX_NONE, GPS_NB_CHANNELS, ImuXsens::gyro_available, GpsState::hmsl, XsensTime::hour, imu_xsens, ins_ax, ins_ay, ins_az, INS_FORMAT, ins_mx, ins_my, ins_mz, ins_p, ins_phi, ins_psi, ins_q, ins_r, ins_theta, ins_vx, ins_vy, ins_vz, ins_x, ins_y, ins_z, InsLinkDevice, AhrsChimu::is_aligned, AhrsChimu::is_enabled, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, LlaCoor_f::lat, LlaCoor_i::lat, LED_ON, LED_TOGGLE, lla_f, LLA_FLOAT_OF_BFP, GpsState::lla_pos, LlaCoor_f::lon, LlaCoor_i::lon, CHIMU_PARSER_DATA::m_attitude, CHIMU_PARSER_DATA::m_attrates, CHIMU_PARSER_DATA::m_MsgID, CHIMU_PARSER_DATA::m_sensor, ImuXsens::mag_available, XsensTime::min, Min, XsensTime::month, XsensTime::nanosec, nav_utm_zone0, GpsState::nb_channels, sys_time::nb_sec, sys_time::nb_sec_rem, GpsState::ned_vel, new_ins_attitude, UtmCoor_f::north, UtmCoor_i::north, GpsState::num_sv, GpsState::pacc, GpsState::pdop, link_device::periph, CHIMU_Euler::phi, CHIMU_Euler::psi, SVinfo::qi, CHIMU_sensor_data::rate, GpsState::sacc, XsensTime::sec, stateSetBodyRates_f(), stateSetNedToBodyEulers_f(), SVinfo::svid, GpsState::svinfos, CHIMU_Euler::theta, GpsState::tow, TRUE, utm_f, utm_of_lla_f(), GpsState::utm_pos, GpsState::week, wgs84_ellipsoid_to_geoid(), NedCoor_i::x, xsens_declination, xsens_errorcode, xsens_gps_arm_x, xsens_gps_arm_y, xsens_gps_arm_z, xsens_id, xsens_len, xsens_msg_buf, xsens_msg_status, xsens_msg_statusword, xsens_output_mode, xsens_output_settings, xsens_time, xsens_time_stamp, NedCoor_i::y, XsensTime::year, NedCoor_i::z, UtmCoor_f::zone, and UtmCoor_i::zone.

Referenced by ins_event_check_and_handle().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Variable Documentation

INS_FORMAT ins_ax

Definition at line 71 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_ay

Definition at line 72 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_az

Definition at line 73 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

volatile uint8_t ins_msg_received

Definition at line 64 of file ins_vn100.c.

Referenced by ins_event_check_and_handle().

INS_FORMAT ins_mx

Definition at line 76 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_my

Definition at line 77 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_mz

Definition at line 78 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_p

Definition at line 66 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_phi

Definition at line 61 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_psi

Definition at line 63 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_q

Definition at line 67 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_r

Definition at line 68 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_theta

Definition at line 62 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_vx

Definition at line 56 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_vy

Definition at line 57 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_vz

Definition at line 58 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_x

Definition at line 51 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_y

Definition at line 52 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_z

Definition at line 53 of file ins_xsens.c.

Referenced by parse_ins_msg().

volatile uint8_t new_ins_attitude

Referenced by ahrs_chimu_init(), and parse_ins_msg().