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
+2 -2
View File
@@ -295,8 +295,8 @@ build_gps_response(uint8_t *buffer, size_t *size)
memset(&home, 0, sizeof(home));
orb_copy(ORB_ID(home_position), _home_sub, &home);
_home_lat = ((double)(home.lat))*1e-7d;
_home_lon = ((double)(home.lon))*1e-7d;
_home_lat = home.lat;
_home_lon = home.lon;
_home_position_set = true;
}