ntrip

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Options *Options

	net.Conn
	io.ReadCloser
	// contains filtered or unexported fields
}

Client represents an NTRIP client.

func NewClient

func NewClient(options *Options) *Client

NewClient creates a new NTRIP client with the given options.

func (*Client) CalculateCheckSum

func (c *Client) CalculateCheckSum(stringToCheck string) string

CalculateCheckSum calculates the checksum for a given string

func (*Client) Close

func (c *Client) Close() error

Close closes the client connection.

func (*Client) Connect

func (c *Client) Connect() error

func (*Client) ConnectTCP

func (c *Client) ConnectTCP() error

ConnectTCP connects to the NTRIP server using TCP and returns a ReadCloser

func (*Client) GetCoordinatesDM

func (c *Client) GetCoordinatesDM() CoordinatesDM

GetCoordinatesDM converts the latitude and longitude to degrees and minutes

func (*Client) GetGGAString

func (c *Client) GetGGAString() string

GetGGAString returns a GGA string for the current time and location

func (*Client) GetSourceTable

func (c *Client) GetSourceTable() ([]byte, error)

GetSourceTable retrieves the source table from the NTRIP server.

func (*Client) SendGGAToServer

func (c *Client) SendGGAToServer() error

SendGGAToServer sends a GGA string to the NTRIP server

type CoordinatesDM

type CoordinatesDM struct {
	LonDeg int
	LatDeg int
	LonMin float64
	LatMin float64
	FlagN  string
	FlagE  string
}

CoordinatesDM represents the latitude and longitude in degrees and minutes.

type Options

type Options struct {
	Host               string
	Port               int
	Mountpoint         string
	Latitude           float64
	Longitude          float64
	Username           string
	Password           string
	LogLevel           logrus.Level
	UseTLS             bool
	InsecureSkipVerify bool
	ReconnectDelay     time.Duration
}

Options contains the configuration options for the NTRIP client.

func (*Options) ToJSON added in v0.10.1

func (o *Options) ToJSON(w io.Writer) error

Jump to

Keyboard shortcuts

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