SITL: use get_distance_NE instead of location_diff

This commit is contained in:
Pierre Kancir 2019-04-08 15:16:20 +02:00 committed by Tom Pittenger
parent 6fbcb21ae3
commit ebdcfdf65b
1 changed files with 1 additions and 1 deletions

View File

@ -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;