SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By whahappened
#12693
Does anyone have a simplistic "how-to" in order to create a overlay in Google Earth with KML data received from the Lassen iQ?

I'm very new to GPS devices and would certainly appreciate any help/input.
By jandirks
#12701
You might find this usefull: http://www.gpsvisualizer.com/map?form=googleearth

Just copy/paste your gps locations into that website and it will generate a KMZ file (zipped KML file) for you which you can drag into Google Earth
By Caffeine
#12707
I wrote a little program that reads NMEA data from the serial port, and generates 2 KML files. 1 is just the current location, the other is a 'network link' kml that refreshes the first KML every few seconds, this dynamically tracks your position.

GEPS

This needs the Microsoft .NET Framework 2.0.

I wrote in the other thread in the GPS forum about what's in the KML files.
By whahappened
#12717
Thank you for the replies!

Please excuse the lack of knowledge I have with GPS information and devices, I'm currently enrolled in a course through school.

So, the Lassen iQ creates a file named: GPS0.TXT, listed below is the information I get after logging in KML mode; it's much longer than this:

-123.4608688354492,39.1453552246094,3752
-123.4608688354492,39.1453552246094,3752
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453514099121,3762

So, I attempt to copy/paste this information into:

http://www.gpsvisualizer.com/map?form=googleearth

After a few moments, it responds saying "No valid GPS data detected!"

I see that in the "paste your data here" there's mention of:

name,desc,latitude,longitude,color

Do I need to alter the data prior to entering?

Thank you again for your help.
By Caffeine
#12719
Ahhh, you're using the FAT datalogger.

To get that thfo in a usable format, cut and paste it into a kml file like this:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Placemark>
  <description>Driving from Home to Work</description>
  <name>Home To Work</name>
  <LookAt>
    <longitude>151.132628</longitude>
    <latitude>-33.909663</latitude>
    <range>4451.842204068102</range>
    <tilt>44.61038665812578</tilt>
    <heading>-125.7518698668815</heading>
  </LookAt>
  <Style>
    <LineStyle>
      <color>7f00ff00</color>
      <width>5</width>
    </LineStyle>
    <PolyStyle>
      <color>7f00ff00</color>
    </PolyStyle>
  </Style>
  <LineString>
    <tessellate>1</tessellate>
    <coordinates>
paste your data here
Code: Select all
    </coordinates>
  </LineString>
</Placemark>
</kml>
Note that the 'look at' node is the initial starting view of google earth, it should be changed to look at a point on your line, it's pointing at my house at the moment so you won't see anything.
By whahappened
#12745
Caffeine (jandirks too!) I really appreciate your help!

This is all slowly making sense to me now.

Although I have one more quick question.

Every once in a while when logging, I'll get these entries:

0.0000000000000,0.0000000000000,0

I'm assuming that this indicates that it's lost the signal?

Is it necessary that I delete these entries before I create a KML file?

It seems that if they are left in I get "interesting" results.

Thank you again for all your help, have a wonderful day!
User avatar
By ohararp
#12769
I delete the zeros otherwise google earth freaks out.
By jandirks
#12776
@whahappened,

Not sure what is wrong with your GPS data, it might be that your coordinate are in a different format from what the software is expecting.

On many GPS receivers it is possible to switch the latitude-longitude display settings format. Investigate your GPS options and if you can get the display into decimal degrees, that is what the GPSVisualizer website expects to receive.

Good luck!
By whahappened
#12808
You people are incredible!

I've learned more here (pertaining to hardware) than in my class.

I really appreciate all your help, thanks again!
By matthev
#12827
[quote="whahappened"]

-123.4608688354492,39.1453552246094,3752
-123.4608688354492,39.1453552246094,3752
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453514099121,3762

I see that in the "paste your data here" there's mention of:

name,desc,latitude,longitude,color

Do I need to alter the data prior to entering?

[/quote]

I've used and it worked well. You might need to make it look like this:

longitude,latitude,altitude
-123.4608688354492,39.1453552246094,3752
-123.4608688354492,39.1453552246094,3752
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453552246094,3762
-123.4608688354492,39.1453514099121,3762

You have to have a header at the top of the data you copy and paste.

-Matt
By pklammer
#13020
See my topic in this forum, "Text filters to convert GPS Logger NMEA to KML and CSV" -- If you want to record full-detail "NORMAL" mode from the logger, and then post-process it for a KML file.