MissouriMRDT/BaseStation_Software

GPS

Closed this issue · 12 comments

We need to be capable of showing a map of the terrain offline with the ability to visually annotate locations.

Previously Researched Options

Implementation Steps

  1. Implement WPF control
  2. Place markers (go to number 4)
  3. Check internet connection to use local cache; be able to switch between online/offline
  4. Obtain offline cache
  5. Add Waypoints (Add/Remove individual ones; clear all)
  6. New background for unavailable tiles
  7. Map style selection (open source only)
  8. Map rotation
  9. Center view on rover location
  10. Distance between waypoints
  11. Elevation data

Sample data from URC 2014 Astronaut Assistance Task

Start Location

Latitude: 38°25'8.57"N
Longitude: 110°46'57.79"W

More to come... hopefully.

Here's an article about using the WebBrowser control with the Google Earth plugin (in-browser). Interacting with the plugin is done via the newer Javascript API for Google Earth. I'm not sure how "clean" this would be, but you might see how it looks. Remember, the key is being able to use it offline.

On a separate note, it looks like they discontinued support for their COM API in 2010 which I'm thinking would have meant interacting with the desktop application version of Google Earth like we were thinking. Old versions of Google Earth still support this but things don't look good...

I saw the Javascript API last night while checking everything out as well. It looked pretty nice, but wouln't work offline.

However, I did see that they have a custom control/plugin for winforms applications which is more of a step in the right direction, but not quite what we want.

I think I will try messing around with the winforms control today and begin looking into another map provider that would work better with our offline requirement.

You should link what you find and record why it is or isn't a good idea after you've tried it. Also, typically WinForms controls don't play nicely inside WPF.

I don't believe that either Google Earth or Bing Maps will work for us as downloading the tiles for use locally is very much against their TOS.

However this project: http://greatmaps.codeplex.com/ supports offline maps specifically for WPF. I think this may be the best starting point for us. Any thoughts?

Some immediate observations:

  • It has a WPF version, but it's for .NET 4.0 (we use 4.5) and that "might" be an issue (have to try it to know for sure)
  • It hasn't been updated since 2011 Make that 2013 (not that bad)
  • Looks nice

Whatever we end up using will have to integrate relatively cleanly with the existing code.
I'm totally willing to take some open source project that's outdated, such as this one, and modify it to fit our needs. Try implementing and make notes on what you like/dislike about it.

Started a Repo to work on implementing a control/simulation that would fit our needs: https://github.com/lucaswalter/GPS-Playground

Currently I have been able to get a barebones control into the application that really doesn't do much of anything but successfully build. I am also using the 2013 version that you mentioned and am having no issues at all. It is able to build completely fine on .NET 4.5

I was able to get the control working with the Open Maps Provider and place a marker down from a custom Longitude/Latitude. I have also added basic functionality to detect whether or not the map tiles should be retrieved from the server or use the tiles from the cache.

Setting/Moving the marker based off GPS data shouldn't be very difficult as markers just require Lat/Long coordinates, so I think the next step should be getting a pre-defined set of map tiles automatically loaded so we will be able to zoom in all the way anywhere around Rolla and the Utah driving area.

Right on man. See if you can obtain the offline cache and make the control use it before the meeting on Sunday. I'm guessing the edge of the map would be black or cut off where the cache doesn't have data if the internet was disconnected.

Offline caching implemented and working correctly! Looking forward to demo it during our meeting today!

A basic waypoint system is now working. My next step is to cleanup their management and removal.

Management and removal?

Management such as being able to select, save, and modify previous waypoints.