Changeset 525:02437e74e7ca for src/mlx


Ignore:
Timestamp:
06/29/13 11:30:39 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The AGL values are logged for gear movements and flap extension during descent and landing (re #206)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r521 r525  
    663663        speed = logState.groundSpeed if logState.groundSpeed<80.0 \
    664664                else logState.ias
    665         return "Flaps %.0f - %.0f %s" % \
     665        message = "Flaps %.0f - %.0f %s" % \
    666666               (logState.flapsSet, flight.speedFromKnots(speed),
    667667                flight.getEnglishSpeedUnit())
     668
     669        if flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING]:
     670            message += ", %.0f ft AGL" % (logState.radioAltitude,)
     671
     672        return message
    668673
    669674#---------------------------------------------------------------------------------------
     
    678683    def _getMessage(self, flight, state, forced):
    679684        """Get the message to log on a change."""
    680         return "Gears SET to %s at %.0f %s, %.0f feet" % \
     685        return "Gears SET to %s at %.0f %s, %.0f ft, %.0f ft AGL" % \
    681686            ("DOWN" if state.gearControlDown else "UP",
    682687             flight.speedFromKnots(state.ias),
    683              flight.getEnglishSpeedUnit(), state.altitude)
     688             flight.getEnglishSpeedUnit(),
     689             state.altitude, state.radioAltitude)
    684690
    685691#---------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.