Changeset 525:02437e74e7ca


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)

Files:
2 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#---------------------------------------------------------------------------------------
  • test/test1.txt

    r519 r525  
    88set lights=1
    99set noseGear=100
     10set gearControl=100
    1011set flapsControl=0
    1112set zfw=46741 hour=7 min=50
     
    4344set altitude=600
    4445
     46set gearControl=0
    4547set noseGear=0
    4648set altitude=2000
     
    6971set radioAltitude=3200
    7072set radioAltitude=1100
     73set gearControl=100
    7174set noseGear=100
    7275set radioAltitude=50
Note: See TracChangeset for help on using the changeset viewer.