Revolution Reading GPS Data

Ben Rubinstein benr_mc at cogapp.com
Sun Mar 2 07:42:43 EST 2008


On 1/3/08 22:59, R. Hillen wrote:
> is there anybody who succeeded in reading data from a gps device into a 
> revolution application?
> 
> How did you do it? Which device did you use?

Hi Richard,

I did this a couple of years ago in Rev - it was very straightforward.  All 
(er, virtually all) GPS devices speak NMEA, which is widely documented on the 
web.  We worked with a couple of different devices, and the software didn't 
notice any difference (apart from anything else, I think pretty much everyone 
is using the same chipsets).

We did this on Mac and Windows; the only difficulty was locating Mac drivers. 
  All the devices we worked with were serial originally with serial-USB chips 
bolted on; there seemed to be a couple of different ones of these.  The other 
way that working on Windows was easier in locating the device automatically - 
just iterated through COM1-10; on the Mac I think we had to set the name of 
the device in the configuration.

The devices just spend a steady stream of data; in the NMEA format this is 
ASCII, line formatted; so I had a handler running on a timer which read data 
from the port and buffered it, and then invoked a handler to see whether there 
were any completed "sentences" to process.

That handler in turn checked whether the position etc information had changed, 
and if so invoked a handler to actually do whatever it was supposed to be.

In theory you can switch the devices into a binary format which should be much 
faster - but we didn't seem to need the speed and I never dared try in case I 
couldn't get it to switch back!

Good luck,

- Ben




More information about the use-livecode mailing list