gnss

package
v0.25.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRinexSignalIDFromCode added in v0.22.0

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

GetRinexSignalIDFromCode returns the Signal ID for a given GNSS system and signal code. This function uses RINEX 4.02 signal IDs for availability computation.

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. This function uses RTCM3 DF395 signal IDs.

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 to Signal structs

var BeidouRTCM3SignalMap 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},
}

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

var BeidouRinexSignalMap SignalMap = SignalMap{

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

	4: {"1D", 1575.42},
	5: {"1P", 1575.42},
	6: {"1X", 1575.42},

	7: {"1S", 1575.42},
	8: {"1L", 1575.42},
	9: {"1Z", 1575.42},

	10: {"5D", 1176.45},
	11: {"5P", 1176.45},
	12: {"5X", 1176.45},

	13: {"7I", 1207.140},
	14: {"7Q", 1207.140},
	15: {"7X", 1207.140},

	16: {"7D", 1207.140},
	17: {"7P", 1207.140},
	18: {"7Z", 1207.140},

	19: {"8D", 1191.795},
	20: {"8P", 1191.795},
	21: {"8X", 1191.795},

	22: {"6I", 1268.52},
	23: {"6Q", 1268.52},
	24: {"6X", 1268.52},

	25: {"6D", 1268.52},
	26: {"6P", 1268.52},
	27: {"6Z", 1268.52},
}

BeidouRinexSignalMap is a map of Beidou Signal IDs for RINEX 4.02 to Signal structs

var GLONASSRTCM3SignalMap SignalMap = SignalMap{

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

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

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

var GLONASSRinexSignalMap SignalMap = SignalMap{

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

	3: {"4A", 1600.995},
	4: {"4B", 1600.995},
	5: {"4X", 1600.995},

	6: {"2C", 1246.00},
	7: {"2P", 1246.00},

	8:  {"6A", 1248.06},
	9:  {"6B", 1248.06},
	10: {"6X", 1248.06},

	11: {"3I", 1202.025},
	12: {"3Q", 1202.025},
	13: {"3X", 1202.025},
}

GLONASSRinexSignalMap is a map of GLONASS Signal IDs for RINEX 4.02 to Signal structs

var GPSRTCM3SignalMap 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},
}

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

var GPSRinexSignalMap SignalMap = SignalMap{

	1:  {"1C", 1575.42},
	2:  {"1S", 1575.42},
	3:  {"1L", 1575.42},
	4:  {"1X", 1575.42},
	5:  {"1P", 1575.42},
	6:  {"1W", 1575.42},
	7:  {"1Y", 1575.42},
	8:  {"1M", 1575.42},
	9:  {"1N", 1575.42},
	10: {"1R", 1575.42},

	11: {"2C", 1227.60},
	12: {"2D", 1227.60},
	13: {"2S", 1227.60},
	14: {"2L", 1227.60},
	15: {"2X", 1227.60},
	16: {"2P", 1227.60},
	17: {"2W", 1227.60},
	18: {"2Y", 1227.60},
	19: {"2M", 1227.60},
	20: {"2N", 1227.60},
	21: {"2R", 1227.60},

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

GPSRinexSignalMap is a map of GPS Signal IDs for RINEX 4.02 to Signal structs

var GalileoRTCM3SignalMap 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},
}

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

var GalileoRinexSignalMap SignalMap = SignalMap{

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

	6: {"5I", 1176.45},
	7: {"5Q", 1176.45},
	8: {"5X", 1176.45},

	9:  {"7I", 1207.140},
	10: {"7Q", 1207.140},
	11: {"7X", 1207.140},

	12: {"8I", 1191.795},
	13: {"8Q", 1191.795},
	14: {"8X", 1191.795},

	15: {"6A", 1278.75},
	16: {"6B", 1278.75},
	17: {"6C", 1278.75},
	18: {"6X", 1278.75},
	19: {"6Z", 1278.75},
}

GalileoRinexSignalMap is a map of Galileo Signal IDs for RINEX 4.02 to Signal structs

var IRNSSRinexSignalMap SignalMap = SignalMap{

	1: {"1D", 1575.42},
	2: {"1P", 1575.42},
	3: {"1X", 1575.42},

	4: {"5A", 1176.45},
	5: {"5B", 1176.45},
	6: {"5C", 1176.45},
	7: {"5X", 1176.45},

	8:  {"9A", 2492.028},
	9:  {"9B", 2492.028},
	10: {"9C", 2492.028},
	11: {"9X", 2492.028},
}

IRNSSRinexSignalMap is a map of IRNSS Signal IDs for RINEX 4.02 to Signal structs

var QZSSRTCM3SignalMap 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},
}

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

var QZSSRinexSignalMap SignalMap = SignalMap{

	1: {"1C", 1575.42},
	2: {"1E", 1575.42},
	3: {"1S", 1575.42},
	4: {"1L", 1575.42},
	5: {"1X", 1575.42},
	6: {"1Z", 1575.42},
	7: {"1B", 1575.42},

	8:  {"2S", 1227.60},
	9:  {"2L", 1227.60},
	10: {"2X", 1227.60},

	11: {"5I", 1176.45},
	12: {"5Q", 1176.45},
	13: {"5X", 1176.45},
	14: {"5D", 1176.45},
	15: {"5P", 1176.45},
	16: {"5Z", 1176.45},

	17: {"6S", 1278.75},
	18: {"6L", 1278.75},
	19: {"6X", 1278.75},
	20: {"6E", 1278.75},
	21: {"6Z", 1278.75},
}

QZSSRinexSignalMap is a map of QZSS Signal IDs for RINEX 4.02 to Signal structs

var SBASRTCM3SignalMap SignalMap = SignalMap{

	2: {"1C", 1575.42},

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

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

var SBASRinexSignalMap SignalMap = SignalMap{

	1: {"1C", 1575.42},

	2: {"5I", 1176.45},
	3: {"5Q", 1176.45},
	4: {"5X", 1176.45},
}

SBASRinexSignalMap is a map of SBAS Signal IDs for RINEX 4.02 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