Documentation
¶
Overview ¶
Package gps provides a driver for GPS receivers over UART and I2C
Index ¶
Constants ¶
View Source
const ( BYTES_AVAIL_REG = 0xfd DATA_STREAM_REG = 0xff )
View Source
const (
I2C_ADDRESS = 0x42
)
The I2C address which this device listens to.
Variables ¶
This section is empty.
Functions ¶
func FlightMode ¶
func SetCfgGNSS ¶
Types ¶
type Device ¶ added in v0.14.0
type Device struct {
// contains filtered or unexported fields
}
Device wraps a connection to a GPS device.
func (*Device) NextSentence ¶ added in v0.14.0
NextSentence returns the next valid NMEA sentence from the GPS device.
func (*Device) WriteBytes ¶ added in v0.14.0
WriteBytes sends data/commands to the GPS device
type Fix ¶
type Fix struct { // Valid if the fix was valid. Valid bool // Time that the fix was taken, in UTC time. Time time.Time // Latitude is the decimal latitude. Negative numbers indicate S. Latitude float32 // Longitude is the decimal longitude. Negative numbers indicate E. Longitude float32 // Altitude is only returned for GGA sentences. Altitude int32 // Satellites is the number of visible satellites, but is only returned for GGA sentences. Satellites int16 // Speed based on reported movement. Only returned for RMC sentences. Speed float32 // Heading based on reported movement. Only returned for RMC sentences. Heading float32 }
Fix is a GPS location fix
Click to show internal directories.
Click to hide internal directories.