.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/initial_mass.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_initial_mass.py: Initial Mass Calculation ======================== Example calculation of aircraft initial mass .. GENERATED FROM PYTHON SOURCE LINES 8-63 .. rst-class:: sphx-glr-script-out .. code-block:: none cruiseFuelFlow: 0.698252094246702 [kg/s] breguetLeducInitialMass: 52118.39521362933 [kg] initMass: 52118.39521362933 [kg] | .. code-block:: Python from pyBADA.bada3 import Bada3Aircraft from pyBADA import trajectoryPrediction as TP from pyBADA import atmosphere as atm from pyBADA import conversions as conv # calculate estimations for the fuel flow, and aircraft initial mass AC = Bada3Aircraft(badaVersion="DUMMY", acName="J2M") deltaTemp = 0 # deviation from ISA temperature [K or deg C] M = 0.7 # Mach number [-] altitude = conv.ft2m(30000) # cruise altitude[m] distance = conv.nm2m(100) # flown distance [NM] payload = 80 # payload mass [% of the maximum payload mass] fuelReserve = 3600 # reserve of the fuel [s] flightPlanInitialMass = None # planned initial/takeoff mass [kg] # fuel flow in cruise cruiseFuelFlow = TP.cruiseFuelConsumption( AC=AC, altitude=altitude, M=M, deltaTemp=deltaTemp ) # in case of no wind, the ground speed is the same as true airspeed [theta, delta, sigma] = atm.atmosphereProperties( h=altitude, DeltaTemp=deltaTemp ) TAS = atm.mach2Tas(Mach=M, theta=theta) GS = TAS # distance based initial mass breguetLeducInitialMass = TP.breguetLeducInitialMass( AC=AC, distance=distance, GS=GS, cruiseFuelFlow=cruiseFuelFlow, payload=payload, fuelReserve=fuelReserve, ) # calculation of initial mass taking into account flight plan data and aircraft flight envelope initMass = TP.getInitialMass( AC=AC, distance=distance, altitude=altitude, M=M, payload=payload, fuelReserve=fuelReserve, flightPlanInitialMass=flightPlanInitialMass, deltaTemp=deltaTemp, ) print(f"cruiseFuelFlow: {cruiseFuelFlow} [kg/s]") print(f"breguetLeducInitialMass: {breguetLeducInitialMass} [kg]") print(f"initMass: {initMass} [kg]") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.005 seconds) .. _sphx_glr_download_auto_examples_initial_mass.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: initial_mass.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: initial_mass.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: initial_mass.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_