AP_Beacon: fix sitl position to be NED

This commit is contained in:
Randy Mackay 2020-08-19 11:39:01 +09:00
parent 276e56e618
commit ce55af4d95
1 changed files with 2 additions and 2 deletions

View File

@ -100,8 +100,8 @@ void AP_Beacon_SITL::update(void)
const Vector2f beac_diff = beacon_origin.get_distance_NE(beacon_loc);
const Vector2f veh_diff = beacon_origin.get_distance_NE(current_loc);
Vector3f veh_pos3d(veh_diff.x, veh_diff.y, (current_loc.alt - beacon_origin.alt)*1.0e-2f);
Vector3f beac_pos3d(beac_diff.x, beac_diff.y, (beacon_origin.alt - beacon_loc.alt)*1.0e-2f);
Vector3f veh_pos3d(veh_diff.x, veh_diff.y, (beacon_origin.alt - current_loc.alt)*1.0e-2f);
Vector3f beac_pos3d(beac_diff.x, beac_diff.y, (beacon_loc.alt - beacon_origin.alt)*1.0e-2f);
Vector3f beac_veh_offset = veh_pos3d - beac_pos3d;
set_beacon_position(beacon_id, beac_pos3d);