diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-04-24 14:30:29 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-04-24 14:30:29 +0200 |
commit | 3a898e54adbaac7fda28e0b9079076d9cdf8028c (patch) | |
tree | f9d6047dbb385a0efe77e0dbf52d55e77b660cdf /src/lib/geo/geo.h | |
parent | 320c97c498cc6e8f2634f88147f0ef15ca9b24e3 (diff) | |
download | px4-firmware-3a898e54adbaac7fda28e0b9079076d9cdf8028c.tar.gz px4-firmware-3a898e54adbaac7fda28e0b9079076d9cdf8028c.tar.bz2 px4-firmware-3a898e54adbaac7fda28e0b9079076d9cdf8028c.zip |
towards a global map projection instance, WIP: need to remove local updates of the reference and add a global map update
Diffstat (limited to 'src/lib/geo/geo.h')
-rw-r--r-- | src/lib/geo/geo.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/geo/geo.h b/src/lib/geo/geo.h index 0a3f85d97..b48d26a66 100644 --- a/src/lib/geo/geo.h +++ b/src/lib/geo/geo.h @@ -71,6 +71,7 @@ struct map_projection_reference_s { double lon; double sin_lat; double cos_lat; + bool init_done; }; /** @@ -80,7 +81,7 @@ struct map_projection_reference_s { * @param lat in degrees (47.1234567°, not 471234567°) * @param lon in degrees (8.1234567°, not 81234567°) */ -__EXPORT void map_projection_init(struct map_projection_reference_s *ref, double lat_0, double lon_0); +__EXPORT void map_projection_init(double lat_0, double lon_0); /** * Transforms a point in the geographic coordinate system to the local azimuthal equidistant plane @@ -88,8 +89,9 @@ __EXPORT void map_projection_init(struct map_projection_reference_s *ref, double * @param y east * @param lat in degrees (47.1234567°, not 471234567°) * @param lon in degrees (8.1234567°, not 81234567°) + * @return true if map_projection_init was called before, false else */ -__EXPORT void map_projection_project(struct map_projection_reference_s *ref, double lat, double lon, float *x, float *y); +__EXPORT bool map_projection_project(double lat, double lon, float *x, float *y); /** * Transforms a point in the local azimuthal equidistant plane to the geographic coordinate system @@ -98,8 +100,9 @@ __EXPORT void map_projection_project(struct map_projection_reference_s *ref, dou * @param y east * @param lat in degrees (47.1234567°, not 471234567°) * @param lon in degrees (8.1234567°, not 81234567°) + * @return true if map_projection_init was called before, false else */ -__EXPORT void map_projection_reproject(struct map_projection_reference_s *ref, float x, float y, double *lat, double *lon); +__EXPORT bool map_projection_reproject(float x, float y, double *lat, double *lon); /** * Returns the distance to the next waypoint in meters. |