ADSBDemodSettings:
  description: ADSBDemod
  properties:
    inputFrequencyOffset:
      description: channel center frequency shift from baseband center in Hz
      type: integer
      format: int64
    rfBandwidth:
      description: channel RF bandwidth in Hz
      type: number
      format: float
    correlationThreshold:
      type: number
      format: float
    samplesPerBit:
      type: integer
    correlateFullPreamble:
      type: integer
      description: >
        Correlate on part or full preamble
          * 0 - part
          * 1 - full
    demodModeS:
      type: integer
      description: >
        Demodulate all mode S frames or just ADS-B
          * 0 - just ADS-B
          * 1 - All mode S
    interpolatorPhaseSteps:
      type: integer
      description: Number of phase steps in channel interpolator
    interpolatorTapsPerPhase:
      type: number
      format: float
      description: Number of taps per phase in channel interpolator
    removeTimeout:
      type: integer
    feedEnabled:
      type: integer
    exportClientEnabled:
      type: integer
      description: >
        Send data to server
          * 0 - Do not send data
          * 1 - Send data
    exportClientHost:
      description: Host to send data to
      type: string
    exportClientPort:
      type: integer
    exportClientFormat:
      type: integer
      description: >
        Format of sent data
          * 0 - Beast binary
          * 1 - Beast hex
    exportServerEnabled:
      type: integer
    exportServerPort:
      type: integer
    importEnabled:
      type: integer
    importHost:
      type: string
    importUsername:
      type: string
      description: OpenSky OAuth2 client ID.
    importPassword:
      type: string
      description: OpenSky OAuth2 client secret.
    importParameters:
      type: string
    importPeriod:
      type: number
      format: float
    importMinLatitude:
      type: string
    importMaxLatitude:
      type: string
    importMinLongitude:
      type: string
    importMaxLongitude:
      type: string
    logFilename:
      type: string
    logEnabled:
      type: integer
    rgbColor:
      type: integer
    title:
      type: string
    streamIndex:
      description: MIMO channel. Not relevant when connected to SI (single Rx).
      type: integer
    useReverseAPI:
      description: Synchronize with reverse API (1 for yes, 0 for no)
      type: integer
    reverseAPIAddress:
      type: string
    reverseAPIPort:
      type: integer
    reverseAPIDeviceIndex:
      type: integer
    reverseAPIChannelIndex:
      type: integer
    channelMarker:
      $ref: "/doc/swagger/include/ChannelMarker.yaml#/ChannelMarker"
    rollupState:
      $ref: "/doc/swagger/include/RollupState.yaml#/RollupState"

ADSBDemodReport:
  description: ADSBDemod
  properties:
    channelPowerDB:
      description: power received in channel (dB)
      type: number
      format: float
    channelSampleRate:
      type: integer
    targetName:
      type: string
    targetAzimuth:
      type: number
      format: float
    targetElevation:
      type: number
      format: float
    targetRange:
      type: number
      format: float
    aircraftState:
      type: array
      items:
        $ref: "/doc/swagger/include/ADSBDemod.yaml#/ADSBDemodAircraftState"

ADSBDemodAircraftState:
  properties:
    icao:
      description: "24-bit hex ICAO identifier"
      type: string
    callsign:
      description: "Callsign (E.g. BAW123)"
      type: string
    latitude:
      description: "Latitude of aircraft in degrees"
      type: number
      format: float
    longitude:
      description: "Longitude of aircraft in degrees"
      type: number
      format: float
    altitude:
      description: "Altitude of aircraft in feet"
      type: integer
    groundSpeed:
      description: "Groundspeed of aircraft in knots"
      type: integer
