gnss

package
v0.21.6 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSignalIDFromCode added in v0.21.6

func GetSignalIDFromCode(sys System, code string) (id int, err error)

GetSignalIDFromCode returns the Signal ID for a given GNSS system and signal code.

Types

type Signal added in v0.21.6

type Signal struct {
	// Code (e.g. "1C")
	Code string
	// Freq [MHz]
	Freq float64
}

Signal represents a GNSS signal

func (Signal) Wavelength added in v0.21.6

func (signal Signal) Wavelength() (wl float64)

Return the wavelength [m]

type SignalMap added in v0.21.6

type SignalMap map[int]Signal

SignalMap is a map of Signal IDs (DF395) to Signal structs

var BeidouSignalToRinexMap SignalMap = SignalMap{

	2: {"2I", 1561.098},
	3: {"2Q", 1561.098},
	4: {"2X", 1561.098},

	8:  {"6I", 1268.52},
	9:  {"6Q", 1268.52},
	10: {"6X", 1268.52},

	14: {"7I", 1207.14},
	15: {"7Q", 1207.14},
	16: {"7X", 1207.14},

	22: {"5D", 1176.45},
	23: {"5P", 1176.45},
	24: {"5X", 1176.45},
	25: {"7D", 1207.14},

	30: {"1D", 1575.42},
	31: {"1P", 1575.42},
	32: {"1X", 1575.42},
}

BeidouSignalToRinexMap is a map of Beidou Signal IDs (DF395) to Signal structs

var GLONASSSignalToRinexMap SignalMap = SignalMap{

	2: {"1C", 1602.00},
	3: {"1P", 1602.00},

	8: {"2C", 1246.00},
	9: {"2P", 1246.00},
}

GLONASSSignalToRinexMap is a map of GLONASS Signal IDs (DF395) to Signal structs

var GPSSignalToRinexMap SignalMap = SignalMap{

	2: {"1C", 1575.42},
	3: {"1P", 1575.42},
	4: {"1W", 1575.42},

	8:  {"2C", 1227.60},
	9:  {"2P", 1227.60},
	10: {"2W", 1227.60},

	15: {"2S", 1227.60},
	16: {"2L", 1227.60},
	17: {"2X", 1227.60},

	22: {"5I", 1176.45},
	23: {"5Q", 1176.45},
	24: {"5X", 1176.45},

	30: {"1S", 1575.42},
	31: {"1L", 1575.42},
	32: {"1X", 1575.42},
}

GPSSignalToRinexMap is a map of GPS Signal IDs (DF395) to Signal structs

var GalileoSignalToRinexMap SignalMap = SignalMap{

	2: {"1C", 1575.42},
	3: {"1A", 1575.42},
	4: {"1B", 1575.42},
	5: {"1X", 1575.42},
	6: {"1Z", 1575.42},

	8:  {"6C", 1278.75},
	9:  {"6A", 1278.75},
	10: {"6B", 1278.75},
	11: {"6X", 1278.75},
	12: {"6Z", 1278.75},

	14: {"7I", 1207.14},
	15: {"7Q", 1207.14},
	16: {"7X", 1207.14},

	18: {"8I", 1191.795},
	19: {"8Q", 1191.795},
	20: {"8X", 1191.795},

	22: {"5I", 1176.45},
	23: {"5Q", 1176.45},
	24: {"5X", 1176.45},
}

GalileoSignalToRinexMap is a map of Galileo Signal IDs (DF395) to Signal structs

var IRNSSSignalToRinexMap SignalMap = SignalMap{

	2: {"1A", 1575.42},

	3: {"5A", 1176.45},
	4: {"5B", 1176.45},
	5: {"5C", 1176.45},

	6: {"9A", 2492.028},
	7: {"9B", 2492.028},
	8: {"9C", 2492.028},
}

IRNSSSignalToRinexMap is a map of IRNSS Signal IDs to Signal structs

var QZSSSignalToRinexMap SignalMap = SignalMap{

	2: {"1C", 1575.42},

	9:  {"6S", 1278.75},
	10: {"6L", 1278.75},
	11: {"6X", 1278.75},

	15: {"2S", 1227.60},
	16: {"2L", 1227.60},
	17: {"2X", 1227.60},

	22: {"5I", 1176.45},
	23: {"5Q", 1176.45},
	24: {"5X", 1176.45},

	30: {"1S", 1575.42},
	31: {"1L", 1575.42},
	32: {"1X", 1575.42},
}

QZSSSignalToRinexMap is a map of QZSS Signal IDs (DF395) to Signal structs

var SBASSignalToRinexMap SignalMap = SignalMap{

	2: {"1C", 1575.42},

	22: {"5I", 1176.45},
	23: {"5Q", 1176.45},
	24: {"5X", 1176.45},
}

SBASSignalToRinexMap is a map of SBAS Signal IDs (DF395) to Signal structs

func (SignalMap) GetSignalCodeFromID added in v0.21.6

func (signalMap SignalMap) GetSignalCodeFromID(id int) (signal Signal, err error)

Return the GetSignalCodeFromID for a given ID

func (SignalMap) GetSignalIDFromCode added in v0.21.6

func (signalMap SignalMap) GetSignalIDFromCode(code string) (id int, err error)

Return the GetSignalIDFromCode for a given code

type System

type System int

System stores the GNSS constellation type

const (
	SystemUnknown System = iota
	GPS
	GLONASS
	SBAS
	GALILEO
	BEIDOU
	QZSS
	IRNSS
)

func ParseSystemChar

func ParseSystemChar(s string) (System, error)

ParseSystemChar parses a single character string into a System type

func (System) Char

func (sys System) Char() string

Char returns the single character representation of the system (e.g. "G")

func (System) Int

func (sys System) Int() int

Int returns the integer representing the system as an int

func (System) MarshalJSON

func (s System) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for System

func (System) String

func (s System) String() string

String returns the string representation of the system (e.g. "GPS")

func (*System) UnmarshalJSON

func (s *System) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for System

type Systems added in v0.18.1

type Systems []System

Systems is a slice of GNSS systems

func (Systems) Sort added in v0.18.1

func (systems Systems) Sort()

Sort systems

func (Systems) String added in v0.18.8

func (systems Systems) String() string

String returns the string representation of the systems (e.g. "GPS+GLONASS")

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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