diydrones/ardupilot — pull request #956 by chapman (2014-04-07 01:29:42+00:00)
Title: AP_Rally for Copter

Seems to work really well for copter in SITL, I've tested the following:

- RTL near rally points, then deleting them in turn, it moves to the next nearest with each RTL switch, delete the last it goes home
- hits the correct rally point heights (or RTL_ALT if that is larger)
- tested with RTL initiated by throttle failsafe
- tested with RTL initiated by battery failsafe
- verified it transitions to landing after reaching the rally point, same as a normal RTL
- obeys RALLY_LIMIT_KM, behaves correctly when set to zero or negative
- tested RTL as part of an auto mission, with rally points within and outside of RALLY_LIMIT_KM range
- works with geo fence - if rally point is outside fence it will try head for it but be stopped and land at the fence border
- checked default RALLY parameter values are correct when upgrading firmware
- checked what happens if you have a rally point in EEPROM, then set AP_RALLY disabled and initiate RTL: fine, RTL to home as expected
- tested setting > MAX_RALLYPOINTS. It behaves correctly, though MP has a bug in this regard (see below)
- various minor MP bugs to do with rally points reported (diydrones/MissionPlanner#400)

Randy: the only entry point to RTL is control_rtl.pde, right? If there are any other fringe cases that could come into play let me know and I'll double-check, but I've tested everything I can think of

Note: most of the changes to ArduCopter/Parameters.h are just fixing windows linefeeds (which Sublime fixes automatically), and there is also a little fix to sensors.pde snuck in there because I found it needed that when you set LOGGING_ENABLED to DISABLED (as needed for testing this on APM hardware as we're out of room)