NearTRIP is an intelligent NTRIP proxy that automatically connects to the closest NTRIP base station based on the user's current location. It acts as an NTRIP server to GNSS receivers while connecting as a client to upstream NTRIP casters.
- 🌍 Automatically selects the closest NTRIP base station
- 🔄 Seamlessly switches between base stations as the user's location changes
- 🔌 Acts as an NTRIP server that can be used with any GNSS receiver
- 📊 Logs NMEA messages for diagnostic purposes
- 🚀 Simple setup and configuration
- 🔥 Hot reloading of configuration (change stations without server restart)
- 🧑💻 Web UI to manage it all
- RTK corrections for precision agriculture
- UAV ground control stations needing RTK data
- Mobile mapping applications
- Any application needing RTK corrections from the closest base station
-
Clone this repository:
git clone https://github.com/smerty/neartrip.git cd neartrip -
Install dependencies:
npm install -
Create configuration file:
cp config.json.sample config.json -
Edit
config.jsonwith your settings and available NTRIP stations.
The config.json file contains all the settings needed to run NearTRIP:
{
"username": "your_ntrip_username",
"password": "your_ntrip_password",
"interface": "0.0.0.0",
"port": 2101,
"mountPoint": "NEAR-Station",
"userAgent": "NearTRIP/1.0",
"adminPort": 2101,
"adminUsername": "your_adminui_username",
"adminPassword": "your_adminui_password",
"stations": [
{
"mountPoint": "STATION1",
"casterHost": "example-caster.com",
"casterPort": 2101,
"username": "station_username",
"password": "station_password",
"latitude": 37.123,
"longitude": -122.456,
"active": true
},
// Add more stations as needed
]
}NearTRIP supports hot reloading of configuration, allowing you to modify settings without restarting the server or disrupting existing connections:
- Edit the
config.jsonfile while the server is running - Save the file
- Changes are automatically detected and applied
You can:
- Add or remove stations
- Change station details (coordinates, credentials, active status)
- Update server settings
Existing client connections will remain stable. Changes take effect:
- Immediately for new connections
- When clients send updated location information
- When clients reconnect
Start the NearTRIP server:
npm start
Connect your GNSS receiver to the NearTRIP server using the IP address and port specified in your configuration.
- Your GNSS receiver connects to NearTRIP as if it were a standard NTRIP server
- The receiver sends its location via NMEA GPGGA sentences
- NearTRIP analyzes the location to find the closest base station
- NearTRIP connects to the selected base station as an NTRIP client
- RTK correction data from the base station is forwarded to your receiver
- As you move, NearTRIP automatically switches to the closest station
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.