Documentation
¶
Index ¶
- Constants
- Variables
- func NewNMEASVNumbering() []gpsprot.NMEASVNumberingRange
- type CfgOld
- type CfgVals
- func (raw *CfgVals) AddData(cfgData []byte) (map[uint8]struct{}, error)
- func (known *CfgVals) BaudRate(target *gpsprot.ConfigTarget, port ucv.Port) []ucv.Item
- func (raw *CfgVals) Cook(ver *Version, cp *gpsprot.ConfigProps)
- func (known *CfgVals) EnableSignals(enabled gpsprot.SignalSet, ver *Version) (gpsprot.SignalSet, []ucv.Item)
- func (known *CfgVals) NavMsgAuth(props *gpsprot.ConfigProps) []ucv.Item
- func (known *CfgVals) Transaction(target *gpsprot.ConfigTarget, ver *Version, port ucv.Port, ...) ([]ucv.Item, []ucv.Key, error)
- type ConfigProtocol
- func (px *ConfigProtocol) Configure(target *gpsprot.ConfigTarget) (gpsprot.Configurator, error)
- func (px *ConfigProtocol) NativeMsg(tag gpsprot.Tag, msgID string, msg interface{}, tRead time.Time) error
- func (px *ConfigProtocol) ProbeOK() bool
- func (px *ConfigProtocol) ProbePacket() []byte
- func (px *ConfigProtocol) Version() *Version
- type Configurator
- type FWVer
- type MsgRate
- type PacketProcessor
- func (p *PacketProcessor) Dispatch(m ubxbin.Msg, tRead time.Time) bool
- func (p *PacketProcessor) FlushNavEpoch(tRead time.Time) (*gpsprot.NavEpochMsg, gpsprot.MsgPriority, gpsprot.MsgHandler)
- func (p *PacketProcessor) ProcessPacket(data string, tRead time.Time) (string, error)
- func (p *PacketProcessor) SetMsgHandler(handler gpsprot.MsgHandler)
- type ProtVer
- type RawConfig
- type Version
Constants ¶
const Tag gpsprot.Tag = "UBX"
Tag is the identifier for UBX protocol packets
Variables ¶
var AllKeys = []ucv.AnyTypedKey{ ucv.KNavspgDynmodel, ucv.KNavspgUtcstandard, ucv.KRateMeas, ucv.KRateNav, ucv.KRateTimeref, ucv.KSignalBdsEna, ucv.KSignalGalEna, ucv.KSignalGloEna, ucv.KSignalGpsEna, ucv.KSignalNavicEna, ucv.KSignalQzssEna, ucv.KSignalSbasEna, ucv.KTmodeEcefX, ucv.KTmodeEcefXHp, ucv.KTmodeEcefY, ucv.KTmodeEcefYHp, ucv.KTmodeEcefZ, ucv.KTmodeEcefZHp, ucv.KTmodeMode, ucv.KTmodePosType, ucv.KTmodeSvinMinDur, ucv.KTmodeSvinAccLimit, ucv.KTpAlignToTowTp1, ucv.KTpAntCabledelay, ucv.KTpDutyTp1, ucv.KTpDutyLockTp1, ucv.KTpFreqTp1, ucv.KTpFreqLockTp1, ucv.KTpLenLockTp1, ucv.KTpLenTp1, ucv.KTpPeriodLockTp1, ucv.KTpPeriodTp1, ucv.KTpPolTp1, ucv.KTpPulseDef, ucv.KTpPulseLengthDef, ucv.KTpSyncGnssTp1, ucv.KTpTimegridTp1, ucv.KTpTp1Ena, ucv.KTpUseLockedTp1, }
var AllMsgKeys = []ucv.KeyM{ ucv.KUbxNavSat, ucv.KUbxNavTimegps, ucv.KUbxNavTimegal, ucv.KUbxNavTimeglo, ucv.KUbxNavTimebds, ucv.KUbxNavTimeutc, ucv.KUbxNavTimels, ucv.KUbxNavSvin, ucv.KUbxTimSvin, ucv.KUbxTimTp, }
var ErrTmodeLLHNotSupported = errors.New("TMODE does not support LLH coordinates, only ECEF")
ErrTmodeLLHNotSupported is returned when trying to convert tmodeConfig with LLH coordinates to TMODE. TMODE only supports ECEF coordinates.
var PacketFormat gpsprot.PacketFormat = packetFormat{}
PacketFormat is the UBX packet format
Functions ¶
func NewNMEASVNumbering ¶
func NewNMEASVNumbering() []gpsprot.NMEASVNumberingRange
NewNMEASVNumbering returns a slice of NMEASVNumberingRange describing the NMEA satellite numbering scheme used by u-blox.
Types ¶
type CfgVals ¶
func MakeCfgVals ¶
func MakeCfgVals() CfgVals
func (*CfgVals) AddData ¶
AddData adds cfgData containing items to the CfgVals map. It returns a map of the groups that were added.
func (*CfgVals) EnableSignals ¶
func (*CfgVals) NavMsgAuth ¶
func (known *CfgVals) NavMsgAuth(props *gpsprot.ConfigProps) []ucv.Item
func (*CfgVals) Transaction ¶
func (known *CfgVals) Transaction(target *gpsprot.ConfigTarget, ver *Version, port ucv.Port, monEnabledGNSS gpsprot.GNSSSet) ([]ucv.Item, []ucv.Key, error)
Transaction determines the transaction to achieve the specified target. The known argument gives what is known about the current configuration. The returned items specifies configuration database changes that are needed. If the specified changes cannot be determined because the value of some keys is not known, those keys are returned in the ucv.Key slice. Typically this function will get called twice. The first time, known will be empty, and some more keys will be needed. The caller will then fetch the additional keys, add them to known and call again.
type ConfigProtocol ¶
type ConfigProtocol struct {
// contains filtered or unexported fields
}
func NewConfigProtocol ¶
func NewConfigProtocol() *ConfigProtocol
func (*ConfigProtocol) Configure ¶
func (px *ConfigProtocol) Configure(target *gpsprot.ConfigTarget) (gpsprot.Configurator, error)
Configure creates a Configurator for the given configuration target.
func (*ConfigProtocol) ProbeOK ¶
func (px *ConfigProtocol) ProbeOK() bool
func (*ConfigProtocol) ProbePacket ¶
func (px *ConfigProtocol) ProbePacket() []byte
func (*ConfigProtocol) Version ¶
func (px *ConfigProtocol) Version() *Version
type Configurator ¶
type Configurator struct {
// contains filtered or unexported fields
}
func (*Configurator) ConfigProps ¶
func (c *Configurator) ConfigProps() *gpsprot.ConfigProps
func (*Configurator) GenerateRequests ¶
func (c *Configurator) GenerateRequests() error
GenerateRequests attempts to generate more requests, potentially increasing the slice size.
func (*Configurator) GetRequestCount ¶
func (c *Configurator) GetRequestCount() (count int, complete bool)
GetRequestCount returns the current number of requests and whether the slice is complete.
func (*Configurator) ReceiverInfo ¶
func (c *Configurator) ReceiverInfo() *gpsprot.ReceiverInfo
ReceiverInfo returns static information about the GPS receiver.
func (*Configurator) Request ¶
func (c *Configurator) Request(index int) gpsprot.ConfigRequest
Request returns the ConfigRequest at the given index.
type FWVer ¶
type PacketProcessor ¶
type PacketProcessor struct {
gpsprot.DefaultPacketProcessor
// contains filtered or unexported fields
}
PacketProcessor implements the gpsprot.PacketProcessor interface for UBX packets
func NewPacketProcessor ¶
func NewPacketProcessor(mgr *gpsprot.NavEpochManager) *PacketProcessor
NewPacketProcessor creates a new UBX packet processor
func (*PacketProcessor) Dispatch ¶
Dispatch converts a UBX message to protocol-agnostic messages and sends them to the message handler. It reports whether the message was handled.
func (*PacketProcessor) FlushNavEpoch ¶
func (p *PacketProcessor) FlushNavEpoch(tRead time.Time) (*gpsprot.NavEpochMsg, gpsprot.MsgPriority, gpsprot.MsgHandler)
FlushNavEpoch implements gpsprot.EpochFlusher.
func (*PacketProcessor) ProcessPacket ¶
ProcessPacket processes a UBX packet's data and returns the message ID and any error
func (*PacketProcessor) SetMsgHandler ¶
func (p *PacketProcessor) SetMsgHandler(handler gpsprot.MsgHandler)
SetMsgHandler sets the handler for protocol-agnostic messages
type RawConfig ¶
type Version ¶
type Version struct {
HW string `json:"hw"`
SW string `json:"sw"`
Extensions []string `json:"extensions,omitempty"`
FW *FWVer `json:"fw,omitempty"`
Prot *ProtVer `json:"prot,omitempty"`
Mod string `json:"mod"`
RunsFromFlash bool `json:"runsFromFlash"`
GNSS gpsprot.GNSSSet `json:"gnss,omitempty"`
}