Paparazzi UAS
v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
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"
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. More... | |
static void | gps_datalink_publish (uint32_t tow, struct EnuCoor_f *enu_pos, struct EnuCoor_f *enu_speed, float course) |
Publish the GPS data. More... | |
void | gps_datalink_parse_EXTERNAL_POSE (uint8_t *buf) |
Parse the full EXTERNAL_POSE message and publish as GPS through ABI. More... | |
void | gps_datalink_parse_EXTERNAL_POSE_SMALL (uint8_t *buf) |
Parse the EXTERNAL_POSE_SMALL message and publish as GPS through ABI. More... | |
void | gps_datalink_parse_REMOTE_GPS_LOCAL (uint8_t *buf) |
Variables | |
struct GpsState | gps_datalink |
static struct LtpDef_i | ltp_def |
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.
#define EXTERNAL_POSE_SMALL_POS_RES 1.0 |
Definition at line 40 of file gps_datalink.c.
#define EXTERNAL_POSE_SMALL_SPEED_RES 1.0 |
Definition at line 44 of file gps_datalink.c.
void gps_datalink_init | ( | void | ) |
GPS initialization.
Definition at line 51 of file gps_datalink.c.
References LlaCoor_i::alt, GpsState::cacc, GpsState::comp_id, GpsState::fix, gps_datalink, GPS_DATALINK_ID, GPS_FIX_NONE, LlaCoor_i::lat, LlaCoor_i::lon, ltp_def, ltp_def_from_lla_i(), GpsState::pacc, GpsState::pdop, and GpsState::sacc.
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.
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.
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.
|
static |
Publish the GPS data.
Definition at line 71 of file gps_datalink.c.
References CM_OF_M, GpsState::course, course, ecef_of_enu_point_i(), ecef_of_enu_vect_i(), GpsState::ecef_pos, GpsState::ecef_vel, GpsState::fix, FLOAT_VECT2_NORM, FLOAT_VECT3_NORM, get_sys_time_usec(), gps_datalink, GPS_DATALINK_ID, GPS_FIX_3D, GPS_VALID_COURSE_BIT, GPS_VALID_HMSL_BIT, GPS_VALID_POS_ECEF_BIT, GPS_VALID_POS_LLA_BIT, GPS_VALID_VEL_ECEF_BIT, GPS_VALID_VEL_NED_BIT, GpsState::gspeed, LtpDef_i::hmsl, GpsState::hmsl, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, GpsState::last_msg_ticks, GpsState::last_msg_time, lla_of_ecef_i(), GpsState::lla_pos, ltp_def, sys_time::nb_sec, sys_time::nb_sec_rem, GpsState::ned_vel, GpsState::num_sv, GpsState::speed_3d, GpsState::tow, GpsState::valid_fields, VECT3_NED_OF_ENU, EnuCoor_f::x, EnuCoor_i::x, EnuCoor_f::y, EnuCoor_i::y, EnuCoor_f::z, and EnuCoor_i::z.
Referenced by gps_datalink_parse_EXTERNAL_POSE(), gps_datalink_parse_EXTERNAL_POSE_SMALL(), and gps_datalink_parse_REMOTE_GPS_LOCAL().
struct GpsState gps_datalink |
Definition at line 1 of file gps_datalink.c.
Referenced by gps_datalink_init(), and gps_datalink_publish().
|
static |
Definition at line 1 of file gps_datalink.c.
Referenced by gps_datalink_init(), gps_datalink_publish(), ins_float_invariant_init(), ins_float_invariant_reset_ref(), ins_float_invariant_reset_vertical_ref(), ins_flow_init(), ins_init_origin_i_from_flightplan(), ins_mekf_wind_wrapper_init(), reset_ref(), reset_vertical_ref(), and stateSetLocalOrigin_i().