This is awesome! that's so much for running with the ball. what language is it written in?
Hey folks,
I wrote a program the other day that saves data from a gps reciever to a Google Earth kml file. I know that someone had made an Applescript to do this (elsewhere on this forum), but having choices is never bad, so I hope this is helpful to someone.
The program uses the gpsd server for getting GPS data, as well as the libxml2 libraries for writing the xml file. An Applescript launcher is included for convenience.
This works just fine on my computer. As any programmer knows, that means that it probably won't work on anyone else's computer and you'll all laugh at the n00b. That being said, I'd be happy to recieve bug reports or suggestions.
Download is available here.
Have fun!
Ravi
This is awesome! that's so much for running with the ball. what language is it written in?
Thanks! The gpsd server and client program are both C++. The applescript user interface is, well, in applescript.
The client program works by polling gpsd and writing the output in kml format to the specified file. In addition to saving position (with an arrow pointing in the direction of motion), this program saves altitude, speed, and climb rate. In my system (1.33GHz PowerBook G4), this uses under 5% of the processor.
Ravi
i dont have a gps module. can you post a screen shot?
Can you make a route with this without an internet connection?
When you first run the script, you get the standard choose serial port dialog:
After choosing the GPS device, you choose the filename to output to:
The script runs the gpsd and client programs, and displays the following dialog:
When you're done, you click "done" and it closes the gpsd and client programs. While they're running, they will update the output file once per second. In Google Earth, the file looks like:
By the way, you can run this without owning a gps module (just to check if it'll work). It will simply output zeros to latitude, longitude, etc...
As far as making a route with this, what do you mean? All this program does is create a kml formatted file with your current state (lat/lon/...) that can be used as a network link in Google Earth. It doesn't actually talk to GE directly (since GE isn't scriptable yet). If you're talking about saving your previous positions so they display as a route on Google Earth, this doesn't currently support that. However, if there's enough demand I may look into adding that capability.
Ravi
blast!
beat me to it, i'm writing something similar in obj-c, but my gps unit is backordered.....![]()
Well heck, go for it! The more people there are working on this, the better the end result will be. I'd be happy to share my code with other developers who want to help.Originally Posted by thatshortkid
Ravi
I was talking about you type in an address and it calculates a route to that address from your current position.
Oh. Um, that's not what this program is for.Originally Posted by super-fly
You can use GE itself to do that, although you do need an internet connection. No non-commercial program can route without an internet connection, because the required road databases aren't free.
Ravi
Bookmarks