29 #include "generated/airframe.h"
30 #include "generated/flight_plan.h"
33 #include "pprzlink/dl_protocol.h"
34 #include "pprzlink/messages.h"
82 #if PPRZLINK_DEFAULT_VER == 2
83 if (pprzlink_get_msg_class_id(
dl_buffer) == DL_telemetry_CLASS_ID) {
157 case DL_ACINFO_LLA: {
188 if (utm_zone == my_zone) {
196 struct UtmCoor_i utm = {.
east = utm_east, .north = utm_north, .alt =
alt, .zone = utm_zone};
static struct UtmCoor_f * acInfoGetPositionUtm_f(uint8_t ac_id)
Get position from UTM coordinates (float).
#define SPEEDS_BFP_OF_REAL(_ef, _ei)
int32_t north
in centimeters
bool utm_initialized_f
True if utm origin (float) coordinate frame is initialsed.
void acInfoCalcPositionUtm_f(uint8_t ac_id)
struct LlaCoor_i lla_pos_i
Position in Latitude, Longitude and Altitude.
struct EnuCoor_f enu_vel_f
speed in North East Down coordinates
float alt
in meters (above WGS84 reference ellipsoid or above MSL)
void set_ac_info_lla(uint8_t id, int32_t lat, int32_t lon, int32_t alt, int16_t course, uint16_t gspeed, int16_t climb, uint32_t itow)
Set Aircraft info.
void acInfoCalcVelocityEnu_f(uint8_t ac_id)
void acInfoCalcVelocityEnu_i(uint8_t ac_id)
uint8_t valid_fields
bitfield indicating valid fields (GPS_VALID_x_BIT)
struct LtpDef_f ned_origin_f
Definition of the local (flat earth) coordinate system.
Handling of messages coming from ground and other A/Cs.
void acInfoCalcPositionUtm_i(uint8_t ac_id)
void acInfoCalcPositionLla_i(uint8_t ac_id)
struct UtmCoor_f utm_pos_f
Position in UTM coordinates.
#define AC_INFO_POS_LLA_I
#define AC_INFO_POS_UTM_F
bool parse_acinfo_dl(void)
Parse all datalink or telemetry messages that contain global position of other acs Messages currently...
#define UTM_FLOAT_OF_BFP(_o, _i)
#define AC_INFO_VEL_ENU_I
int32_t east
in centimeters
void enu_of_lla_point_f(struct EnuCoor_f *enu, struct LtpDef_f *def, struct LlaCoor_f *lla)
#define SPEEDS_FLOAT_OF_BFP(_ef, _ei)
vector in Latitude, Longitude and Altitude
volatile uint32_t nb_tick
SYS_TIME_TICKS since startup.
uint16_t status
Holds the status bits for all acinfo position and velocity representations.
int32_t alt
in millimeters above WGS84 reference ellipsoid
void set_ac_info_utm(uint8_t id, uint32_t utm_east, uint32_t utm_north, uint32_t alt, uint8_t utm_zone, uint16_t course, uint16_t gspeed, uint16_t climb, uint32_t itow)
Set Aircraft info.
uint8_t zone
UTM zone number.
#define UTM_BFP_OF_REAL(_o, _i)
int32_t hmsl
height above mean sea level (MSL) in mm
void acInfoCalcPositionEnu_i(uint8_t ac_id)
struct UtmCoor_i utm_pos_i
Position in UTM coordinates.
static void update_geoid_height(void)
Update estimate of the geoid height Requires an available hsml and/or lla measurement, if not available value isn't updated.
void lla_of_utm_i(struct LlaCoor_i *lla, struct UtmCoor_i *utm)
Convert a UTM to LLA.
void lla_of_utm_f(struct LlaCoor_f *lla, struct UtmCoor_f *utm)
#define ENU_FLOAT_OF_BFP(_o, _i)
#define GPS_VALID_HMSL_BIT
int32_t lon
in degrees*1e7
#define AC_INFO_POS_ENU_I
static struct LlaCoor_f * acInfoGetPositionLla_f(uint8_t ac_id)
Get position from LLA coordinates (float).
void utm_of_lla_i(struct UtmCoor_i *utm, struct LlaCoor_i *lla)
Convert a LLA to UTM.
uint8_t zone
UTM zone number.
struct UtmCoor_f utm_origin_f
Definition of the origin of Utm coordinate system.
#define LLA_COPY(_pos1, _pos2)
bool ned_initialized_i
true if local int coordinate frame is initialsed
#define AC_INFO_POS_ENU_F
void traffic_info_init(void)
struct LtpDef_i ned_origin_i
Definition of the local (flat earth) coordinate system.
float alt
in meters (normally above WGS84 reference ellipsoid)
Constants UTM (Mercator) projections.
void acInfoCalcPositionEnu_f(uint8_t ac_id)
int32_t alt
in millimeters (above WGS84 reference ellipsoid or above MSL)
struct LlaCoor_f lla_pos_f
Position in Latitude, Longitude and Altitude.
API to get/set the generic vehicle states.
#define AC_INFO_VEL_LOCAL_F
struct acInfo ti_acs[NB_ACS]
#define LLA_BFP_OF_REAL(_o, _i)
uint8_t dl_buffer[MSG_SIZE]
#define GPS_VALID_POS_LLA_BIT
uint32_t gps_tow_from_sys_ticks(uint32_t sys_ticks)
Convert time in sys_time ticks to GPS time of week.
#define ENU_BFP_OF_REAL(_o, _i)
struct LlaCoor_i lla_pos
position in LLA (lat,lon: deg*1e7; alt: mm over ellipsoid)
#define AC_INFO_POS_UTM_I
void enu_of_lla_point_i(struct EnuCoor_i *enu, struct LtpDef_i *def, struct LlaCoor_i *lla)
Convert a point from LLA to local ENU.
int32_t lat
in degrees*1e7
void acInfoCalcPositionLla_f(uint8_t ac_id)
static struct LlaCoor_i * acInfoGetPositionLla_i(uint8_t ac_id)
Get position from LLA coordinates (int).
#define ENU_OF_UTM_DIFF(_pos, _utm1, _utm2)
struct GpsState gps
global GPS state
#define AC_INFO_POS_LLA_F
#define LLA_FLOAT_OF_BFP(_o, _i)
static int32_t wgs84_ellipsoid_to_geoid_i(int32_t lat, int32_t lon)
Get WGS84 ellipsoid/geoid separation.
void utm_of_lla_f(struct UtmCoor_f *utm, struct LlaCoor_f *lla)
#define AC_INFO_VEL_ENU_F
position in UTM coordinates
uint8_t ti_acs_id[NB_ACS_ID]
#define UTM_COPY(_u1, _u2)