Integration NMEA
Data Integration — NMEA Output
Some sensor data collected by Medusa gamma-ray spectrometers can be broadcast over the RS-232 serial port using a NMEA-like protocol, similar to NMEA-0183. The typical baud rate is 115,200 baud.
This output format is useful for integrating with external hardware that expects NMEA-style serial data, such as GIS loggers or survey equipment. For more detailed data, use the JSON output format instead — see JSON Format.
To enable NMEA output, set the RS-232 output mode to Medusa NMEA strings under Settings → Communication → RS232.
Note: The NMEA output is a subset of the data available in JSON format.
Sentence Reference
Raw Spectrum — $MSSPE
The raw spectrum sentence contains the integer counts per channel for the current measurement.
Note: This sentence may be longer than the 82-byte limit specified by NMEA-0183. To reduce the length, use the Channels to sum setting under Settings → Communication → RS232 — for example, combining 8 channels of a 512-channel spectrum produces 64 output channels. This only affects the NMEA output; the full-resolution spectrum is always stored onboard.
Example:
$MSSPE,1634718239893,1.001,0.982,64,0,113,574,450,369,259,186,...
# | Example | Format | Description |
|---|---|---|---|
0 |
|
| Sentence label |
1 |
|
| Unix timestamp in milliseconds since Jan 1st 1970 |
2 |
|
| Real time in seconds |
3 |
|
| Live time in seconds |
4 |
|
| Number of channels in this output |
5 |
|
| Counts in the first channel |
6 .. 4+resolution |
|
| Counts in the remaining channels |
Activity Concentrations — $MSACT
Note: Energy stabilization is required before activity concentrations can be calculated. Depending on the crystal size, this may take several minutes after startup.
Example:
$MSACT,1634738741388,1.002,0.983,0.682,1365.484,136.370,136.429,14.500,86.641,19.458*58
# | Example | Format | Description |
|---|---|---|---|
0 |
|
| Sentence label |
1 |
|
| Unix timestamp in milliseconds since Jan 1st 1970 |
2 |
|
| Real time in seconds |
3 |
|
| Live time in seconds |
4 |
|
| Stabilization parameter |
5 |
|
| Activity concentration for ⁴⁰K in Bq/kg |
6 |
|
| Uncertainty in ⁴⁰K concentration |
7 |
|
| Activity concentration for ²³⁸U in Bq/kg |
8 |
|
| Uncertainty in ²³⁸U concentration |
9 |
|
| Activity concentration for ²³²Th in Bq/kg |
10 |
|
| Uncertainty in ²³²Th concentration |
PTH Sensor — $MSPTH
Example:
$MSPTH,1634738741389,1007.000,30.000,112.000*47
# | Example | Format | Description |
|---|---|---|---|
0 |
|
| Sentence label |
1 |
|
| Unix timestamp in milliseconds since Jan 1st 1970 |
2 |
|
| Pressure in hPa |
3 |
|
| Temperature in °C |
4 |
|
| Humidity in % |
GPS — $MSGPS
Example:
$MSGPS,1634738741389,53.211048,6.612187,2.857,1634636299006*6E
# | Example | Format | Description |
|---|---|---|---|
0 |
|
| Sentence label |
1 |
|
| Unix timestamp in milliseconds since Jan 1st 1970 |
2 |
|
| Latitude in degrees |
3 |
|
| Longitude in degrees |
4 |
|
| Altitude in metres |
5 |
|
| GPS timestamp |
Stabilized Counts — $MSSC
The stabilized counts sentence reports the number of counts in fixed energy windows of the stabilized spectrum. Because it uses the stabilized (energy-corrected) spectrum, the count values are temperature-independent. To convert to count rate, divide by the live time.
Example:
$MSSC,1634738741389,1.000,967,816,672,524,318*0B
# | Example | Format | Description |
|---|---|---|---|
0 |
|
| Sentence label |
1 |
|
| Unix timestamp in milliseconds since Jan 1st 1970 |
2 |
|
| Live time in seconds |
3 |
|
| Total counts in the spectrum |
4 |
|
| Counts in the region ≥ 100 keV |
5 |
|
| Counts in the region ≥ 200 keV |
6 |
|
| Counts in the region ≥ 300 keV |
7 |
|
| Counts in the region ≥ 400 keV |