A gps module for vex would be very cool.

Until they make an “official one” there are a number of them currently on the market that you can use.

Most GPS output is as a serial device running about 9600 baud (a pretty slow speed). The output is in NMEA defined character strings. It’s pretty easy to decode the messages and figure out where you are.

For more indepth help on using GPS, I’d suggest two sources. First is Eric Raymond’s Introduction to GPS. When I was decoding GPS messages two years ago for a contest I used this guide to GPS Messages

In the VEX, the GPS will attach to the serial ports on top of the PIC or Cortex controllers. Quazar and others have produced threads on how to read serial devices.

The tricky bit is to do the math of “I’m here and I want to go there, which way do I go?”, since you need SIN and COS to make it work. That’s not really a problem since you can make a table with 36 entries in it covering the directions at 5 degrees at a time. (Just as a heads up, most of the spherical math stuff is done in radians, so you might want to read up on the degree to radian calculations. )

As with most things robotic, Google is your friend. Lots of people have blazed the trail of reading and using GPS on small robots.

Good luck!

Yes, but I would rather wait until they got an official one so I wouldnt require a whole bunch of junk code to decrypt the input.

GPS is only good outdoors. With 3 meter accuracy not really usuable for VEX competitions even if held outdoors.

An angular gyro would be great! (it’s been in the works now for several years); an Inertial Measurement Unit (IMU), would be fantastic. Google Sparkfun or Pololu for these awesome sensors. The accelerometer IMHO, not too useful for autonomous mode.

If you want to blow your budget, how about a laser range finder $2K-$6K at Akroname? or some tracking video cameras?

To further aid in autonomous, how about some IR beacons atop goals and/or four corners of the field?

Well not everything has to be for competition, just like vexpro! And gps would be good for autonomous vehicles travelling long distances.

Would 36 entries be 5 degrees at a time or 10 degrees at a time?

Depends on how you do it. With some fairly simple algebra, you can get both sin() and cos() from a table that only covers 90°. The remaining 270° is derived by simple transforms of the index and/or the value. So 36 entries could give you 2.5° resolution.


  • Dean

Well it depends what you are trying to work out. If you had two positions and you wanted to change the angle of the aircraft you could use 2D vectors and then just have another reference vector from 2 - 5 seconds ago (depends on your velocity) and then just make a triangle and calculate the angles. Then set that as your turning angle, and then if there was a compass device, you could use that to measure how far you have turned. Very simple but very expensive. Lol if you have the money then knock your self out! Go for it!

This link shows most of the common info available from GPS units. Time, Latitude, Longitude, Horizontal Speed, Vertical Speed, Altitude, Heading and the number of Satellites in view. The L/D is Lift/Drag ratio (for Skydiving). This particular video gps data logger is using a gps from U-Blox running at 4hz. The relative position is being “printed” real-time on the screen. In your app,you would probably just use lat, long & heading and perhaps a list of way-points lat/longs.

I had posted 5 degrees at a time, what I had done before. It was a small course and the way points were 1000’ apart so there was no need for single or sub-degree accuracy. Flipping the data to match the other quadrants isn’t tough and if you are smart enough to do the math for the GPS, the table look up is very easy. Dean and the 2.5° would be easy to do if you needed more accuracy.