Changeset 366:21db3f9653ce


Ignore:
Timestamp:
12/15/12 16:50:01 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for the ILS frequency, and made use of it in case of the DA F70 model (#115)

Location:
src/mlx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r360 r366  
    8686        self._checkers.append(checks.AltimeterLogger())
    8787
     88        self._ilsLogger = checks.ILSLogger()
     89        self._checkers.append(self._ilsLogger)
    8890        self._nav1Logger = checks.NAV1Logger()
    8991        self._checkers.append(self._nav1Logger)
     
    455457        logger = flight.logger
    456458
     459        self._ilsLogger.forceLog(flight, logger, aircraftState)
    457460        self._nav1Logger.forceLog(flight, logger, aircraftState)
    458461        self._nav2Logger.forceLog(flight, logger, aircraftState)
  • src/mlx/checks.py

    r364 r366  
    517517#---------------------------------------------------------------------------------------
    518518
     519class ILSLogger(NAVLogger):
     520    """Logger for the ILS radio setting."""
     521    def __init__(self):
     522        """Construct the logger."""
     523        super(ILSLogger, self).__init__("ils", "ILS")
     524
     525#---------------------------------------------------------------------------------------
     526
    519527class NAV1Logger(NAVLogger):
    520528    """Logger for the NAV1 radio setting."""
  • src/mlx/const.py

    r335 r366  
    1111
    1212## The version of the program
    13 VERSION="0.11"
     13VERSION="0.12"
    1414
    1515#-------------------------------------------------------------------------------
  • src/mlx/fs.py

    r361 r366  
    229229    (float)
    230230    - altimeter: the altimeter setting in hPa (float)
     231    - ils: the frequency of the ILS radio in MHz (string). Can be None, if
     232    the frequency is unreliable or meaningless.
     233    - ols_obs: the OBS setting of the ILS radio in degrees (int). Can be None, if
     234    the value is unreliable or meaningless.
     235    - ils_manual: a boolean indicating if the ILS radio is on manual control
    231236    - nav1: the frequency of the NAV1 radio in MHz (string). Can be None, if
    232237    the frequency is unreliable or meaningless.
  • src/mlx/fsuipc.py

    r361 r366  
    13711371        state.altimeter = data[self._monidx_altimeter] / 16.0
    13721372
     1373        state.ils = None
     1374        state.ils_obs = None
     1375        state.ils_manual = False
    13731376        state.nav1 = AircraftModel.convertFrequency(data[self._monidx_nav1])
    13741377        state.nav1_obs = data[self._monidx_nav1_obs]
     
    13831386            AircraftModel.convertADFFrequency(data[self._monidx_adf2_main],
    13841387                                              data[self._monidx_adf2_ext])
     1388
    13851389        state.squawk = AircraftModel.convertBCD(data[self._monidx_squawk], 4)
    13861390
     
    17921796        state.navLightsOn = None
    17931797        state.landingLightsOn = None
    1794         state.nav2_manual = aircraft.flight.stage!=const.STAGE_CRUISE
    1795         self.autoXPDR = True
     1798
     1799        state.ils = state.nav1
     1800        state.ils_obs = state.nav1_obs
     1801        state.ils_manual = state.nav1_manual
     1802
     1803        state.nav1 = state.nav2
     1804        state.nav1_obs = state.nav2_obs
     1805        state.nav1_manual = aircraft.flight.stage!=const.STAGE_CRUISE
     1806
     1807        state.nav2 = None
     1808        state.nav2_obs = None
     1809        state.nav2_manual = False
     1810
     1811        state.autoXPDR = True
    17961812
    17971813        return state
Note: See TracChangeset for help on using the changeset viewer.