Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
ins_module.h File Reference

Device independent INS code. More...

#include "std.h"
#include "modules/ins/ins.h"
#include "pprzlink/pprzlink_device.h"
#include "mcu_periph/uart.h"
#include "mcu_periph/spi.h"
Include dependency graph for ins_module.h:

Go to the source code of this file.

Macros

#define INS_FORMAT   float
#define InsLinkDevice   (&((INS_LINK).device))
#define InsSend1(c)
#define InsUartSend1(c)
#define InsSend(_dat, _len)
#define InsUartSetBaudrate(_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

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

◆ INS_FORMAT

#define INS_FORMAT   float

Definition at line 35 of file ins_module.h.

◆ InsLinkDevice

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

Definition at line 76 of file ins_module.h.

Referenced by ins_event_check_and_handle().

◆ InsSend

#define InsSend ( _dat,
_len )
Value:
{ for (uint8_t i = 0; i< (_len); i++) InsSend1(_dat[i]); };
#define InsSend1(c)
Definition ins_module.h:82
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.

Definition at line 84 of file ins_module.h.

◆ InsSend1

#define InsSend1 ( c)
Value:
InsLinkDevice->put_byte(InsLinkDevice->periph, 0, c)
#define InsLinkDevice
Definition ins_module.h:76

Definition at line 82 of file ins_module.h.

◆ InsUartSend1

#define InsUartSend1 ( c)
Value:

Definition at line 83 of file ins_module.h.

◆ InsUartSetBaudrate

#define InsUartSetBaudrate ( _b)
Value:
void uart_periph_set_baudrate(struct uart_periph *periph, uint32_t baud)
Definition uart_arch.c:280

Definition at line 85 of file ins_module.h.

Function Documentation

◆ handle_ins_msg()

void handle_ins_msg ( void )

Definition at line 151 of file ins_xsens.c.

References FLOAT_VECT2_NORM, float_vect3_norm(), GPS_FIX_3D, GPS_VALID_COURSE_BIT, new_ins_attitude, update_state_interface(), and xsens.

Here is the call graph for this function:

◆ ins_event_check_and_handle()

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

!SITL

Definition at line 89 of file ins_module.h.

References dev, ins_msg_received, InsLinkDevice, parse_ins_buffer(), and parse_ins_msg().

Here is the call graph for this function:

◆ parse_ins_buffer()

void parse_ins_buffer ( uint8_t )

Referenced by ins_event_check_and_handle().

Here is the caller graph for this function:

◆ parse_ins_msg()

void parse_ins_msg ( void )
inline

Variable Documentation

◆ ins_ax

INS_FORMAT ins_ax
extern

◆ ins_ay

INS_FORMAT ins_ay
extern

◆ ins_az

INS_FORMAT ins_az
extern

◆ ins_msg_received

volatile uint8_t ins_msg_received
extern

Definition at line 64 of file ins_vn100.c.

Referenced by ins_event_check_and_handle().

◆ ins_mx

INS_FORMAT ins_mx
extern

◆ ins_my

INS_FORMAT ins_my
extern

◆ ins_mz

INS_FORMAT ins_mz
extern

◆ ins_p

INS_FORMAT ins_p
extern

◆ ins_phi

INS_FORMAT ins_phi
extern

◆ ins_psi

INS_FORMAT ins_psi
extern

◆ ins_q

INS_FORMAT ins_q
extern

◆ ins_r

INS_FORMAT ins_r
extern

◆ ins_theta

INS_FORMAT ins_theta
extern

◆ ins_vx

INS_FORMAT ins_vx
extern

◆ ins_vy

INS_FORMAT ins_vy
extern

◆ ins_vz

INS_FORMAT ins_vz
extern

◆ ins_x

INS_FORMAT ins_x
extern

◆ ins_y

INS_FORMAT ins_y
extern

◆ ins_z

INS_FORMAT ins_z
extern

◆ new_ins_attitude

volatile uint8_t new_ins_attitude
extern

Referenced by handle_ins_msg(), and handle_ins_msg().