Beispiel #1
0
    def test_string_decode_encode(self):
        from QGIS_FMV.klvdata.common import bytes_to_hexstr
        from QGIS_FMV.klvdata.common import hexstr_to_bytes

        self.assertEqual(
            hexstr_to_bytes(
                bytes_to_hexstr(b'\x50\x72\x65\x64\x61\x74\x6F\x72')),
            b'\x50\x72\x65\x64\x61\x74\x6F\x72')

        self.assertEqual(
            bytes_to_hexstr(
                hexstr_to_bytes(
                    '06 0E 2B 34 - 02 0B 01 01 – 0E 01 03 01 - 01 00 00 00')),
            '06 0E 2B 34 02 0B 01 01 0E 01 03 01 01 00 00 00')
Beispiel #2
0
class StartDateTime(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 02 01 02 01 01 00 00")
    TAG = 72
    UDSKey = "06 0E 2B 34 01 01 01 01 07 02 01 02 01 01 00 00"
    LDSName = "Start Date Time - UTC"
    UDSName = "Start Date Time - UTC"
    min_length, max_length = 0, 127
Beispiel #3
0
class EventStartTime(DateTimeElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 02 01 02 07 01 00 00")
    TAG = 72
    UDSKey = "06 0E 2B 34 01 01 01 01 07 02 01 02 07 01 00 00"
    LDSName = "Event Start Time - UTC"
    ESDName = "Mission Start Time, Date, and Date of Collection"
    UDSName = "Event Start Date Time - UTC"
Beispiel #4
0
class RVTLocalSet(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 02 01 02 07 01 00 00")
    TAG = 73
    UDSKey = "06 0E 2B 34 01 01 01 01 07 02 01 02 07 01 00 00"
    LDSName = "RVT Local Data Set"
    ESDName = ""
    UDSName = "Remote Video Terminal Local Set"
Beispiel #5
0
class VMTILocalSet(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 02 0B 01 01 0E 01 03 03 06 00 00 00")
    TAG = 74
    UDSKey = "06 0E 2B 34 02 0B 01 01 0E 01 03 03 06 00 00 00"
    LDSName = "VMTI Local Set"
    ESDName = ""
    UDSName = "Video Moving Target Indicator Local Set"
Beispiel #6
0
class MIISCoreIdentifier(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 0E 01 04 05 03 00 00 00")
    TAG = 94
    UDSKey = "06 0E 2B 34 01 01 01 01 0E 01 04 05 03 00 00 00"
    LDSName = "MIIS Core Identifier"
    ESDName = ""
    UDSName = "Motion Imagery Identification System Core"
Beispiel #7
0
class SARMotionImageryLocalSet(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 02 0B 01 01 0E 01 03 03 0D 00 00 00")
    TAG = 95
    UDSKey = "06 0E 2B 34 02 0B 01 01 0E 01 03 03 0D 00 00 00"
    LDSName = "SAR Motion Imagery Local Set"
    ESDName = ""
    UDSName = "SAR Motion Imagery Local Set"
Beispiel #8
0
class ImageCoordinateSystem(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 01 01 00 00 00 00")
    TAG = 12
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 01 01 00 00 00 00"
    LDSName = "Image Coordinate System"
    ESDName = "Image Coordinate System"
    UDSName = "Image Coordinate System"
    min_length, max_length = 0, 127
Beispiel #9
0
class ImageSourceSensor(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 04 20 01 02 01 01 00 00")
    TAG = 11
    UDSKey = "06 0E 2B 34 01 01 01 01 04 20 01 02 01 01 00 00"
    LDSName = "Image Source Sensor"
    ESDName = "Sensor Name"
    UDSName = "Image Source Device"
    min_length, max_length = 0, 127
Beispiel #10
0
class PlatformDesignation(StringElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 01 01 20 01 00 00 00 00")
    TAG = 10
    UDSKey = "06 0E 2B 34 01 01 01 01 01 01 20 01 00 00 00 00"
    LDSName = "Platform Designation"
    ESDName = "Project ID Code"
    UDSName = "Device Designation"
    min_length, max_length = 0, 127
Beispiel #11
0
class PlatformPitchAngle(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 07 07 01 10 01 05 00 00 00")
    TAG = 6
    UDSKey = "06 0E 2B 34 01 01 01 07 07 01 10 01 05 00 00 00"
    LDSName = "Platform Pitch Angle"
    ESDName = "UAV Pitch (INS)"
    UDSName = "Platform Pitch Angle"
    _domain = (-(2**15-1), 2**15-1)
    _range = (-20, 20)
Beispiel #12
0
class PlatformHeadingAngle(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 07 07 01 10 01 06 00 00 00")
    TAG = 5
    UDSKey = "06 0E 2B 34 01 01 01 07 07 01 10 01 06 00 00 00"
    LDSName = "Platform Heading Angle"
    ESDName = "UAV Heading (INS)"
    UDSName = "Platform Heading Angle"
    _domain = (0, 2**16-1)
    _range = (0, 360)
Beispiel #13
0
class TargetWidthExtended(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 09 02 01 00 00 00")
    TAG = 96
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 09 02 01 00 00 00"
    LDSName = "Target Width Extended"
    ESDName = "Target Width"
    UDSName = "Target Width"
    _domain = (0, 2**8-1)
    _range = (0, 2**8-1)
    units = 'meters'
Beispiel #14
0
class SensorLatitude2(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 01 01 01 03 07 01 02 01 02 04 02 00")
    TAG = 13
    UDSKey = "06 0E 01 01 01 03 07 01 02 01 02 04 02 00"
    LDSName = "Sensor Latitude"
    ESDName = "Sensor Latitude"
    UDSName = "Device Latitude"
    _domain = (-(2**63-1), 2**63-1)
    _range = (-90, 90)
    units = 'degrees'
Beispiel #15
0
class SensorLongitude1(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 02 01 02 06 02 00")
    TAG = 14
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 02 01 02 06 02 00"
    LDSName = "Sensor Longitude"
    ESDName = "Sensor Longitude"
    UDSName = "Device Longitude"
    _domain = (-(2**63-1), 2**63-1)
    _range = (-180, 180)
    units = 'degrees'
Beispiel #16
0
class PlatformRollAngleFull(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 07 07 01 10 01 04 00 00 00")
    TAG = 91
    UDSKey = "06 0E 2B 34 01 01 01 07 07 01 10 01 04 00 00 00"
    LDSName = "Platform Roll Angle (Full)"
    ESDName = "UAV Roll (INS)"
    UDSName = "Platform Roll Angle"
    _domain = (-(2**31-1), 2**31-1)
    _range = (-90, 90)
    units = 'degrees'
Beispiel #17
0
class CornerLongitudePoint4Full(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 03 07 01 02 01 03 0E 01 00")
    TAG = 89
    UDSKey = "06 0E 2B 34 01 01 01 03 07 01 02 01 03 0E 01 00"
    LDSName = "Corner Longitude Point 4 (Full)"
    ESDName = "SAR Longitude 3"
    UDSName = "Corner Longitude Point 4 (Decimal Degrees)"
    _domain = (-(2**31 - 1), 2**31 - 1)
    _range = (-180, 180)
    units = 'degrees'
Beispiel #18
0
class TargetWidth(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 09 02 01 00 00 00")
    TAG = 22
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 09 02 01 00 00 00"
    LDSName = "Target Width"
    ESDName = "Target Width"
    UDSName = "Target Width"
    _domain = (0, 2**16-1)
    _range = (0, +10e3)
    units = 'meters'
Beispiel #19
0
class SensorHorizontalFieldOfView(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 02 04 20 02 01 01 08 00 00")
    TAG = 16
    UDSKey = "06 0E 2B 34 01 01 01 02 04 20 02 01 01 08 00 00"
    LDSName = "Sensor Horizontal Field of View"
    ESDName = "Field of View"
    UDSName = "Field of View (FOVHorizontal)"
    _domain = (0, 2**16-1)
    _range = (0, 180)
    units = 'degrees'
Beispiel #20
0
class SensorRelativeAzimuthAngle(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0e 2b 34 01 01 01 01 07 01 10 01 02 00 00 00")
    TAG = 18
    UDSKey = "06 0e 2b 34 01 01 01 01 07 01 10 01 02 00 00 00"
    LDSName = "Sensor Relative Azimuth Angle"
    ESDName = "Sensor Relative Azimuth Angle"
    UDSName = ""
    _domain = (0, 2 ** 32 - 1)
    _range = (0, 360)
    units = 'degrees'
Beispiel #21
0
class SensorVerticalFieldOfView(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0e 2b 34 01 01 01 07 04 20 02 01 01 0a 01 00")
    TAG = 17
    UDSKey = "06 0e 2b 34 01 01 01 07 04 20 02 01 01 0a 01 00"
    LDSName = "Sensor Vertical Field of View"
    ESDName = "Vertical Field of View"
    UDSName = ""
    _domain = (0, 2 ** 16 - 1)
    _range = (0, 180)
    units = 'degrees'
Beispiel #22
0
class SensorRelativeElevationAngle(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0e 2b 34 01 01 01 01 07 01 10 01 03 00 00 00")
    TAG = 19
    UDSKey = "06 0e 2b 34 01 01 01 01 07 01 10 01 03 00 00 00"
    LDSName = "Sensor Relative Elevation Angle"
    ESDName = "Sensor Relative Elevation Angle"
    UDSName = ""
    _domain = (-(2 ** 31 - 1), 2 ** 31 - 1)
    _range = (-180, 180)
    units = 'degrees'
Beispiel #23
0
class OffsetCornerLatitudePoint1(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 03 07 01 02 01 03 07 01 00")
    TAG = 26
    UDSKey = "06 0E 2B 34 01 01 01 03 07 01 02 01 03 07 01 00"
    LDSName = "Offset Corner Latitude Point 1"
    ESDName = "SAR Latitude 4"
    UDSName = "Corner Latitude Point 1"
    _domain = (-(2**15 - 1), 2**15 - 1)
    _range = (-0.075, +0.075)
    units = 'degrees'
Beispiel #24
0
class FrameCenterLongitude(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 02 01 03 04 00 00")
    TAG = 24
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 02 01 03 04 00 00"
    LDSName = "Frame Center Longitude"
    ESDName = "Target Longitude"
    UDSName = "Frame Center Longitude"
    _domain = (-(2**31 - 1), 2**31 - 1)
    _range = (-180, 180)
    units = 'degrees'
Beispiel #25
0
class DensityAltitudeExtended(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 0E 01 01 01 10 00 00 00")
    TAG = 103
    UDSKey = "06 0E 2B 34 01 01 01 01 0E 01 01 01 10 00 00 00"
    LDSName = "Density Altitude Extended"
    ESDName = "Density Altitude"
    UDSName = ""
    _domain = (0, 2**16-1)
    _range = (-900, 40000)
    units = 'meters'
Beispiel #26
0
class SensorTrueAltitude(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 02 01 02 02 00 00")
    TAG = 15
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 02 01 02 02 00 00"
    LDSName = "Sensor True Altitude"
    ESDName = "Sensor Altitude"
    UDSName = "Device Altitude"
    _domain = (0, 2**16-1)
    _range = (-99999, 99999)
    units = 'meters'
Beispiel #27
0
class AlternatePlatformEllipsoidHeightExtended(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 0E 01 02 01 82 48 00 00")
    TAG = 105
    UDSKey = "06 0E 2B 34 01 01 01 01 0E 01 02 01 82 48 00 00"
    LDSName = " Alternate Platform Ellipsoid Height Extended"
    ESDName = ""
    UDSName = ""
    _domain = (0, 2**16-1)
    _range = (-900, 40000)
    units = 'meters'
Beispiel #28
0
class CornerLatitudePoint3Full(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 03 07 01 02 01 03 09 01 00")
    TAG = 86
    UDSKey = "06 0E 2B 34 01 01 01 03 07 01 02 01 03 09 01 00"
    LDSName = "Corner Latitude Point 3 (Full)"
    ESDName = "SAR Latitude 2"
    UDSName = "Corner Latitude Point 3 (Decimal Degrees)"
    _domain = (-(2**31 - 1), 2**31 - 1)
    _range = (-90, 90)
    units = 'degrees'
Beispiel #29
0
class OffsetCornerLongitudePoint4(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 03 07 01 02 01 03 0E 01 00")
    TAG = 33
    UDSKey = "06 0E 2B 34 01 01 01 03 07 01 02 01 03 0E 01 00"
    LDSName = "Offset Corner Longitude Point 4"
    ESDName = "SAR Longitude 3"
    UDSName = "Corner Longitude Point 4"
    _domain = (-(2**15 - 1), 2**15 - 1)
    _range = (-0.075, 0.075)
    units = 'degrees'
Beispiel #30
0
class SlantRange(IEEE754ElementParser):
    key = hexstr_to_bytes("06 0E 2B 34 01 01 01 01 07 01 08 01 01 00 00 00")
    TAG = 21
    UDSKey = "06 0E 2B 34 01 01 01 01 07 01 08 01 01 00 00 00"
    LDSName = "Slant Range"
    ESDName = "Slant Range"
    UDSName = "Slant Range"
    _domain = (0, 2**32-1)
    _range = (0, +5e6)
    units = 'meters'