mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 07:43:34 +08:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user