Documentation ¶
Overview ¶
Package site handles a GNSS site with its antenna, receiver etc. including the history.
Index ¶
- func EncodeSitelog(w io.Writer, s *Site) error
- func IDByFilename(filename string) string
- type Address
- type ApproximatePosition
- type CartesianPosition
- type Collocation
- type Contact
- type ContactInfo
- type DeltaXYZ
- type EffectiveDates
- type FormInformation
- type FrequencyStandard
- type GeodeticPosition
- type HumiditySensor
- type Identification
- type Links
- type LocalEpisodicEffect
- type LocalTies
- type Location
- type MetadataCustodian
- type MoreInformation
- type Party
- type Phone
- type PressureSensor
- type ResponsibleAgency
- type Role
- type Self
- type Site
- type SiteLog
- type Sites
- type Standard
- type StationInfo
- type TemperatureSensor
- type WaterVaporSensor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeSitelog ¶
EncodeSitelog writes the Site s to the writer w in IGS sitelog format.
func IDByFilename ¶
IDByFilename extracts the siteID (usually nineCharID) from a IGS sitelog filename. The returned value is upper case. On failure an empty string is returned. The filename must comply to the IGS conventions, that means e.g. "wtzr00deu_20231030.log" or the deprecated short name "wtzr_20231030.log".
Types ¶
type Address ¶
type Address struct { PostalCode string `json:"postalCode"` City string `json:"city"` Country string `json:"country"` AdministrativeArea string `json:"administrativeArea"` // Bundesland DeliveryPoints []string `json:"deliveryPoints"` // Postfach? EmailAddresses []string `json:"electronicMailAddresses" validate:"dive,email"` Standard Standard `json:"standard"` // ? Modifiable bool `json:"modifiable"` // ? Interface string `json:"interface"` // "org.opengis.metadata.citation.ResponsibleParty" }
Address stores an address. It's not possible to parse that information from a sitelog.
type ApproximatePosition ¶
type ApproximatePosition struct { CartesianPosition CartesianPosition `json:"cartesianPosition"` GeodeticPosition GeodeticPosition `json:"geodeticPosition"` }
ApproximatePosition stores the approximate position of the site.
type CartesianPosition ¶
type CartesianPosition struct { Type string `json:"type"` // "Point" Coordinates [3]float64 `json:"coordinates"` }
CartesianPosition is a point specified by its XYZ-coordinates.
func NewCartesianPosition ¶
func NewCartesianPosition() CartesianPosition
NewCartesianPosition inits a Cartesian Point Position.
type Collocation ¶
type Collocation struct { InstrumentType string `json:"instrumentType"` // GPS/GLONASS/DORIS/PRARE/SLR/VLBI/TIME/etc Status string `json:"status"` // PERMANENT/MOBILE EffectiveDates EffectiveDates `json:"effectiveDates"` Notes string `json:"notes"` }
Collocation describes collocation instruments.
type ContactInfo ¶
type ContactInfo struct { ContactInstructions interface{} `json:"contactInstructions"` HoursOfService interface{} `json:"hoursOfService"` OnLineResource interface{} `json:"onLineResource"` Address Address `json:"address"` Phone Phone `json:"phone"` Standard Standard `json:"standard"` Modifiable bool `json:"modifiable"` Interface string `json:"interface"` // "org.opengis.metadata.citation.Contact" }
ContactInfo stores the address, phones etc. of an party/organisation.
type EffectiveDates ¶
EffectiveDates holds a start- and enddate.
type FormInformation ¶
type FormInformation struct { PreparedBy string `json:"preparedBy"` DatePrepared time.Time `json:"datePrepared" validate:"required"` ReportType string `json:"reportType"` // NEW/UPDATE }
FormInformation stores sitelog metdadata.
type FrequencyStandard ¶
type FrequencyStandard struct { Type string `json:"type"` // INTERNAL or EXTERNAL H-MASER/CESIUM/etc. InputFrequency string `json:"inputFrequency"` // if external EffectiveDates EffectiveDates `json:"effectiveDates"` Notes string `json:"notes"` }
FrequencyStandard describes the internal or external frequency input.
type GeodeticPosition ¶
type GeodeticPosition struct { Type string `json:"type"` // "Point" Coordinates [3]float64 `json:"coordinates"` }
GeodeticPosition is a point specified by lat,lon and ellipsoid height.
func NewGeodeticPosition ¶
func NewGeodeticPosition() GeodeticPosition
NewGeodeticPosition inits a Geodetic Point Position.
type HumiditySensor ¶
type HumiditySensor struct { Type string `json:"type"` // Humidity Sensor Model Manufacturer string `json:"manufacturer"` SerialNumber string `json:"serialNumber"` DataSamplingInterval float64 `json:"dataSamplingInterval"` // in secs Accuracy float64 `json:"accuracyPercentRelativeHumidity"` // in % relative humidity Aspiration string `json:"aspiration"` // UNASPIRATED, NATURAL, FAN etc. HeightDiffToAntenna float64 `json:"heightDiffToAntenna"` // in meter CalibrationDate time.Time `json:"calibrationDate"` EffectiveDates EffectiveDates `json:"effectiveDates"` Notes string `json:"notes"` }
HumiditySensor specifies a humidity sensor.
type Identification ¶
type Identification struct { Name string `json:"siteName" validate:"required"` // City or nearest town FourCharacterID string `json:"fourCharacterId"` // Deprecated: use NineCharacterID NineCharacterID string `json:"nineCharacterId" validate:"omitempty,alphanum,len=9"` // or store singel fields? ID MonumentInscription string `json:"monumentInscription"` // DOMESNumber string `json:"iersDOMESNumber"` // IERS Domes number, A9 CDPNumber string `json:"cdpNumber"` // whats that? A4 MonumentDescription string `json:"monumentDescription"` // PILLAR/BRASS PLATE/STEEL MAST/etc HeightOfMonument float64 `json:"heightOfMonument"` // in meter? MonumentFoundation string `json:"monumentFoundation"` // STEEL RODS, CONCRETE BLOCK, ROOF, etc FoundationDepth float64 `json:"foundationDepth"` // in meter MarkerDescription string `json:"markerDescription"` // CHISELLED CROSS/DIVOT/BRASS NAIL/etc DateInstalled time.Time `json:"dateInstalled"` // GeologicCharacteristic string `json:"geologicCharacteristic"` // BEDROCK/CLAY/CONGLOMERATE/GRAVEL/SAND/etc BedrockType string `json:"bedrockType"` // IGNEOUS/METAMORPHIC/SEDIMENTARY -> new type BedrockType BedrockCondition string `json:"bedrockCondition"` // FRESH/JOINTED/WEATHERED FractureSpacing string `json:"fractureSpacing"` // 1-10 cm/11-50 cm/51-200 cm/over 200 cm FaultZonesNearby string `json:"faultZonesNearby"` // YES/NO/Name of the zone DistanceActivity string `json:"distanceActivity"` Notes string `json:"notes"` }
Identification holds common fields about this site.
type LocalEpisodicEffect ¶
type LocalEpisodicEffect struct { EffectiveDates EffectiveDates `json:"effectiveDates"` Event string `json:"event"` // TREE CLEARING/CONSTRUCTION/etc }
LocalEpisodicEffect is a local episodic effect that possibly affects data quality, defined in 10.
type LocalTies ¶
type LocalTies struct { MarkerName string `json:"tiedMarkerName"` MarkerUsage string `json:"tiedMarkerUsage"` // SLR/VLBI/LOCAL CONTROL/FOOTPRINT/etc MarkerCDPNumber string `json:"tiedMarkerCdpNumber"` // A4 MarkerDomesNumber string `json:"tiedMarkerDomesNumber"` // A9 DifferentialFromMarker DeltaXYZ `json:"differentialFromMarker"` // in meter Accuracy float64 `json:"localSiteTieAccuracy"` // in mm SurveyMethod string `json:"surveyMethod"` // GPS CAMPAIGN/TRILATERATION/TRIANGULATION/etc DateMeasured time.Time `json:"dateMeasured"` Notes string `json:"notes"` }
LocalTies stores the surveyed local ties from one measurement.
type Location ¶
type Location struct { City string `json:"city"` State string `json:"state"` Country string `json:"country"` TectonicPlate string `json:"tectonicPlate"` ApproximatePosition ApproximatePosition `json:"approximatePosition" validate:"required"` // ITRF Notes string `json:"notes"` }
Location holds information about the location.
type MetadataCustodian ¶
type MetadataCustodian struct { ContactTypeID int `json:"contactTypeId"` Party Party `json:"party"` }
The MetadataCustodian is responsible for the sites' metadata.
type MoreInformation ¶
type MoreInformation struct { PrimaryDataCenter string `json:"primaryDataCenter"` SecondaryDataCenter string `json:"secondaryDataCenter"` URLForMoreInformation string `json:"urlForMoreInformation"` SiteMap string `json:"siteMap"` SiteDiagram string `json:"siteDiagram"` HorizonMask string `json:"horizonMask"` MonumentDescription string `json:"monumentDescription"` SitePictures string `json:"sitePictures"` Notes string `json:"notes"` AntennaGraphicsWithDimensions string `json:"antennaGraphicsWithDimensions"` InsertTextGraphicFromAntenna string `json:"insertTextGraphicFromAntenna"` Doi string `json:"doi"` }
MoreInformation about data centers, pictures etc., sitelog block 13
type Party ¶
type Party struct { IndividualName string `json:"individualName"` OrganisationName string `json:"organisationName"` // abbreviation Abbreviation string `json:"abbreviation"` // additional field added by wiese PositionName string `json:"positionName"` // ? ContactInfo ContactInfo `json:"contactInfo"` Role Role `json:"role"` Standard Standard `json:"standard"` Modifiable bool `json:"modifiable"` Interface string `json:"interface"` }
Party describes an organisation with contacts, addresses included.
type PressureSensor ¶
type PressureSensor struct { Type string `json:"type"` // Pressure Sensor Model Manufacturer string `json:"manufacturer"` SerialNumber string `json:"serialNumber"` DataSamplingInterval float64 `json:"dataSamplingInterval"` // in secs Accuracy float64 `json:"accuracyHPa"` // in hPa HeightDiffToAntenna float64 `json:"heightDiffToAntenna"` // in meter CalibrationDate time.Time `json:"calibrationDate"` EffectiveDates EffectiveDates `json:"effectiveDates"` Notes string `json:"notes"` }
PressureSensor specifies a pressure sensor.
type ResponsibleAgency ¶
type ResponsibleAgency struct { ContactTypeID int `json:"contactTypeId"` Party Party `json:"party"` }
ResponsibleAgency is the responsible agency.
type Site ¶
type Site struct { ID int `json:"id"` EntryDate time.Time `json:"entryDate"` LastModifiedDate time.Time `json:"lastModifiedDate"` // SiteLogText time.Time `json:"siteLogText"` FormInfo FormInformation `json:"formInformation"` Ident Identification `json:"siteIdentification"` Location Location `json:"siteLocation"` Receivers []*gnss.Receiver `json:"gnssReceivers" validate:"required,min=1,dive,required"` Antennas []*gnss.Antenna `json:"gnssAntennas" validate:"required,min=1,dive,required"` LocalTies []LocalTies `json:"surveyedLocalTies"` FrequencyStandards []FrequencyStandard `json:"frequencyStandards"` Collocations []Collocation `json:"collocationInformation"` HumiditySensors []HumiditySensor `json:"humiditySensors"` PressureSensors []PressureSensor `json:"pressureSensors"` TemperatureSensors []TemperatureSensor `json:"temperatureSensors"` WaterVaporSensors []WaterVaporSensor `json:"waterVaporSensors"` OtherInstrumentationLogItem []interface{} `json:"otherInstrumentationLogItem"` // 8.5 Other Instrumentation RadioInterferences []interface{} `json:"radioInterferences"` // 9.1 MultipathSourceLogItems []interface{} `json:"multipathSourceLogItems"` // 9.2 SignalObstructionLogItems []interface{} `json:"signalObstructionLogItems"` // 9.3 LocalEpisodicEffectLogItems []LocalEpisodicEffect `json:"localEpisodicEffectLogItems"` // 10 Contacts []Contact `json:"siteContacts"` // 11. On-Site, Point of Contact Agency Information ResponsibleAgencies []ResponsibleAgency `json:"responsibleParties"` // 12. Responsible Agency MoreInformation MoreInformation `json:"moreInformation"` // 13 MetadataCustodians []MetadataCustodian `json:"siteMetadataCustodians"` Warnings []error `json:"-"` }
Site specifies a GNSS site.
func DecodeSitelog ¶
DecodeSitelog reads and parses the sitelog input stream and returns it as a site.
func (*Site) GetResponsibleAgency ¶
GetResponsibleAgency returns the responsible agency for questions about the operation of the site, regarding site log or RINEX errors etc. In the sitelog this is section "12. Responsible Agency" if available. If not available, return the "11. On-Site Point of Contact".
func (*Site) StationInfo ¶
func (s *Site) StationInfo() ([]StationInfo, error)
StationInfo returns the station information with all receiver and antenna changes since the installation of the site, as it is used for the bernese Station Information (STA file).
func (*Site) ValidateAndClean ¶
ValidateAndClean validates and cleans the site data. With input data often being lousy, the values are cleaned as much as possible before, missing fields e.g. dates are set if possible. With force being true, corrupt data will be cleaned with extra force as much as possible, e.g. adjust overlapping sensor dates, where it would otherwise return with an error.
type StationInfo ¶
type StationInfo struct { Name string // The 9-char or 4-char station name. Description string // usually the city or town DOMESNumber string Flag string // "001" From, To time.Time Recv *gnss.Receiver Ant *gnss.Antenna Remark string // could be the Recv.Firmware if not otherwise used }
StationInfo represents the receiver and antenna state for a time range.
func (*StationInfo) FourCharacterID ¶
func (sta *StationInfo) FourCharacterID() string
Returns the (old) short 4-char station name.
func (*StationInfo) MarshalBerneseSTA ¶
func (sta *StationInfo) MarshalBerneseSTA(fmtVers string) string
MarshalBerneseSTA returns the station info as it is used in Bernese STA files.
type TemperatureSensor ¶
type TemperatureSensor struct { Type string `json:"type"` // Pressure Sensor Model Manufacturer string `json:"manufacturer"` SerialNumber string `json:"serialNumber"` DataSamplingInterval float64 `json:"dataSamplingInterval"` // in secs Accuracy float64 `json:"accuracyDegreesCelcius"` // in degrees Aspiration string `json:"aspiration"` // UNASPIRATED, NATURAL, FAN etc. HeightDiffToAntenna float64 `json:"heightDiffToAntenna"` // in meter CalibrationDate time.Time `json:"calibrationDate"` EffectiveDates EffectiveDates `json:"effectiveDates"` Notes string `json:"notes"` }
TemperatureSensor specifies a temperature sensor.
type WaterVaporSensor ¶
type WaterVaporSensor struct { Type string `json:"type"` Manufacturer string `json:"manufacturer"` SerialNumber string `json:"serialNumber"` DistanceToAntenna float64 `json:"distanceToAntenna"` HeightDiffToAntenna float64 `json:"heightDiffToAntenna"` CalibrationDate time.Time `json:"calibrationDate"` EffectiveDates EffectiveDates `json:"effectiveDates"` Notes string `json:"notes"` }
WaterVaporSensor specifies a water-vapor sensor.