https://github.com/joshnuss/nmea
Parser for NMEA compliant sensors
https://github.com/joshnuss/nmea
elixir gps nmea sensor
Last synced: 11 months ago
JSON representation
Parser for NMEA compliant sensors
- Host: GitHub
- URL: https://github.com/joshnuss/nmea
- Owner: joshnuss
- Created: 2019-09-12T21:19:09.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-08-08T11:30:34.000Z (almost 3 years ago)
- Last Synced: 2025-06-28T16:07:18.898Z (12 months ago)
- Topics: elixir, gps, nmea, sensor
- Language: Elixir
- Homepage:
- Size: 8.79 KB
- Stars: 6
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NMEA
[NMEA (National Marine Electronics Association) 0183](https://en.wikipedia.org/wiki/NMEA_0183) is a standard for parsing sensor data for many marine electronics like echo sounders, sonars, anemometers, gyrocompasses, autopilots and GPS receivers.
Example GPS data looks like this:
```bash
cat /dev/ttyACM0
```
```
$GPGGA,092750.000,5321.6802,N,00630.3372,W,1,8,1.03,61.7,M,55.2,M,,*76
$GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38*0A
$GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30*70
$GPGSV,3,2,11,02,39,223,19,13,28,070,17,26,23,252,,04,14,186,14*79
$GPGSV,3,3,11,29,09,301,24,16,09,020,,36,,,*76
$GPRMC,092750.000,A,5321.6802,N,00630.3372,W,0.02,31.66,280511,,,A*43
$GPGGA,092751.000,5321.6802,N,00630.3371,W,1,8,1.03,61.7,M,55.3,M,,*75
$GPGSA,A,3,10,07,05,02,29,04,08,13,,,,,1.72,1.03,1.38*0A
$GPGSV,3,1,11,10,63,137,17,07,61,098,15,05,59,290,20,08,54,157,30*70
$GPGSV,3,2,11,02,39,223,16,13,28,070,17,26,23,252,,04,14,186,15*77
$GPGSV,3,3,11,29,09,301,24,16,09,020,,36,,,*76
$GPRMC,092751.000,A,5321.6802,N,00630.3371,W,0.06,31.66,280511,,,A*45
```
Every line starts with a dollar sign. The next 2 characters is the "talker", followed by 3 characters for the "type" of record. It is followed by a CSV and then a "*" followed by a checksum.
Tested with a [ublox series 6 GPS receiver](https://www.u-blox.com/en/product/neo-6-series).
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `nmea` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:nmea, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/nmea](https://hexdocs.pm/nmea).