aboutsummaryrefslogtreecommitdiff
path: root/apps/commander/commander.c
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2013-02-06 12:41:05 -0800
committerJulian Oes <joes@student.ethz.ch>2013-02-06 12:41:05 -0800
commitfc4be3e7280db480b67b7c6cec11e35481969bbb (patch)
tree90f760ad4022a3ad568a815e3a89e29cd4e47d48 /apps/commander/commander.c
parenta79ad17f09ac69bf2a19a4f617fa1df16bcaa6be (diff)
downloadpx4-firmware-fc4be3e7280db480b67b7c6cec11e35481969bbb.tar.gz
px4-firmware-fc4be3e7280db480b67b7c6cec11e35481969bbb.tar.bz2
px4-firmware-fc4be3e7280db480b67b7c6cec11e35481969bbb.zip
Changed gps position topic mostly to SI units and float, removed counters and added specifig timestamps
Diffstat (limited to 'apps/commander/commander.c')
-rw-r--r--apps/commander/commander.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/commander/commander.c b/apps/commander/commander.c
index 3a6fecf74..f19f1d0e6 100644
--- a/apps/commander/commander.c
+++ b/apps/commander/commander.c
@@ -1678,8 +1678,8 @@ int commander_thread_main(int argc, char *argv[])
orb_copy(ORB_ID(vehicle_gps_position), gps_sub, &gps_position);
/* check for first, long-term and valid GPS lock -> set home position */
- float hdop_m = gps_position.eph / 100.0f;
- float vdop_m = gps_position.epv / 100.0f;
+ float hdop_m = gps_position.eph_m;
+ float vdop_m = gps_position.epv_m;
/* check if gps fix is ok */
// XXX magic number
@@ -1697,7 +1697,7 @@ int commander_thread_main(int argc, char *argv[])
if (gps_position.fix_type == GPS_FIX_TYPE_3D && (hdop_m < dop_threshold_m)
&& (vdop_m < dop_threshold_m)
&& !home_position_set
- && (hrt_absolute_time() - gps_position.timestamp < 2000000)
+ && (hrt_absolute_time() - gps_position.timestamp_position < 2000000)
&& !current_status.flag_system_armed) {
warnx("setting home position");
@@ -1706,11 +1706,11 @@ int commander_thread_main(int argc, char *argv[])
home.lon = gps_position.lon;
home.alt = gps_position.alt;
- home.eph = gps_position.eph;
- home.epv = gps_position.epv;
+ home.eph_m = gps_position.eph_m;
+ home.epv_m = gps_position.epv_m;
- home.s_variance = gps_position.s_variance;
- home.p_variance = gps_position.p_variance;
+ home.s_variance_m_s = gps_position.s_variance_m_s;
+ home.p_variance_m = gps_position.p_variance_m;
/* announce new home position */
if (home_pub > 0) {