ublox

package
v0.7.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateCheckSum

func CalculateCheckSum(buf []byte, cka, ckb byte) bool

func GPSWeekSowToTime

func GPSWeekSowToTime(gpsWeek uint16, tow float64) (dt time.Time)

func SerializeRawXToGNSSEpoch

func SerializeRawXToGNSSEpoch(u UbxRxmRawx) (e gnss.Epoch, err error)

Types

type Message

type Message struct {
	Sync1   byte
	Sync2   byte
	Class   byte
	Id      byte
	Length  uint16
	Payload []byte
	CkA     byte
	CkB     byte
}

Each multi-byte binary type is transmitted as little-endian.

func DeserializeMessage

func DeserializeMessage(r *bufio.Reader) (msg Message, err error)

type Scanner

type Scanner struct {
	Reader *bufio.Reader
	Sync   byte
}

func NewScanner

func NewScanner(r io.Reader) Scanner

func (Scanner) NextMessage

func (scanner Scanner) NextMessage() (msg Message, err error)

type Signal

type Signal struct {
	// Frequency [MHz]
	Freq float64
	// Code: 2 character RINEX code (e.g. '1C', '2L', ...)
	Code string
}

type SubBlock

type SubBlock struct {
	// Pseudorange
	// Meters
	Range float64
	// Phase
	// Cycles
	Phase float64
	// Doppler
	// Hz
	Doppler float32
	// System Identifiers
	// G:0, S:1, E:2, C:3, IMES:4, J:5, R:6, IRNSS:7
	System uint8
	// Satellite Numbering
	// G:0, S:1, E:2, C:3, IMES:4, J:5, R:6, IRNSS:7
	SvId uint8
	// Signal Identifier (see interface docs)
	Signal uint8
	// GLONASS Freqency Channel Number
	// 0 to 13 (slot number + 7)
	Fcn uint8
	// Carrier Phase locktime counter (max 64500ms)
	Locktime uint16
	// Cno
	// dbHz
	Snr uint8
	// Range Standard Deviation
	// 0.01*2^n m
	// bits 3...0
	RangeStd uint8
	// Phase Standard Deviation
	// 0.004 cycles
	// bits 3...0
	PhaseStd uint8
	// Doppler Standard Deviation
	// 0.002*2^n meters
	// bits 3...0 estimated doppler standard deviation
	DopplerStd uint8
	// Tracking Status
	// bit 0: range valid
	// bit 1: phase valid
	// bit 2: half cycle valid
	// bit 3: half cycle subtracted from phase
	TrkStatus uint8
	// Reserved
	Reserved uint8
}

type UbxRxmRawx

type UbxRxmRawx struct {
	Tow       float64 // Receiver local time - approx. alligned to GPS
	Week      uint16  // GPS week number
	LeapSec   int8    // GPS leap seconds (GPS-UTC)
	NumMeas   uint8   `struct:"sizeof=SubBlocks"`
	RecStat   uint8   // bit 0: leap second valid; bit 1: clock reset
	MsgVer    uint8   // 0x01
	Res       uint16
	SubBlocks []SubBlock // repeated NumM times
}

func DeserializeUbxRxmRawX

func DeserializeUbxRxmRawX(data []byte) (u UbxRxmRawx, err error)

Jump to

Keyboard shortcuts

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