|NMEA(4)||Device Drivers Manual||NMEA(4)|
The line discipline is enabled by the following sequence:
#include <sys/ioctl.h> int ldisc = NMEADISC, fildes; ... ioctl(fildes, TIOCSETD, &ldisc);
The byte stream is unaltered by the line discipline which maintains timedelta and position sensors using the NMEA data. The sensors will appear as nmea* in the list. The timedelta (nanoseconds difference between the received time information and the local time), and position (calculated latitude and longitude in degrees) can be accessed through the sysctl(8) interface.
nmea line discipline decodes NMEA 0183
Recommended Minimum Specific GPS/TRANSIT Data sentences. The time and date
information and position are extracted. The warning indication is used to
provide the sensor status (see below). If the attached device sends the RMC
message in the 13-field format, the operation mode of the GPS device is
reported in the sensor description. The sensor timestamp is copied from the
tty timestamp if a device with PPS is being used and tty timestamping has
been turned on. Otherwise the sensor timestamp is taken when the initial `$'
character of a message block is received from the NMEA device.
RMC messages source are recognised by the first two characters of the sentence according to the following prefixes:
The status of a second sensor is used to report the status of the device itself:
nmeainterface first appeared in OpenBSD 4.0.
nmealine discipline was written by Marc Balmer <firstname.lastname@example.org>.
|September 2, 2018||OpenBSD-current|