PX4/Firmware — pull request #870 by julianoes (2014-04-26 11:14:47+00:00)
Title: Navigator cleanup/rewrite

This is an attempt to make the navigator readable and understandable again.

My goal was to remove as many bools as possible and actually use the state machine as a finite state machine with Events and States and not as an enum with some forks around it. I don't know if this is the right approach but at least it's consistent now. I'm open to discuss this.

On the way, I added a take-off/landed detector for fixedwing so this allowed to get rid of some if (rotary).
The detector will need some testing.

Also, I moved the RTL logic which was entangled in the navigator to a separate class (like mission).
I feel we should have some kind of generic interface here for modes like Mission/RTL/Follow and whatever will come up soon, so probably some kind of Auto class to inherit from.

This is already merged with: #790

**Todo for merge**:
- More testing in HIL
- MC Testing
- FW Testing
- Review
- Resolving or remove TODOs in code