--- source_files: - Common/DTS.Common.Serialization/IRIGCH10/TMATS/DataConversion/DataConversionSection.cs - Common/DTS.Common.Serialization/IRIGCH10/TMATS/DataConversion/TelemetrySection.cs - Common/DTS.Common.Serialization/IRIGCH10/TMATS/DataConversion/CoefficientSection.cs - Common/DTS.Common.Serialization/IRIGCH10/TMATS/DataConversion/Measurand.cs - Common/DTS.Common.Serialization/IRIGCH10/TMATS/DataConversion/OtherInformationSection.cs - Common/DTS.Common.Serialization/IRIGCH10/TMATS/DataConversion/TransducerInformation.cs generated_at: "2026-04-16T03:44:20.663456+00:00" model: "Qwen/Qwen3-Coder-Next-FP8" schema_version: 1 sha256: "7f4dfba0264ee789" --- # Data Conversion Section Documentation ## 1. Purpose This module implements the TMATS (Telemetry and Tracking Attributes Standard) data conversion sections as defined in IRIG Chapter 10 specification (Chapter 9 of the TMATS document). It provides strongly-typed C# classes to represent and serialize various aspects of data conversion metadata—including conversion types, binary formats, polynomial coefficients, measurand descriptions, transducer information, and other measurement-related attributes—into the TMATS packet format used in IRIG 110-04 telemetry standards. These sections enable structured representation of how raw telemetry data is processed, calibrated, and interpreted for engineering analysis. ## 2. Public Interface ### Enums #### `DataConversionAttributes` (namespace `DTS.Serialization.IRIGCH10.Attributes`) - **`ConversionType`**: Attribute identifier `"DCT"` for specifying the data conversion type. #### `ConversionTypes` (namespace `DTS.Serialization.IRIGCH10.Attributes`) - **`None`**: `"NON"` — No conversion applied. - **`PairSets`**: `"PRS"` — Conversion via pair sets. - **`Coefficients`**: `"COE"` — Polynomial coefficients (positive). - **`CoefficientsNegative`**: `"NPC"` — Polynomial coefficients (negative). - **`Derived`**: `"DER"` — Derived channel. - **`Discrete`**: `"DIS"` — Discrete (digital) channel. - **`PCMTime`**: `"PTM"` — PCM time channel. - **`Time1553`**: `"BTM"` — 1553 time channel. - **`DigitalVoice`**: `"VOI"` — Digital voice channel. - **`DigitalVideo`**: `"VID"` — Digital video channel. - **`SpecializedProcessing`**: `"SP"` — Specialized processing. - **`Other`**: `"OTH"` — Other conversion type. #### `TelemetryAttributes` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`BinaryFormat`**: Attribute identifier `"BFM"` for specifying binary data format. #### `BinaryFormats` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`Integer`**: `"INT"` — Integer format. - **`UnsignedBinary`**: `"UNS"` — Unsigned binary. - **`SignAndMagnitudeSig`**: `"SIG"` — Sign and magnitude (SIG). - **`SignAndMagnitudeSim`**: `"SIM"` — Sign and magnitude (SIM). - **`OnesCompliment`**: `"ONE"` — One’s complement. - **`TwosCompliment`**: `"TWO"` — Two’s complement. - **`OffsetBinary`**: `"OFF"` — Offset binary. - **`FloatingPoint`**: `"FPT"` — Floating point. - **`BinaryCodedDecimal`**: `"BCD"` — BCD. - **`BitWeight`**: `"BWT"` — Bit weight. - **`Other`**: `"OTH"` — Other format. #### `CoefficientsAttributes` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`OrderOfCurveFit`**: `"CO\\N"` — Polynomial order *n*. - **`DerivedFromPairSet`**: `"CO1"` — Indicates derivation from pair set. - **`Coefficient0`** to **`Coefficient7`**: `"CO"`, `"CO-1"` … `"CO-7"` — Polynomial coefficients (0th to 7th order). #### `MeasurandAttributes` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`Description`**: `"MN1"` — Measurand description (max 64 chars). - **`MeasurementAlias`**: `"MNA"` — Alternate name (max 32 chars). - **`ExcitationVoltage`**: `"MN2"` — Sensor excitation voltage in volts (max 10 chars). - **`EngineeringUnits`**: `"MN3"` — Engineering units (max 16 chars). - **`LinkType`**: `"MN4"` — Source data link type (max 3 chars). #### `SourceDataTypeLinks` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`FM`**: `"ANA"` — Analog (FM). - **`PCM`**: `"PCM"` — PCM. - **`PAM`**: `"PAM"` — PAM. - **`Other`**: `"OTH"` — Other. #### `OtherInformationAttributes` (namespace `DTS.Serialization.IRIGCH10.Attributes`) - **`HighMeasurementValue`**: `"MOT1"` — Max engineering value (max 32 chars). - **`LowMeasurementValue`**: `"MOT2"` — Min engineering value (max 32 chars). - **`HighAlertLimitValue`**: `"MOT3"` — High alert limit (max 32 chars). - **`LowAlertLimitValue`**: `"MOT4"` — Low alert limit (max 32 chars). - **`HighWarningLimitValue`**: `"MOT5"` — High warning limit (max 32 chars). - **`LowWarningLimitValue`**: `"MOT6"` — Low warning limit (max 32 chars). - **`SampleRate`**: `"SR"` — Sample rate in samples/sec (max 6 chars). #### `TransducerInformation` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`MeasurementName`**: `"DCN"` — Measurement name (max 32 chars). - **`Type`**: `"TRD1"` — Sensor type (max 32 chars). - **`ModelNumber`**: `"TRD2"` — Model number (max 32 chars). - **`SerialNumber`**: `"TRD3"` — Serial number (max 32 chars). - **`SecurityClassification`**: `"TRD4"` — Classification code (max 2 chars). - **`OriginationDate`**: `"TRD5"` — Date in `MM-DD-YYYY` format (max 10 chars). - **`RevisionNumber`**: `"TRD6"` — Revision number (max 4 chars). - **`Orientation`**: `"TRD7"` — Physical orientation (max 32 chars). - **`PointOfContactName`**: `"POC1"` — POC name (max 32 chars). - **`PointOfContactAgency`**: `"POC2"` — POC agency (max 48 chars). - **`PointOfContectAddress`**: `"POC3"` — POC address (max 48 chars). - **`PointOfContactTelephone`**: `"POC4"` — POC telephone (max 20 chars). #### `ClassificationTypes` (namespace `DTS.Serialization.IRIGCH10.TMATS.DataConversion`) - **`Unclassified`**: `"U"` - **`Confidential`**: `"C"` - **`Secret`**: `"S"` - **`TopSecret`**: `"T"` - **`Other`**: `"O"` ### Classes #### `DataConversionSection` - **Constructor**: `DataConversionSection(int number)` Initializes the section with `AttributeIdentifiers.DataConversionAttributes` and given `number`. - **`SetConversionType(ConversionTypes type)`**: Sets the `"DCT"` attribute to the encoded description of `type` (e.g., `"COE"` for `Coefficients`). #### `TelemetrySection` - **Constructor**: `TelemetrySection(int number)` Initializes the section with `AttributeIdentifiers.DataConversionAttributes` and given `number`. - **`SetBinaryFormat(BinaryFormats format)`**: Sets the `"BFM"` attribute to the encoded description of `format` (e.g., `"TWO"` for `TwosCompliment`). #### `CoefficientSection` - **Constructor**: `CoefficientSection(int number)` Initializes the section with `AttributeIdentifiers.DataConversionAttributes` and given `number`. - **`OrderOfCurveFit`**: `int?` Gets/sets the `"CO\\N"` attribute (polynomial order *n*). - **`Coefficient0`**: `string` Gets/sets the `"CO"` attribute (0th-order coefficient, e.g., offset). - **`Coefficient1`**: `string` Gets/sets the `"CO-1"` attribute (1st-order coefficient, equivalent to bit weight). #### `MeasurandSection` - **Constructor**: `MeasurandSection(int number)` Initializes the section with `AttributeIdentifiers.DataConversionAttributes` and given `number`. - **`Description`**: `string` Gets/sets `"MN1"` — Measurand description. - **`MeasurementAlias`**: `string` Gets/sets `"MNA"` — Alternate name. - **`ExcitationVoltage`**: `string` Gets/sets `"MN2"` — Sensor excitation voltage (volts). - **`EngineeringUnits`**: `string` Gets/sets `"MN3"` — Engineering units. - **`SetLinkType(SourceDataTypeLinks linkType)`**: Sets `"MN4"` to the encoded description of `linkType`. #### `OtherInformationSection` - **Constructor**: `OtherInformationSection(int number)` Initializes the section with `AttributeIdentifiers.DataConversionAttributes` and given `number`. - **`HighMeasurementValue`**, **`LowMeasurementValue`**, **`HighAlertLimitValue`**, **`LowAlertLimitValue`**, **`HighWarningLimitValue`**, **`LowWarningLimitValue`**: `string` Gets/sets corresponding `"MOTx"` attributes (engineering unit limits). - **`SampleRate`**: `string` Gets/sets `"SR"` — Sample rate (samples/sec). #### `TransducerInformationSection` - **Constructor**: `TransducerInformationSection(int number)` Initializes the section with `AttributeIdentifiers.DataConversionAttributes` and given `number`. - **`MeasurementName`**, **`Type`**, **`ModelNumber`**, **`SerialNumber`**, **`RevisionNumber`**, **`Orientation`**: `string` Gets/sets respective `"DCN"`, `"TRDx"`, `"TRD7"` attributes. - **`SecurityClassification`**: `string` Gets/sets `"TRD4"` — Classification code. - **`SetSecurityClassification(ClassificationTypes type, bool signalClassified, bool measurandClassified)`**: Sets `"TRD4"` to `type` description, optionally appending `"B"` (both), `"R"` (signal only), or `"E"` (measurand only). - **`OriginationDate`**: `DateTime?` Gets/sets `"TRD5"` — Date in `MM-DD-YYYY` format. - **`PointOfContact`**: `POC` Gets/sets POC data via `POC` class (see below). #### `POC` (nested class in `TransducerInformationSection`) - **Properties**: `Name`, `Agency`, `Address`, `Telephone` (`string`). - **Constructors**: Parameterized and default. ## 3. Invariants - All sections inherit from `TMATSSection` and are initialized with `AttributeIdentifiers.DataConversionAttributes`, indicating they belong to the *Data Conversion* TMATS section group. - Attribute values are stored as strings with explicit length encoding via `SetValueWithLength`. - Integer attributes (`OrderOfCurveFit`) use `GetIntOrNull`/`SetIntOrNull`, implying nullable integer handling. - Date values (`OriginationDate`) are serialized in strict `MM-DD-YYYY` format (e.g., `03-15-2023`); parsing is lenient (`DateTime.TryParse`). - Classification codes may be extended with suffixes (`B`, `R`, `E`) depending on `signalClassified`/`measurandClassified` flags. - String attributes have maximum lengths enforced via `[MaxLength]` attributes on enum fields (e.g., `Description` max 64 chars), though enforcement occurs at serialization time via `SetValueWithLength`. ## 4. Dependencies ### Dependencies *of* this module: - **IRIGCh10.dll**: Provides base infrastructure (`TMATSSection`, `AttributeIdentifiers`, `DescriptionDecoder`). - **System.ComponentModel**: Used for `[Description]` and `[MaxLength]` attributes. - **System.ComponentModel.DataAnnotations**: Used for `[MaxLength]`. ### Dependencies *on* this module: - Other TMATS section implementations (e.g., `TMATSSection` base class). - Likely consumed by higher-level TMATS packet builders (e.g., `TMATSPacketBuilder`). - `DescriptionDecoder.GetDescription(Enum)` is used extensively to convert enum values to their IRIG-compliant string codes. ## 5. Gotchas - **Typo in POC property**: In `TransducerInformationSection.PointOfContact.get`, `Address` is incorrectly assigned from `PointOfContectAddress` *twice* (should be `PointOfContectAddress` for `Address`, `PointOfContactTelephone` for `Telephone`). This is likely a bug. - **Classification suffix logic**: The `SetSecurityClassification` method appends `"B"`, `"R"`, or `"E"` to the base classification code. This is non-standard and may be proprietary extension; verify against IRIG spec. - **`DerivedFromPairSet` attribute (`CO1`)**: Defined in `CoefficientsAttributes` but has no corresponding property or setter in `CoefficientSection`. Its purpose is unclear from source. - **`SampleRate` max length**: Only 6 characters — may truncate high-precision rates (e.g., `123456` Hz is valid, but `1.23456e5` may exceed limit). - **`OriginationDate` format**: Hardcoded as `MM-DD-YYYY` (e.g., `03-15-2023`). This differs from ISO 8601 and may cause parsing issues in non-US locales. - **No validation on coefficient values**: `Coefficient0`, `Coefficient1`, etc., accept arbitrary strings (including scientific notation), but no validation ensures syntactic correctness. - **`BinaryFormats.SignAndMagnitudeSig` vs `SignAndMagnitudeSim`**: Ambiguous naming (`SIG`/`SIM`) — unclear if these correspond to distinct IRIG codes or are implementation-specific variants.