GRip

Success Stories

Overview

RipTrails, an online GPS trail sharing community, needed a free utility to allow its users to download GPS track logs and upload them to their account. GRip (short for GPS Rip) is a Microsoft Windows application that communicates with your GPS and helps you visualize, edit and organize your trails.

Since most GPS’s save all your tracks until you clear them, each track log you download could contain many different trails. GRip was designed to automatically differentiate which tracks belong to which trail, and group them together. A simple click of the button will turn your track logs into trails.

GRip allows you to visualize your trails in both 2D and 3D. GRip will plot your trails on its built in map or an integrated Google Map. If your GPS supports altitude data, GRip will generate a 3D view of your trails, which you can zoom and rotate, so you get a better feel for the trail.

GRip will automatically locate your trails by going online and looking up the nearest state, county, city, and area in RipTrail’s geographic database. There are several organizational features, that let you organize your trails based on their location or the date the trail was done. You can also attach pictures to each trail.

Features include:

  • Download track logs from your Garmin or Magellan GPS.
  • Make trails from your track logs, which you can upload to RipTrails.
  • Attach images to each trail.
  • Organize your trails by date or location.
  • Plot trails/logs on a built in map or a Google map.
  • Track trail statistics.
  • 3D trail view.
  • Multiple GPS configurations.

Why the VCF?

GRip 1.0 was initially written in MS VC6, on top of the ATL/WTL framework.

While GRip 1.0 was adequate, doing the job it was supposed to do, it just wasn’t quite there yet, so plans for GRip 2.0 were soon set into motion.

During the design phase for GRip 2.0, it became obvious that a lot of technologies would need to be incorporated, such as a web browser and OpenGL controls. While ATL/WTL is an adequate framework for this, it’s not built into the framework. You either have to write it yourself, or use 3rd party libraries, or switch frameworks.

I looked at C# and the .NET framework, but decided it was way too cumbersome for my needs. .NET has a pretty substantial runtime, and I wanted a single .exe and a small download.

Then I discovered the VCF, and it fit like a glove! It had everything I needed to get going, plus built in string and date time classes that are used consistently throughout the framework. The VCF feels like .NET for ATL/WTL.

I needed threading for communicating with GPS’s and going out to the Internet, so the interface would still be responsive. Solution: Thread class.

I needed OpenGL for visualizing trails in 3D. Solution: the OpenGLKit and the OpenGLControl.

I needed an embedded web browser to display and interact with a Google map. Solution: HTMLBrowserControl.

I needed to be able to look information up on the net. Solution: the InternetKit and the URL class.

I needed to be able to load many different image formats. Solution: the Image class.

I needed to be able to import/export trails using XML. Solution: the XMLParser class is built in, but due to legacy issues I use TinyXML still (i.e. I haven’t gotten around to porting it yet).

While there are currently no plans for porting to other platforms, it’s nice to have the option to do so in the future.

Likes:

  • Creating controls and windows is very easy and consistent. This is probably the most helpful part of the VCF. You don’t have to remember each controls constants (enums are very descriptive) or have to subclass anything, as you do in ATL/WTL.
  • Events and wiring them up are very intuitive, compared to window message routing and handling.
  • Layout containers and docking. I used to have to write all the layout logic myself, but these features make it way easier. Panels for containing other controls, make layout and docking even easier.
  • Writing your own custom controls could not be any easier. I created several custom controls for GRip. The TabSplit control shows tabs as normal, or allows the user to show multiple tab pages at once. A FireFox like progress control, which derives from the standard ProgressControl, provides an endless wait indicator.
Dislikes:
  • The Model View Controller design pattern can make it hard to find the functions you need to call. Sometimes you need the control, and sometimes you need the model. Some controls provide wrapper functions that call the model for you, so sometimes it can get confusing.

Modifying the VCF

Since the VCF is still in development, some functionality has not been implemented yet. Modifying the VCF is pretty straight forward, once you figure out what and where you need to modify it.

For example, there was no way to parse a string into a DateTime instance. With a little experimentation, and the help of people on the discussion forums, I was able to add this functionality to the Locale classes. [Editor's note: The next version of the VCF will incorporate a similar solution to this.]

Adding drop down menu support to the Toolbar class was equally easy, as well as correcting the behavior of a few of the Win32 common controls.

Summary

Developing with the VCF has been an exciting adventure into open-source software. All the aspects of the VCF were well thought out and implemented consistently, which makes using it effortless. Looking at the documentation, viewing the source, or asking questions in the discussion forums has resolved any problems I’ve had. I am looking forward to starting my next project using the VCF.

Images


Shows GRip in action, downloading tracks from a GPS. This makes use of the Thread class, so you can continue to use the program or cancel the download.


Shows editing a downloaded track log. Grouping indicators are to the left of the tracks.



Shows the trail in 3D and 2D on the built in map, selected tracks are shown in both views. OpenGLControl was used to create the 3D view, and the 2D view is another custom control that handles all the map drawing.



The HTMLBrowserControl was used to embed a google map that GRip interacts using click event handlers and the dom element’s click method.



Shows the trail dialog.



Shows the trail images tab and image dialog. The image dialog has a custom ImageControl which maintains the aspect ratio of the image as it’s resized.





Steve Echols