[groupi] GPSReader works

  • From: Lorin Tauss <taussl01@xxxxxxxxxxxxxxxxxx>
  • To: groupi@xxxxxxxxxxxxx
  • Date: Tue, 29 Sep 2009 23:18:57 +0800

Hi guys....

this is mainly for Beau, cos we were having issues today.

So, the GPSReader library is working! As I sit here now, it is spitting out
my position every 2 seconds! Woohoo.

Beau.... I didnt change my code at all............ So, it must have been
working when we ran it on the archer, just maybe we didnt set it up
correctly? Or perhaps the archer was not setup to use the serial port at the
time? or maybe the debugger can't access the archer's serial port???

All I did tonight was:

GPSReader reader = new GPSReader(10);
gpsData data = new gpsData();

NOTE: I would still be in favour of only doing this once, rather than each
time you press the "grab" button, then when "grab" is pressed, just do the

Then you can use reader.getGpsData() to get the struct.

data = reader.getGpsData();
Console.WriteLine("LAT: " + data.lat.ToString() + " " +
Console.WriteLine("LON: " + data.lon.ToString() + " " +
Console.WriteLine("Isvalid: " + data.isValid.ToString() + " inDate: " +
     data.inDate.ToString() + " isInitialised: " +
Console.WriteLine("Time last: " + data.time.ToString());

This is working for me......... dont know what the issue could have been.

Incidentally; I think your laptop jinxed the GPS!! It was working fine, then
it showed up as a mouse! I had to reboot to get my mouse back... unplugging
the gps didnt do anything!

And by the way; the debugger is freaking awesome!!! Being able to check all
the variables while running is hot!

Now all I need to do is stop GPSReader printing to the terminal, get it to
throw exceptions for you, and document it a little.



Other related posts:

  • » [groupi] GPSReader works - Lorin Tauss