Do I need a compass for autonomous car navigation?
August 12, 2012
I'm working on building an autonomous car using a 1/10 scale RC car as my platform. Right now I've got a GPS and 3 axis gyro scope for navigation.
I'm wondering if I need to add a compass too?
The way I have the code set up right now is that I calculate the heading to the next waypoint. Store the car's current heading and angular rate from the gyro. I'm assuming that the heading I get from the GPS is a bit old so I correct the heading up to the current time by keeping track of the gyro rate inbetween GPS updates. Kind of difficult to explain.. Maybe I need to draw a diagram for this?
It seems to be working somewhat. I store all the data from the sensors on a microSD car to view later. I can see that the car will get a new heading and inbetween GPS updates will correct it's self so that it is driving toward the waypoint. The problem seems to be from the GPS though. Often the car will correct it's heading properly but the next GPS update says that the car is way off. It seems like the there is just too much error in the calculated heading from the GPS. Should I get a compass to try and corrrect it or it there a bigger problem in the code somewhere.