Documentation
¶
Index ¶
- Constants
- func CalculateNormECEF(x, y, z float64) float64
- func GeometricRange(xr, yr, zr, xs, ys, zs float64) float64
- func IsNormWithinRange(x, y, z, minNorm, maxNorm float64) bool
- func Norm(vector []float64) float64
- func Rotate(satPosition ephemeris.SatPosition, transmissionTime float64) (rotatedSatPosition ephemeris.SatPosition)
- type Config
- type ECEFCoordinates
- type InputData
- type RawConfig
- type Results
- type SPP
- type SatelliteState
- func (s *SatelliteState) CalculateGeometryFree(c1, c2 string) error
- func (s *SatelliteState) CalculateIonosphereFree(config Config) error
- func (s *SatelliteState) CalculateIonosphericCorrection() error
- func (s *SatelliteState) CalculateMelbourneWubbena(config Config) error
- func (s *SatelliteState) CalculateModeledRange(config Config)
- func (s *SatelliteState) CalculateSagnacCorrection(config Config) error
- func (s *SatelliteState) CalculateSatelliteAzimuthElevation(config Config) error
- func (s *SatelliteState) CalculateSatelliteCoordinates(config Config) error
- func (s *SatelliteState) CalculateTroposphericCorrection(config Config) error
- func (s *SatelliteState) GetSignalEmissionTime(config Config) error
- func (s *SatelliteState) WriteJSON(w io.Writer) error
- type SatelliteStateMap
Constants ¶
const ( // RadiusOfEarth is the radius of the Earth in meters RadiusOfEarth = 6378137.0 // AngularVelocity is the angular velocity of the Earth in rad/s AngularVelocity = 7.2921151467e-5 )
const ( InputTypeConfig = "configuration" InputTypeEphemeris = "ephemeris" InputTypeObservation = "observation" )
Constants for InputData types
Variables ¶
This section is empty.
Functions ¶
func CalculateNormECEF ¶ added in v0.10.0
CalculateNormECEF calculates the norm (magnitude) of ECEF XYZ coordinates.
func GeometricRange ¶ added in v0.10.0
func IsNormWithinRange ¶ added in v0.10.0
IsNormWithinRange checks if the norm of ECEF coordinates is within the specified range.
func Rotate ¶ added in v0.10.0
func Rotate(satPosition ephemeris.SatPosition, transmissionTime float64) (rotatedSatPosition ephemeris.SatPosition)
Types ¶
type Config ¶ added in v0.10.0
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"`
}
func NewConfigFromFile ¶ added in v0.10.0
NewConfigFromFile reads a configuration from a file and returns a Config struct
type ECEFCoordinates ¶ added in v0.10.0
type ECEFCoordinates struct {
X, Y, Z float64
}
type RawConfig ¶ added in v0.10.0
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"`
}
I havent found a good way to read a config file and return the Config struct directly
type SPP ¶
type SPP struct {
Config Config
DataChan chan InputData
ResultsChan chan Results
Epoch observation.Epoch
EphemerisSlice ephemeris.EphemerisSlice
SatelliteStateMap
Result struct {
Time time.Time
Position ECEFCoordinates
PositionError ECEFCoordinates
ReceiverClockOffset float64
NumberOfSatellites int
}
}
SPP is a struct that holds the input and output channels for the Single Point Positioning (SPP) algorithm
func (*SPP) FilterEpoch ¶ added in v0.10.0
FilterEpoch filters the observations based on the GNSSOptions in the Config
func (*SPP) FilterSatellites ¶ added in v0.10.0
func (s *SPP) FilterSatellites(satelliteMap SatelliteStateMap) (SatelliteStateMap, error)
func (*SPP) NewSatelliteMap ¶ added in v0.10.0
NewSatelliteMap creates a map of SatelliteState structs from the current epoch's observations
type SatelliteState ¶ added in v0.10.0
type SatelliteState struct {
SignalArrivalTime time.Time // T - time signal was received by receiver
SignalEmissionTime time.Time // Tau - time signal was emitted by satellite
Sys gnss.System
SvID int
Prepared bool
SatelliteEphemeris ephemeris.TypeSpecificEphemeris
SatellitePosition ephemeris.SatPosition
Elevation float64
Azimuth float64
SagnacCorrection float64
TroposphericCorrection float64
IonosphericCorrection float64
IonosphereFreePhase float64
IonosphereFreeRange float64
ModeledRange float64
MelbourneWubbena float64
ObservationMap map[string]*observation.Observation
}
func (*SatelliteState) CalculateGeometryFree ¶ added in v0.10.0
func (s *SatelliteState) CalculateGeometryFree(c1, c2 string) error
func (*SatelliteState) CalculateIonosphereFree ¶ added in v0.10.0
func (s *SatelliteState) CalculateIonosphereFree(config Config) error
func (*SatelliteState) CalculateIonosphericCorrection ¶ added in v0.10.0
func (s *SatelliteState) CalculateIonosphericCorrection() error
func (*SatelliteState) CalculateMelbourneWubbena ¶ added in v0.10.0
func (s *SatelliteState) CalculateMelbourneWubbena(config Config) error
CalculateMelbourneWubbena calculates the Melbourne-Wubbena combination for a given pair of observation codes c1 and c2 (e.g. "1C" and "2W") TODO - add support for more than two observation codes
func (*SatelliteState) CalculateModeledRange ¶ added in v0.10.0
func (s *SatelliteState) CalculateModeledRange(config Config)
TODO: add support for configuration of the modeled terms
func (*SatelliteState) CalculateSagnacCorrection ¶ added in v0.10.0
func (s *SatelliteState) CalculateSagnacCorrection(config Config) error
func (*SatelliteState) CalculateSatelliteAzimuthElevation ¶ added in v0.10.0
func (s *SatelliteState) CalculateSatelliteAzimuthElevation(config Config) error
func (*SatelliteState) CalculateSatelliteCoordinates ¶ added in v0.10.0
func (s *SatelliteState) CalculateSatelliteCoordinates(config Config) error
func (*SatelliteState) CalculateTroposphericCorrection ¶ added in v0.10.0
func (s *SatelliteState) CalculateTroposphericCorrection(config Config) error
func (*SatelliteState) GetSignalEmissionTime ¶ added in v0.10.0
func (s *SatelliteState) GetSignalEmissionTime(config Config) error
type SatelliteStateMap ¶ added in v0.10.0
type SatelliteStateMap map[ephemeris.SatelliteKey]*SatelliteState