SITL: adjust for Location_Class and Location unification

This commit is contained in:
Peter Barker 2019-01-02 14:14:00 +11:00 committed by Peter Barker
parent 035957ca4c
commit e3c719b27f
3 changed files with 2 additions and 2 deletions

View File

@ -125,7 +125,7 @@ bool Aircraft::parse_home(const char *home_str, Location &loc, float &yaw_degree
return false;
}
memset(&loc, 0, sizeof(loc));
loc = {};
loc.lat = static_cast<int32_t>(strtod(lat_s, nullptr) * 1.0e7);
loc.lng = static_cast<int32_t>(strtod(lon_s, nullptr) * 1.0e7);
loc.alt = static_cast<int32_t>(strtod(alt_s, nullptr) * 1.0e2);

View File

@ -122,7 +122,6 @@ void CRRCSim::recv_fdm(const struct sitl_input &input)
Location loc1, loc2;
loc2.lat = pkt.latitude * 1.0e7;
loc2.lng = pkt.longitude * 1.0e7;
memset(&loc1, 0, sizeof(loc1));
Vector2f posdelta = location_diff(loc1, loc2);
position.x = posdelta.x;
position.y = posdelta.y;

View File

@ -2,6 +2,7 @@
#include <AP_Math/AP_Math.h>
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <AP_Common/Location.h>
#include "SIM_Sprayer.h"
#include "SIM_Gripper_Servo.h"