I've had a couple people ask why there's such an emphasis here on GPS simulation. The simple answer is "Because we don't want to lose our UAVs!" With regular robots, when they've got bugs or software crashes, you just pick them up and fix the problem. With UAVs, they're likely to fly away forever or end up in a pile of pieces. They're more like satellites or Mars rovers than battlebots--you can't fix them from the ground, and when they go wrong in the air, it can be catastrophic.
One example: in my Basic Stamp code, to get around the lack of floating point, we truncate the lat/lon to one word, which means assuming that all waypoints are within one full degree of where we are. Which is a perfectly safe assumption---unless you enter the waypoint wrong, which I did the very first time. In the air, this would have led to a fly-away. On the ground, where I could read the data coming in over the debug terminal, I spotted the problem right away. Now the autopilot has an abort routine that returns it to RC control if the next waypoint is too far away. (That way we get remote notice that something has gone wrong and we can bring it back manually; later on, when we've demonstrated that it can fly to waypoints properly, we'll switch that to a "return to home location" command in the event of an error)
GPS simulation identifies problems faster than anything else you could imagine, and safely, too. If you don't want to throw away hundreds of dollars of equipment and countless hours, Just Do It!
With that in mind, the Basic Stamp autopilot code will no longer support GPS modules that aren't compatible with standard GPS simulators (ie, output regular NMEA sentences). That means that if you've got the Parallax GPS module, you can't use it in "smart" mode anymore; you've got to ground its /RAW pin so that it's a standard GPS module.
In the latest rev of the software, I've incorporate the Parallax servo driver board as an option, and eliminated the Parallax GPS module smart mode, so that leaves just one code set, for which the standard hardware is a Basic Stamp BS2p chip, EM406 GPS module and FT639 servo driver. If you've got other hardware, the comments on the code will tell you how to modify it, but that's the recommended package.
From now on, I'll just be working on that single code set, so I hope version control problems and other confusion are behind us. The software is here.
Thanks for the catch on the broken link in that post; it's now fixed. That code has a working NMEA parser built in to its SERIN command. Let me know if it doesn't work for you or if you have other questions. As for bringing the /RAW pin to ground, if you're using that LCD extension cable, you'll need to ground the pin right on the GPS module itself by soldering a wired from the ground pin to the /RAW pin. Cut a short length of very light weight wire and strip the ends. Wrap one end around the base of the ground pin a few times, and the wrap the other end around the base of the /RAW pin. Solder them, and you should still have plenty of room to put the cable connector on the ends of the pins.
I've been running tests on my prototype and I've noticed I've been getting a lot of garbage data in smart mode, so I was considering switching to raw anyway to see if that would help any.
I have the parallax GPS receiver plugged into the servo port via an LCD extension cable as described in your hardware tutorial. To switch to raw mode, I would simply have to connect the raw pin to the BOE's ground, correct? (And the rest would be left the same?) I've never had any formal electronics training so I am a little unsure as to how to do it, does the soldered wire just have to be in contact with the raw pin or does the wire lead have to pretty much completely lined up with it?
Comments
Soldering is easy, and it's time you learned!
I have a feeling my soldering ability is not up to par with what you're describing, but I'll take a shot at it.
Thanks for the catch on the broken link in that post; it's now fixed. That code has a working NMEA parser built in to its SERIN command. Let me know if it doesn't work for you or if you have other questions. As for bringing the /RAW pin to ground, if you're using that LCD extension cable, you'll need to ground the pin right on the GPS module itself by soldering a wired from the ground pin to the /RAW pin. Cut a short length of very light weight wire and strip the ends. Wrap one end around the base of the ground pin a few times, and the wrap the other end around the base of the /RAW pin. Solder them, and you should still have plenty of room to put the cable connector on the ends of the pins.
Make sense?
I've been running tests on my prototype and I've noticed I've been getting a lot of garbage data in smart mode, so I was considering switching to raw anyway to see if that would help any.
I have the parallax GPS receiver plugged into the servo port via an LCD extension cable as described in your hardware tutorial. To switch to raw mode, I would simply have to connect the raw pin to the BOE's ground, correct? (And the rest would be left the same?) I've never had any formal electronics training so I am a little unsure as to how to do it, does the soldered wire just have to be in contact with the raw pin or does the wire lead have to pretty much completely lined up with it?
Also, are there any tutorials/source code for parsing NMEA strings? (The autopilot code download link on http://diydrones.ning.com/profiles/blog/show?id=705844%3ABlogPost%3... doesn't work, by the way)