First successful GPS position hold tests!
I added a GPS module, a compass and a pressure sensor to my tricopter to enable automatic position hold. GPS is implemented using a PD control loop, compass is P only, and height is PID. And... it works! Still not optimal, but in principle it is already ok. There are some things that have to be optimized of course, e.g. a one-axis compass will probably not work for waypoint navigation and position hold when there is wind. And my code is still far from being optimal. At the moment, I have to make my copter hover at the position + height that I want. Then, I flip a switch (connected to channel 6) - current position, heading and height is stored and used as setpoint for position hold. I think I will have to switch to a 3-axes compass in combination with an additional 3-axes accelerometer. That will enable tilt compensation for the compass, as well as improving the D-term for height stabilization.
The tests that you see in the video where done with no wind at all. The tricopter stayed mostly within a circle of around 3m diameter. So that is close to GPS precision. Funny to watch the tricopter for 30 minutes without doing anything...
Additional components used for this setup (maybe I'll try different ones):
Pressure sensor: BMP085
And here for the DLXm (parameters don't fit yet, but pressure sensor is also very close to the propellers...):