gnssconfig

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Name                string                   `json:"name"`
	SystemSignalMapping map[gnss.System][]string `json:"system_signal_mapping"`
	ElevationMasks      map[gnss.System]float64  `json:"elevation_masks"`
	Coordinates         ECEFCoordinates          `json:"coordinates"`
	SampleInterval      int                      `json:"sample_interval"` // in milliseconds
	MWSlipThreshold     float64                  `json:"mw_slip_threshold"`
}

func NewConfigFromFile

func NewConfigFromFile(filePath string) (Config, error)

NewConfigFromFile reads a configuration from a file and returns a Config struct

func (*Config) Check

func (c *Config) Check() error

type ECEFCoordinates

type ECEFCoordinates struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
	Z float64 `json:"z"`
}

type RawConfig

type RawConfig struct {
	Name                string              `json:"name"`
	SystemSignalMapping map[string][]string `json:"system_signal_mapping"`
	ElevationMasks      map[string]float64  `json:"elevation_masks"`
	Coordinates         ECEFCoordinates     `json:"coordinates"`
	SampleInterval      int                 `json:"sample_interval"` // in milliseconds
	MWSlipThreshold     float64             `json:"mw_slip_threshold"`
}

I havent found a good way to read a config file and return the Config struct directly

Jump to

Keyboard shortcuts

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