Ignore:
Timestamp:
02/08/12 16:28:21 (13 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added the checks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/const.py

    r8 r11  
    107107# Flight stage: end
    108108STAGE_END = 12
     109
     110#-------------------------------------------------------------------------------
     111
     112_stageStrings = { STAGE_BOARDING : "boarding",
     113                  STAGE_PUSHANDTAXI : "pushback and taxi",
     114                  STAGE_TAKEOFF : "takeoff",
     115                  STAGE_RTO : "RTO",
     116                  STAGE_CLIMB : "climb",
     117                  STAGE_CRUISE : "cruise",
     118                  STAGE_DESCENT : "descent",
     119                  STAGE_LANDING : "landing",
     120                  STAGE_TAXIAFTERLAND : "taxi",
     121                  STAGE_PARKING : "parking",
     122                  STAGE_GOAROUND : "go-around",
     123                  STAGE_END : "end" }
     124
     125def stage2string(stage):
     126    """Convert the given stage to a lower-case string."""
     127    return _stageStrings[stage] if stage in _stageStrings else None
     128       
     129   
Note: See TracChangeset for help on using the changeset viewer.