mirror of https://github.com/ArduPilot/ardupilot
SITL: use get_distance_NE instead of location_diff
This commit is contained in:
parent
6fbcb21ae3
commit
ebdcfdf65b
|
@ -122,7 +122,7 @@ void CRRCSim::recv_fdm(const struct sitl_input &input)
|
|||
Location loc1, loc2;
|
||||
loc2.lat = pkt.latitude * 1.0e7;
|
||||
loc2.lng = pkt.longitude * 1.0e7;
|
||||
Vector2f posdelta = location_diff(loc1, loc2);
|
||||
const Vector2f posdelta = loc1.get_distance_NE(loc2);
|
||||
position.x = posdelta.x;
|
||||
position.y = posdelta.y;
|
||||
position.z = -pkt.altitude;
|
||||
|
|
Loading…
Reference in New Issue