aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-04-29 14:40:01 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-04-29 14:40:01 +0200
commit4f84cdc8b871b6c8da7f05a58e96f97b65f290c9 (patch)
tree254009e1800242805d2374ed998bf961f5162488
parent3ec818ce1ed764aeb5f3e8c7371b53b87c2498c3 (diff)
downloadpx4-firmware-4f84cdc8b871b6c8da7f05a58e96f97b65f290c9.tar.gz
px4-firmware-4f84cdc8b871b6c8da7f05a58e96f97b65f290c9.tar.bz2
px4-firmware-4f84cdc8b871b6c8da7f05a58e96f97b65f290c9.zip
fw_att_pos_estimator: use new global map projection
-rw-r--r--src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp
index 45ca13a7f..79328d516 100644
--- a/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp
+++ b/src/modules/fw_att_pos_estimator/fw_att_pos_estimator_main.cpp
@@ -797,7 +797,7 @@ FixedwingEstimator::task_main()
if (hrt_elapsed_time(&start_time) > 100000) {
- if (!_gps_initialized && (_ekf->GPSstatus == 3) && map_projection_initialized()) {
+ if (!_gps_initialized && (_ekf->GPSstatus == 3) && map_projection_global_initialized()) {
_ekf->velNED[0] = _gps.vel_n_m_s;
_ekf->velNED[1] = _gps.vel_e_m_s;
_ekf->velNED[2] = _gps.vel_d_m_s;
@@ -809,9 +809,9 @@ FixedwingEstimator::task_main()
_ekf->InitialiseFilter(_ekf->velNED);
// Initialize projection
- map_projection_reference(&_local_pos.ref_lat, &_local_pos.ref_lon);
+ map_projection_global_reference(&_local_pos.ref_lat, &_local_pos.ref_lon);
_local_pos.ref_alt = alt;
- _local_pos.ref_timestamp = map_projection_timestamp();
+ _local_pos.ref_timestamp = map_projection_global_timestamp();
// Store
orb_copy(ORB_ID(sensor_baro), _baro_sub, &_baro);
@@ -1041,7 +1041,7 @@ FixedwingEstimator::task_main()
if (_local_pos.xy_global) {
double est_lat, est_lon;
- map_projection_reproject(_local_pos.x, _local_pos.y, &est_lat, &est_lon);
+ map_projection_global_reproject(_local_pos.x, _local_pos.y, &est_lat, &est_lon);
_global_pos.lat = est_lat;
_global_pos.lon = est_lon;
_global_pos.time_gps_usec = _gps.time_gps_usec;