aboutsummaryrefslogtreecommitdiff
path: root/src/modules/commander
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2014-04-22 01:42:12 +0200
committerLorenz Meier <lm@inf.ethz.ch>2014-04-22 01:42:12 +0200
commit119dfc44e291962ae2340e3cbb6f22e1456fc8b4 (patch)
tree191477ef435cf7dde4a85e87fdc2e6bdaff4e4d9 /src/modules/commander
parent3a4874b22ec469bb77c46b37c1fd204f083202d7 (diff)
parentdb15e2811ea01dd023ae930e6e7a73c1a370cecf (diff)
downloadpx4-firmware-119dfc44e291962ae2340e3cbb6f22e1456fc8b4.tar.gz
px4-firmware-119dfc44e291962ae2340e3cbb6f22e1456fc8b4.tar.bz2
px4-firmware-119dfc44e291962ae2340e3cbb6f22e1456fc8b4.zip
Merged home_fix
Diffstat (limited to 'src/modules/commander')
-rw-r--r--src/modules/commander/commander.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp
index 8ecd4e840..1a332cb5d 100644
--- a/src/modules/commander/commander.cpp
+++ b/src/modules/commander/commander.cpp
@@ -1040,13 +1040,12 @@ int commander_thread_main(int argc, char *argv[])
if (!status.condition_home_position_valid && gps_position.fix_type >= 3 &&
(gps_position.eph_m < hdop_threshold_m) && (gps_position.epv_m < vdop_threshold_m) &&
- (hrt_absolute_time() < gps_position.timestamp_position + POSITION_TIMEOUT) && !armed.armed
- && global_position.global_valid) {
+ (hrt_absolute_time() < gps_position.timestamp_position + POSITION_TIMEOUT) && !armed.armed) {
/* copy position data to uORB home message, store it locally as well */
home.lat = gps_position.lat / (double)1e7;
home.lon = gps_position.lon / (double)1e7;
- home.alt = gps_position.alt;
+ home.alt = gps_position.alt / (float)1e3;
warnx("home: lat = %.7f, lon = %.7f, alt = %.4f ", home.lat, home.lon, (double)home.alt);
mavlink_log_info(mavlink_fd, "[cmd] home: %.7f, %.7f, %.4f", home.lat, home.lon, (double)home.alt);