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

This commit is contained in:
Julian Oes
2013-12-27 11:07:45 +01:00
parent 677150388f
commit 32c7aea2a6
5 changed files with 29 additions and 38 deletions
+1 -1
View File
@@ -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