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

Simply converts GPS ECEF position and velocity to NED and passes it through to the state interface. More...

#include "modules/ins/ins_gps_passthrough.h"
#include "modules/ins/ins.h"
#include <inttypes.h>
#include <math.h>
#include "state.h"
#include "modules/gps/gps.h"
#include "modules/core/abi.h"
#include "modules/datalink/telemetry.h"
Include dependency graph for ins_gps_passthrough.c:

Go to the source code of this file.

Data Structures

struct  InsGpsPassthrough

Macros

#define USE_INS_NAV_INIT   TRUE
#define INS_PT_IMU_ID   ABI_BROADCAST
 ABI bindings on ACCEL data.
#define INS_PT_GPS_ID   GPS_MULTI_ID
 ABI binding for gps data.

Functions

static void accel_cb (uint8_t sender_id, uint32_t stamp, struct Int32Vect3 *accel)
static void reset_cb (uint8_t sender_id, uint8_t flag)
static void gps_cb (uint8_t sender_id, uint32_t stamp, struct GpsState *gps_s)
static void send_ins (struct transport_tx *trans, struct link_device *dev)
static void send_ins_z (struct transport_tx *trans, struct link_device *dev)
static void send_ins_ref (struct transport_tx *trans, struct link_device *dev)
void ins_gps_passthrough_init (void)
static void reset_ref (void)
static void reset_vertical_ref (void)

Variables

struct InsGpsPassthrough ins_gp
static abi_event accel_ev
static abi_event reset_ev
static abi_event gps_ev

Detailed Description

Simply converts GPS ECEF position and velocity to NED and passes it through to the state interface.

Definition in file ins_gps_passthrough.c.


Data Structure Documentation

◆ InsGpsPassthrough

struct InsGpsPassthrough

Definition at line 49 of file ins_gps_passthrough.c.

Collaboration diagram for InsGpsPassthrough:
Data Fields
struct NedCoor_i ltp_accel
struct LtpDef_i ltp_def
bool ltp_initialized
struct NedCoor_i ltp_pos
struct NedCoor_i ltp_speed

Macro Definition Documentation

◆ INS_PT_GPS_ID

#define INS_PT_GPS_ID   GPS_MULTI_ID

ABI binding for gps data.

Used for GPS ABI messages.

Definition at line 77 of file ins_gps_passthrough.c.

Referenced by ins_gps_passthrough_init().

◆ INS_PT_IMU_ID

#define INS_PT_IMU_ID   ABI_BROADCAST

ABI bindings on ACCEL data.

Definition at line 64 of file ins_gps_passthrough.c.

Referenced by ins_gps_passthrough_init().

◆ USE_INS_NAV_INIT

#define USE_INS_NAV_INIT   TRUE

Definition at line 40 of file ins_gps_passthrough.c.

Function Documentation

◆ accel_cb()

void accel_cb ( uint8_t sender_id,
uint32_t stamp,
struct Int32Vect3 * accel )
static

◆ gps_cb()

◆ ins_gps_passthrough_init()

◆ reset_cb()

void reset_cb ( uint8_t sender_id UNUSED,
uint8_t flag )
static

Definition at line 201 of file ins_gps_passthrough.c.

References INS_RESET_REF, INS_RESET_VERTICAL_REF, reset_ref(), reset_vertical_ref(), and UNUSED.

Here is the call graph for this function:

◆ reset_ref()

void reset_ref ( void )
static

Definition at line 178 of file ins_gps_passthrough.c.

References LlaCoor_i::alt, ecef_int_from_gps(), gps, ins_gp, lla_int_from_gps(), ltp_def_from_ecef_i(), and stateSetLocalOrigin_i().

Referenced by reset_cb().

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

◆ reset_vertical_ref()

void reset_vertical_ref ( void )
static

Definition at line 189 of file ins_gps_passthrough.c.

References gps, ins_gp, LlaCoor_i::lat, LlaCoor_i::lon, ltp_def_from_lla_i(), stateGetLlaOrigin_i(), and stateSetLocalOrigin_i().

Referenced by reset_cb().

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

◆ send_ins()

void send_ins ( struct transport_tx * trans,
struct link_device * dev )
static

Definition at line 113 of file ins_gps_passthrough.c.

References dev, and ins_gp.

◆ send_ins_ref()

void send_ins_ref ( struct transport_tx * trans,
struct link_device * dev )
static

Definition at line 129 of file ins_gps_passthrough.c.

References dev, and ins_gp.

◆ send_ins_z()

void send_ins_z ( struct transport_tx * trans,
struct link_device * dev )
static

Definition at line 121 of file ins_gps_passthrough.c.

References dev, and ins_gp.

Variable Documentation

◆ accel_ev

abi_event accel_ev
static

Definition at line 66 of file ins_gps_passthrough.c.

◆ gps_ev

abi_event gps_ev
static

Definition at line 80 of file ins_gps_passthrough.c.

◆ ins_gp

◆ reset_ev

abi_event reset_ev
static

Definition at line 70 of file ins_gps_passthrough.c.