Skip to content

GPX importer for Magene Cycling head units with navigation (OneLapFit)

License

Notifications You must be signed in to change notification settings

jeromecornet/magpx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MAGPX

This is a quick and dirty importer for GPX routes on the magene cycle units with routing. This has only been barely tested on a mac with GPX routes generated by Komoot and uploaded to a C406 pro.

Things may not work for you, and magene may change their protocol at any point without saying anything so it may not work at all.

That said, it works for me so I'm putting it out there.

Usage

Install ruby 3.2 run bundle install

Signup for mapbox and get an API token https://account.mapbox.com/ The small limits of the free plan should be enough for personal usage.

You also need to know your login and password from Onelapfit.

The first time, you will need to save your onelapfit configuration by running ruby magpx.rb --login --username 'onelapfit-login' --password 'onelapfit-password' --mapbox-token 'mapbox-token' (replace 'onelapfit-login' 'onelapfit-password' and 'mapbox-token' by their respective values)

This will create a configuration file in ~/.magpx.yml that contains your Onelapfit userid, authentication token and mapbox token.

After this, you can import GPX files using: ruby magpx.rb -g path/to/your/file.gpx

This runs the GPX file through the mapbox route matching, splitting the route in smaller sections to remain within the API limits of only 25 points. Once the route is matched, it uploads the data in the way the onelapfit server expects (I think)

You can find the route in the mobile app by going to the navigation screen, then looking at the history. The route should appear there.

Good luck !

About

GPX importer for Magene Cycling head units with navigation (OneLapFit)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages