A versatile marine data simulator supporting both NMEA 0183 and NMEA 2000 protocols simultaneously.
- TCP Server (default port 10110)
- WebSocket Server with web interface (default port 8080)
- Configurable Baud Rates: 4800, 9600, 19200, 38400
- Supported Sentences
- Position: GGA (GPS Fix), GLL (Geographic Position)
- Navigation: RMC (Recommended Minimum), HDT (True Heading), VTG (Track & Speed), XTE (Cross-Track Error)
- Environment: DBT (Depth Below Transducer), MTW (Water Temperature), MWV (Wind), VHW (Water Speed & Heading), DPT (Depth)
- TCP Server (default port 10200)
- WebSocket Server with web interface (default port 8081)
- Supported PGNs
- 127250 (Vessel Heading)
- 128259 (Speed)
- 128267 (Water Depth)
- 129025 (Position Rapid Update)
- 129026 (COG & SOG Rapid Update)
- 130306 (Wind Data)
go install github.com/captv89/nmea-simulator/cmd/nmeasim@latest
Or clone and build:
git clone https://github.com/captv89/nmea-simulator.git
cd nmea-simulator
make build
By default, the simulator runs both NMEA 0183 and NMEA 2000 protocols simultaneously:
nmeasim
Run only NMEA 0183:
nmeasim --protocol nmea0183
Run only NMEA 2000:
nmeasim --protocol nmea2000
Protocol Selection:
--protocol
: Protocol to use ("both", "nmea0183", or "nmea2000", default: "both")
NMEA 0183 Options:
--nmea0183-ws-port
: WebSocket server port (default: 8080)--nmea0183-tcp-port
: TCP server port (default: 10110)--baud
: Baud rate for TCP output (default: 4800)
NMEA 2000 Options:
--nmea2000-ws-port
: WebSocket server port (default: 8081)--nmea2000-tcp-port
: TCP port (default: 10200)
Common Options:
--host
: Host to bind servers to (default: "0.0.0.0")--interval
: Data update interval (default: 1s)
The web interface now supports viewing both NMEA 0183 and NMEA 2000 data simultaneously. Access it at:
- NMEA 0183: http://localhost:8080
- NMEA 2000: http://localhost:8081
You can use common terminal commands to view the NMEA data streams directly:
For NMEA 0183:
nc localhost 10110
For NMEA 2000:
nc localhost 10200
For NMEA 0183:
telnet localhost 10110
For NMEA 2000:
telnet localhost 10200
To view data with timestamps and hex dump:
For NMEA 0183:
socat TCP:localhost:10110 STDOUT | hexdump -C
For NMEA 2000:
socat TCP:localhost:10200 STDOUT | hexdump -C
Note: You may need to install these tools first:
- macOS:
brew install netcat socat
- Ubuntu/Debian:
sudo apt install netcat-openbsd socat
- Windows: Use PowerShell's
Test-NetConnection
or install WSL
- Go 1.24 or higher
- Make (optional, for using Makefile commands)
make build
: Build the binarymake test
: Run testsmake coverage
: Generate test coverage reportmake clean
: Clean build filesmake release
: Create a new releasemake release-dry-run
: Test release process without publishing
make test
Generate coverage report:
make coverage
This project is licensed under the LICENSE file in the repository.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request