gnss

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SPEED_OF_LIGHT = 299792458.0
	// earth semimajor axis (m)
	RE_GRS80 float64 = 6378137.0
	RE_WGS84 float64 = 6378137.0
	// earth flattening
	FE_GRS80 float64 = 1.0 / 298.257222101
	FE_WGS84 float64 = 1.0 / 298.257223563
)
View Source
var SystemCodeTypes = map[System][]string{
	GPS: {

		"1C", "1S", "1L", "1X", "1P", "1W", "1Y", "1M", "1N", "1R",

		"2C", "2D", "2S", "2L", "2X", "2P", "2W", "2Y", "2M", "2N", "2R",

		"5I", "5Q", "5X",
	},
	GLONASS: {

		"1C", "1P",

		"4A", "4B", "4X",

		"2C", "2P",

		"6A", "6B", "6X",

		"3I", "3Q", "3X",
	},
	SBAS: {

		"1C",

		"5I", "5Q", "5X",
	},
	GALILEO: {

		"1A", "1B", "1C", "1X", "1Z",

		"5I", "5Q", "5X",

		"7I", "7Q", "7X",

		"8I", "8Q", "8X",

		"6A", "6B", "6C", "6X", "6Z",
	},
	BEIDOU: {

		"2I", "2Q", "2X",

		"1D", "1P", "1X",

		"1S", "1L", "1Z",

		"5D", "5P", "5X",

		"7I", "7Q", "7X",

		"7D", "7P", "7Z",

		"8D", "8P", "8X",

		"6I", "6Q", "6X",

		"6D", "6P", "6Z",
	},
	QZSS: {

		"1C", "1E", "1S", "1L", "1X", "1Z", "1B",

		"2S", "2L", "2X",

		"5I", "5Q", "5X", "5D", "5P", "5Z",

		"6S", "6L", "6X", "6E", "6Z",
	},
	IRNSS: {

		"1D", "1P", "1X",

		"5A", "5B", "5C", "5X",

		"9A", "9B", "9C", "9X",
	},
}

Map of GNSS systems to their valid code types

Functions

func ECEF2LLH

func ECEF2LLH(x, y, z float64, degrees bool) (latitude, longitude, height float64)

ECEF2LLH - Transform Earth-Centered, Earth-Fixed (ECEF) coordinates to Latitude, Longitude, and Height (LLH)

func LLH2ECEF

func LLH2ECEF(latitude, longitude, height float64, degrees bool) (x, y, z float64)

LLH2ECEF - Transform Latitude, Longitude, and Height (LLH) to Earth-Centered, Earth-Fixed (ECEF) coordinates

func SatAzEl

func SatAzEl(recX, recY, recZ, satX, satY, satZ float64) (azi, ele float64)

SatAzEl - Calculate satellite azimuth and elevation in degrees

func XYZ2NEU

func XYZ2NEU(refX, refY, refZ, x, y, z float64) (n, e, u float64)

XYZ2NEU - Calculate East, North, Up

Types

type System

type System int

System stores the GNSS constellation type

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

Here we enumerate the current constellations

func NewSystemFromChar

func NewSystemFromChar(sysChar string) (System, error)

func ParseSystem added in v0.10.0

func ParseSystem(s string) (System, error)

func (System) Char

func (sys System) Char() string

Char returns the letter representing the system as a string

func (System) Int

func (sys System) Int() int

Int returns the integer representing the system as an int

func (System) MarshalJSON added in v0.13.0

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

MarshalJSON implements the json.Marshaler interface for System

func (System) String added in v0.10.0

func (s System) String() string

func (*System) UnmarshalJSON added in v0.13.0

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

UnmarshalJSON implements the json.Unmarshaler interface for System

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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