Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
GPS system based on datalink. More...
#include "generated/flight_plan.h"
#include "subsystems/gps.h"
#include "subsystems/abi.h"
#include "subsystems/datalink/datalink.h"
Go to the source code of this file.
Functions | |
void | gps_datalink_init (void) |
GPS initialization. More... | |
static void | parse_gps_datalink_small (int16_t heading, uint32_t pos_xyz, uint32_t speed_xyz, uint32_t tow) |
static void | parse_gps_datalink (uint8_t numsv, int32_t ecef_x, int32_t ecef_y, int32_t ecef_z, int32_t lat, int32_t lon, int32_t alt, int32_t hmsl, int32_t ecef_xd, int32_t ecef_yd, int32_t ecef_zd, uint32_t tow, int32_t course) |
Parse the REMOTE_GPS datalink packet. More... | |
static void | parse_gps_datalink_local (float enu_x, float enu_y, float enu_z, float enu_xd, float enu_yd, float enu_zd, uint32_t tow, float course) |
Parse the REMOTE_GPS_LOCAL datalink packet. More... | |
void | gps_datalink_parse_REMOTE_GPS (uint8_t *buf) |
void | gps_datalink_parse_REMOTE_GPS_SMALL (uint8_t *buf) |
void | gps_datalink_parse_REMOTE_GPS_LOCAL (uint8_t *buf) |
Variables | |
struct LtpDef_i | ltp_def |
struct GpsState | gps_datalink |
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.
void gps_datalink_init | ( | void | ) |
GPS initialization.
Definition at line 41 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_REMOTE_GPS | ( | uint8_t * | buf | ) |
Definition at line 231 of file gps_datalink.c.
References parse_gps_datalink().
void gps_datalink_parse_REMOTE_GPS_LOCAL | ( | uint8_t * | buf | ) |
Definition at line 260 of file gps_datalink.c.
References parse_gps_datalink_local().
void gps_datalink_parse_REMOTE_GPS_SMALL | ( | uint8_t * | buf | ) |
Definition at line 250 of file gps_datalink.c.
References parse_gps_datalink_small().
|
static |
Parse the REMOTE_GPS datalink packet.
Definition at line 128 of file gps_datalink.c.
References LlaCoor_i::alt, course, GpsState::course, 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, GpsState::hmsl, GpsState::last_3dfix_ticks, GpsState::last_3dfix_time, GpsState::last_msg_ticks, GpsState::last_msg_time, LlaCoor_i::lat, GpsState::lla_pos, LlaCoor_i::lon, ltp_def, sys_time::nb_sec, sys_time::nb_sec_rem, ned_of_ecef_vect_i(), GpsState::ned_vel, GpsState::num_sv, GpsState::speed_3d, GpsState::tow, GpsState::valid_fields, EcefCoor_i::x, EcefCoor_i::y, and EcefCoor_i::z.
Referenced by gps_datalink_parse_REMOTE_GPS().
|
static |
Parse the REMOTE_GPS_LOCAL datalink packet.
Definition at line 177 of file gps_datalink.c.
References CM_OF_M, GpsState::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, GpsState::hmsl, LtpDef_i::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_i::x, EnuCoor_i::y, and EnuCoor_i::z.
Referenced by gps_datalink_parse_REMOTE_GPS_LOCAL().
|
static |
Definition at line 61 of file gps_datalink.c.
References GpsState::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, GpsState::hmsl, LtpDef_i::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_i::x, EnuCoor_i::y, and EnuCoor_i::z.
Referenced by gps_datalink_parse_REMOTE_GPS_SMALL().
struct GpsState gps_datalink |
Definition at line 38 of file gps_datalink.c.
Referenced by gps_datalink_init(), parse_gps_datalink(), parse_gps_datalink_local(), and parse_gps_datalink_small().
struct LtpDef_i ltp_def |
Definition at line 36 of file gps_datalink.c.
Referenced by gps_datalink_init(), parse_gps_datalink(), parse_gps_datalink_local(), and parse_gps_datalink_small().