forked from Archive/PX4-Autopilot
Merge pull request #2190 from s3erjaeh/master
FIX GPS coordinates conversion in HIL mode
This commit is contained in:
commit
bbd55a01ce
|
@ -1386,7 +1386,7 @@ MavlinkReceiver::handle_message_hil_state_quaternion(mavlink_message_t *msg)
|
||||||
if (!_hil_local_proj_inited) {
|
if (!_hil_local_proj_inited) {
|
||||||
_hil_local_proj_inited = true;
|
_hil_local_proj_inited = true;
|
||||||
_hil_local_alt0 = hil_state.alt / 1000.0f;
|
_hil_local_alt0 = hil_state.alt / 1000.0f;
|
||||||
map_projection_init(&_hil_local_proj_ref, hil_state.lat, hil_state.lon);
|
map_projection_init(&_hil_local_proj_ref, lat, lon);
|
||||||
hil_local_pos.ref_timestamp = timestamp;
|
hil_local_pos.ref_timestamp = timestamp;
|
||||||
hil_local_pos.ref_lat = lat;
|
hil_local_pos.ref_lat = lat;
|
||||||
hil_local_pos.ref_lon = lon;
|
hil_local_pos.ref_lon = lon;
|
||||||
|
|
Loading…
Reference in New Issue