aboutsummaryrefslogtreecommitdiff
path: root/apps/mavlink/orb_listener.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/mavlink/orb_listener.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/mavlink/orb_listener.c')
-rw-r--r--apps/mavlink/orb_listener.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/mavlink/orb_listener.c b/apps/mavlink/orb_listener.c
index 18da70f61..9f85d5801 100644
--- a/apps/mavlink/orb_listener.c
+++ b/apps/mavlink/orb_listener.c
@@ -231,15 +231,15 @@ l_vehicle_gps_position(struct listener *l)
/* GPS position */
mavlink_msg_gps_raw_int_send(MAVLINK_COMM_0,
- gps.timestamp,
+ gps.timestamp_position,
gps.fix_type,
gps.lat,
gps.lon,
gps.alt,
- gps.eph,
- gps.epv,
- gps.vel,
- gps.cog,
+ (uint16_t)(gps.eph_m * 1e2f), // from m to cm
+ (uint16_t)(gps.epv_m * 1e2f), // from m to cm
+ (uint16_t)(gps.vel_m_s * 1e2f), // from m/s to cm/s
+ (uint16_t)(gps.cog_rad * M_RAD_TO_DEG_F * 1e2f), // from rad to deg * 100
gps.satellites_visible);
if (gps.satellite_info_available && (gps_counter % 4 == 0)) {