aboutsummaryrefslogtreecommitdiff
path: root/src/modules/systemlib/geo/geo.h
diff options
context:
space:
mode:
authorSimon Wilks <sjwilks@gmail.com>2013-06-04 00:10:58 +0200
committerSimon Wilks <sjwilks@gmail.com>2013-06-04 00:10:58 +0200
commitf435025d26f49d1d9069282aa72c7e1cb9201773 (patch)
treeeb1e9907db514b5c97140de2392d99409b605e96 /src/modules/systemlib/geo/geo.h
parent6571629dcac252165a210f8a96983fe96be64538 (diff)
downloadpx4-firmware-f435025d26f49d1d9069282aa72c7e1cb9201773.tar.gz
px4-firmware-f435025d26f49d1d9069282aa72c7e1cb9201773.tar.bz2
px4-firmware-f435025d26f49d1d9069282aa72c7e1cb9201773.zip
Completed main implementation and debugging
Diffstat (limited to 'src/modules/systemlib/geo/geo.h')
-rw-r--r--src/modules/systemlib/geo/geo.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/modules/systemlib/geo/geo.h b/src/modules/systemlib/geo/geo.h
index 0c0b5c533..84097b49f 100644
--- a/src/modules/systemlib/geo/geo.h
+++ b/src/modules/systemlib/geo/geo.h
@@ -82,8 +82,24 @@ __EXPORT void map_projection_project(double lat, double lon, float *x, float *y)
*/
__EXPORT void map_projection_reproject(float x, float y, double *lat, double *lon);
+/**
+ * Returns the distance to the next waypoint in meters.
+ *
+ * @param lat_now current position in degrees (47.1234567°, not 471234567°)
+ * @param lon_now current position in degrees (8.1234567°, not 81234567°)
+ * @param lat_next next waypoint position in degrees (47.1234567°, not 471234567°)
+ * @param lon_next next waypoint position in degrees (8.1234567°, not 81234567°)
+ */
__EXPORT float get_distance_to_next_waypoint(double lat_now, double lon_now, double lat_next, double lon_next);
+/**
+ * Returns the bearing to the next waypoint in radians.
+ *
+ * @param lat_now current position in degrees (47.1234567°, not 471234567°)
+ * @param lon_now current position in degrees (8.1234567°, not 81234567°)
+ * @param lat_next next waypoint position in degrees (47.1234567°, not 471234567°)
+ * @param lon_next next waypoint position in degrees (8.1234567°, not 81234567°)
+ */
__EXPORT float get_bearing_to_next_waypoint(double lat_now, double lon_now, double lat_next, double lon_next);
__EXPORT 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);