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
ins_module.h File Reference

Device independent INS code. More...

#include "std.h"
#include "subsystems/ins.h"
#include "mcu_periph/uart.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 __InsLink(dev, _x)   dev##_x
 
#define _InsLink(dev, _x)   __InsLink(dev, _x)
 
#define InsLink(_x)   _InsLink(INS_LINK, _x)
 
#define InsBuffer()   InsLink(ChAvailable())
 
#define ReadInsBuffer()   { while (InsLink(ChAvailable())&&!ins_msg_received) parse_ins_buffer(InsLink(Getch())); }
 
#define InsSend1(c)   InsLink(Transmit(c))
 
#define InsUartSend1(c)   InsSend1(c)
 
#define InsSend(_dat, _len)   { for (uint8_t i = 0; i< (_len); i++) InsSend1(_dat[i]); };
 
#define InsUartSetBaudrate(_b)   InsLink(SetBaudrate(_b))
 
#define InsUartRunning   InsLink(TxRunning)
 
#define InsEventCheckAndHandle(handler)
 !SITL More...
 

Functions

void handle_ins_msg (void)
 
void parse_ins_msg (void)
 
void parse_ins_buffer (uint8_t)
 

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 __InsLink (   dev,
  _x 
)    dev##_x

Definition at line 77 of file ins_module.h.

#define _InsLink (   dev,
  _x 
)    __InsLink(dev, _x)

Definition at line 78 of file ins_module.h.

#define INS_FORMAT   float

Definition at line 35 of file ins_module.h.

Referenced by parse_ins_msg().

#define InsBuffer ( )    InsLink(ChAvailable())

Definition at line 81 of file ins_module.h.

#define InsEventCheckAndHandle (   handler)
Value:
{ \
} \
handler; \
} \
}
volatile uint8_t ins_msg_received
Definition: ins_vn100.c:64
#define InsBuffer()
Definition: ins_module.h:81
if(PrimarySpektrumState.SpektrumTimer)--PrimarySpektrumState.SpektrumTimer
#define FALSE
Definition: imu_chimu.h:141
void parse_ins_msg(void)
#define ReadInsBuffer()
Definition: ins_module.h:82

!SITL

Definition at line 91 of file ins_module.h.

#define InsLink (   _x)    _InsLink(INS_LINK, _x)

Definition at line 79 of file ins_module.h.

Referenced by parse_ins_msg().

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

Definition at line 85 of file ins_module.h.

Referenced by ahrs_init(), and ahrs_update_gps().

#define InsSend1 (   c)    InsLink(Transmit(c))

Definition at line 83 of file ins_module.h.

Referenced by ahrs_init().

#define InsUartRunning   InsLink(TxRunning)

Definition at line 87 of file ins_module.h.

#define InsUartSend1 (   c)    InsSend1(c)

Definition at line 84 of file ins_module.h.

Referenced by ahrs_init().

#define InsUartSetBaudrate (   _b)    InsLink(SetBaudrate(_b))

Definition at line 86 of file ins_module.h.

#define ReadInsBuffer ( )    { while (InsLink(ChAvailable())&&!ins_msg_received) parse_ins_buffer(InsLink(Getch())); }

Definition at line 82 of file ins_module.h.

Function Documentation

void parse_ins_buffer ( uint8_t  )
void parse_ins_msg ( void  )
inline

Definition at line 79 of file ahrs_chimu_spi.c.

References ImuXsens::accel_available, LlaCoor_i::alt, UtmCoor_i::alt, CHIMU_Msg_3_IMU_Attitude, CHIMU_Parse(), SVinfo::cno, XsensTime::day, DefaultChannel, DefaultDevice, UtmCoor_f::east, UtmCoor_i::east, CHIMU_attitude_data::euler, GpsState::fix, SVinfo::flags, 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, InsLink, GpsState::last_fix_time, LlaCoor_f::lat, LlaCoor_i::lat, LED_ON, LED_TOGGLE, lla_f, 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, GpsState::ned_vel, new_ins_attitude, UtmCoor_f::north, UtmCoor_i::north, GpsState::num_sv, GpsState::pacc, GpsState::pdop, 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.

+ Here is the call graph for this function:

Variable Documentation

INS_FORMAT ins_ax

Definition at line 70 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_ay

Definition at line 71 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_az

Definition at line 72 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.

INS_FORMAT ins_mx

Definition at line 75 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_my

Definition at line 76 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_mz

Definition at line 77 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_p

Definition at line 65 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_phi

Definition at line 60 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_psi

Definition at line 62 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_q

Definition at line 66 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_r

Definition at line 67 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_theta

Definition at line 61 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_vx

Definition at line 55 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_vy

Definition at line 56 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_vz

Definition at line 57 of file ins_xsens.c.

Referenced by handle_ins_msg(), and parse_ins_msg().

INS_FORMAT ins_x

Definition at line 50 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_y

Definition at line 51 of file ins_xsens.c.

Referenced by parse_ins_msg().

INS_FORMAT ins_z

Definition at line 52 of file ins_xsens.c.

Referenced by parse_ins_msg().

volatile uint8_t new_ins_attitude

Referenced by ahrs_init(), and parse_ins_msg().