aboutsummaryrefslogtreecommitdiff
path: root/src/modules/mavlink
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2013-12-27 11:07:45 +0100
committerJulian Oes <julian@oes.ch>2013-12-27 11:07:45 +0100
commit32c7aea2a6a0c355d2cae362884e40e4f3573311 (patch)
treea6b2579c283704d5c8fc8782ae99e1ad2958836d /src/modules/mavlink
parent677150388f31c380923c17e947df36b7c62425b1 (diff)
downloadpx4-firmware-32c7aea2a6a0c355d2cae362884e40e4f3573311.tar.gz
px4-firmware-32c7aea2a6a0c355d2cae362884e40e4f3573311.tar.bz2
px4-firmware-32c7aea2a6a0c355d2cae362884e40e4f3573311.zip
Home position: use double for lat/lon and float for altitude, set home position to global position instead of GPS position once we have a fix
Diffstat (limited to 'src/modules/mavlink')
-rw-r--r--src/modules/mavlink/orb_listener.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/mavlink/orb_listener.c b/src/modules/mavlink/orb_listener.c
index de902f3da..96888f06a 100644
--- a/src/modules/mavlink/orb_listener.c
+++ b/src/modules/mavlink/orb_listener.c
@@ -657,7 +657,7 @@ l_home(const struct listener *l)
orb_copy(ORB_ID(home_position), mavlink_subs.home_sub, &home);
- mavlink_msg_gps_global_origin_send(MAVLINK_COMM_0, home.lat, home.lon, home.alt);
+ mavlink_msg_gps_global_origin_send(MAVLINK_COMM_0, (int32_t)(home.lat*1e7d), (int32_t)(home.lon*1e7d), (int32_t)(home.altitude)*1e3f);
}
void