sxh / ui-base / UiBase.AircraftTypes

Provide types to be shared across applications

Generic Aircraft Data


type alias GenericAircraftData =
{ id : Basics.Int
, name : String
, notes_markdown : String
, misnomers : List String 
}

Data that is common to all kinds of aircraft related entities

Aircraft Type


type AircraftType
    = ManufacturerType
    | AircraftType
    | VariantType
    | CommonNameType
    | ToBeDeletedSearchType

Enumerated types of aircraft

aircraftTypeString : AircraftType -> String

Convert an aircraft type to a string

Typed Aircraft, single and lists


type alias TypedAircraftData =
{ aircraftType : AircraftType
, aircraftData : GenericAircraftData 
}

Generic aircraft data plus an aircraft type


type alias TypedAircraftList =
{ aircraftType : AircraftType
, list : List GenericAircraftData 
}

List of generic aircraft data of the same aircraft type

isEmpty : TypedAircraftList -> Basics.Bool

Check of a typed aircraft list is empty

toTypedList : TypedAircraftList -> List TypedAircraftData

Convert a list of a single type of entity to a generic list that holds items typed individually

Collections of related aircraft data


type alias RelatedToAircraft =
{ base : TypedAircraftData
, lists : Vector3 TypedAircraftList 
}

All the typed entities related to some particular typed aircraft data, grouped by type and including the base. There will never be other items of the same type.


type alias RelatedToSearch =
{ lists : Vector4 TypedAircraftList }

All the typed entities related to a particular search, grouped by type