Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractNavStatus(output string) int64
- func ExtractOffset(output string) int64
- type ANT_STATUS
- type GNSSAntStatus
- type POWER_STATUS
- type UBlox
- func (u *UBlox) DisableBinary()
- func (u *UBlox) EnableDisableVoltageController(command string, value int) ([]byte, error)
- func (u *UBlox) EnableNMEA()
- func (u *UBlox) Init() (err error)
- func (u *UBlox) MonVersion(command string, regEx *regexp.Regexp) (*string, error)
- func (u *UBlox) Query(command string, promptRE *regexp.Regexp) (result string, matches []string, err error)
- func (u *UBlox) UbloxPollInit()
- func (u *UBlox) UbloxPollPull() string
- func (u *UBlox) UbloxPollPushThread()
- func (u *UBlox) UbloxPollReset()
Constants ¶
View Source
const ( // CMD_PROTO_VERSION ... CMD_PROTO_VERSION = " -p MON-VER" // CMD_VOLTAGE_CONTROLER ... CMD_VOLTAGE_CONTROLER = " -v 1 -z CFG-HW-ANT_CFG_VOLTCTRL,%d" // CMD_NAV_STATUS ... CMD_NAV_STATUS = " -t -p NAV-STATUS" UBXCommand = "/usr/local/bin/ubxtool" )
Variables ¶
View Source
var ( // PorotoVersionRegEx ... PorotoVersionRegEx = regexp.MustCompile(`PROTVER=+(\d+)`) // AntennaStatusRegEx ... AntennaStatusRegEx = regexp.MustCompile(`antStatus[[:space:]]+(\d+)[[:space:]]antPower[[:space:]]+(\d+)`) NavStatusRegEx = regexp.MustCompile(`gpsFix[[:space:]]+(\d+)`) )
Functions ¶
func ExtractNavStatus ¶
func ExtractOffset ¶
Types ¶
type ANT_STATUS ¶
type ANT_STATUS int
ANT_STATUS ...
const ( // NOT_OK ... NOT_OK ANT_STATUS = iota // UNKNOWN ... UNKNOWN // OK ... OK )
func (ANT_STATUS) String ¶
func (a ANT_STATUS) String() string
type GNSSAntStatus ¶
type GNSSAntStatus struct {
// contains filtered or unexported fields
}
GNSSAntStatus ... Passed: Status of the Antenna is OK (i.e., antStatus equals 2) and Antena power status is Ok (i.e., antPower equals 1) Failure: antStatus not equals 2 and antPower not equals 1 GNSSAntStatus ...
func NewAntStatus ¶
func NewAntStatus(ant ANT_STATUS, power POWER_STATUS) GNSSAntStatus
NewAntStatus ... get antenna status
func (*GNSSAntStatus) SetAntPower ¶
func (g *GNSSAntStatus) SetAntPower(power POWER_STATUS)
SetAntPower ..
func (*GNSSAntStatus) SetAntStatus ¶
func (g *GNSSAntStatus) SetAntStatus(antStatus ANT_STATUS)
SetAntStatus ...
type POWER_STATUS ¶
type POWER_STATUS int
POWER_STATUS ...
const ( // OFF ... OFF POWER_STATUS = iota // ON ... ON )
func (POWER_STATUS) String ¶
func (p POWER_STATUS) String() string
type UBlox ¶
type UBlox struct {
// contains filtered or unexported fields
}
UBlox ... UBlox type
func (*UBlox) EnableDisableVoltageController ¶
EnableDisableVoltageController ... UBX-ACK-ACK: ACK to Class x06 (CFG) ID x8a (VALSET) TODO: Should read ACK-ACK to confirm right and read the item
func (*UBlox) MonVersion ¶
MonVersion ... get monitor version
func (*UBlox) Query ¶
func (u *UBlox) Query(command string, promptRE *regexp.Regexp) (result string, matches []string, err error)
Query ... used for testing only
func (*UBlox) UbloxPollInit ¶
func (u *UBlox) UbloxPollInit()
func (*UBlox) UbloxPollPull ¶
func (*UBlox) UbloxPollPushThread ¶
func (u *UBlox) UbloxPollPushThread()
func (*UBlox) UbloxPollReset ¶
func (u *UBlox) UbloxPollReset()
Click to show internal directories.
Click to hide internal directories.