Skip to content

Remove Vehicle.waypoint_home documentation #100

Closed

Description

@hamishwillee

Vehicle.waypoint_home was in the original documentation, but is not present in the implementation (MPVehicle). So if you try the following you will get an exception.

print "waypoint_home: %s" % v.waypoint_home

Remove the variable from the documentation as it is "not implemented".
#105 has been created to add the attribute back again

Activity

  1. self-assigned this
    on May 12, 2015
  2. hamishwillee commented on May 12, 2015

    @hamishwillee
    ContributorAuthor

    Research indicates that implementing this API this probably isn't possible currently. It is possible to set the home position in a mission but it is not 100% clear whether this is the same "variable" as is used in other modes. It is also not obvious that there is any way to get the home position. There was a brief discussion on this in the discussion group some years ago.

  3. geeksville commented on May 12, 2015

    @geeksville
    Collaborator

    definitely possible, it was probably inadvertently lost when full command access was added.. vehicle.commands[0] is guaranteed to be home. It would be easy to add it back.

  4. hamishwillee commented on May 12, 2015

    @hamishwillee
    ContributorAuthor

    @geeksville Thanks very much.

    @mrpollo - do you want to add it back or should we just document vehicle.commands[0] gets the right value? My preference is to add it back to make it more visible.

    While we're at it, can/should we make this have a setter as well? That makes sense to me because then you could easily change the home position outside of missions.

  5. changed the title [-]Vehicle.waypoint_home not implemented[/-] [+]Remove Vehicle.waypoint_home documentation[/+] on May 13, 2015
  6. hamishwillee commented on May 13, 2015

    @hamishwillee
    ContributorAuthor

    Closed by #108

  7. maruina commented on Jun 4, 2015

    @maruina
    Contributor

    I have a couple of doubts:

    • What should be the type of waypoint_home? A Location instance? An array with lat, lon, alt?
    • Let's say that I set a waypoint_home and then I create a mission: should my home overwrite vehicle.commands[0] or vice versa? Or should be they always kept separate from each other? Should my waypoint_home be None unless I set a mission?
  8. hamishwillee commented on Jun 5, 2015

    @hamishwillee
    ContributorAuthor

    @maruina All good questions. I would say

    What should be the type of waypoint_home? A Location instance? An array with lat, lon, alt?

    Yes, a Location instance.

    Let's say that I set a waypoint_home and then I create a mission: should my home overwrite vehicle.commands[0] or vice versa? Or should be they always kept separate from each other? Should my waypoint_home be None unless I set a mission?

    The home position is (currently) stored in the 0th waypoint, and is automatically set by the autopilot, usually when it first gets GPS lock (though sometimes it is set at takeoff or when arming occurs - not sure). I THINK that you can't upload your own value for this, but that is worth checking.

    So I recommend doing some testing. If you can't set the value, then just make it a read-only attribute. If you can set it, then do (but we'll need to make it clear that the value may be over-written at any time by the autopilot).

    Does that make sense?

  9. removed their assignment
    on Jul 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions