iNavFlight / inav

INAV: Navigation-enabled flight control software
https://inavflight.github.io
GNU General Public License v3.0
3.18k stars 1.49k forks source link

NAV - Waypoint mode #39

Closed digitalentity closed 8 years ago

digitalentity commented 9 years ago

Hi everybody! I'm thinking about waypoint support and I wonder how the firmware should work when there is no waypoints on the list or all waypoints were successfully visited. I have two options:

  1. Hold last position
  2. Execure RTH
bk79 commented 9 years ago

Hold last position would be the good deal, rth could get trouble specially if in the straight line calculated from last wp to home there are some obstacles

digitalentity commented 9 years ago

I'm thinking hold last position is a better option myself. If pilot wants RTH - just set last waypoint to home coordinates.

dkisselev commented 9 years ago

Yeah, I'm pretty sure hold position is what most other platforms do.

In Pixhawk there's a waypoint type that triggers a landing when it arrives, so that could be a future extension.

digitalentity commented 9 years ago

"Hold last position" it will be. I've started to implement waypoints. Added proper MSP_SET_WP message handing - EzGUI follow me feature should work now.

digitalentity commented 9 years ago

Full waypoint navigation implemented in 16a3cb514ff86d26ced9d9482319d22adb8fb4bb - a total of 15 waypoints numbered 1 to 15 supported for compatibility with existing MSP clients where waypoint 0 is home and waypoint 16 - current hold position.

digitalentity commented 9 years ago

It seems that MultiWii and Baseflight/Cleanflight is treating MSP_SET_WP differently. MultiWii seem to have more a advanced waypoint protocol while MSP message number is the same.

stronnag commented 9 years ago

See https://docs.google.com/document/d/16ZfS_qwc-rJeA7N5Tx0DA6wtgxl6HdGgaz-jE3lHBWs/edit?usp=sharing for details of the mw-nav messages and data structures (as in mwp and ezgui).

digitalentity commented 9 years ago

Ok, I've implemented a quick and dirty hack for waypoints (94b9fc271d778a9aebf56a03f17627452bf03cf6). action and flags are ignored, but lat/lon are now handled correctly.

digitalentity commented 8 years ago

Basic waypoint support is working. Improvements should be opened as separate issues.