Blog Stats
  • Posts - 132
  • Articles - 0
  • Comments - 28
  • Trackbacks - 0

 

Moving Map, With Virtual Earth

So I thought, ahead of new year, I should just prove end-to-end the components of the GPSd service.   What better way than to plot our current position on a map.

Using a converted version of the GPSd client, that we talked about previously,  I parse the NMEA data coming from the GPS and produce an XML file of the following -

<?xml version="1.0" encoding="utf-8" ?>
<movingmap>
  <latitude>51.267</latitude>
  <longitude>-1.108</longitude>
  <bearing>182</bearing>
  <speed>90</speed>
  <altitude>3000</altitude>
  <timestamp>0950</timestamp>
</movingmap>

This process runs continually only when we have a valid GPS position (this is important to avoid getting really lost).    I haven't quite finished this bit,  but will post it when complete.

 

Now the fun bit.   Using a very simple web page and a little bit of AJAX,  we plot a map using Virtual Earth.   Then using AJAX we poll our XML location file every 5 seconds.     We then parse the returned XML and draw an icon on the map.

image

The icon can of course be anything you like, I've chosen an executive jet :-)

The illusion is then complete, we have a continually updating map showing our current location from wherever the GPSd is running.

I guess, I was thinking that this would be a great web-page to available when you initially connected to the aircrafts/ships wireless network.

Full source 

 

NMEA parser to follow.

Please let me know if this application is of any use to you?

 

Happy New Year!

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

Feedback

# re: Moving Map, With Virtual Earth

Gravatar I like this idea - It's been neat to follow your recent GPS/Mobile posts! 12/31/2008 1:21 PM | Lou

Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification:
 
 

 

 

Copyright © Richard Jones