# Section/Subsection Descriptive Dict
section_description_def = {  # https://github.com/jgillmanjr/parseCifp/blob/master/sections.pl
    'A': {
        'S': 'MORA - Grid MORA',
    },
    'D': {
        '': 'Navaid - VHF Navaid',
        'B': 'Navaid - NDB Navaid',
    },
    'E': {
        'A': 'Enroute - Grid Waypoints',
        'M': 'Enroute - Airway Markers',
        'P': 'Enroute - Holding Patterns',
        'R': 'Enroute - Airways and Routes',
        'T': 'Enroute - Preferred Routes',
        'U': 'Enroute - Airway Restrictions',
        'V': 'Enroute - Airway Restrictions',
    },
    'H': {
        'A': 'Heliport - Pads',
        'C': 'Heliport - Terminal Waypoints',
        'D': 'Heliport - SIDs',
        'E': 'Heliport - STARs',
        'F': 'Heliport - Approach Procedures',
        'K': 'Heliport - TAA',
        'S': 'Heliport - MSA',
        'V': 'Heliport - Communications',
    },
    'P': {
        'A': 'Airport - Reference Points',
        'B': 'Airport - Gates',
        'C': 'Airport - Terminal Waypoints',
        'D': 'Airport - SIDs',
        'E': 'Airport - STARs',
        'F': 'Airport - Approach Procedures',
        'G': 'Airport - Runways',
        'I': 'Airport - Localizer/Glide Slope',
        'K': 'Airport - TAA',
        'L': 'Airport - MLS',
        'M': 'Airport - Localizer Marker',
        'N': 'Airport - Terminal NDB',
        'P': 'Airport - Path Point',
        'R': 'Airport - Flt Planning ARR/DEP',
        'S': 'Airport - MSA',
        'T': 'Airport - GLS Station',
        'V': 'Airport - Communications',
    },
    'R': {
        '': 'Company Routes - Company Routes',
        'A': 'Company Routes - Alternate Records',

    },
    'T': {
        'C': 'Tables - Cruising Tables',
        'G': 'Tables - Geographical Reference',
        'N': 'Tables - RNAV Name Table',
    },
    'U': {
        'C': 'Airspace - Controlled Airspace',
        'F': 'Airspace - FIR/UIR',
        'R': 'Airspace - Restrictive Airspace',
    }
}

# Parser definitions and the sort
bootstrap_def = [  # https://github.com/jgillmanjr/parseCifp/blob/master/parseCifp.pl (Line 96)
    ('RecordType', 1),
    ('CustomerAreaCode', 3),
    ('SectionCode', 1),
    ('SubSectionCode', 1),
    ('Remainder', 126)
]

air_heliport_def = [  # https://github.com/jgillmanjr/parseCifp/blob/master/parseCifp.pl (Line 10)
    ('RecordType', 1),
    ('CustomerAreaCode', 3),
    ('SectionCode', 1),
    ('BlankSpacing', 1),
    ('AirportICAOIdentifier', 4),
    ('ICAOCode', 2),
    ('SubSectionCode', 1),
    ('Remainder', 119)
]

main_parser_def = {  # https://github.com/jgillmanjr/parseCifp/blob/master/parsers.pl
    'A': {
        'S': [
            ('RecordType', 1),
            ('BlankSpacing', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('BlankSpacing', 7),
            ('StartingLatitude', 3),
            ('StartingLongitude', 4),
            ('BlankSpacing', 10),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('MORA', 3),
            ('ReservedExpansion', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    },
    'D': {
        '': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('BlankSpacing', 1),
            ('VORIdentifier', 4),
            ('BlankSpacing', 2),
            ('VorIcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('VORFrequency', 5),
            ('NAVAIDClass', 5),
            ('VORLatitude', 9),
            ('VORLongitude', 10),
            ('DMEIdent', 4),
            ('DMELatitude', 9),
            ('DMELongitude', 10),
            ('StationDeclination', 5),
            ('DMEElevation', 5),
            ('FigureofMerit', 1),
            ('ILSDMEBias', 2),
            ('FrequencyProtection', 3),
            ('DatumCode', 3),
            ('VORName', 30),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'B': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('BlankSpacing', 1),
            ('NDBIdentifier', 4),
            ('BlankSpacing', 2),
            ('NdbIcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('NDBFrequency', 5),
            ('NDBClass', 5),
            ('NDBLatitude', 9),
            ('NDBLongitude', 10),
            ('BlankSpacing', 23),
            ('MagneticVariation', 5),
            ('BlankSpacing', 6),
            ('ReservedExpansion', 5),
            ('DatumCode', 3),
            ('NDBName', 30),
            ('FileRecordNumber', 5),
            ('CycleData', 4)
        ]
    },
    'E': {
        'A': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('RegionCode', 4),
            ('IcaoRegionCode', 2),
            ('BlankSubSectionCode', 1),
            ('WaypointIdentifier', 5),
            ('BlankSpacing', 1),
            ('WaypointIcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('BlankSpacing', 4),
            ('WaypointType', 3),
            ('WaypointUsage', 2),
            ('BlankSpacing', 1),
            ('WaypointLatitude', 9),
            ('WaypointLongitude', 10),
            ('BlankSpacing', 23),
            ('DynamicMagVariation', 5),
            ('ReservedExpansion', 5),
            ('DatumCode', 3),
            ('ReservedExpansion', 8),
            ('NameFormatIndicator', 3),
            ('WaypointNameDescription', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'M': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('BlankSpacing', 7),
            ('MarkerIdentifier', 4),
            ('BlankSpacing', 2),
            ('IcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('MarkerCode', 4),
            ('ReservedExpansion', 1),
            ('MarkerShape', 1),
            ('MarkerPower', 1),
            ('BlankSpacing', 3),
            ('MarkerLatitude', 9),
            ('MarkerLongitude', 10),
            ('MinorAxis', 4),
            ('BlankSpacing', 19),
            ('MagneticVariation', 5),
            ('FacilityElevation', 5),
            ('DatumCode', 3),
            ('BlankSpacing', 6),
            ('MarkerName', 30),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'P': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('RegionCode', 4),
            ('IcaoRegionCode', 2),
            ('BlankSpacing', 15),
            ('DuplicateIdentifier', 2),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('InboundHoldingCourse', 4),
            ('TurnDirection', 1),
            ('LegLength', 3),
            ('LegTime', 2),
            ('MinimumAltitude', 5),
            ('MaximumAltitude', 5),
            ('HoldingSpeed', 3),
            ('RNP', 3),
            ('ArcRadius', 6),
            ('ReservedExpansion', 27),
            ('Name', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'R': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('BlankSpacing', 7),
            ('RouteIdentifier', 5),
            ('Reserved', 1),
            ('BlankSpacing', 6),
            ('SequenceNumber', 4),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('BoundaryCode', 1),
            ('RouteType', 1),
            ('Level', 1),
            ('DirectionRestriction', 1),
            ('CruiseTableIndicator', 2),
            ('EUIndicator', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('RNP', 3),
            ('BlankSpacing', 3),
            ('Theta', 4),
            ('Rho', 4),
            ('OutboundMagneticCourse', 4),
            ('RouteDistanceFrom', 4),
            ('InboundMagneticCourse', 4),
            ('BlankSpacing', 1),
            ('MinimumAltitude', 5),
            ('MinimumAltitude', 5),
            ('MaximumAltitude', 5),
            ('FixRadiusTransitionIndicator', 3),
            ('ReservedExpansion', 22),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'T': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('BlankSpacing', 7),
            ('RouteIdentifier', 10),
            ('PreferredRouteUseInd', 2),
            ('SequenceNumber', 4),
            ('BlankSpacing', 9),
            ('ContinuationRecordNumber', 1),
            ('ToFixIdentifier', 5),
            ('ToFixIcaoRegionCode', 2),
            ('ToFixSectionCode', 1),
            ('ToFixSubSectionCode', 1),
            ('VIACode', 3),
            ('SIDSTARAWYIdent', 6),
            ('AREACode', 3),
            ('Level', 1),
            ('RouteType', 1),
            ('InitialAirportFix', 5),
            ('InitialAirportFixIcaoRegionCode', 2),
            ('InitialAirportFixSectionCode', 1),
            ('InitialAirportFixSubSectionCode', 1),
            ('TerminusAirportFix', 5),
            ('TerminusAirportFixIcaoRegionCode', 2),
            ('TerminusAirportFixSectionCode', 1),
            ('TerminusAirportFixSubSectionCode', 1),
            ('MinimumAltitude', 5),
            ('MaximumAltitude', 5),
            ('TimeCode', 1),
            ('AircraftUseGroup', 2),
            ('DirectionRestriction', 1),
            ('AltitudeDescription', 1),
            ('AltitudeOne', 5),
            ('AltitudeTwo', 5),
            ('ReservedExpansion', 18),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'U': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('RouteIdentifier', 5),
            ('Reserved', 1),
            ('RestrictionIdentifier', 3),
            ('RestrictionType', 2),
            ('ContinuationRecordNumber', 1),
            ('StartFixIdentifier', 5),
            ('StartFixIcaoRegionCode', 2),
            ('StartFixSectionCode', 1),
            ('StartFixSubSectionCode', 1),
            ('EndFixIdentifier', 5),
            ('EndFixIcaoRegionCode', 2),
            ('EndFixSectionCode', 1),
            ('EndFixSubSectionCode', 1),
            ('BlankSpacing', 1),
            ('StartDate', 7),
            ('EndDate', 7),
            ('TimeCode', 1),
            ('TimeIndicator', 1),
            ('TimeofOperation', 10),
            ('TimeofOperation', 10),
            ('TimeofOperation', 10),
            ('TimeofOperation', 10),
            ('ExclusionIndicator', 1),
            ('UnitsOfAltitude', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('RestrictionAltitude', 3),
            ('BlockIndicator', 1),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'V': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('FIRRDOIdent', 4),
            ('FIRUIRAddress', 4),
            ('Indicator', 1),
            ('ReservedExpansion', 3),
            ('RemoteName', 25),
            ('CommunicationsType', 3),
            ('CommFrequency', 7),
            ('GuardTransmit', 1),
            ('FrequencyUnits', 1),
            ('ContinuationRecordNumber', 1),
            ('ServiceIndicator', 3),
            ('RadarService', 1),
            ('Modulation', 1),
            ('SignalEmission', 1),
            ('Latitude', 9),
            ('Longitude', 10),
            ('MagneticVariation', 5),
            ('FacilityElevation', 5),
            ('H24Indicator', 1),
            ('AltitudeDescript', 1),
            ('CommunicationAltitude', 5),
            ('CommunicationAltitude', 5),
            ('RemoteFacility', 4),
            ('RemoteFacilityIcaoRegionCode', 2),
            ('RemoteFacilitySectionCode', 1),
            ('RemoteFacilitySubSectionCode', 1),
            ('ReservedExpansion', 12),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    },
    'H': {
        'A': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('ATAIATADesignator', 3),
            ('PADIdentifier', 5),
            ('ContinuationRecordNumber', 1),
            ('SpeedLimitAltitude', 5),
            ('DatumCode', 3),
            ('IFRIndicator', 1),
            ('BlankSpacing', 1),
            ('Latitude', 9),
            ('Longitude', 10),
            ('MagneticVariation', 5),
            ('HeliportElevation', 5),
            ('SpeedLimit', 3),
            ('RecommendedVHFNavaid', 4),
            ('RecommendedVHFNavaidIcaoRegionCode', 2),
            ('TransitionAltitude', 5),
            ('TransitionLevel', 5),
            ('PublicMilitaryIndicator', 1),
            ('TimeZone', 3),
            ('DaylightIndicator', 1),
            ('PadDimensions', 6),
            ('MagneticTrueIndicator', 1),
            ('ReservedExpansion', 1),
            ('HeliportName', 30),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'C': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('WaypointIdentifier', 5),
            ('BlankSpacing', 1),
            ('WaypointIcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('BlankSpacing', 4),
            ('WaypointType', 3),
            ('WaypointUsage', 2),
            ('BlankSpacing', 1),
            ('WaypointLatitude', 9),
            ('WaypointLongitude', 10),
            ('BlankSpacing', 23),
            ('DynamicMagneticVariation', 5),
            ('ReservedExpansion', 5),
            ('DatumCode', 3),
            ('ReservedExpansion', 8),
            ('NameFormatIndicator', 3),
            ('WaypointNameDescription', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'D': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARAPPIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('TurnDirection', 1),
            ('RNP', 3),
            ('PathAndTermination', 2),
            ('TurnDirectionValid', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('ARCRadius', 6),
            ('Theta', 4),
            ('Rho', 4),
            ('MagneticCourse', 4),
            ('RouteDistanceHoldingDistanceOrTime', 4),
            ('RecommendedNavaidSection', 1),
            ('RecommendedNavaidSubSection', 1),
            ('ReservedSpacing', 2),
            ('AltitudeDescription', 1),
            ('ATCIndicator', 1),
            ('Altitude', 5),
            ('Altitude', 5),
            ('TransitionAltitude', 5),
            ('SpeedLimit', 3),
            ('VerticalAngle', 4),
            ('CenterFixOrTAAProcedureTurnIndicator', 5),
            ('MultipleCodeOrTAASectorIdentifier', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorIcaoRegionCode', 2),
            ('CenterFixOrTAAProcedureTurnIndicatorSectionCode', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorSubSectionCode', 1),
            ('GNSSFMSIndicator', 1),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'E': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARAPPIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('TurnDirection', 1),
            ('RNP', 3),
            ('PathAndTermination', 2),
            ('TurnDirectionValid', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('ARCRadius', 6),
            ('Theta', 4),
            ('Rho', 4),
            ('MagneticCourse', 4),
            ('RouteDistanceHoldingDistanceOrTime', 4),
            ('RecommendedNavaidSection', 1),
            ('RecommendedNavaidSubSection', 1),
            ('ReservedSpacing', 2),
            ('AltitudeDescription', 1),
            ('ATCIndicator', 1),
            ('Altitude', 5),
            ('Altitude', 5),
            ('TransitionAltitude', 5),
            ('SpeedLimit', 3),
            ('VerticalAngle', 4),
            ('CenterFixOrTAAProcedureTurnIndicator', 5),
            ('MultipleCodeOrTAASectorIdentifier', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorIcaoRegionCode', 2),
            ('CenterFixOrTAAProcedureTurnIndicatorSectionCode', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorSubSectionCode', 1),
            ('GNSSFMSIndicator', 1),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'F': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARAPPIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('TurnDirection', 1),
            ('RNP', 3),
            ('PathAndTermination', 2),
            ('TurnDirectionValid', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('ARCRadius', 6),
            ('Theta', 4),
            ('Rho', 4),
            ('MagneticCourse', 4),
            ('RouteDistanceHoldingDistanceOrTime', 4),
            ('RecommendedNavaidSection', 1),
            ('RecommendedNavaidSubSection', 1),
            ('ReservedSpacing', 2),
            ('AltitudeDescription', 1),
            ('ATCIndicator', 1),
            ('Altitude', 5),
            ('Altitude', 5),
            ('TransitionAltitude', 5),
            ('SpeedLimit', 3),
            ('VerticalAngle', 4),
            ('CenterFixOrTAAProcedureTurnIndicator', 5),
            ('MultipleCodeOrTAASectorIdentifier', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorIcaoRegionCode', 2),
            ('CenterFixOrTAAProcedureTurnIndicatorSectionCode', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorSubSectionCode', 1),
            ('GNSSFMSIndicator', 1),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'K': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('ApproachIdentifier', 6),
            ('TAASectorIdentifier', 1),
            ('TAAProcedureTurn', 4),
            ('BlankReserved', 5),
            ('TAAIAFWaypoint', 5),
            ('TAAIAFWaypointIcaoRegionCode', 2),
            ('TAAIAFWaypointSectionCode', 1),
            ('TAAIAFWaypointSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('Reserved', 1),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('BlankSpacing', 4),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'S': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('MSACenter', 5),
            ('MSACenterIcaoRegionCode', 2),
            ('MSACenterSectionCode', 1),
            ('MSACenterSubSectionCode', 1),
            ('MultipleCode', 1),
            ('ReservedExpansion', 15),
            ('ContinuationRecordNumber', 1),
            ('ReservedSpacing', 3),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('MagneticTrueIndicator', 1),
            ('ReservedExpansion', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'V': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('CommunicationsType', 3),
            ('CommunicationsFreq', 7),
            ('GuardTransmit', 1),
            ('FrequencyUnits', 1),
            ('ContinuationRecordNumber', 1),
            ('ServiceIndicator', 3),
            ('RadarService', 1),
            ('Modulation', 1),
            ('SignalEmission', 1),
            ('Latitude', 9),
            ('Longitude', 10),
            ('MagneticVariation', 5),
            ('FacilityElevation', 5),
            ('H24Indicator', 1),
            ('Sectorization', 6),
            ('AltitudeDescription', 1),
            ('CommunicationAltitude', 5),
            ('CommunicationAltitude', 5),
            ('SectorFacility', 4),
            ('SectorFacilityIcaoRegionCode', 2),
            ('SectorFacilitySectionCode', 1),
            ('SectorFacilitySubSectionCode', 1),
            ('DistanceDescription', 1),
            ('CommunicationsDistance', 2),
            ('RemoteFacility', 4),
            ('RemoteFacilityIcaoRegionCode', 2),
            ('RemoteFacilitySectionCode', 1),
            ('RemoteFacilitySubSectionCode', 1),
            ('CallSign', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    },
    'P': {
        'A': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('ATAIATADesignator', 3),
            ('ReservedExpansion', 2),
            ('BlankSpacing', 3),
            ('ContinuationRecordNumber', 1),
            ('SpeedLimitAltitude', 5),
            ('LongestRunway', 3),
            ('IFRCapability', 1),
            ('LongestRunwaySurfaceCode', 1),
            ('AirportReferencePtLatitude', 9),
            ('AirportReferencePtLongitude', 10),
            ('MagneticVariation', 5),
            ('AirportElevation', 5),
            ('SpeedLimit', 3),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('TransitionsAltitude', 5),
            ('TransitionLevel', 5),
            ('PublicMilitaryIndicator', 1),
            ('TimeZone', 3),
            ('DaylightIndicator', 1),
            ('MagneticTrueIndicator', 1),
            ('DatumCode', 3),
            ('ReservedExpansion', 4),
            ('AirportName', 30),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'B': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('GateIdentifier', 5),
            ('BlankSpacing', 3),
            ('ContinuationRecordNumber', 1),
            ('BlankSpacing', 10),
            ('GateLatitude', 9),
            ('GateLongitude', 10),
            ('ReservedExpansion', 47),
            ('Name', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'C': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('RegionCode', 4),
            ('IcaoRegionCode', 2),
            ('SubSection', 1),
            ('WaypointIdentifier', 5),
            ('BlankSpacing', 1),
            ('WaypointIcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('BlankSpacing', 4),
            ('WaypointType', 3),
            ('WaypointUsage', 2),
            ('BlankSpacing', 1),
            ('WaypointLatitude', 9),
            ('WaypointLongitude', 10),
            ('BlankSpacing', 23),
            ('DynamicMagVariation', 5),
            ('ReservedExpansion', 5),
            ('DatumCode', 3),
            ('ReservedExpansion', 8),
            ('NameFormatIndicator', 3),
            ('WaypointNameDescription', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'D': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARApproachIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('TurnDirection', 1),
            ('RNP', 3),
            ('PathAndTermination', 2),
            ('TurnDirectionValid', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('ARCRadius', 6),
            ('Theta', 4),
            ('Rho', 4),
            ('MagneticCourse', 4),
            ('RouteDistanceHoldingDistanceOrTime', 4),
            ('RecommendedNAVAIDSection', 1),
            ('RecommendedNAVAIDSubSection', 1),
            ('Reservedexpansion', 2),
            ('AltitudeDescription', 1),
            ('ATCIndicator', 1),
            ('Altitude', 5),
            ('Altitude', 5),
            ('TransitionAltitude', 5),
            ('SpeedLimit', 3),
            ('VerticalAngle', 4),
            ('CenterFixOrTAAProcedureTurnIndicator', 5),
            ('MultipleCodeOrTAASectorIdentifier', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorIcaoRegionCode', 2),
            ('CenterFixOrTAAProcedureTurnIndicatorSectionCode', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorSubSectionCode', 1),
            ('GNSSFMSIndication', 1),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'E': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARApproachIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('TurnDirection', 1),
            ('RNP', 3),
            ('PathAndTermination', 2),
            ('TurnDirectionValid', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('ARCRadius', 6),
            ('Theta', 4),
            ('Rho', 4),
            ('MagneticCourse', 4),
            ('RouteDistanceHoldingDistanceOrTime', 4),
            ('RecommendedNavaidSection', 1),
            ('RecommendedNavaidSubSection', 1),
            ('Reservedexpansion', 2),
            ('AltitudeDescription', 1),
            ('ATCIndicator', 1),
            ('Altitude', 5),
            ('Altitude', 5),
            ('TransitionAltitude', 5),
            ('SpeedLimit', 3),
            ('VerticalAngle', 4),
            ('CenterFixOrTAAProcedureTurnIndicator', 5),
            ('MultipleCodeOrTAASectorIdentifier', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorIcaoRegionCode', 2),
            ('CenterFixOrTAAProcedureTurnIndicatorSectionCode', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorSubSectionCode', 1),
            ('GNSSFMSIndication', 1),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'F': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARApproachIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('FixIcaoRegionCode', 2),
            ('FixSectionCode', 1),
            ('FixSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('TurnDirection', 1),
            ('RNP', 3),
            ('PathAndTermination', 2),
            ('TurnDirectionValid', 1),
            ('RecommendedNavaid', 4),
            ('RecommendedNavaidIcaoRegionCode', 2),
            ('ARCRadius', 6),
            ('Theta', 4),
            ('Rho', 4),
            ('MagneticCourse', 4),
            ('RouteDistanceHoldingDistanceOrTime', 4),
            ('RecommendedNavaidSection', 1),
            ('RecommendedNavaidSubSection', 1),
            ('Reservedexpansion', 2),
            ('AltitudeDescription', 1),
            ('ATCIndicator', 1),
            ('Altitude', 5),
            ('Altitude', 5),
            ('TransitionAltitude', 5),
            ('SpeedLimit', 3),
            ('VerticalAngle', 4),
            ('CenterFixOrTAAProcedureTurnIndicator', 5),
            ('MultipleCodeOrTAASectorIdentifier', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorIcaoRegionCode', 2),
            ('CenterFixOrTAAProcedureTurnIndicatorSectionCode', 1),
            ('CenterFixOrTAAProcedureTurnIndicatorSubSectionCode', 1),
            ('GNSSFMSIndication', 1),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'G': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('RunwayIdentifier', 5),
            ('BlankSpacing', 3),
            ('ContinuationRecordNumber', 1),
            ('RunwayLength', 5),
            ('RunwayMagneticBearing', 4),
            ('BlankSpacing', 1),
            ('RunwayLatitude', 9),
            ('RunwayLongitude', 10),
            ('RunwayGradient', 5),
            ('BlankSpacing', 4),
            ('LTPEllipsoidHeight', 6),
            ('LandingThresholdElevation', 5),
            ('DisplacedThresholdDistance', 4),
            ('ThresholdCrossingHeight', 2),
            ('RunwayWidth', 3),
            ('TCHValueIndicator', 1),
            ('LocalizerMLSGLSRefPathIdentifier', 4),
            ('LocalizerMLSGLSCategoryClass', 1),
            ('Stopway', 4),
            ('SecondLocalizerMLSGLSRefPathIdent', 4),
            ('SecondLocalizerMLSGLSCategoryClass', 1),
            ('ReservedExpansion', 6),
            ('RunwayDescription', 22),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'I': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('LocalizerIdentifier', 4),
            ('ILSCategory', 1),
            ('BlankSpacing', 3),
            ('ContinuationRecordNumber', 1),
            ('LocalizerFrequency', 5),
            ('RunwayIdentifier', 5),
            ('LocalizerLatitude', 9),
            ('LocalizerLongitude', 10),
            ('LocalizerBearing', 4),
            ('GlideSlopeLatitude', 9),
            ('GlideSlopeLongitude', 10),
            ('LocalizerPosition', 4),
            ('LocalizerPositionReference', 1),
            ('GlideSlopePosition', 4),
            ('LocalizerWidth', 4),
            ('GlideSlopeAngle', 3),
            ('StationDeclination', 5),
            ('GlideSlopeHeightatLandingThreshold', 2),
            ('GlideSlopeElevation', 5),
            ('SupportingFacilityID', 4),
            ('SupportingFacilityIcaoRegionCode', 2),
            ('SupportingFacilitySectionCode', 1),
            ('SupportingFacilitySubSectionCode', 1),
            ('ReservedExpansion', 13),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'K': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('ApproachIdentifier', 6),
            ('TAASectorIdentifier', 1),
            ('TAAProcedureTurn', 4),
            ('BlankReserved', 5),
            ('TAAIAFWaypoint', 5),
            ('TAAIAFWaypointIcaoRegionCode', 2),
            ('TAAIAFWaypointSectionCode', 1),
            ('TAAIAFWaypointSubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('Reserved', 1),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('SectorBearing', 6),
            ('SectorMinimumAltitude', 3),
            ('BlankSpacing', 4),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'L': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('MLSIdentifier', 4),
            ('MLSCategory', 1),
            ('BlankSpacing', 3),
            ('ContinuationRecordNumber', 1),
            ('Channel', 3),
            ('BlankSpacing', 2),
            ('RunwayIdentifier', 5),
            ('AzimuthLatitude', 9),
            ('AzimuthLongitude', 10),
            ('AzimuthBearing', 4),
            ('ElevationLatitude', 9),
            ('ElevationLongitude', 10),
            ('AzimuthPosition', 4),
            ('AzimuthPositionReference', 1),
            ('ElevationPosition', 4),
            ('AzimuthProportionalAngleRight', 3),
            ('AzimuthProportionalAngleLeft', 3),
            ('AzimuthCoverageRight', 3),
            ('AzimuthCoverageLeft', 3),
            ('ElevationAngleSpan', 3),
            ('MagneticVariation', 5),
            ('ELElevation', 5),
            ('NominalElevationAngle', 4),
            ('MinimumGlidePathAngle', 3),
            ('SupportingFacilityIdentifier', 4),
            ('SupportingFacilityIcaoRegionCode', 2),
            ('SupportingFacilitySectionCode', 1),
            ('SupportingFacilitySubSectionCode', 1),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'M': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('LocalizerIdentifier', 4),
            ('MarkerType', 3),
            ('BlankSpacing', 1),
            ('ContinuationRecordNumber', 1),
            ('LocatorFrequency', 5),
            ('RunwayIdentifier', 5),
            ('MarkerLatitude', 9),
            ('MarkerLongitude', 10),
            ('MinorAxisBearing', 4),
            ('LocatorLatitude', 9),
            ('LocatorLongitude', 10),
            ('LocatorClass', 5),
            ('LocatorFacilityCharacteristics', 5),
            ('LocatorIdentifier', 4),
            ('BlankSpacing', 2),
            ('MagneticVariation', 5),
            ('BlankSpacing', 2),
            ('FacilityElevation', 5),
            ('ReservedExpansion', 21),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'N': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('BlankSpacing', 1),
            ('NDBIdentifier', 4),
            ('BlankSpacing', 2),
            ('NdbIcaoRegionCode', 2),
            ('ContinuationRecordNumber', 1),
            ('NDBFrequency', 5),
            ('NDBClass', 5),
            ('NDBLatitude', 9),
            ('NDBLongitude', 10),
            ('BlankSpacing', 23),
            ('MagneticVariation', 5),
            ('BlankSpacing', 6),
            ('ReservedExpansion', 5),
            ('DatumCode', 3),
            ('NDBName', 30),
            ('FileRecordNumber', 5),
            ('CycleData', 4)
        ],
        'P': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('ApproachProcedureIdent', 6),
            ('RunwayOrHelipadIdentifier', 5),
            ('OperationType', 2),
            ('ContinuationRecordNumber', 1),
            ('RouteIndicator', 1),
            ('SBASServiceProviderIdentifier', 2),
            ('ReferencePathDataSelector', 2),
            ('ReferencePathIdentifier', 4),
            ('ApproachPerformanceDesignator', 1),
            ('LandingThresholdPointLatitude', 11),
            ('LandingThresholdPointLongitude', 12),
            ('LTPEllipsoidHeight', 6),
            ('GlidePathAngle', 4),
            ('FlightPathAlignmentPointLatitude', 11),
            ('FlightPathAlignmentPointLongitude', 12),
            ('CourseWidthatThreshold', 5),
            ('LengthOffset', 4),
            ('PathPointTCH', 6),
            ('TCHUnitsIndicator', 1),
            ('HAL', 3),
            ('VAL', 3),
            ('SBASFASDataCRCRemainder', 8),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'R': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARApproachIdentifier', 6),
            ('ProcedureType', 1),
            ('RunwayTransitionIdentifier', 5),
            ('RunwayTransitionFix', 5),
            ('RunwayTransitionFixIcaoRegionCode', 2),
            ('RunwayTransitionFixSectionCode', 1),
            ('RunwayTransitionFixSubSectionCode', 1),
            ('Distance', 3),
            ('CommonSegmentTransitionFix', 5),
            ('CommonSegmentTransitionFixIcaoRegionCode', 2),
            ('CommonSegmentTransitionFixSectionCode', 1),
            ('CommonSegmentTransitionFixSubSectionCode', 1),
            ('Distance', 3),
            ('EnrouteTransitionIdentifier', 5),
            ('EnrouteTransitionFix', 5),
            ('EnrouteTransitionFixIcaoRegionCode', 2),
            ('EnrouteTransitionFixSectionCode', 1),
            ('EnrouteTransitionFixSubSectionCode', 1),
            ('Distance', 3),
            ('SequenceNumber', 3),
            ('ContinuationRecordNumber', 1),
            ('NumberofEngines', 4),
            ('TurbopropJetIndicator', 1),
            ('RNAVFlag', 1),
            ('ATCWeightCategory', 1),
            ('ATCIdentifier', 7),
            ('TimeCode', 1),
            ('ProcedureDescription', 15),
            ('LegTypeCode', 2),
            ('ReportingCode', 1),
            ('InitialDepartureMagneticCourse', 4),
            ('AltitudeDescription', 1),
            ('Altitude', 3),
            ('Altitude', 3),
            ('SpeedLimit', 3),
            ('InitialCruiseTable', 2),
            ('SpeedLimitDescription', 1),
            ('BlankSpacing', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'S': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('MSACenter', 5),
            ('MSACenterIcaoRegionCode', 2),
            ('MSACenterSectionCode', 1),
            ('MSACenterSubSectionCode', 1),
            ('MultipleCode', 1),
            ('ReservedExpansion', 15),
            ('ContinuationRecordNumber', 1),
            ('ReservedSpacing', 3),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('SectorBearing', 6),
            ('SectorAltitude', 3),
            ('SectorRadius', 2),
            ('MagneticTrueIndicator', 1),
            ('ReservedExpansion', 3),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'T': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('GLSRefPathIdentifier', 4),
            ('GLSCategory', 1),
            ('BlankSpacing', 3),
            ('ContinuationRecordNumber', 1),
            ('GLSChannel', 5),
            ('RunwayIdentifier', 5),
            ('BlankSpacing', 19),
            ('GLSApproachBearing', 4),
            ('StationLatitude', 9),
            ('StationLongitude', 10),
            ('GLSStationident', 4),
            ('BlankSpacing', 5),
            ('ServiceVolumeRadius', 2),
            ('TDMASlots', 2),
            ('GLSApproachSlope', 3),
            ('MagneticVariation', 5),
            ('Reserved', 2),
            ('StationElevation', 5),
            ('DatumCode', 3),
            ('StationType', 3),
            ('BlankSpacing', 2),
            ('BlankSpacing', 8),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'V': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('LandingFacilityIcaoIdentifier', 4),
            ('LandingFacilityIcaoRegionCode', 2),
            ('SubSectionCode', 1),
            ('CommunicationsType', 3),
            ('CommunicationsFreq', 7),
            ('GuardTransmit', 1),
            ('FrequencyUnits', 1),
            ('ContinuationRecordNumber', 1),
            ('ServiceIndicator', 3),
            ('RadarService', 1),
            ('Modulation', 1),
            ('SignalEmission', 1),
            ('Latitude', 9),
            ('Longitude', 10),
            ('MagneticVariation', 5),
            ('FacilityElevation', 5),
            ('H24Indicator', 1),
            ('Sectorization', 6),
            ('AltitudeDescription', 1),
            ('CommunicationAltitude', 5),
            ('CommunicationAltitude', 5),
            ('SectorFacility', 4),
            ('SectorFacilityIcaoRegionCode', 2),
            ('SectorFacilitySectionCode', 1),
            ('SectorFacilitySubSectionCode', 1),
            ('DistanceDescription', 1),
            ('CommunicationsDistance', 2),
            ('RemoteFacility', 4),
            ('RemoteFacilityIcaoRegionCode', 2),
            ('RemoteFacilitySectionCode', 1),
            ('RemoteFacilitySubSectionCode', 1),
            ('CallSign', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    },
    'R': {
        'A': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('AlternateRelatedAirportOrFix', 5),
            ('AlternateRelatedAirportOrFixIcaoRegionCode', 2),
            ('AlternateRelatedAirportOrFixSectionCode', 1),
            ('AlternateRelatedAirportOrFixSubSectionCode', 1),
            ('AlternateRecordType', 2),
            ('BlankSpacing', 2),
            ('DistancetoAlternate', 3),
            ('AlternateType', 1),
            ('PrimaryAlternateIdentifier', 10),
            ('BlankSpacing', 2),
            ('DistancetoAlternate', 3),
            ('AlternateType', 1),
            ('AdditionalAlternateIdentifierOne', 10),
            ('BlankSpacing', 2),
            ('DistancetoAlternate', 3),
            ('AlternateType', 1),
            ('AdditionalAlternateIdentifierTwo', 10),
            ('BlankSpacing', 2),
            ('DistancetoAlternate', 3),
            ('AlternateType', 1),
            ('AdditionalAlternateIdentifierThree', 10),
            ('BlankSpacing', 2),
            ('DistancetoAlternate', 3),
            ('AlternateType', 1),
            ('AdditionalAlternateIdentifierFour', 10),
            ('BlankSpacing', 2),
            ('DistancetoAlternate', 3),
            ('AlternateType', 1),
            ('AdditionalAlternateIdentifierFive', 10),
            ('Reservedexpansion', 10),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    },
    'T': {
        'C': [
            ('RecordType', 1),
            ('BlankSpacing', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('CruiseTableIdentifier', 2),
            ('SequenceNumber', 1),
            ('BlankSpacing', 19),
            ('CourseFrom', 4),
            ('CourseTo', 4),
            ('MagTrue', 1),
            ('BlankSpacing', 2),
            ('CruiseLevelFrom', 5),
            ('VerticalSeparation', 5),
            ('CruiseLevelTo', 5),
            ('CruiseLevelFrom', 5),
            ('VerticalSeparation', 5),
            ('CruiseLevelTo', 5),
            ('CruiseLevelFrom', 5),
            ('VerticalSeparation', 5),
            ('CruiseLevelTo', 5),
            ('CruiseLevelFrom', 5),
            ('VerticalSeparation', 5),
            ('CruiseLevelTo', 5),
            ('ReservedExpansion', 24),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'G': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('GeographicalRefTableID', 2),
            ('SequenceNumber', 1),
            ('GeographicalEntity', 29),
            ('ContinuationRecordNumber', 1),
            ('Reserved', 1),
            ('PreferredRouteIdent', 10),
            ('PreferredRouteUseInd', 2),
            ('PreferredRouteIdent', 10),
            ('PreferredRouteUseInd', 2),
            ('PreferredRouteIdent', 10),
            ('PreferredRouteUseIndi', 2),
            ('PreferredRouteIdent', 10),
            ('PreferredRouteUseIndi', 2),
            ('PreferredRouteIdent', 10),
            ('PreferredRouteUseIndi', 2),
            ('PreferredRouteIdent', 10),
            ('PreferredRouteUseInd', 2),
            ('BlankSpacing', 11),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    },
    'U': {
        'C': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('IcaoRegionCode', 2),
            ('AirspaceType', 1),
            ('AirspaceCenter', 5),
            ('AirspaceCenterSectionCode', 1),
            ('AirspaceCenterSubSectionCode', 1),
            ('AirspaceClassification', 1),
            ('ReservedSpacing', 2),
            ('MultipleCode', 1),
            ('SequenceNumber', 4),
            ('ContinuationRecordNumber', 1),
            ('Level', 1),
            ('TimeCode', 1),
            ('NOTAM', 1),
            ('BlankSpacing', 2),
            ('Latitude', 9),
            ('Longitude', 10),
            ('ArcOriginLatitude', 9),
            ('ArcOriginLongitude', 10),
            ('ArcDistance', 4),
            ('ArcBearing', 4),
            ('RNP', 3),
            ('LowerLimit', 5),
            ('UnitIndicator', 1),
            ('UpperLimit', 5),
            ('UnitIndicator', 1),
            ('ControlledAirspaceName', 30),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'F': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('FIRUIRIdentifier', 4),
            ('FIRUIRAddress', 4),
            ('FIRUIRIndicator', 1),
            ('SequenceNumber', 4),
            ('ContinuationRecordNumber', 1),
            ('AdjacentFIRIdentifier', 4),
            ('AdjacentUIRIdentifier', 4),
            ('ReportingUnitsSpeed', 1),
            ('ReportingUnitsAltitude', 1),
            ('EntryReport', 1),
            ('BlankSpacing', 1),
            ('FIRUIRLatitude', 9),
            ('FIRUIRLongitude', 10),
            ('ArcOriginLatitude', 9),
            ('ArcOriginLongitude', 10),
            ('ArcDistance', 4),
            ('ArcBearing', 4),
            ('FIRUpperLimit', 5),
            ('UIRLowerLimit', 5),
            ('UIRUpperLimit', 5),
            ('CruiseTableInd', 2),
            ('ReservedExpansion', 1),
            ('FIRUIRName', 25),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ],
        'R': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('IcaoRegionCode', 2),
            ('RestrictiveType', 1),
            ('RestrictiveAirspaceDesignation', 10),
            ('MultipleCode', 1),
            ('SequenceNumber', 4),
            ('ContinuationRecordNumber', 1),
            ('Level', 1),
            ('TimeCode', 1),
            ('NOTAM', 1),
            ('BlankSpacing', 2),
            ('Latitude', 9),
            ('Longitude', 10),
            ('ArcOriginLatitude', 9),
            ('ArcOriginLongitude', 10),
            ('ArcDistance', 4),
            ('ArcBearing', 4),
            ('BlankSpacing', 3),
            ('LowerLimit', 5),
            ('UnitIndicator', 1),
            ('UpperLimit', 5),
            ('UnitIndicator', 1),
            ('RestrictiveAirspaceName', 30),
            ('FileRecordNumber', 5),
            ('CycleDate', 4)
        ]
    }
}

cont_base_parser_def = {  # https://github.com/jgillmanjr/parseCifp/blob/master/continuation_base_parsers.pl
    'P': {
        'F': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('BlankSpacing', 1),
            ('AirportIdentifier', 4),
            ('ICAOCode', 2),
            ('SubSectionCode', 1),
            ('SIDSTARApproachIdentifier', 6),
            ('RouteType', 1),
            ('TransitionIdentifier', 5),
            ('BlankSpacing', 1),
            ('SequenceNumber', 3),
            ('FixIdentifier', 5),
            ('ICAOCode', 2),
            ('SectionCode', 1),
            ('SubSectionCode', 1),
            ('ContinuationRecordNumber', 1),
            ('ApplicationType', 1),
            ('Remainder', 92),
        ],
        'P': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('Blank', 1),
            ('AirportIdentifier', 4),
            ('ICAOCode', 2),
            ('SubSectionCode', 1),
            ('ApproachProcedureIdent', 6),
            ('RunwayOrHelipadIdentifier', 5),
            ('OperationType', 2),
            ('ContinuationRecordNumber', 1),
            ('ApplicationType', 1),
            ('Remainder', 104),
        ],
    },
    'U': {
        'R': [
            ('RecordType', 1),
            ('CustomerAreaCode', 3),
            ('SectionCode', 1),
            ('SubsectionCode', 1),
            ('ICAOCode', 2),
            ('RestrictiveType', 1),
            ('RestrictiveAirspaceDesignation', 10),
            ('MultipleCode', 1),
            ('SequenceNumber', 4),
            ('ContinuationRecordNumber', 1),
            ('ApplicationType', 1),
            ('TimeCode', 1),
            ('NOTAM', 1),
            ('TimeIndicator', 1),
            ('TimeofOperations', 10),
            ('TimeofOperations', 10),
            ('TimeofOperations', 10),
            ('TimeofOperations', 10),
            ('TimeofOperations', 10),
            ('TimeofOperations', 10),
            ('TimeofOperations', 10),
            ('ControllingAgency', 24),
            ('FileRecordNumber', 5),
            ('CycleDate', 4),
        ],
    }
}

cont_app_parser_def = {  # https://github.com/jgillmanjr/parseCifp/blob/master/continuation_application_parsers.pl
    'P': {
        'F': {
            'W': [
                ('RecordType', 1),
                ('CustomerAreaCode', 3),
                ('SectionCode', 1),
                ('BlankSpacing', 1),
                ('AirportIdentifier', 4),
                ('ICAOCode', 2),
                ('SubSectionCode', 1),
                ('SIDSTARApproachIdentifier', 6),
                ('RouteType', 1),
                ('TransitionIdentifier', 5),
                ('BlankSpacing', 1),
                ('SequenceNumber', 3),
                ('FixIdentifier', 5),
                ('ICAOCode', 2),
                ('SectionCode', 1),
                ('SubSectionCode', 1),
                ('ContinuationRecordNumber', 1),
                ('ApplicationType', 1),
                ('FASBlockProvided', 1),
                ('FASBlockProvidedLevelOfServiceName', 10),
                ('LNAVVNAVAuthorizedForSBAS', 1),
                ('LNAVVNAVLevelOfServiceName', 10),
                ('LNAVAuthorizedForSBAS', 1),
                ('LNAVLevelOfServiceName', 10),
                ('Blank_Spacing', 45),
                ('ApproachRouteTypeQualifier1', 1),
                ('ApproachRouteTypeQualifier2', 1),
                ('Blank', 3),
                ('FileRecordNumber', 5),
                ('CycleDate', 4),
            ],
        },
        'P': {
            'E': [
                ('RecordType', 1),
                ('CustomerAreaCode', 3),
                ('SectionCode', 1),
                ('Blank', 1),
                ('AirportIdentifier', 4),
                ('ICAOCode', 2),
                ('SubSectionCode', 1),
                ('ApproachProcedureIdent', 6),
                ('RunwayOrHelipadIdentifier', 5),
                ('OperationType', 2),
                ('ContinuationRecordNumber', 1),
                ('ApplicationType', 1),
                ('FPAPEllipsoidHeight', 6),
                ('FPAPOrthometricHeight', 6),
                ('LTPOrthometricHeight', 6),
                ('ApproachTypeIdentifier', 10),
                ('GNSSChannelNumber', 5),
                ('BlankSpacing', 10),
                ('HelicopterProcedureCourse', 3),
                ('BlankSpacing', 49),
                ('FileRecordNumber', 5),
                ('CycleDate', 4),
            ],
        },
    },
    'U': {
        'R': {
            'C': [
                ('RecordType', 1),
                ('CustomerAreaCode', 3),
                ('SectionCode', 1),
                ('SubsectionCode', 1),
                ('ICAOCode', 2),
                ('RestrictiveType', 1),
                ('RestrictiveAirspaceDesignation', 10),
                ('MultipleCode', 1),
                ('SequenceNumber', 4),
                ('ContinuationRecordNumber', 1),
                ('ApplicationType', 1),
                ('TimeCode', 1),
                ('NOTAM', 1),
                ('TimeIndicator', 1),
                ('TimeofOperations', 10),
                ('TimeofOperations', 10),
                ('TimeofOperations', 10),
                ('TimeofOperations', 10),
                ('TimeofOperations', 10),
                ('TimeofOperations', 10),
                ('TimeofOperations', 10),
                ('ControllingAgency', 24),
                ('FileRecordNumber', 5),
                ('CycleDate', 4),
            ],
        },
    }
}
