Documentation ¶
Index ¶
- type Epoch
- func (e *Epoch) Find(s gnss.System, SvID int, Code string) (o Observation, err error)
- func (e *Epoch) GetSystems() []gnss.System
- func (e *Epoch) IsClockSteeringSet() bool
- func (e *Epoch) IsSmoothingSet() bool
- func (e *Epoch) ToEpochMap(s *Set) (epochMap EpochMap, err error)
- func (e Epoch) ToJSON(w io.Writer) (err error)
- type EpochFlag
- type EpochMap
- type Observation
- type Set
- type SysCode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Epoch ¶
type Epoch struct { Time time.Time `json:"time"` ReceiverClockOffset time.Duration `json:"receiver_clock_offset"` ClockSteeringIndicator int `json:"clock_steering_indicator"` ExternalClockIndicator int `json:"external_clock_indicator"` SmoothingIndicator int `json:"smoother_indicator"` SmoothingInterval int `json:"smoother_interval"` EpochFlag EpochFlag `json:"epoch_flag"` Event string `json:"event"` Observations []Observation `json:"obs"` }
Epoch is a struct containing the observations
func CombineEpochs ¶
CombineEpochs merges multiple Epoch instances into a single Epoch if their times match. This function checks if all provided epochs have the same time and combines them only if they do. It concatenates the observation slices from all matching epochs.
Parameters:
- epochs ...Epoch: A variadic slice of Epoch structs to be combined.
Returns:
- Epoch: A single Epoch struct containing all observations from the input epochs with matching times.
- error: An error if the epoch times do not match or if no epochs are provided.
Example:
epoch1 := Epoch{Time: time.Now(), Observations: []Observation{{Sys: gnss.SystemGPS, SvID: 1, Code: "1C"}}} epoch2 := Epoch{Time: epoch1.Time, Observations: []Observation{{Sys: gnss.SystemGPS, SvID: 2, Code: "1C"}}} combinedEpoch, err := CombineEpochs(epoch1, epoch2) if err != nil { fmt.Println(err) } else { fmt.Println(len(combinedEpoch.Observations)) // Output: 2 }
Note: Only combines epochs with exactly matching times.
func (*Epoch) GetSystems ¶
func (*Epoch) IsClockSteeringSet ¶
func (*Epoch) IsSmoothingSet ¶
func (*Epoch) ToEpochMap ¶
ToEpochMap converts observations from a slice to a map keeps track of observable types as a function system
type EpochFlag ¶
type EpochFlag uint8
EpochFlag enumerates possible RINEX epoch flag cases
Note: these will not guard against unassigned integers
type EpochMap ¶
type EpochMap struct { Time time.Time `json:"time"` ObservationMap map[string]map[string]Observation `json:"obs"` }
EpochMap stores observations for a given epoch as a nested map
type Observation ¶
type Observation struct { // Satellite System // G:0, R:1, S:2, E:3, C:4, J:5, I:6 Sys gnss.System `json:"system"` // Satellite PRN or Slot (R) SvID int `json:"sv"` // Observation Type Code (e.g 1C, 1W, 2C, 2W, ...) Code string `json:"code"` // Frequency [Mhz] (e.g. 1575.42) Freq float64 `json:"freq"` // Frequency Channel Number (GLONASS Only) Fcn int `json:"fcn"` // Pseudorange [m] Range float64 `json:"range"` // Phase [cyc] Phase float64 `json:"phase"` // Doppler [Hz] Doppler float64 `json:"doppler"` // Signal-to-noise [db-Hz] SNR float32 `json:"snr"` // Slip count or timer LLI uint16 `json:"lli"` // Flags - bit 0,1,2 same as rinex Flags uint16 `json:"flags"` // RTCM 3 MSM specific fields HalfCycleAmbiguity *uint8 `json:"half_cycle_ambiguity"` LockTimeIndicatorDF407 *uint16 `json:"lock_time_indicator_df407"` LockTimeIndicatorDF402 *uint8 `json:"lock_time_indicator_df402"` }
Observation - holds GNSS observation data
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set - implemented as a map with an empty struct as the value