28 #ifndef TRAFFIC_INFO_H
29 #define TRAFFIC_INFO_H
47 #define AC_INFO_POS_UTM_I 0
48 #define AC_INFO_POS_LLA_I 1
49 #define AC_INFO_POS_ENU_I 2
50 #define AC_INFO_POS_UTM_F 3
51 #define AC_INFO_POS_LLA_F 4
52 #define AC_INFO_POS_ENU_F 5
53 #define AC_INFO_VEL_ENU_I 6
54 #define AC_INFO_VEL_ENU_F 7
55 #define AC_INFO_VEL_LOCAL_F 8
174 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
192 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
210 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
228 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
246 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
264 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
282 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
300 if (ac_id > 0 &&
ti_acs_id[ac_id] == 0) {
static void acInfoSetPositionLla_f(uint8_t ac_id, struct LlaCoor_f *lla_pos)
Set position from LLA coordinates (float).
static struct UtmCoor_f * acInfoGetPositionUtm_f(uint8_t ac_id)
Get position from UTM coordinates (float).
struct EnuCoor_i enu_vel_i
Velocity in North East Down coordinates.
static struct EnuCoor_i * acInfoGetPositionEnu_i(uint8_t ac_id)
Get position in local ENU coordinates (int).
void acInfoCalcPositionUtm_f(uint8_t ac_id)
struct LlaCoor_i lla_pos_i
Position in Latitude, Longitude and Altitude.
static struct EnuCoor_i * acInfoGetVelocityEnu_i(uint8_t ac_id)
Get position from ENU coordinates (int).
static float acInfoGetGspeed(uint8_t ac_id)
Get vehicle ground speed (float).
struct EnuCoor_f enu_vel_f
speed in North East Down coordinates
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)
static void acInfoSetPositionEnu_i(uint8_t ac_id, struct EnuCoor_i *enu_pos)
Set position from ENU coordinates (int).
vector in East North Up coordinates Units: meters
bool parse_acinfo_dl(uint8_t *buf)
Parse all datalink or telemetry messages that contain global position of other acs Messages currently...
#define VECT3_COPY(_a, _b)
static float acInfoGetCourse(uint8_t ac_id)
Get vehicle course (float).
static struct UtmCoor_i * acInfoGetPositionUtm_i(uint8_t ac_id)
Get position from UTM coordinates (int).
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
position in UTM coordinates Units: meters
#define AC_INFO_VEL_ENU_I
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.
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.
static float acInfoGetClimb(uint8_t ac_id)
Get vehicle climb speed (float).
Paparazzi floating point math for geodetic calculations.
struct EnuCoor_f enu_pos_f
Position in North East Down coordinates Units: m.
vector in Latitude, Longitude and Altitude
static struct EnuCoor_f * acInfoGetPositionEnu_f(uint8_t ac_id)
Get position in local ENU coordinates (float).
static uint32_t acInfoGetItow(uint8_t ac_id)
Get time of week from latest message (ms).
void acInfoCalcPositionEnu_i(uint8_t ac_id)
static void acInfoSetPositionUtm_i(uint8_t ac_id, struct UtmCoor_i *utm_pos)
Set position from UTM coordinates (int).
static void acInfoSetVelocityEnu_i(uint8_t ac_id, struct EnuCoor_i *enu_vel)
Set velocity from ENU coordinates (int).
Architecture independent timing functions.
struct UtmCoor_i utm_pos_i
Position in UTM coordinates.
Device independent GPS code (interface)
static void acInfoSetVelocityEnu_f(uint8_t ac_id, struct EnuCoor_f *enu_vel)
Set velocity from ENU coordinates (float).
static struct EnuCoor_f * acInfoGetVelocityEnu_f(uint8_t ac_id)
Get position from ENU coordinates (float).
#define AC_INFO_POS_ENU_I
static struct LlaCoor_f * acInfoGetPositionLla_f(uint8_t ac_id)
Get position from LLA coordinates (float).
Paparazzi fixed point math for geodetic calculations.
struct EnuCoor_i enu_pos_i
Position in North East Down coordinates.
#define LLA_COPY(_pos1, _pos2)
#define AC_INFO_POS_ENU_F
void traffic_info_init(void)
void acInfoCalcPositionEnu_f(uint8_t ac_id)
struct LlaCoor_f lla_pos_f
Position in Latitude, Longitude and Altitude.
vector in East North Up coordinates
static void acInfoSetPositionLla_i(uint8_t ac_id, struct LlaCoor_i *lla_pos)
Set position from LLA coordinates (int).
uint32_t gps_tow_from_sys_ticks(uint32_t sys_ticks)
Convert time in sys_time ticks to GPS time of week.
static void acInfoSetPositionEnu_f(uint8_t ac_id, struct EnuCoor_f *enu_pos)
Set position from ENU coordinates (float).
#define AC_INFO_POS_UTM_I
void acInfoCalcPositionLla_f(uint8_t ac_id)
static struct LlaCoor_i * acInfoGetPositionLla_i(uint8_t ac_id)
Get position from LLA coordinates (int).
static void acInfoSetPositionUtm_f(uint8_t ac_id, struct UtmCoor_f *utm_pos)
Set position from UTM coordinates (float).
#define AC_INFO_POS_LLA_F
#define AC_INFO_VEL_ENU_F
position in UTM coordinates
#define UTM_COPY(_u1, _u2)