aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-04-29 15:41:12 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-04-29 15:41:12 +0200
commit606f3cba5c932d6aba0e383e915b02b78009fd9f (patch)
treeff650c09cf40968146311384016039e288006d77
parent510678bdae82a04151b6d5dcd5b02bee6f96abfd (diff)
downloadpx4-firmware-606f3cba5c932d6aba0e383e915b02b78009fd9f.tar.gz
px4-firmware-606f3cba5c932d6aba0e383e915b02b78009fd9f.tar.bz2
px4-firmware-606f3cba5c932d6aba0e383e915b02b78009fd9f.zip
pos estimator mc: revert to local map projection
-rwxr-xr-xsrc/modules/position_estimator_mc/position_estimator_mc_main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/position_estimator_mc/position_estimator_mc_main.c b/src/modules/position_estimator_mc/position_estimator_mc_main.c
index ee6457ade..363961819 100755
--- a/src/modules/position_estimator_mc/position_estimator_mc_main.c
+++ b/src/modules/position_estimator_mc/position_estimator_mc_main.c
@@ -322,6 +322,11 @@ int position_estimator_mc_thread_main(int argc, char *argv[])
lon_current = ((double)(gps.lon)) * 1e-7d;
alt_current = gps.alt * 1e-3f;
gps_origin_altitude = alt_current;
+ /* initialize coordinates */
+ map_projection_init(lat_current, lon_current);
+ /* publish global position messages only after first GPS message */
+ printf("[pos_est_mc] initialized projection with: lat: %.10f, lon:%.10f\n", lat_current, lon_current);
+
} else {
mavlink_log_info(mavlink_fd, "[pos_est_mc] I'm NOT using GPS - I use VICON");
/* onboard calculated position estimations */