Posts

Showing posts from September, 2010

First successful GPS position hold tests!

Image
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 mo