rtcm3

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

README

RTCM parser library implementation in Go.

Usage example:

import rtcm "github.com/misterjulian/go-rtcm"

...
conn, err := d.DialContext(ctx, "tcp", "some address here")
...

source = rtcm.New(conn)
for {
    frame, err := source.NextFrame() 
    ...
    Your logic here
    ...
}

Documentation

Index

Constants

View Source
const (
	FramePreamble byte = 0xD3

	ErrInvalidPreamble = "invalid preamble"
	ErrInvalidCRC      = "invalid crc"
)

Variables

This section is empty.

Functions

func Crc24q

func Crc24q(data []byte) uint32

Types

type Frame

type Frame struct {
	Preamble uint8
	Reserved uint8
	Length   uint16
	Payload  []byte
	Crc      uint32
}

func DeserializeFrame

func DeserializeFrame(reader *bufio.Reader) (frame *Frame, err error)

func EncapsulateByteArray

func EncapsulateByteArray(data []byte) (frame *Frame)

EncapsulateByteArray lazily wraps any byte array in an RTCM3 Frame

func EncapsulateMessage

func EncapsulateMessage(msg messages.Message) (frame *Frame)

func (*Frame) MessageNumber

func (f *Frame) MessageNumber() uint16

func (*Frame) Serialize

func (f *Frame) Serialize() []byte

type Scanner

type Scanner interface {
	Scan() (message messages.Message, err error)
	ScanFrame() (frame *Frame, err error)
}

func NewScanner

func NewScanner(r io.Reader) Scanner

New returns a Rtcm interface for getting next rtcm v3 message

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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