USE AT YOUR OWN RISK! I haven't tested this myself yet. Perhaps someone with more experience in the codebase could review this.
I am attaching a zip of the files I modified to add a Position Hold mode to ArduCopter. This is essentially the same as Loiter, except that the throttle is manually controlled. So you could take off... enable Position Hold and then rocket your multi-rotor into the sky. I don't take any credit for the true functionality happening behind the scenes to hold the position. This is really more of an internal configuration change than anything else.
I also attached a zip of the two files I changed to add the new mode to the Mission Planner.
Couple more things I have locally for the Mission Planner that I am not attaching unless someone wants to integrate it:
1. Private Attribute to be used with enums - This allows a dev to hide certain enum values from the user
2. Display Text Attribute to be used with enums - This allows different display text to be used in drop down lists in the UI. Example: ALT_HOLD is the enum string, but it would be decorated with [DisplayText("Altitude Hold")], which through a helper class, gets bound to the drop down list.
3. EnumTranslator helper class - Returns enumeration values respecting the above attributes. Returns either Dictionary<int, string> where int is the enum int value and string is the enum display text, or Returns string[] where the values are the display text. In both cases if the display text attribute is missing, it defaults to the string enum value.
I seem to be missing a bunch of referenced dlls so I haven't been able to compile the Mission Planner locally yet. I will try to sort that out and get all this tested.
Replies
OK OK, I'll add it in ;)