Documentation ¶
Index ¶
Examples ¶
Constants ¶
const ( BlockFileReference = "FILE/REFERENCE" // Information on the Organization, point of contact, etc. BlockFileComment = "FILE/COMMENT" // General comments about the SINEX data file. BlockInputHistory = "INPUT/HISTORY" // Information about the source of the information used to create the current SINEX file. BlockInputFiles = "INPUT/FILES" // Identify the input files. BlockInputAck = "INPUT/ACKNOWLEDGEMENTS" // Defines the agency codes contributing to the SINEX file. BlockNutationData = "NUTATION/DATA" // VLBI: contains the nutation model used in the analysis procedure. BlockPrecessionData = "PRECESSION/DATA" // VLBI: contains the precession model used in the analysis procedure. BlockSourceID = "SOURCE/ID" // VLBI: contains information about the radio sources estimated in the analysis. BlockSiteID = "SITE/ID" // General information for each site containing estimated parameters. BlockSiteData = "SITE/DATA" // Relationship between the estimated station parameters and in the input files. BlockSiteReceiver = "SITE/RECEIVER" // GNSS: The receiver used at each site during the observation period. BlockSiteAntenna = "SITE/ANTENNA" // GNSS: The antennas used at each site during the observation period. BlockSiteGPSPhaseCen = "SITE/GPS_PHASE_CENTER" // GPS: phase center offsets for the antennas. BlockSiteGalPhaseCen = "SITE/GAL_PHASE_CENTER" // Galileo: phase center offsets for the antennas. BlockSiteEcc = "SITE/ECCENTRICITY" // Antenna eccentricities from the Marker to the Antenna Reference Point (ARP). BlockSatelliteID = "SATELLITE/ID" // List of GNSS satellites used. BlockSatellitePhaseCen = "SATELLITE/PHASE_CENTER" // GNSS satellite antenna phase center corrections. BlockSolEpochs = "SOLUTION/EPOCHS" // List of solution epoch for each Site Code/Point Code/Solution Number/Observation Code (SPNO) combination. BlockBiasEpochs = "BIAS/EPOCHS" // List of epochs of bias parameters for each Site Code/Point Code/Solution Number/Bias Type (SPNB) combination BlockSolStatistics = "SOLUTION/STATISTICS" // Statistical information about the solution. BlockSolEstimate = "SOLUTION/ESTIMATE" // The Estimated parameters. BlockSolApriori = "SOLUTION/APRIORI" // Apriori information for estimated parameters. BlockSolMatrixEst = "SOLUTION/MATRIX_ESTIMATE" // The estimate matrix. BlockSolMatrixApr = "SOLUTION/MATRIX_APRIORI" // The apriori matrix. BlockSolNormalEquVec = "SOLUTION/NORMAL_EQUATION_VECTOR" // Vector of the right hand side of the unconstrained (reduced) normal equation. )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Antenna ¶
type Antenna struct { SiteCode SiteCode // 4-char site code, e.g. WTZR. PointCode string // A 2-char code identifying physical monument within a site. SolID string // Solution ID at a Site/Point code for which the parameter is estimated. ObsTech ObservationTechnique // Technique(s) used to generate the SINEX solution. *gnss.Antenna }
Antenna for GNSS.
func (*Antenna) UnmarshalSINEX ¶
Unmarshall a SITE/ANTENNA record.
type Decoder ¶
type Decoder struct { Header *Header // contains filtered or unexported fields }
Decoder reads and decodes the SINEX input stream.
Example (Estimates) ¶
Loop over the epochs of a observation data input stream.
r, err := os.Open("testdata/igs20P21161.snx") if err != nil { log.Fatal(err) } defer r.Close() dec, err := NewDecoder(r) if err != nil { log.Fatal(err) } for dec.NextBlock() { name := dec.CurrentBlock() if name == BlockSolEstimate { for dec.NextBlockLine() { var est Estimate err := dec.Decode(&est) if err != nil { log.Fatal(err) } // Do something with est //fmt.Printf("%s: %.5f\n", est.SiteCode, est.Value) } } }
Output:
func NewDecoder ¶
NewDecoder returns a new decoder that reads from r. The header line and FILE/REFERENCE block will be read implicitely.
It is the caller's responsibility to call Close on the underlying reader when done!
func (*Decoder) CurrentBlock ¶
Returns the name of the current block.
func (*Decoder) Decode ¶
func (dec *Decoder) Decode(out Unmarshaler) error
Decode the current line into out.
func (*Decoder) GetFileReference ¶
func (dec *Decoder) GetFileReference() FileReference
Return the FILE/REFERENCE data.
func (*Decoder) NextBlock ¶
NextBlock reports whether there is another block available and moves the reader to the begin of the this block. Use CurrentBlock() to get the name of the current block.
func (*Decoder) NextBlockLine ¶
NextBlockLine reports whether there is another data line in the current block and reads that line into the buffer. It returns false when reaching the end of the block.
type Estimate ¶
type Estimate struct { Idx int // Index of estimated parameters, beginning with 1. ParType ParameterType // The type of the parameter. SiteCode SiteCode // 4-char site code, e.g. WTZR. PointCode string // A 2-char code identifying physical monument within a site. SolID string // Solution ID at a Site/Point code for which the parameter is estimated. Epoch time.Time // Epoch at which the estimated parameter is valid. Unit string // Units used for the estimates and sigmas. ConstraintCode string // Constraint code applied to the parameter. Value float64 // Estimated value of the parameter. Stddev float64 // Estimated standard deviation for the parameter. }
Estimate stores the estimated solution parameters.
func (*Estimate) UnmarshalSINEX ¶
Unmarshall a SOLUTION/ESTIMATE record.
type FileReference ¶
type FileReference struct { Description string // Organization(s). Output string // File contents. Contact string // Contact information. Software string // SW used to generate the file. Hardware string // Hardware on which above software was run. Input string // Input used to generate this solution. }
FileReference provides information on the Organization, point of contact, the software and hardware involved in the creation of the file.
type Header ¶
type Header struct { Version string // Format version. Agency string // Agency creating the file. AgencyDataProvider string // Agency providing the data in the file. CreationTime time.Time // Creation time of the file. StartTime time.Time // Start time of the data. EndTime time.Time // End time of the data. ObsTech ObservationTechnique // Technique(s) used to generate the SINEX solution. NumEstimates int // parameters estimated ConstraintCode int // Single digit indicating the constraints: 0-fixed/tight constraints, 1-significant constraints, 2-unconstrained. SolutionTypes []string // Solution types contained in this SINEX file. Each character in this field may be one of the following: }
Header containes the information from the SINEX Header line.
func (*Header) UnmarshalSINEX ¶
Unmarshall the header line.
type ObservationTechnique ¶
type ObservationTechnique int
ObservationTechnique used to arrive at the solutions obtained in this SINEX file, e.g. SLR, GPS, VLBI. It should be consistent with the IERS convention.
const ( ObsTechCombined ObservationTechnique = iota + 1 ObsTechDORIS ObsTechSLR ObsTechLLR ObsTechGPS ObsTechVLBI )
Observation techniques.
func (ObservationTechnique) String ¶
func (techn ObservationTechnique) String() string
type ParameterType ¶
type ParameterType string
ParameterType identifies the type of parameter.
const ( ParameterTypeSTAX ParameterType = "STAX" // Station X coordinate in m. ParameterTypeSTAY ParameterType = "STAY" // Station Y coordinate in m. ParameterTypeSTAZ ParameterType = "STAZ" // Station Z coordinate in m. )
type Receiver ¶
type Receiver struct { SiteCode SiteCode // 4-char site code, e.g. WTZR. PointCode string // A 2-char code identifying physical monument within a site. SolID string // Solution ID at a Site/Point code for which the parameter is estimated. ObsTech ObservationTechnique // Technique(s) used to generate the SINEX solution. *gnss.Receiver }
Receiver for GNSS.
func (*Receiver) UnmarshalSINEX ¶
Unmarshall a SITE/RECEIVER record.
type Site ¶
type Site struct { Code SiteCode // 4-charID site code, e.g. WTZR. PointCode string // A 2-char code identifying physical monument within a site. DOMESNumber string ObsTech ObservationTechnique // Technique(s) used to generate the SINEX solution. Description string // Site description, e.g. city. Lon string // Longitude Lat string // Latitude Height float64 Receivers []*gnss.Receiver Antennas []*gnss.Antenna }
Site provides general information for each site. See also site.Site{}
func (*Site) UnmarshalSINEX ¶
Unmarshall a SITE/ID record.