37 #define WP_FLAG_GLOBAL 0
38 #define WP_FLAG_ENU_I 1
39 #define WP_FLAG_ENU_F 2
40 #define WP_FLAG_LLA_I 3
54 #define WaypointX(_wp) waypoint_get_x(_wp)
55 #define WaypointY(_wp) waypoint_get_y(_wp)
56 #if USE_ALT_LLA_WAYPOINTS
57 #define WaypointAlt(_wp) waypoint_get_lla_alt(_wp)
59 #define WaypointAlt(_wp) waypoint_get_alt(_wp)
61 #define Height(_h) (_h)
vector in East North Up coordinates
vector in Latitude, Longitude and Altitude
void waypoint_copy(uint8_t wp_dest, uint8_t wp_src)
copy one waypoint to another, this includes all flags from the source waypoint
void waypoint_globalize(uint8_t wp_id)
update global LLA coordinates from its ENU coordinates
void waypoint_set_here_2d(uint8_t wp_id)
set waypoint to current horizontal location without modifying altitude
struct Waypoint waypoints[]
size == nb_waypoint, waypoint 0 is a dummy waypoint
void waypoints_localize_all(void)
update local ENU coordinates of all global waypoints
struct LlaCoor_i * waypoint_get_lla(uint8_t wp_id)
Get LLA coordinates of waypoint.
void waypoint_position_copy(uint8_t wp_dest, uint8_t wp_src)
void waypoint_move_xy_i(uint8_t wp_id, int32_t x, int32_t y)
bool waypoint_is_global(uint8_t wp_id)
float waypoint_get_lon_rad(uint8_t wp_id)
Get longitude of waypoint in rad.
float waypoint_get_alt(uint8_t wp_id)
Get altitude of waypoint in meters (above reference)
float waypoint_get_x(uint8_t wp_id)
Get X/East coordinate of waypoint in meters.
void waypoint_set_xy_i(uint8_t wp_id, int32_t x, int32_t y)
Set only local XY coordinates of waypoint without update altitude.
void waypoint_set_here(uint8_t wp_id)
set waypoint to current location and altitude
float waypoint_get_lon_deg(uint8_t wp_id)
Get longitude of waypoint in deg.
void waypoint_set_global_flag(uint8_t wp_id)
uint8_t flags
bitmask encoding valid representations and if local or global
void waypoint_set_latlon(uint8_t wp_id, struct LlaCoor_i *lla)
set waypoint latitude/longitude without updating altitude
void waypoints_init(void)
initialize global and local waypoints
struct EnuCoor_i enu_i
with INT32_POS_FRAC
float waypoint_get_lla_alt(uint8_t wp_id)
float waypoint_get_lat_deg(uint8_t wp_id)
Get latitude of waypoint in deg.
void waypoint_move_enu_i(uint8_t wp_id, struct EnuCoor_i *new_pos)
struct EnuCoor_i * waypoint_get_enu_i(uint8_t wp_id)
Get ENU coordinates (integer)
float waypoint_get_y(uint8_t wp_id)
Get Y/North coordinate of waypoint in meters.
const uint8_t nb_waypoint
void waypoint_set_enu_i(uint8_t wp_id, struct EnuCoor_i *enu)
void waypoint_clear_global_flag(uint8_t wp_id)
void waypoint_set_lla(uint8_t wp_id, struct LlaCoor_i *lla)
void waypoint_set_alt_i(uint8_t wp_id, int32_t alt)
void waypoint_move_here_2d(uint8_t wp_id)
void waypoint_localize(uint8_t wp_id)
update local ENU coordinates from its LLA coordinates
void waypoint_set_alt(uint8_t wp_id, float alt)
Set altitude of waypoint in meters (above reference)
struct EnuCoor_f * waypoint_get_enu_f(uint8_t wp_id)
Get ENU coordinates (float)
void waypoint_move_lla(uint8_t wp_id, struct LlaCoor_i *lla)
float waypoint_get_lat_rad(uint8_t wp_id)
Get latitude of waypoint in rad.
void waypoint_set_enu(uint8_t wp_id, struct EnuCoor_f *enu)
Set local ENU waypoint coordinates.
Paparazzi floating point math for geodetic calculations.
vector in East North Up coordinates Units: meters
Paparazzi fixed point math for geodetic calculations.
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.