mirror of https://github.com/ArduPilot/ardupilot
Copter: update pv_location_to_vector to use get_origin instead of get_home
This commit is contained in:
parent
c95e7b2282
commit
9c2865f6a8
|
@ -10,8 +10,8 @@
|
|||
// pv_location_to_vector - convert lat/lon coordinates to a position vector
|
||||
Vector3f pv_location_to_vector(const Location& loc)
|
||||
{
|
||||
const struct Location &temp_home = ahrs.get_home();
|
||||
Vector3f tmp((loc.lat-temp_home.lat) * LATLON_TO_CM, (loc.lng-temp_home.lng) * LATLON_TO_CM * scaleLongDown, loc.alt);
|
||||
const struct Location &origin = inertial_nav.get_origin();
|
||||
Vector3f tmp((loc.lat-origin.lat) * LATLON_TO_CM, (loc.lng-origin.lng) * LATLON_TO_CM * scaleLongDown, loc.alt);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue