254 double *lat_target,
double *lon_target);
268 double *lat_target,
double *lon_target);
287 double lat_start,
double lon_start,
double lat_end,
double lon_end);
290 double lat_center,
double lon_center,
291 float radius,
float arc_start_bearing,
float arc_sweep);
297 double lat_next,
double lon_next,
float alt_next,
298 float *dist_xy,
float *dist_z);
304 float x_next,
float y_next,
float z_next,
305 float *dist_xy,
float *dist_z);
bool map_projection_global_initialized()
Checks if global projection was initialized.
uint64_t map_projection_timestamp(const struct map_projection_reference_s *ref)
Get the timestamp of the map projection given by the argument.
int get_distance_to_line(struct crosstrack_error_s *crosstrack_error, double lat_now, double lon_now, double lat_start, double lon_start, double lat_end, double lon_end)
float get_distance_to_next_waypoint(double lat_now, double lon_now, double lat_next, double lon_next)
Returns the distance to the next waypoint in meters.
static constexpr float CONSTANTS_AIR_GAS_CONST
static constexpr float CONSTANTS_ABSOLUTE_NULL_CELSIUS
void get_vector_to_next_waypoint(double lat_now, double lon_now, double lat_next, double lon_next, float *v_n, float *v_e)
int map_projection_reference(const struct map_projection_reference_s *ref, double *ref_lat_rad, double *ref_lon_rad)
Writes the reference values of the projection given by the argument to ref_lat and ref_lon...
int map_projection_init_timestamped(struct map_projection_reference_s *ref, double lat_0, double lon_0, uint64_t timestamp)
Initializes the map transformation given by the argument.
static constexpr double CONSTANTS_RADIUS_OF_EARTH
uint64_t map_projection_global_timestamp(void)
Get the timestamp of the global map projection.
int map_projection_global_init(double lat_0, double lon_0, uint64_t timestamp)
Initializes the global map transformation.
void waypoint_from_heading_and_distance(double lat_start, double lon_start, float bearing, float dist, double *lat_target, double *lon_target)
Creates a waypoint from given waypoint, distance and bearing see http://www.movable-type.co.uk/scripts/latlong.html.
void get_vector_to_next_waypoint_fast(double lat_now, double lon_now, double lat_next, double lon_next, float *v_n, float *v_e)
int globallocalconverter_toglobal(float x, float y, float z, double *lat, double *lon, float *alt)
Convert from local position coordinates to global position coordinates using the global reference...
void add_vector_to_global_position(double lat_now, double lon_now, float v_n, float v_e, double *lat_res, double *lon_res)
int globallocalconverter_tolocal(double lat, double lon, float alt, float *x, float *y, float *z)
Convert from global position coordinates to local position coordinates using the global reference...
float mavlink_wpm_distance_to_point_local(float x_now, float y_now, float z_now, float x_next, float y_next, float z_next, float *dist_xy, float *dist_z)
int get_distance_to_arc(struct crosstrack_error_s *crosstrack_error, double lat_now, double lon_now, double lat_center, double lon_center, float radius, float arc_start_bearing, float arc_sweep)
static constexpr float CONSTANTS_ONE_G
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
float get_distance_to_point_global_wgs84(double lat_now, double lon_now, float alt_now, double lat_next, double lon_next, float alt_next, float *dist_xy, float *dist_z)
int map_projection_global_getref(double *lat_0, double *lon_0)
Get reference position of the global map projection.
int map_projection_reproject(const struct map_projection_reference_s *ref, float x, float y, double *lat, double *lon)
Transforms a point in the local azimuthal equidistant plane to the geographic coordinate system using...
static constexpr float CONSTANTS_EARTH_SPIN_RATE
int globallocalconverter_init(double lat_0, double lon_0, float alt_0, uint64_t timestamp)
Initialize the global mapping between global position (spherical) and local position (NED)...
static constexpr float CONSTANTS_RADIUS_OF_EARTH_F
static constexpr float CONSTANTS_STD_PRESSURE_KPA
bool globallocalconverter_initialized(void)
Checks if globallocalconverter was initialized.
float get_bearing_to_next_waypoint(double lat_now, double lon_now, double lat_next, double lon_next)
Returns the bearing to the next waypoint in radians.
int map_projection_global_reference(double *ref_lat_rad, double *ref_lon_rad)
Writes the reference values of the global projection to ref_lat and ref_lon.
int map_projection_global_reproject(float x, float y, double *lat, double *lon)
Transforms a point in the local azimuthal equidistant plane to the geographic coordinate system using...
static constexpr float CONSTANTS_AIR_DENSITY_SEA_LEVEL_15C
bool map_projection_initialized(const struct map_projection_reference_s *ref)
Checks if projection given as argument was initialized.
static constexpr float CONSTANTS_STD_PRESSURE_MBAR
static constexpr float CONSTANTS_STD_PRESSURE_PA
int map_projection_init(struct map_projection_reference_s *ref, double lat_0, double lon_0)
Initializes the map transformation given by the argument and sets the timestamp to now...
int globallocalconverter_getref(double *lat_0, double *lon_0, float *alt_0)
Get reference position of the global to local converter.
int map_projection_project(const struct map_projection_reference_s *ref, double lat, double lon, float *x, float *y)
void create_waypoint_from_line_and_dist(double lat_A, double lon_A, double lat_B, double lon_B, float dist, double *lat_target, double *lon_target)
Creates a new waypoint C on the line of two given waypoints (A, B) at certain distance from waypoint ...
int map_projection_global_project(double lat, double lon, float *x, float *y)
Transforms a point in the geographic coordinate system to the local azimuthal equidistant plane using...