Skip to main content

nexrad_decode/messages/digital_radar_data/
definitions.rs

1/// Indicates whether the message is compressed and what type of compression was used.
2#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
3pub enum CompressionIndicator {
4    Uncompressed,
5    CompressedBZIP2,
6    CompressedZLIB,
7    FutureUse,
8}
9
10/// Possible statuses for a radial describing its position within the larger scan.
11#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
12pub enum RadialStatus {
13    ElevationStart,
14    IntermediateRadialData,
15    ElevationEnd,
16    VolumeScanStart,
17    VolumeScanEnd,
18    /// Start of new elevation which is the last in the VCP.
19    ElevationStartVCPFinal,
20}
21
22/// Flags indicating special control features.
23#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
24pub enum ControlFlags {
25    None,
26    RecombinedAzimuthalRadials,
27    RecombinedRangeGates,
28    RecombinedRadialsAndRangeGatesToLegacyResolution,
29}
30
31/// Processing status flags.
32#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
33pub enum ProcessingStatus {
34    RxRNoise,
35    CBT,
36    Other(u16),
37}
38
39/// Volume coverage pattern (VCP) definitions.
40#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
41pub enum VolumeCoveragePattern {
42    VCP12,
43    VCP31,
44    VCP35,
45    VCP112,
46    VCP212,
47    VCP215,
48}
49
50/// The value for a data moment/radial, gate, and product. The value may be a floating-point number
51/// or a special case such as "below threshold" or "range folded".
52#[derive(Debug, Clone, Copy, PartialEq)]
53pub enum ScaledMomentValue {
54    /// The converted floating-point representation of the data moment value for a gate.
55    Value(f32),
56    /// The value for this gate was below the signal threshold.
57    BelowThreshold,
58    /// The value for this gate exceeded the maximum unambiguous range.
59    RangeFolded,
60}