aboutsummaryrefslogtreecommitdiff
path: root/apps/commander/commander.c
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2013-02-06 13:50:32 -0800
committerJulian Oes <joes@student.ethz.ch>2013-02-06 13:50:32 -0800
commitd962e6c403678e14a64a6b01be8773e98660bb24 (patch)
treed14dd2ed4ca5b324c94dc961355614cb0d78db23 /apps/commander/commander.c
parentfc4be3e7280db480b67b7c6cec11e35481969bbb (diff)
downloadpx4-firmware-d962e6c403678e14a64a6b01be8773e98660bb24.tar.gz
px4-firmware-d962e6c403678e14a64a6b01be8773e98660bb24.tar.bz2
px4-firmware-d962e6c403678e14a64a6b01be8773e98660bb24.zip
Removed some unnecessairy flags, home position back working
Diffstat (limited to 'apps/commander/commander.c')
-rw-r--r--apps/commander/commander.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/commander/commander.c b/apps/commander/commander.c
index f19f1d0e6..6b1bc0f9b 100644
--- a/apps/commander/commander.c
+++ b/apps/commander/commander.c
@@ -1683,7 +1683,8 @@ int commander_thread_main(int argc, char *argv[])
/* check if gps fix is ok */
// XXX magic number
- float dop_threshold_m = 2.0f;
+ float hdop_threshold_m = 4.0f;
+ float vdop_threshold_m = 8.0f;
/*
* If horizontal dilution of precision (hdop / eph)
@@ -1694,8 +1695,10 @@ int commander_thread_main(int argc, char *argv[])
* the system is currently not armed, set home
* position to the current position.
*/
- if (gps_position.fix_type == GPS_FIX_TYPE_3D && (hdop_m < dop_threshold_m)
- && (vdop_m < dop_threshold_m)
+
+ if (gps_position.fix_type == GPS_FIX_TYPE_3D
+ && (hdop_m < hdop_threshold_m)
+ && (vdop_m < vdop_threshold_m)
&& !home_position_set
&& (hrt_absolute_time() - gps_position.timestamp_position < 2000000)
&& !current_status.flag_system_armed) {