You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vehicle.location returns wrong isRelative for copter #306
The location value has an isRelative field which is supposed to tell you if the altitude is relative to MSL or the home location. If it is true and you're sitting at the home location altitude should be zero.
This is buggy for copter - if you look at the location value for (landed) Plane and Copter below you can see that the Copter value is broken - it should be True because we're sitting on the home position and altitude is zero.
@ggregory8 Please don't hijack unrelated threads for questions - as it makes it hard to track the original problem. You can create your own issues for questions if you want, or perhaps read the answer I already posted in Gitter.
That said:
Is there a way to set what type of reference frame is used for altitude when retrieving vehicle.location. I.e I want to specifically receive AMSL.
Alternatively is there another way to retrieve AMSL altitude?
Yes. All values in copter are returned relative to the home location, and its position is relative to the AMSL. So you can simply get the home location altitude (the guide shows how) and use it as an offset calculating the AMSL relative altitude on all other requests.
Note that this won't work if terrain following is introduced in a future release, because then values will be relative to the "actual" ground.
Activity
ggregory8 commentedon Sep 10, 2015
Is there a way to set what type of reference frame is used for altiude when retreiving vehicle.location. I.e I want to specifically receive AMSL.
Alternatively is there another way to retrieve AMSL altitude?
hamishwillee commentedon Sep 11, 2015
@ggregory8 Please don't hijack unrelated threads for questions - as it makes it hard to track the original problem. You can create your own issues for questions if you want, or perhaps read the answer I already posted in Gitter.
That said:
No. I requested this in #131.
Yes. All values in copter are returned relative to the home location, and its position is relative to the AMSL. So you can simply get the home location altitude (the guide shows how) and use it as an offset calculating the AMSL relative altitude on all other requests.
Note that this won't work if terrain following is introduced in a future release, because then values will be relative to the "actual" ground.
ggregory8 commentedon Sep 11, 2015
Sorry I thought it was related! I guess #131 is it. THanks.
tcr3dr commentedon Nov 12, 2015
Deprioritizing from 2.0.0 pending more rigorous testing.
tcr3dr commentedon Nov 24, 2015
@hamishwillee I suppose we can close this? Are we good cross-vehicle now?
hamishwillee commentedon Nov 24, 2015
Yes!