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

GPS system based on datalink. More...

#include "generated/flight_plan.h"
#include "modules/gps/gps.h"
#include "modules/core/abi.h"
#include "modules/imu/imu.h"
#include "modules/datalink/datalink.h"
#include "modules/datalink/downlink.h"
Include dependency graph for gps_datalink.c:

Go to the source code of this file.

Macros

#define EXTERNAL_POSE_SMALL_POS_RES   1.0
#define EXTERNAL_POSE_SMALL_SPEED_RES   1.0

Functions

void gps_datalink_init (void)
 GPS initialization.
static void gps_datalink_publish (uint32_t tow, struct EnuCoor_f *enu_pos, struct EnuCoor_f *enu_speed, float course)
 Publish the GPS data.
void gps_datalink_parse_EXTERNAL_POSE (uint8_t *buf)
 Parse the full EXTERNAL_POSE message and publish as GPS through ABI.
void gps_datalink_parse_EXTERNAL_POSE_SMALL (uint8_t *buf)
 Parse the EXTERNAL_POSE_SMALL message and publish as GPS through ABI.
void gps_datalink_parse_REMOTE_GPS_LOCAL (uint8_t *buf)

Variables

struct GpsState gps_datalink = {0}
static struct LtpDef_i ltp_def

Detailed Description

GPS system based on datalink.

This GPS parses the datalink REMOTE_GPS packet and sets the GPS structure to the values received.

Definition in file gps_datalink.c.

Macro Definition Documentation

◆ EXTERNAL_POSE_SMALL_POS_RES

#define EXTERNAL_POSE_SMALL_POS_RES   1.0

Definition at line 40 of file gps_datalink.c.

Referenced by gps_datalink_parse_EXTERNAL_POSE_SMALL().

◆ EXTERNAL_POSE_SMALL_SPEED_RES

#define EXTERNAL_POSE_SMALL_SPEED_RES   1.0

Definition at line 44 of file gps_datalink.c.

Referenced by gps_datalink_parse_EXTERNAL_POSE_SMALL().

Function Documentation

◆ gps_datalink_init()

void gps_datalink_init ( void )

GPS initialization.

Definition at line 51 of file gps_datalink.c.

References LlaCoor_i::alt, gps_datalink, GPS_DATALINK_ID, GPS_FIX_NONE, LlaCoor_i::lat, LlaCoor_i::lon, ltp_def, and ltp_def_from_lla_i().

Here is the call graph for this function:

◆ gps_datalink_parse_EXTERNAL_POSE()

void gps_datalink_parse_EXTERNAL_POSE ( uint8_t * buf)

Parse the full EXTERNAL_POSE message and publish as GPS through ABI.

Definition at line 123 of file gps_datalink.c.

References float_eulers_of_quat(), gps_datalink_publish(), heading, FloatEulers::psi, FloatQuat::qi, FloatQuat::qx, FloatQuat::qy, FloatQuat::qz, EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

Here is the call graph for this function:

◆ gps_datalink_parse_EXTERNAL_POSE_SMALL()

void gps_datalink_parse_EXTERNAL_POSE_SMALL ( uint8_t * buf)

Parse the EXTERNAL_POSE_SMALL message and publish as GPS through ABI.

Definition at line 151 of file gps_datalink.c.

References EXTERNAL_POSE_SMALL_POS_RES, EXTERNAL_POSE_SMALL_SPEED_RES, gps_datalink_publish(), heading, EnuCoor_f::x, EnuCoor_i::x, EnuCoor_f::y, EnuCoor_i::y, EnuCoor_f::z, and EnuCoor_i::z.

Here is the call graph for this function:

◆ gps_datalink_parse_REMOTE_GPS_LOCAL()

void gps_datalink_parse_REMOTE_GPS_LOCAL ( uint8_t * buf)

Definition at line 203 of file gps_datalink.c.

References course, gps_datalink_publish(), EnuCoor_f::x, EnuCoor_f::y, and EnuCoor_f::z.

Here is the call graph for this function:

◆ gps_datalink_publish()

Variable Documentation

◆ gps_datalink

struct GpsState gps_datalink = {0}

Definition at line 47 of file gps_datalink.c.

Referenced by gps_datalink_init(), and gps_datalink_publish().

◆ ltp_def