Documentation ¶
Index ¶
- type GPS
- func (d *GPS) Altitude() (int, error)
- func (d *GPS) AngleSinceLast() (int, error)
- func (d *GPS) AngleToDest() (int, error)
- func (d *GPS) Close() error
- func (d *GPS) DistanceToDest() (int, error)
- func (d *GPS) ExtendedFirmware(use bool) ([]byte, error)
- func (d *GPS) HDOP() (int, error)
- func (d *GPS) Heading() (int, error)
- func (d *GPS) Latitude() (int, error)
- func (d *GPS) Longitude() (int, error)
- func (d *GPS) SatellitesInView() (int, error)
- func (d *GPS) SetDestLatitude(lat int) error
- func (d *GPS) SetDestLongitude(lon int) error
- func (d *GPS) Status() (ok bool, err error)
- func (d *GPS) UTC() (time.Time, error)
- func (d *GPS) Velocity() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPS ¶
type GPS struct {
// contains filtered or unexported fields
}
GPS is a handle to a dGPS device.
func OpenGPS ¶
OpenGPS opens a GPS attached to the LEGO sensort port given. This can either be in the form inX for an EV3 input port where X is the physical port number, or N where N is the I²C bus number.
The GPS should be closed when it is no longer needed.
func (*GPS) Altitude ¶
Altitude returns the current altitude in meters. This is only valid if ExtendedFirmware(true) has been called prior to calling Altitude.
func (*GPS) AngleSinceLast ¶
AngleSinceLast returns the angle travelled since the last call to AngleSinceLast.
func (*GPS) AngleToDest ¶
AngleToDest returns the heading to the current destination in degrees.
func (*GPS) DistanceToDest ¶
DistanceToDest returns the distance to the current destination in meters.
func (*GPS) ExtendedFirmware ¶
ExtendedFirmware specifies whether to use the dGPS-X firmware extension. Turning on the extended firmware can slow down the dGPS sensor.
func (*GPS) HDOP ¶
HDOP returns the measure of the precision that can be expected. This is only valid if ExtendedFirmware(true) has been called prior to calling HDOP.
func (*GPS) Latitude ¶
Latitude returns the current latitude in millionths of a degree. A negative latitude indicates southern latitudes.
func (*GPS) Longitude ¶
Longitude returns the current latitude in millionths of a degree. A negative longitude indicates western longitudes.
func (*GPS) SatellitesInView ¶
SatellitesInView returns the number of satellites in view. This is only valid if ExtendedFirmware(true) has been called prior to calling SatellitesInView.
func (*GPS) SetDestLatitude ¶
SetDestLatitude sets the latitude of the destination in millionths of a degree. A negative latitude indicates southern latitudes.
func (*GPS) SetDestLongitude ¶
SetDestLongitude sets the longitude of the destination in millionths of a degree. A negative longitude indicates western longitudes.