Skip to content

pinpox/bike-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bike Tracker

A real-time GPS tracking application built with Go and WebSockets.

image

Features

  • Real-time position updates via WebSocket
  • Interactive map display using MapLibre GL with OpenStreetMap tiles
  • Configurable map styles
  • 3D terrain visualization support
  • Hillshading for enhanced terrain depth visualization
  • Sky and fog effects for immersive 3D atmosphere
  • H02 GPS protocol support (text and binary formats)
  • Dual server setup: HTTP web interface + TCP GPS data

Usage

Environment variables:

  • ADDR - Server address (default: localhost)
  • PORT - HTTP server port (default: 8080)
  • H02_PORT - H02 GPS server TCP port (default: 8989)
  • MAP_STYLE - Map tile style URL (default: MapLibre demo style)
    • Use any MapLibre GL compatible style JSON URL
    • Free options: MapLibre demo, MapTiler (requires free API key)
    • Get free API key at https://www.maptiler.com
  • TERRAIN_SOURCE - Terrain tiles URL for 3D visualization (optional)
    • Use MapTiler terrain tiles: https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=YOUR_API_KEY
  • HILLSHADE_SOURCE - Hillshading tiles URL for enhanced terrain visualization (optional)
    • Use MapTiler terrain tiles: https://api.maptiler.com/tiles/terrain-rgb-v2/tiles.json?key=YOUR_API_KEY

The server starts two services by default:

  • Web interface: http://localhost:8080
  • H02 GPS server: TCP port 8989

GPS Data Sources

Option 1: H02 Protocol (Recommended for GPS trackers)

Configure your GPS tracker to send H02 data to:

  • Server IP: YOUR_IP
  • Port: 8989 (or your configured H02_PORT)
  • Protocol: TCP

Supports both H02 text format and binary format.

Option 2: HTTP API (For manual testing)

Send GPS data to the /position endpoint:

curl -X POST http://localhost:8080/position \
  -H "Content-Type: application/json" \
  -d '{"latitude": 52.5200, "longitude": 13.4050}'

About

A real-time GPS tracking for your bike

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors