SITL: adjust for Location_Class and Location unification
This commit is contained in:
parent
035957ca4c
commit
e3c719b27f
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user