ublox

package
v0.0.0-...-cba9a52 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

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 ...
	NavStatusRegEx = regexp.MustCompile(`gpsFix[[:space:]]+(\d+)`)
)

Functions

func ExtractNavStatus

func ExtractNavStatus(output string) int64

func ExtractOffset

func ExtractOffset(output string) int64

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) IntString

func (a ANT_STATUS) IntString() string

IntString ...

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) AntennaOk

func (g *GNSSAntStatus) AntennaOk() bool

AntennaOk ...

func (*GNSSAntStatus) Power

func (g *GNSSAntStatus) Power() POWER_STATUS

Power ...

func (*GNSSAntStatus) SetAntPower

func (g *GNSSAntStatus) SetAntPower(power POWER_STATUS)

SetAntPower ..

func (*GNSSAntStatus) SetAntStatus

func (g *GNSSAntStatus) SetAntStatus(antStatus ANT_STATUS)

SetAntStatus ...

func (*GNSSAntStatus) Status

func (g *GNSSAntStatus) Status() ANT_STATUS

Status ...

type POWER_STATUS

type POWER_STATUS int

POWER_STATUS ...

const (
	// OFF ...
	OFF POWER_STATUS = iota
	// ON ...
	ON
)

func (POWER_STATUS) IntString

func (p POWER_STATUS) IntString() string

IntString ...

func (POWER_STATUS) String

func (p POWER_STATUS) String() string

type UBlox

type UBlox struct {
	// contains filtered or unexported fields
}

UBlox ... UBlox type

func NewUblox

func NewUblox() (*UBlox, error)

NewUblox ... create new Ublox

func (*UBlox) DisableBinary

func (u *UBlox) DisableBinary()

DisableBinary ... disable binary

func (*UBlox) EnableDisableVoltageController

func (u *UBlox) EnableDisableVoltageController(command string, value int) ([]byte, error)

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) EnableNMEA

func (u *UBlox) EnableNMEA()

EnableNMEA ... enable nmea

func (*UBlox) Init

func (u *UBlox) Init() (err error)

Init ...

func (*UBlox) MonVersion

func (u *UBlox) MonVersion(command string, regEx *regexp.Regexp) (*string, error)

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 (u *UBlox) UbloxPollPull() string

func (*UBlox) UbloxPollPushThread

func (u *UBlox) UbloxPollPushThread()

func (*UBlox) UbloxPollReset

func (u *UBlox) UbloxPollReset()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL