Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractNavStatus(output string) int64
- func ExtractOffset(output string) int64
- type ANT_STATUS
- type GNSSAntStatus
- type POWER_STATUS
- type TimeLs
- 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()
- func (u *UBlox) UbloxPollStop()
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" UBXTOOL_NEW = 0 UBXTOOL_ACTIVE = 1 UBXTOOL_DEAD = 2 UBXTOOL_STOPPED = 3 )
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 TimeLs ¶
type TimeLs struct { //Information source for the current number // of leap seconds SrcOfCurrLs uint8 // Current number of leap seconds since // start of GPS time (Jan 6, 1980). It reflects // how much GPS time is ahead of UTC time. // Galileo number of leap seconds is the // same as GPS. BeiDou number of leap // seconds is 14 less than GPS. GLONASS // follows UTC time, so no leap seconds CurrLs int8 // Information source for the future leap // second event. SrcOfLsChange uint8 // Future leap second change if one is // scheduled. +1 = positive leap second, -1 = // negative leap second, 0 = no future leap // second event scheduled or no information // available. If the value is 0, then the // amount of leap seconds did not change // and the event should be ignored LsChange int8 // Number of seconds until the next leap // second event, or from the last leap second // event if no future event scheduled. If > 0 // event is in the future, = 0 event is now, < 0 // event is in the past. Valid only if // validTimeToLsEvent = 1 TimeToLsEvent int // GPS week number (WN) of the next leap // second event or the last one if no future // event scheduled. Valid only if // validTimeToLsEvent = 1. DateOfLsGpsWn uint // GPS day of week number (DN) for the next // leap second event or the last one if no // future event scheduled. Valid only if // validTimeToLsEvent = 1. (GPS and Galileo // DN: from 1 = Sun to 7 = Sat. BeiDou DN: // from 0 = Sun to 6 = Sat. DateOfLsGpsDn uint8 // Validity flags // 1<<0 validCurrLs 1 = Valid current number of leap seconds value. // 1<<1 validTimeToLsEvent 1 = Valid time to next leap second event // or from the last leap second event if no future event scheduled. Valid uint8 }
func ExtractLeapSec ¶
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()
func (*UBlox) UbloxPollStop ¶
func (u *UBlox) UbloxPollStop()
Click to show internal directories.
Click to hide internal directories.