MapSettings:
  description: Map
  properties:
    displayNames:
      description: Display object names on the map (1 for yes, 0 for no)
      type: integer
    terrain:
      description: "Terrain used for 3D map (E.g: 'Ellipsoid' or 'Cesium World Terrain')"
      type: string
    title:
      type: string
    rgbColor:
      type: integer
    useReverseAPI:
      description: Synchronize with reverse API (1 for yes, 0 for no)
      type: integer
    reverseAPIAddress:
      type: string
    reverseAPIPort:
      type: integer
    reverseAPIFeatureSetIndex:
      type: integer
    reverseAPIFeatureIndex:
      type: integer
    rollupState:
      $ref: "http://swgserver:8081/api/swagger/include/RollupState.yaml#/RollupState"

MapReport:
  description: Map
  properties:
    dateTime:
      description: "Current date and time being displayed by 3D map"
      type: string

MapActions:
  description: Map
  properties:
    find:
      description: "The name of the item or the location to centre the map on"
      type: string
    setDateTime:
      description: "Date and time to set for the map (ISO 8601 extended format)"
      type: string

MapItem:
  description: "An item to draw on the map. Set image to an empty string to remove item from the map."
  required:
    - name
  properties:
    name:
      description: "A name for the item"
      type: string
    image:
      description: "Filename or URL of image to draw on the 2D map"
      type: string
    imageRotation:
      description: "Angle to rotate the image by"
      type: integer
      default: 0
    text:
      description: "Text to draw on the map when item is selected"
      type: string
    latitude:
      description: "Latitude in decimal degrees, positive to the North"
      type: number
      format: float
    longitude:
      description: "Longitude in decimal degrees, positive to the East"
      type: number
      format: float
    altitude:
      description: "Altitude / height above sea level in metres"
      type: number
      format: float
    fixedPosition:
      description: "Indicates whether position of item is constant with time (0 - variable, 1 - fixed)"
      type: integer
    positionDateTime:
      description: "Date and time at this position (ISO 8601 extended format)"
      type: string
    altitudeDateTime:
      description: "Date and time at this altitude, if different from positionDateTime (ISO 8601 extended format)"
      type: string
    track:
      description: "Track/path the item has taken"
      type: array
      items:
        $ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapCoordinate"
    predictedTrack:
      description: "Track/path the item is predicted to take"
      type: array
      items:
        $ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapCoordinate"
    model:
      description: "3D .glb/*.gltf model for displaying on 3D map"
      type: string
    orientation:
      description: "How to orientate the model (0 - Along direction of motion, 1 - Use heading, pitch and roll)"
      type: integer
    heading:
      description: "Heading angle, in decimal degrees clockwise from North"
      type: number
      format: float
    pitch:
      description: "Pitch angle, in decimal degrees"
      type: number
      format: float
    roll:
      description: "Roll angle, in decimal degrees"
      type: number
      format: float
    orientationDateTime:
      description: "Date and time at this orientation (ISO 8601 extended format)"
      type: string
    label:
      description: "Label for the model"
      type: string
    labelAltitudeOffset:
      description: "Vertical offset to position label at"
      type: number
      format: float
    labelDateTime:
      description: "Date and time from when this label applies (ISO 8601 extended format). Leave empty if label should apply for all time."
      type: string
    modelAltitudeOffset:
      description: "Vertical offset to adjust model by to prevent it from going underground when altitude is 0"
      type: number
      format: float
    altitudeReference:
      description: "0 - NONE (Absolute), 1 - CLAMP_TO_GROUND, 2 - RELATIVE_TO_GROUND, 3 - CLIP_TO_GROUND."
      type: integer
    animations:
      description: "Animations to play"
      type: array
      items:
        $ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapAnimation"
    type:
      description: "(0 - Map Item, 1 - Image Tile, 2 - Polygon, 3 - Polyline)"
      type: integer
    imageTileWest:
      type: number
      format: float
    imageTileSouth:
      type: number
      format: float
    imageTileEast:
      type: number
      format: float
    imageTileNorth:
      type: number
      format: float
    imageZoomLevel:
      description: "For 2D map"
      type: number
      format: float
    coordinates:
      description: "Polygon/polyline coordinates"
      type: array
      items:
        $ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapCoordinate"
    extrudedHeight:
      description: "Extruded height (from surface) for polygons"
      type: number
      format: float
    availableFrom:
      description: "Date and time at which the item should first appear on 3D map"
      type: string
    availableUntil:
      description: "Date and time until after which this item should no longer appear on 3D map"
      type: string
    colorValid:
      description: "0 - Use default color, 1 - Use specified color"
      type: integer
    color:
      description: "RGBA for polygon and polyline"
      type: integer
    aircraftState:
      $ref: "http://swgserver:8081/api/swagger/include/Map.yaml#/MapAircraftState"

MapAnimation:
  description: "Animation to play in the model on the 3D map"
  properties:
    name:
      description: "Name of animation to play (As in .glb/.glTF file)"
      type: string
    reverse:
      description: "(0 - Forward, 1 - Reverse)"
      type: integer
    loop:
      description: "(0 - Play once, 1 - Play in loop)"
      type: integer
    startDateTime:
      description: "Date and time to start playing this animation (ISO 8601 extended format)"
      type: string
    startOffset:
      description: "Fractional [0..1] offset in to animations timeline to start animation at"
      type: number
      format: float
      default: 0.0
    multiplier:
      description: "Speed multiplier for animation. >1 plays faster"
      type: number
      format: float
      default: 1.0
    duration:
      description: "Time in seconds to play animation for. 0 to play whole animation"
      type: number
      format: float
      default: 0.0
    stop:
      description: "Stop a looped animation from playing"
      type: integer

MapCoordinate:
  description: "A map coordinate"
  properties:
    latitude:
      description: "Latitude in decimal degrees, positive to the North"
      type: number
      format: float
    longitude:
      description: "Longitude in decimal degrees, positive to the East"
      type: number
      format: float
    altitude:
      description: "Altitude / height above sea level in metres"
      type: number
      format: float
    dateTime:
      description: "Date and time at this coordinate (ISO 8601 extended format)"
      type: string

MapAircraftState:
  description: "Aircraft state for PFD/ND"
  properties:
    callsign:
      type: string
    aircraftType:
      type: string
    onSurface:
      type: integer
    airspeed:
      description: "Indicated airspeed in knots"
      type: number
      format: float
    airspeedDateTime:
      description: "Date and time at this indicated airspeed (ISO 8601 extended format)"
      type: string
    trueAirspeed:
      description: "True airspeed in knots"
      type: number
      format: float
    groundspeed:
      description: "Ground speed in knots"
      type: number
      format: float
    mach:
      type: number
      format: float
    altitude:
      description: "Barometric altitude in feet"
      type: number
      format: float
    altitudeDateTime:
      description: "Date and time at this altitude (ISO 8601 extended format)"
      type: string
    qnh:
      description: "QNH in hPA"
      type: number
      format: float
    verticalSpeed:
      description: "feet/m"
      type: number
      format: float      
    verticalSpeedDateTime:
      description: "Date and time at this vertical speed (ISO 8601 extended format)"
      type: string
    heading:
      description: "Degrees magnetic"
      type: number
      format: float
    track:
      description: "Degrees true"
      type: number
      format: float
    selectedAirspeed:
      type: number
      format: float
    selectedAltitude:
      type: number
      format: float
    selectedHeading:
      type: number
      format: float
    autopilot:
      description: "-1 unknown, 0 off, 1 on"
      type: integer
    verticalMode:
      description: "0 unknown, 1 VNAV, ALT HOLD, APP (G/S)"
      type: integer
    lateralMode:
      description: "0 unknown, 1 LNAV, APP (LOC)"
      type: integer
    tcasMode:
      description: "-1 unknown, 0 Off, 1 TA, 2 TA/RA"
      type: integer  
    windSpeed:
      type: number
      format: float
    windDirection:
      type: number
      format: float
    staticAirTemperature:
      type: number
      format: float
      
