Skip to content

Vehicle.location returns wrong isRelative for copter #306

Closed

Description

@hamishwillee

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.

  • Copter: Location:lat=-35.3632507,lon=149.1652309,alt=0.0,is_relative=False
  • Plane: Location:lat=-35.3632507,lon=149.1652309,alt=584.309997559,is_relative=False

Activity

  1. ggregory8 commented on Sep 10, 2015

    @ggregory8

    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?

  2. hamishwillee commented on Sep 11, 2015

    @hamishwillee
    ContributorAuthor

    @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.

    No. I requested this in #131.

    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.

  3. ggregory8 commented on Sep 11, 2015

    @ggregory8

    Sorry I thought it was related! I guess #131 is it. THanks.

  4. modified the milestone: v2.0.0 on Nov 10, 2015
  5. tcr3dr commented on Nov 12, 2015

    @tcr3dr
    Contributor

    Deprioritizing from 2.0.0 pending more rigorous testing.

  6. removed this from the v2.0.0 milestone on Nov 12, 2015
  7. tcr3dr commented on Nov 24, 2015

    @tcr3dr
    Contributor

    @hamishwillee I suppose we can close this? Are we good cross-vehicle now?

  8. hamishwillee commented on Nov 24, 2015

    @hamishwillee
    ContributorAuthor

    Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions