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 ¶
- func ConnectToVirtualBase(ntripInfo *NtripInfo, logger logging.Logger) *bufio.ReadWriter
- func ContainsGGAMessage(data []byte) bool
- func FindLineWithMountPoint(sourceTable *ntrip.Sourcetable, mountPoint string) (bool, error)
- func GetGGAMessage(correctionWriter io.ReadWriteCloser, logger logging.Logger) ([]byte, error)
- type NtripConfig
- type NtripInfo
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
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
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.