Documentation
¶
Overview ¶
package gpsfeed
package gpsfeed ...
Index ¶
Constants ¶
View Source
const DeviceTimeout = _deviceDataValidTimeout + 1 // wait before try to access device again
DeviceTimeout ...
Variables ¶
This section is empty.
Functions ¶
func CheckSumTag ¶
CheckSumTag calculates the NMEA sentence CheckSum and returns an tag string [ok|fail]
func CheckSumValid ¶
CheckSumValid validates an NMEA sentence checksum
Types ¶
type GpsDevice ¶
type GpsDevice struct {
FileIO string // file name, eg. /dev/gps0
Feed *bufio.Scanner // line feed
ErrCount atomic.Uint64 // global err counter
InitDone atomic.Bool // initial time sync done
Responsive atomic.Bool // feed state [responsive/unresponsive]
DataValid atomic.Bool // feed state [datavalid/invalidutput]]
Dog atomic.Bool // watchdog state
Lock sync.Mutex // global device lock
Handle *os.File // file handle
Global sync.WaitGroup // global state
}
GpsDevice holds all the feed, locks and handles for a specifc gps input device dongle
func (*GpsDevice) CheckErrAdd ¶
CheckErrAdd validates the current number of global errors
Click to show internal directories.
Click to hide internal directories.