Nmea Gps
π‘ NMEA GPS Integrationβ
π°οΈ Overviewβ
MAPS Messaging supports parsing, publishing, and transforming GPS data received in NMEA (National Marine Electronics Association) format. The server can act as a location source and convert raw NMEA sentences into structured JSON.
Configuration for this module is handled via the nmea.yaml
file.
βοΈ Configuration Referenceβ
nmea:
format: json
publish: true
serverLocation: true
sentenceForPosition: GPGGA
Field | Description |
---|---|
format | Output format: json (parsed structure) or raw (verbatim NMEA sentence). |
publish | Whether to publish parsed messages to $NMEA topics. |
serverLocation | Use this NMEA source as the system's location provider. |
sentenceForPosition | The sentence type used to extract device/server GPS position. |
π§ Example: If
serverLocation: true
andsentenceForPosition: GPGGA
, the server uses the latest GPGGA sentence to derive its position.
π§Ύ Supported NMEA Sentencesβ
The sentences
section maps individual NMEA sentence types (e.g., GPGGA
, GPRMC
) to a structured schema.
Each entry defines:
- A human-readable
description
- A
syntax
map that describes each field in the sentence by position
𧬠Field Definitionsβ
Each field within a sentence includes:
name
: Logical name of the data fieldtype
: Data type (e.g.,UTCTime
,Position
,Enum
,long
,double
,Height
)param
(optional): Enum mappings or special flagsrepeat
(optional): Repetition count for array fields
β Example: GPGGAβ
GPGGA:
description: Global Positioning System Fix Data
syntax:
1:
name: time
type: UTCTime
2:
name: latitude
type: Position
3:
name: longitude
type: Position
4:
name: fix_quality
type: Enum
param: '[{"0": "fix not available"}, {"1": "GPS Fix"}, {"2": "Differential GPS fix"}]'
...
π Full List of Supported Sentencesβ
Sentence | Description |
---|---|
GPGGA | GPS Fix Data |
GPGLL | Geographic Position (Lat/Lon) |
GPGSA | GPS DOP and Active Satellites |
GPGSV | Satellites in View |
GPHDT | Heading, True |
GPRMC | Recommended Minimum Specific GPS/Transit |
GPVTG | Track & Speed over Ground |
GPZDA | UTC Date and Time |
Each of these is parsed into structured fields and published if publish: true
is set.
π§ͺ Example Output (GPGGA, JSON Format)β
Given a raw sentence:
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
Parsed result:
{
"time": "12:35:19",
"latitude": 48.1173,
"longitude": 11.5167,
"fix_quality": "GPS Fix",
"satellites": 8,
"hdop": 0.9,
"altitude": 545.4,
"height_of_geoid": 46.9
}
β Best Practicesβ
- Use
json
format for structured parsing and integration with applications. - Enable
publish: true
to allow other components or subscribers to access GPS data. - Use
serverLocation: true
for location-aware features (e.g., geo-fencing). - Choose a stable sentence like
GPGGA
orGPRMC
forsentenceForPosition
. - Add only relevant sentences to reduce overhead if parsing all types isnβt needed.