|
|
|
@ -237,12 +237,33 @@ __EXPORT int globallocalconverter_getref(double *lat_0, double *lon_0, float *al
@@ -237,12 +237,33 @@ __EXPORT int globallocalconverter_getref(double *lat_0, double *lon_0, float *al
|
|
|
|
|
__EXPORT float get_distance_to_next_waypoint(double lat_now, double lon_now, double lat_next, double lon_next); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO put description for both functions and improve naming
|
|
|
|
|
/**
|
|
|
|
|
* Creates a new waypoint C on the line of two given waypoints (A, B) at certain distance |
|
|
|
|
* from waypoint A |
|
|
|
|
* |
|
|
|
|
* @param lat_A waypoint A latitude in degrees (47.1234567°, not 471234567°) |
|
|
|
|
* @param lon_A waypoint A longitude in degrees (8.1234567°, not 81234567°) |
|
|
|
|
* @param lat_B waypoint B latitude in degrees (47.1234567°, not 471234567°) |
|
|
|
|
* @param lon_B waypoint B longitude in degrees (8.1234567°, not 81234567°) |
|
|
|
|
* @param dist distance of target waypoint from waypoint A (can be negative) |
|
|
|
|
* @param lat_target latitude of target waypoint C in degrees (47.1234567°, not 471234567°) |
|
|
|
|
* @param lon_target longitude of target waypoint C in degrees (47.1234567°, not 471234567°) |
|
|
|
|
*/ |
|
|
|
|
__EXPORT 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 waypoint from given waypoint, distance and bearing |
|
|
|
|
* |
|
|
|
|
* @param lat_start latitude of starting waypoint in degrees (47.1234567°, not 471234567°) |
|
|
|
|
* @param lon_start longitude of starting waypoint in degrees (8.1234567°, not 81234567°) |
|
|
|
|
* @param bearing |
|
|
|
|
* @param distance |
|
|
|
|
* @param lat_target latitude of target waypoint in degrees (47.1234567°, not 471234567°) |
|
|
|
|
* @param lon_target longitude of target waypoint in degrees (47.1234567°, not 471234567°) |
|
|
|
|
*/ |
|
|
|
|
__EXPORT void waypoint_from_heading_and_distance(double lat_start, double lon_start, float bearing, float dist, |
|
|
|
|
double *end_lat, double *end_lon); |
|
|
|
|
double *lat_target, double *lon_target); |
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns the bearing to the next waypoint in radians. |
|
|
|
|