The MP3car.com Store  

Welcome to the MP3Car.com forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. Registering will also remove advertisements. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Go Back   MP3Car.com > Mp3Car Technical > MacCar

Reply
 
Thread Tools Display Modes
Old 03-12-2006, 03:19 AM   #1
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Thumbs up New Mac GPS to Google Earth Program

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
ravidavi is offline   Reply With Quote
Sponsored Links
Old 03-12-2006, 07:58 PM   #2
Constant Bitrate
 
Join Date: Apr 2005
Location: monroe/louisiana
Vehicle: 2001/chrystler/sebring
Posts: 168
My Photos: (0)
This is awesome! that's so much for running with the ball. what language is it written in?

Last edited by CArringt; 03-12-2006 at 08:00 PM.
CArringt is offline   Reply With Quote
Old 03-12-2006, 08:16 PM   #3
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
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
ravidavi is offline   Reply With Quote
Old 03-12-2006, 08:30 PM   #4
Constant Bitrate
 
Join Date: Apr 2005
Location: monroe/louisiana
Vehicle: 2001/chrystler/sebring
Posts: 168
My Photos: (0)
i dont have a gps module. can you post a screen shot?
CArringt is offline   Reply With Quote
Old 03-12-2006, 09:46 PM   #5
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 189
My Photos: (9)
Can you make a route with this without an internet connection?
super-fly is offline   Reply With Quote
Old 03-12-2006, 10:48 PM   #6
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Post

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
ravidavi is offline   Reply With Quote
Old 03-13-2006, 04:32 AM   #7
Newbie
 
Join Date: Apr 2005
Posts: 16
My Photos: (0)
blast!

beat me to it, i'm writing something similar in obj-c, but my gps unit is backordered.....
thatshortkid is offline   Reply With Quote
Old 03-13-2006, 05:07 AM   #8
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Quote: Originally Posted by thatshortkid
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.

Ravi
ravidavi is offline   Reply With Quote
Old 03-13-2006, 06:43 AM   #9
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 189
My Photos: (9)
I was talking about you type in an address and it calculates a route to that address from your current position.
super-fly is offline   Reply With Quote
Old 03-13-2006, 06:52 AM   #10
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Red face

Quote: Originally Posted by super-fly
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. 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
ravidavi is offline   Reply With Quote
Sponsored Links
Old 03-13-2006, 06:56 AM   #11
Constant Bitrate
 
super-fly's Avatar
 
Join Date: Feb 2006
Location: In a van down by the river!
Posts: 189
My Photos: (9)
OIC....so i guess the only option for that is still Route 66.
super-fly is offline   Reply With Quote
Old 03-13-2006, 07:25 AM   #12
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Post

Updated the program on Monday, March 13, 7:15am. Changes are:
* Most recent version of gpsd.
* Speed is now in the name of the Placemark.
* Detects if your GPS receiver loses the satellite signals, and displays "GPS Unavailable" as the name.
* Data printed in dark green if signal is available, and last known data printed in red if satellite signal lost.

Once again, you can download the software here.

Have fun!
Ravi
ravidavi is offline   Reply With Quote
Old 03-13-2006, 06:20 PM   #13
Constant Bitrate
zapwizard's CarPC Specs
 
zapwizard's Avatar
 
Join Date: Aug 2002
Location: Austin, TX
Vehicle: 2006 PT Cruiser
Posts: 136
My Photos: (0)
Mine was the first, granted I wrote in only days, and learned applescript along the way. It's hardly polshed but works:
http://www.mp3car.com/vbulletin/maccar/67053-google-earth-osx.html

Dude, perhaps we should have worked on this together considering you live 13 miles from me on the other side of Austin.
Check out www.austinmodders.com, we have an active forum group of locals.

The GPS network program looks much more effecient then the SerialX thing I found, but I also noticed SerialX was in the Zip file, is that still used?

Is the source code in there? As I would like the impliment some of the things I have in my code such as movement of the camera based on speed.
zapwizard is offline   Reply With Quote
Old 03-13-2006, 07:20 PM   #14
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Well I'll be! I didn't even notice that you lived in Austin too. I actually saw your script the day after I finished my program ... if I had seen it earlier I probably wouldn't have even worked on mine.

The only thing I use SerialX for is to display the list of serial ports. I wish I could do this without using SerialX, but I hadn't used Applescript in like 10 years and couldn't figure out how to get it to list the contents of /dev/ .

[edit: I figured out how to list serial ports without SerialX, so in future versions SerialX won't be required.]

Anyways, I'm gonna do another update to my program in a bit, and will include the code with it then. It'd be cool to see what others want to add to it. One thing I do plan for the future is saving a track file so you can see a location history.

If you do want to mess with the code, you'll need to download, compile, and install gpsd (see the first post for a link).

Ravi

Last edited by ravidavi; 03-14-2006 at 01:51 AM.
ravidavi is offline   Reply With Quote
Old 03-14-2006, 04:09 PM   #15
Newbie
 
Join Date: Mar 2006
Location: Austin, TX
Vehicle: 2006 Scion tC
Posts: 13
My Photos: (0)
Post

Hey folks,
OK, I uploaded a new version. Fully commented source code is included now. If you make changes that you feel will be useful to others please inform me.

Ravi
ravidavi is offline   Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mac flash frontend! Use any program with ease viper24 MacCar 0 11-19-2005 02:47 PM
Wanted: Mac compatable GPS reciever!!!! viper24 Classified Archive 1 11-16-2005 11:57 PM
gps soft for mac (not route) xcosmes GPS 4 10-20-2005 04:22 PM
GPS Software for MAC? Check This NiN^_^NiN MacCar 42 07-17-2005 11:46 PM
google earth Ascension Software & Software Development 1 06-30-2005 05:35 AM


All times are GMT -5. The time now is 05:45 PM.


Sponsored Links
The MP3car.com Store

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 1999 - 2008 Mp3Car.com Inc.
Ad Management by RedTyger
Message Board Statistics