Code Monkey home page Code Monkey logo

gpsmap's Introduction

GPS Map Generator

This tool takes a GPX file as input and produces MP4 videos of an animated map augmented with various statistics, like speed, distance, or elevation. You can then take this video and overlay it on top of your action cam footage using your favorite video editor.

Here is how the map looks like:

Sample map

Here is an example of a video that incorporates the generated map:

Sample video

The video cycles through several maps at different zoom levels, showing a detailed map most of the time as well as several zoomed out ones in order to give an overview of the trip.

Building

Assuming you have an Ubuntu installation, run the following commands:

$ sudo apt-get update
$ sudo apt-get install cmake clang libopenimageio-dev libcurl4-openssl-dev libboost-filesystem-dev libavcodec-dev \
    libavformat-dev libswscale-dev
$ git clone https://github.com/vitalych/gpsmap
$ mkdir gpsmap-build && cd gpsmap-build
$ cmake ../gpsmap
$ make

How to use

# If you have a Garmin device, you will have *.fit files instead of *.gpx. Convert them as follows:
$ gpsbabel -i garmin_fit -f trace.fit -o gpx -F trace.fit.gpx

# Create a directory that will store the downloaded map tiles from OpenStreetMap
$ TILESDIR=/path/to/tiles/dir
$ mkdir -p $TILESDIR

# Generate the map video
$ SRCDIR=/path/to/gpsmap/source
$ BUILDIR=/path/to/gpsmap-build
$ $BUILDIR/src/gps \
    -gpx /path/to/trace.fit.gpx \
    -rsrcdir $SRCDIR/rsrc \
    -tiles $TILESDIR \
    -outdir /path/to/video/out

The tool splits the GPX file into segments and generates one MP4 video for each of them. A new segment starts when the speed drops to 0 km/h. This makes it much easier to spot uninteresting parts where you stopped and cut them out in your video editor.

gpsmap's People

Contributors

vitalych avatar

Stargazers

 avatar  avatar  avatar

gpsmap's Issues

Fix cumulative distance with multiple GPX files

Use case: a cyclist stops riding in one location, stops the gps recording, then resumes riding and restarts the gps in another location.

Current behavior: the map will show a straight line between the last gpx entry from the first recording and the first entry of the second recording. The cumulative distance will include this fake line.

Desired behavior: do not show the straight line (there should be a gap) and do not count it in the distance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.