Documentation ¶
Index ¶
- Constants
- type Archive2
- type DataBlock
- type DataMoment
- type ElevationData
- type GenericDataMoment
- type LDMRecord
- type Message15
- type Message15AzimuthSegment
- type Message15ElevSegment
- type Message15Header
- type Message15RangeZones
- type Message2
- type Message3
- type Message31
- type Message31Header
- type Message5
- type Message5ElevCut
- type Message5Header
- type MessageHeader
- type RadialData
- type VolumeData
- type VolumeHeaderRecord
Constants ¶
const ( LegacyCTMHeaderLen = 12 MessageHeaderSize = 16 DefaultMessageSize = 2432 // MessageBodySize is the size of the message without the legacy CTM header and Message Header. Note: this does not work for Message 31 types. MessageBodySize = DefaultMessageSize - LegacyCTMHeaderLen - MessageHeaderSize )
const Archive2MetadataRecordLen = 325888
Archive2MetadataRecordLen "The first LDM Compressed Record contains the Archive II messages comprising the Archive II metadata. The size of the uncompressed metadata is fixed at 134 messages, ie. 325888 bytes."
const Message2Length = 68
const Message3Length = 960
const Message5Length = 960
const MomentDataBelowThreshold = 999
const MomentDataFolded = 998
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Archive2 ¶
type Archive2 struct { // ElevationScans contains all the messages for every elevation scan in the volume ElevationScans map[int][]*Message31 VolumeHeader VolumeHeaderRecord //RadarStatus is a container for the Message2 record from the LDM metadata RadarStatus *Message2 //RadarPerformance is a container for the Message3 record from the LDM metadata RadarPerformance *Message3 VCP *Message5 }
Archive2 wrapper for processed archive 2 data files.
func Extract ¶
func Extract(f io.ReadSeeker) *Archive2
Extract data from a given archive 2 data file.
func (*Archive2) Elevations ¶
type DataMoment ¶
type DataMoment struct { GenericDataMoment Data []byte }
DataMoment wraps all Momentary data records. ex: REF, VEL, SW data
func (*DataMoment) ScaledData ¶
func (d *DataMoment) ScaledData() []float32
ScaledData automatically scales the nexrad moment values to their actual values. For all data moment integer values N = 0 indicates received signal is below threshold and N = 1 indicates range folded data. Actual data range is N = 2 through 255, or 1023 for data resolution size 8, and 10 bits respectively.
type ElevationData ¶
type ElevationData struct { DataBlock // LRTUP Size of data block in bytes LRTUP uint16 // ATMOS Atmospheric Attenuation Factor ATMOS [2]byte // CalibConst Scaling constant used by the Signal Processor for this elevation to calculate reflectivity CalibConst float32 }
ElevationData wraps Message 31 elevation data
type GenericDataMoment ¶
type GenericDataMoment struct { DataBlock Reserved uint32 // NumberDataMomentGates Number of data moment gates for current radial NumberDataMomentGates uint16 // DataMomentRange Range to center of first range gate DataMomentRange uint16 // DataMomentRangeSampleInterval Size of data moment sample interval DataMomentRangeSampleInterval uint16 // TOVER Threshold parameter which specifies the minimum difference in echo power between two resolution gates for them not to be labeled "overlayed" TOVER uint16 // SNRThreshold SNR threshold for valid data SNRThreshold uint16 // ControlFlags Indicates special control features ControlFlags uint8 // DataWordSize Number of bits (DWS) used for storing data for each Data Moment gate DataWordSize uint8 // Scale value used to convert Data Moments from integer to floating point data Scale float32 // Offset value used to convert Data Moments from integer to floating point data Offset float32 }
GenericDataMoment is a generic data wrapper for momentary data. ex: REF, VEL, SW data
type LDMRecord ¶
LDMRecord (Local Data Manager) contains NEXRAD message data. Following the Volume Header Record are variable-length records containing the Archive II data messages. These records are referred to as LDM Compressed Record(s).
type Message15 ¶
type Message15 struct { Message15Header // ElevCuts contains info for each elevation angle ElevSegments []Message15ElevSegment }
Message15 Clutter Filter Map see documentation RDA/RPG 3-61
func (*Message15) Read ¶
func (m15 *Message15) Read(r io.ReadSeeker)
type Message15AzimuthSegment ¶
type Message15AzimuthSegment struct { NumRangeZones uint16 RangeZones []Message15RangeZones }
type Message15ElevSegment ¶
type Message15ElevSegment struct {
AzimuthSegments []Message15AzimuthSegment
}
type Message15Header ¶
type Message15RangeZones ¶
type Message2 ¶
type Message2 struct { RDAStatus uint16 OperabilityStatus uint16 ControlStatus uint16 AuxPowerGeneratorState uint16 AvgTxPower uint16 HorizRefCalibCorr uint16 DataTxEnabled uint16 VolumeCoveragePatternNum uint16 RDAControlAuth uint16 RDABuild uint16 OperationalMode uint16 SuperResStatus uint16 ClutterMitigationDecisionStatus uint16 AvsetStatus uint16 RDAAlarmSummary uint16 CommandAck uint16 ChannelControlStatus uint16 SpotBlankingStatus uint16 BypassMapGenDate uint16 BypassMapGenTime uint16 ClutterFilterMapGenDate uint16 ClutterFilterMapGenTime uint16 VertRefCalibCorr uint16 TransitionPwrSourceStatus uint16 RMSControlStatus uint16 PerformanceCheckStatus uint16 AlarmCodes uint16 Spares [14]byte }
Message2 RDA Status Data (User 3.2.4.6)
func (Message2) GetBuildNumber ¶
GetBuildNumber as a more recognizable float
func (Message2) GetOperabilityStatus ¶
GetOperabilityStatus returns a human friendly status
func (Message2) GetRDAStatus ¶
GetRDAStatus returns a human friendly status
type Message3 ¶
type Message3 struct { LoopBackTestStatus uint16 T1OutputFrames uint32 T1InputFrames uint32 RouterMemoryUsed uint32 RouterMemoryFree uint32 RouterMemoryUtilization uint16 RouteToRPG uint16 CSULossOfSignal uint32 CSULossOfFrames uint32 CSUYellowAlarms uint32 // Number of times Resource Availability Indication (RAI) (yellow) alarm received. CSUBlueAlarms uint32 // Number of times Alarm Indication Signal (AIS) (blue) alarm received CSU24hrErroredSeconds uint32 CSU24hrSeverelyErroredSeconds uint32 CSU24hrSeverelyErroredFramingSeconds uint32 CSU24hrControlledSlipSeconds uint32 CSU24hrPathCodingViolations uint32 CSU24hrLineErroredSeconds uint32 CSU24hrBurstyErroredSeconds uint32 CSU24hrDegradedMinutes uint32 LANSwitchCPUUtilization uint32 LANSwitchMemory uint16 IFDRChassisTemp uint16 IFDRFPGATemp uint16 GPSSats uint32 IPCStatus uint16 CommandedChannelControl uint16 Polarization uint16 AMEInternalTemp float32 AMERecvModuleTemp float32 AMEBITECALModuleTemp float32 AMEPeltier uint16 AMEPeltierStatus uint16 AMEADConverterStatus uint16 AMEState uint16 AME33VPSVoltage float32 AME5VPSVoltage float32 AME65VPSVoltage float32 AME15VPSVoltage float32 AME48VPSVoltage float32 AMESTALOPower float32 PeltierCurrent float32 ADCCalibrationRefVoltage float32 AMEMode uint16 AMEPeltierMode uint16 AMEPeltierInsideFanCurrent float32 AMEPeltierOutsideFanCurrent float32 HorzTRLimiterVoltage float32 VertTRLimiterVoltage float32 ADCCalibrationOffsetVoltage float32 ADCCalibrationGainCorrection float32 RCPStatus uint16 RCPString [16]byte SPIPPowerButtons uint16 MasterPowerAdminLoad float32 ExpansionPowerAdminLoad float32 PS5VDC uint16 PS15VDC uint16 PS28VDC uint16 PSn15VDC uint16 PS45VDC uint16 FilamentPSVoltage uint16 VacuumPumpPSVoltage uint16 FocusCoilPSVoltage uint16 FilamentPS uint16 KlystronWarmup uint16 TransmitterAvail uint16 WGSwitchPos uint16 WGPFNTransferInterlock uint16 MaintenanceMode uint16 MaintenanceRequired uint16 PFNSwitchPosition uint16 ModulatorOverload uint16 ModulatorInvCurrent uint16 ModulatorSwitchFail uint16 MainPowerVoltage uint16 ChargingSystemFail uint16 InverseDiodeCurrent uint16 TriggerAmp uint16 CirculatorTemp uint16 SpectrumFilterPressure uint16 WGARCVSWR uint16 CabinetInterlock uint16 CabinetAirTemp uint16 CabinetAirflow uint16 KlystronCurrent uint16 KlystronFilamentCurrent uint16 KlystronVacionCurrent uint16 KlystronAirTemp uint16 KlystronAirflow uint16 ModulatorSwitchMaintenance uint16 PostChargeRegulatorMaintenance uint16 WGPressureHumidity uint16 TransmitterOvervoltage uint16 TransmitterOvercurrent uint16 FocusCoilCurrent uint16 FocusCoilAirflow uint16 OilTemperature uint16 PRFLimit uint16 TransmitterOilLevel uint16 TransmitterBatteryCharging uint16 HighVoltageStatus uint16 TransmitterRecyclingSummary uint16 TransmitterInoperable uint16 TransmitterAirFilter uint16 ZeroTestBit0 uint16 ZeroTestBit1 uint16 ZeroTestBit2 uint16 ZeroTestBit3 uint16 ZeroTestBit4 uint16 ZeroTestBit5 uint16 ZeroTestBit6 uint16 ZeroTestBit7 uint16 OneTestBit0 uint16 OneTestBit1 uint16 OneTestBit2 uint16 OneTestBit3 uint16 OneTestBit4 uint16 OneTestBit5 uint16 OneTestBit6 uint16 OneTestBit7 uint16 XMTRSPIPInterface uint16 TransmitterSummaryStatus uint16 TransmitterRFPowerSensor float32 HorizontalXMTRPeakPower float32 XMTRPeakPower float32 VerticalXMTRPeakPower float32 XMTRRFAvgPower float32 XMTRRecycleCount uint32 ReceiverBiasMeasurement float32 TransmitImbalance float32 XMTRPowerMeterZero float32 ACUnit1CompressorShutoff uint16 ACUnit2CompressorShutoff uint16 GeneratorMaintenanceRequired uint16 GeneratorBatteryVoltage uint16 GeneratorEngine uint16 GeneratorVoltFreq uint16 PowerSource uint16 TransitionalPowerSource uint16 GeneratorAutoRunOffSwitch uint16 AircraftHazardLighting uint16 EquipmentShelterFireDetectionSystem uint16 EquipmentShelterFireSmoke uint16 GeneratorShelterFireSmoke uint16 UtilityVoltFreq uint16 SiteSecurityAlarm uint16 SecurityEquipment uint16 SecuritySystem uint16 ReceiverConnectedToAntenna uint16 RadomeHatch uint16 ACUnit1FilterDirty uint16 ACUnit2FilterDirty uint16 EquipmentShelterTemp float32 OutsideAmbientTemp float32 TransmitterLeavingAirTemp float32 ACUnit1DischargeAirTemp float32 GeneratorShelterTemp float32 RadomeAirTemp float32 ACUnit2DischargeAirTemp float32 SPIPp15VPS float32 SPIPn15VPS float32 SPIP28VStatus uint16 SPIP5VPS float32 ConvertedGeneratorFuelLevel uint16 ElevationUpperDeadLimit uint16 Overvolatage150 uint16 Undervolatage150 uint16 ElevationServoAmpInhibit uint16 ElevationServoAmpOvertemp uint16 ElevationServoAmpShortCircuit uint16 ElevationMotorOvertemp uint16 ElevationStowPin uint16 ElevationHousing5VPS uint16 ElevationLowerDeadLimit uint16 ElevationUpperNormalLimit uint16 ElevationLowerNormalLimit uint16 ElevationEncoderLight uint16 ElevationGearboxOil uint16 ElevationHandwheel uint16 ElevationAmpPS uint16 AzimuthServoAmpInhibit uint16 AzimuthServoAmpShortCircuit uint16 AzimuthServoAmpOvertemp uint16 AzimuthMotorOvertemp uint16 AzimuthStowPin uint16 AzimuthHousing5VPS uint16 AzimuthEncoderLight uint16 AzimuthGearboxOil uint16 AzimuthBullGearboxOil uint16 AzimuthHandwheel uint16 AzimuthServoAMPPS uint16 Servo uint16 PedestalInterlockSwitch uint16 COHOClock uint16 RFGeneratorFreqSelectOsc uint16 RFGeneratorRFSTALO uint16 RFGeneratorPhaseShiftedCOHO uint16 Receiver9VpPS uint16 Receiver5vpPS uint16 Receiver18VpPS uint16 Receiver9VnPS uint16 SingleChanRDAIU5VpPS uint16 HorzShortPulseNoise float32 HorzLongPulseNoise float32 HorzNoiseTemp float32 VertShortPulseNoise float32 VertLongPulseNoise float32 VertNoiseTemp float32 HorzLinearty float32 HorzDynamicRange float32 HorzDeltadBZ float32 VertDeltadBZ float32 KDPeakMeasured float32 ShortPulseHorzdbz float32 LongPulseHorzdbz float32 VelocityProcessed uint16 WidthProcessed uint16 VelocityRFGen uint16 WidthRFGen uint16 HorzIO float32 VertIO float32 VertDynamicRange float32 ShortPulseVertdbz float32 LongPulseVertdbz float32 HorzPowerSense float32 VertPowerSense float32 ZDRBias float32 ClutterSuppressionDelta float32 ClutterSuppressionUnfilteredPower float32 ClutterSuppressionFilteredPower float32 VertLinearity float32 StateFileReadStatus uint16 StateFileWriteStatus uint16 BypassMapFileReadStatus uint16 BypassMapFileWriteStatus uint16 CurrentAdaptationFileReadStatus uint16 CurrentAdaptationFileWriteStatus uint16 CensorZoneFileReadStatus uint16 CensorZoneFileWriteStatus uint16 RemoteVCPFileReadStatus uint16 RemoteVCPFileWriteStatus uint16 BaselineAdaptationFileReadStatus uint16 ReadStatusPRFSets uint16 ClutterFilterMapFileReadStatus uint16 ClutterFilterMapFileWriteStatus uint16 GeneralDiskIOError uint16 RSPStatus uint8 MotherboardTemp uint8 CPU1Temp uint8 CPU2Temp uint8 CPU1FanSpeed uint16 CPU2FanSpeed uint16 RSPFan1Speed uint16 RSPFan2Speed uint16 RSPFan3Speed uint16 SPIPCommStatus uint16 HCIComStatus uint16 SignalProcessorCommandStatus uint16 AMECommStatus uint16 RMSLinkStatus uint16 RPGLinkStatus uint16 InterpanelLinkStatus uint16 PerformanceCheckTime uint32 Version uint16 /// Version number for the performance data message // contains filtered or unexported fields }
Message3 Performance/Maintenance Data see documentation RDA/RPG 3-44
type Message31 ¶
type Message31 struct { Header Message31Header VolumeData VolumeData ElevationData ElevationData RadialData RadialData ReflectivityData *DataMoment VelocityData *DataMoment SwData *DataMoment // SwData (Spectrum Width) ZdrData *DataMoment // ZdrData (Differential Reflectivity) used to help identify hail shafts, detect updrafts, determine rain drop size, and identify aggregation of dry snow. PhiData *DataMoment // PhiData (Differential Phase Shift) RhoData *DataMoment // RhoData (Correlation Coefficient) CfpData *DataMoment // CfpData (Clutter Filter Power Removed) }
Message31 Digital Radar Data Generic Format
Description: The message consists of base data information, that is, reflectivity, mean radial velocity, spectrum width, differential reflectivity, differential phase, correlation coefficient, azimuth angle, elevation angle, cut type, scanning strategy and calibration parameters. The frequency and volume of the message will be dependent on the scanning strategy and the type of data associated with that scanning strategy.
type Message31Header ¶
type Message31Header struct { RadarIdentifier [4]byte // CollectionTime Radial data collection time in milliseconds past midnight GMT CollectionTime uint32 // CollectionDate Current Julian date - 2440586.5 CollectionDate uint16 // AzimuthNumber Radial number within elevation scan AzimuthNumber uint16 // AzimuthAngle Azimuth angle at which radial data was collected AzimuthAngle float32 // CompressionIndicator Indicates if message type 31 is compressed and what method of compression is used. The Data Header Block is not compressed. CompressionIndicator uint8 Spare uint8 // RadialLength Uncompressed length of the radial in bytes including the Data Header block length RadialLength uint16 // AzimuthResolutionSpacing Code for the Azimuthal spacing between adjacent radials. 1 = .5 degrees, 2 = 1degree AzimuthResolutionSpacingCode uint8 // RadialStatus Radial Status RadialStatus uint8 // ElevationNumber Elevation number within volume scan ElevationNumber uint8 // CutSectorNumber Sector Number within cut CutSectorNumber uint8 // ElevationAngle Elevation angle at which radial radar data was collected ElevationAngle float32 // RadialSpotBlankingStatus Spot blanking status for current radial, elevation scan and volume scan RadialSpotBlankingStatus uint8 // AzimuthIndexingMode Azimuth indexing value (Set if azimuth angle is keyed to constant angles) AzimuthIndexingMode uint8 DataBlockCount uint16 }
Message31Header contains header information for an Archive 2 Message 31 type
func (*Message31Header) AzimuthResolutionSpacing ¶
func (h *Message31Header) AzimuthResolutionSpacing() float64
AzimuthResolutionSpacing returns the spacing in degrees according to the AzimuthResolutionSpacingCode
func (Message31Header) Date ¶
func (h Message31Header) Date() time.Time
Date and time this data is valid for
func (Message31Header) String ¶
func (h Message31Header) String() string
type Message5 ¶
type Message5 struct { Message5Header // ElevCuts contains info for each elevation angle ElevCuts []Message5ElevCut }
Message5 Volume Coverage Pattern Data see documentation RDA/RPG 3-54
type Message5ElevCut ¶
type Message5ElevCut struct { ElevationAngle uint16 ChannelConfiguration uint8 WaveformType uint8 SuperResControl uint8 SurveillancePRFNumber uint8 SurveillancePRFPulseCountRadial uint16 AzimuthRate uint16 ReflectivityThreshold uint16 VelocityThreshold uint16 SpectrumWidthThreshold uint16 DifferentialReflectivityThreshold uint16 DifferentialPhaseThreshold uint16 CorrelationCoefficientThreshold uint16 EdgeAngle uint16 DopplerPRFNumber uint16 DopplerPRFPulseCountRadial uint16 SupplementalData uint16 EBCAngle uint16 // contains filtered or unexported fields }
type Message5Header ¶
type MessageHeader ¶
type MessageHeader struct { MessageSize uint16 RDARedundantChannel uint8 MessageType uint8 IDSequenceNumber uint16 JulianDate uint16 MillisOfDay uint32 NumMessageSegments uint16 MessageSegmentNum uint16 }
MessageHeader wrapper for archive2 Message Headers
func (MessageHeader) Date ¶
func (vh MessageHeader) Date() time.Time
type RadialData ¶
type RadialData struct { DataBlock // LRTUP Size of data block in bytes LRTUP uint16 // UnambiguousRange, Interval Size UnambiguousRange uint16 NoiseLevelHorz float32 NoiseLevelVert float32 NyquistVelocity uint16 RadialFlags uint16 CalibConstHorzChan float32 CalibConstVertChan float32 }
RadialData wraps Message 31 radial data
func (RadialData) String ¶
func (r RadialData) String() string
type VolumeData ¶
type VolumeData struct { DataBlock // LRTUP Size of data block in bytes LRTUP uint16 VersionMajor uint8 VersionMinor uint8 Lat float32 Long float32 SiteHeight uint16 FeedhornHeight uint16 CalibrationConstant float32 SHVTXPowerHor float32 SHVTXPowerVer float32 SystemDifferentialReflectivity float32 InitialSystemDifferentialPhase float32 VolumeCoveragePatternNumber uint16 ProcessingStatus uint16 }
VolumeData wraps information about the Volume being extracted
type VolumeHeaderRecord ¶
type VolumeHeaderRecord struct { X_FileName [12]byte // ModifiedJulianDate NEXRAD date since 1970/1/1 = 1 X_ModifiedJulianDate int32 // X_ModifiedTime ms since midnight X_ModifiedTime int32 // ICAO Radar identifier in ASCII. The four uppercase character International Civil Aviation Organization identifier of the radar producing the data. ICAO [4]byte }
VolumeHeaderRecord for NEXRAD Archive II Data Streams
Description: The Volume Header Record is fixed length and contains information uniquely identifying the format and the data that follows. Sits at the beginning of the Archive II data stream.
Volume Header Record Data Format: The first 9 bytes is a character constant of which the last 2 characters identify the version. The next 3 bytes is a numeric string field starting with the value 001 and increasing by one for each volume of radar data in the queue to a maximum value of 999. Once the maximum value is reached the value will be rolled over. The combined 12 bytes are called the Archive II filename. The next 4 bytes contain the NEXRAD-modified Julian date the volume was produced at the RDA followed by 4 bytes containing the time the volume was recorded. The date and time integer values are big Endian. The last 4 bytes contain a 4-letter radar identifier assigned by ICAO.
Version Number Reference: Version 02: Super Resolution disabled at the RDA (pre RDA Build 12.0) Version 03: Super Resolution (pre RDA Build 12.0) Version 04: Recombined Super Resolution Version 05: Super Resolution disabled at the RDA (RDA Build 12.0 and later) Version 06: Super Resolution (RDA Build 12.0 and later) Version 07: Recombined Super Resolution (RDA Build 12.0 and later)
func (VolumeHeaderRecord) Date ¶
func (vh VolumeHeaderRecord) Date() time.Time
Date returns a time type representing the date of the scan capture
func (VolumeHeaderRecord) FileName ¶
func (vh VolumeHeaderRecord) FileName() string
FileName returns the name of the File
func (VolumeHeaderRecord) String ¶
func (vh VolumeHeaderRecord) String() string
Date returns a time type representing the date of the scan capture