========== User Guide ========== This user guide to pyAPP7 is structured into four parts. First, an overview over the :ref:`package strcuture` is provided. The second section describes how to :ref:`read and write APP files ` (aircraft, missions and performance charts) using Python. The last two sections describe how to execute APP's :ref:`mission computations ` and :ref:`performance chart computations ` by using Python and parse the results written by APP. .. _package_structure: Package Structure ============================= The pyAPP7 package comprises the following modules: Files Classes for `Reading and Writing APP Files`_. Datatypes Classes defining APP sepcific, custom data types Mission Classes for executing `Mission Computations`_ and reading the results. Performance Classes for executing `Performance Charts`_ computations and reading the results. Database Helper class to read APP's string table. Global Constants as used in APP. Units Unit conversion factors as used in APP. .. _reading_writing_files: Reading and Writing APP Files ============================= .. image:: images/welcome.png For each APP7 filetype, pyAPP7 offers a class to read, manipulate and write a file. The classes are located in the Files module: ========================== ============================ APP File pyAPP7 Class ========================== ============================ Aircraft (.acft) Files.AircraftModel Mission Computation (.mis) Files.MissionComputationFile Performance Charts (.perf) Files.PerformanceChartFile ========================== ============================ The classes are located in the Files module: .. autoclass:: pyAPP7.Files.AircraftModel :noindex: .. autoclass:: pyAPP7.Files.MissionComputationFile :noindex: .. autoclass:: pyAPP7.Files.PerformanceChartFile :noindex: NExtReal -------- APP defines two custom data types: NExtReal and XTables. When using pyAPP7 to manipulate APP files, it is important to understand these data types. NExtReals are recognizable in the APP user interface by a text followed by a value and a unit: .. image:: images/NExtReal.PNG .. autoclass:: pyAPP7.Datatypes.NExtReal :members: :noindex: XTable ------- XTables are used everywhere you see a spreadsheet-like table in APP. pyAPP7 uses the **numpy** module to store data tables. **numpy** offers a lot of functionality to manipulate arrays. pyAPP7 defines four different tables, with increasing dimensionality: X0Table, X1Table, X2Table and X3Table. The X0Table is used for one-column data ranges, for example in performance charts for the **X-Range** and **Parameter** range. .. autoclass:: pyAPP7.Datatypes.X0Table :noindex: The X1Table is a simple two-column table. An example would be the Mach limit or CLmax table. The data is stored in a two-dimensional numpy array. .. autoclass:: pyAPP7.Datatypes.X1Table :noindex: The X2Table is a list of two-column tables. An example would be the induced drag tables or the max. thrust tables. The data is stored in a list of two-dimensional numpy arrays (*table* attribute). Each table also has a value (for the induced drag table that would be a Mach number). The values are stored in the *value* list. The *table* and *value* list have the same length and same ordering. .. autoclass:: pyAPP7.Datatypes.X2Table :noindex: The X3Table class is used in APP for the fuel flow table. The X3Table consists of a list of X2Tables and corresponding values. .. autoclass:: pyAPP7.Datatypes.X3Table :noindex: Variables ========== When executing APP via the command line, the user can specify what variables will be written in the output result file. By default, pyAPP7 uses the included *ParameterList_All.par* file to specify the variables. The ouput data is stored in a large numpy table, and the variable can be best accessed by it's index. The following table presents the current mapping of indices to the variables when using the default parameter list file. ====== ============================ ============ ============== Index Variable Name (SI) (British) ------ ---------------------------- ------------ -------------- 0 Acceleration [m/sec2] [ft/sec2] 1 SEP (Accel) [m/sec2] [KTS/s] 2 X-Acc. [m/sec2] [ft/sec2] 3 Z-Acc. [m/sec2] [ft/sec2] 4 Advance Ratio [-] [-] 5 Altitude [m] [ft] 6 AoA [deg] [deg] 7 Attitude [deg] [deg] 8 Battery Energy [kJ] [Wh] 9 Battery SOC [%] [%] 10 Propeller Beta [deg] [deg] 11 CAS [m/sec] [nm/hr] 12 CD [-] [-] 13 CD0 [-] [-] 14 CDi [-] [-] 15 CDs [-] [-] 16 CL [-] [-] 17 CL/CD [-] [-] 18 CLmax [-] [-] 19 CO2 Mass [kg] [lbs] 20 Thrust cos(AoA+sigma) [N] [lbf] 21 CP [-] [-] 22 (M/SFC)(L/D) [-] [-] 23 CT [-] [-] 24 Density [kg/m3] [slug/ft3] 25 Distance [km] [nm] 26 Drag [N] [lbf] 27 Drag Area [m2] [ft2] 28 dT [K] [K] 29 EAS [m/sec] [nm/hr] 30 Energy Height [m] [ft] 31 Ekin [Nm] [lbf ft] 32 Epot [Nm] [lbf ft] 33 Energy Specific Range [m/J] [m/J] 34 Etot [Nm] [lbf ft] 35 Friction Force [N] [lbf] 36 Fuel Flow [kg/sec] [lbs/hr] 37 Fuel Mass [kg] [lbs] 38 Fuel Percent [%] [%] 39 Fuel Percent (Internal) [%] [%] 40 Climb Angle [deg] [deg] 41 Generator Power [%] [%] 42 Ground Force [N] [lbf] 43 Load Factor [-] [-] 44 Lift [N] [lbf] 45 Lift Area [m2] [ft2] 46 Placard Mach [-] [-] 47 Mach [-] [-] 48 Mass [kg] [lbs] 49 Max. Thrust [N] [lbf] 50 Min. Thrust [N] [lbf] 51 Motor Eta [%] [%] 52 Motor Torque [Nm] [lbf ft] 53 Payload [%] [%] 54 Power Setting [%] [%] 55 Power Consumption [W] [W] 56 Power Required [W] [shp] 57 Pull-Up Rate [deg/sec] [deg/sec] 58 Pressure Altitude [m] [ft] 59 Pressure [N/m2] [lbf/ft2] 60 Propeller Efficiency [%] [%] 61 Dynamic Pressure [N/m2] [lbf/ft2] 62 Engine Revolution [rpm] [rpm] 63 Seg. CO2 Mass [kg] [lbs] 64 Seg. Dist. [km] [nm] 65 Seg. Fuel [kg] [lbs] 66 Seg. Time [min] [min] 67 SEP [m/sec] [ft/sec] 68 Configuration Nr. [-] [-] 69 SFC [kg/(sec N)] [lbs/(hr lbf)] 70 Shaft Power [W] [shp] 71 Speed of Sound [m/sec] [ft/sec] 72 Specific Range [km/kg] [nm/lbs] 73 Reference Area [m2] [ft2] 74 TAS [m/sec] [nm/hr] 75 Temperature [K] [K] 76 Thrust [N] [lbf] 77 Time [sec] [sec] 78 Turn Radius [m] [ft] 79 Turn Rate [deg/sec] [deg/sec] 80 T/Tmax [-] [-] 81 Turns [turn] [turn] 82 Velocity [m/sec] [nm/hr] 83 Minimum Unstick Speed [m/sec] [nm/hr] 84 Minimum Unstick Speed (CAS) [m/sec] [nm/hr] 85 Stall Speed [m/sec] [nm/hr] 86 Stall Speed (CAS) [m/sec] [nm/hr] 87 Vx [m/sec] [nm/hr] 88 Climb Speed [m/sec] [ft/sec] ====== ============================ ============ ============== .. _mission_computations: Mission Computations ==================== The Mission module, specifically the class *MissionComputation*, is used to run the APP command line mode for mission computations and parse the result text file. .. autoclass:: pyAPP7.Mission.MissionComputation :noindex: A result from an APP command line computation can also be directly read by using the MissionResult class. .. autoclass:: pyAPP7.Mission.MissionResult :noindex: .. _performance_computations: Performance Charts ================== The Performance module, specifically the class *PerformanceChart*, is used to run the APP command line mode for performance chart computations and parse the result text file. .. autoclass:: pyAPP7.Performance.PerformanceChart :noindex: A result from an APP command line computation can also be directly read by using the PerformanceChartResult class. .. autoclass:: pyAPP7.Performance.PerformanceChartResult :noindex: