Ignore:
Timestamp:
03/19/23 13:28:59 (14 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
amend_source:
0d69ca1836814137b601f24493e4d718c56b12b7
Message:

It is possible to provide an extra parameter for the SimBrief cruise profile.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r1043 r1087  
    8787class SimBriefData(object):
    8888    """Data to be used when creating SimBrief briefings."""
    89     def __init__(self, climbProfiles, cruiseProfiles, descentProfiles):
    90         """Construct the SimBrief data with the given profiles."""
     89    def __init__(self, climbProfiles, cruiseProfiles, descentProfiles,
     90                 cruiseParameters = {}):
     91        """Construct the SimBrief data with the given profiles.
     92
     93        cruiseParameters is a dictionary keyed by the cruise profile index. It
     94        contains a tuple of:
     95        - a boolean indicating if the parameter is mandatory,
     96        - the name of the parameter for the SimBrief API
     97        """
    9198        self.climbProfiles = climbProfiles
    9299        self.cruiseProfiles = cruiseProfiles
    93100        self.descentProfiles = descentProfiles
     101        self.cruiseParameters = cruiseParameters
    94102
    95103#---------------------------------------------------------------------------------------
     
    743751        self.simBriefData = SimBriefData(["250/280/78"],
    744752                                         ["CI", "M75", "M78", "M79", "M80", "LRC"],
    745                                          ["78/280/250"])
     753                                         ["78/280/250"],
     754                                         cruiseParameters = {0: (False, "civalue")})
    746755
    747756#---------------------------------------------------------------------------------------
     
    760769        self.simBriefData = SimBriefData(["250/280/78"],
    761770                                         ["CI", "M75", "M78", "M79", "M80", "LRC"],
    762                                          ["78/280/250", "78/250/250"])
     771                                         ["78/280/250", "78/250/250"],
     772                                         cruiseParameters = {0: (False, "civalue")})
    763773
    764774#---------------------------------------------------------------------------------------
     
    777787        self.simBriefData = SimBriefData(["250/280/78"],
    778788                                         ["CI", "M76", "M78", "M79", "M80", "LRC"],
    779                                          ["78/280/250", "78/250/250"])
     789                                         ["78/280/250", "78/250/250"],
     790                                         cruiseParameters = {0: (False, "civalue")})
    780791
    781792#---------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.