rtkutils

package
v0.19.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package rtkutils implements necessary functions to set and return NTRIP information here.

Package rtkutils implements functions that are used in the gpsrtkserial and gpsrtkpmtk.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToVirtualBase added in v0.16.0

func ConnectToVirtualBase(ntripInfo *NtripInfo,
	logger logging.Logger,
) *bufio.ReadWriter

ConnectToVirtualBase is responsible for establishing a connection to a virtual base station using the NTRIP protocol.

func ContainsGGAMessage added in v0.16.0

func ContainsGGAMessage(data []byte) bool

ContainsGGAMessage returns true if data contains GGA message.

func FindLineWithMountPoint added in v0.16.0

func FindLineWithMountPoint(sourceTable *ntrip.Sourcetable, mountPoint string) (bool, error)

FindLineWithMountPoint parses the given source-table returns the NMEA field associated with the given mountpoint.

func GetGGAMessage added in v0.16.0

func GetGGAMessage(correctionWriter io.ReadWriteCloser, logger logging.Logger) ([]byte, error)

GetGGAMessage checks if a GGA message exists in the buffer and returns it.

Types

type NtripConfig

type NtripConfig struct {
	NtripURL             string `json:"ntrip_url"`
	NtripConnectAttempts int    `json:"ntrip_connect_attempts,omitempty"`
	NtripMountpoint      string `json:"ntrip_mountpoint,omitempty"`
	NtripPass            string `json:"ntrip_password,omitempty"`
	NtripUser            string `json:"ntrip_username,omitempty"`
}

NtripConfig is used for converting attributes for a correction source.

type NtripInfo

type NtripInfo struct {
	URL                string
	Username           string
	Password           string
	MountPoint         string
	Client             *ntrip.Client
	Stream             io.ReadCloser
	MaxConnectAttempts int
}

NtripInfo contains the information necessary to connect to a mountpoint.

func NewNtripInfo

func NewNtripInfo(cfg *NtripConfig, logger logging.Logger) (*NtripInfo, error)

NewNtripInfo function validates and sets NtripConfig arributes and returns NtripInfo.

Jump to

Keyboard shortcuts

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