============ Introduction ============ pyAPP7 is a Python package to interact with ALR's Aircraft Performance Program APP. The current implementation of pyAPP7 is a file based interface to APP. pyAPP7's classes enable to read and write APP7 files. Together with the command line interface of APP, pyAPP7 allows for automation of mission and point performance computations. The results that are calculated and written by APP (as text files) can be read with pyAPP7. pyAPP7 is made to work with both Python 2 and Python 3. This was tested using Python 2.7 and Python 3.6. .. image:: images/schema.png ============ Installation ============ If you do not already have a Python distribution installed, ALR recommends to use a distribution that is pre-built for windows and includes common modules such as numpy, scipy and matplotlib. Such a distribution is Anaconda, available here: https://www.continuum.io/downloads Installing pyAPP7 is straight forward, as for any python packge. Navigate to the pyAPP7 folder and open a Windows command line (cmd). Install pyAPP7 by executing:: python setup.py install This will add pyAPP7 to your active python distribution. To test the sucessful installation, open a python shell by entering:: python and then type:: >>> import pyAPP7 If no error message appears, the installation was sucessful. A second method is to either add the path to the pyAPP7 root folder in each script by modifying sys.path or to add the path to the PYTHONPATH environment variable. For futher information, consult the official python documentation on how to install modules: https://docs.python.org/2/install/#modifying-python-s-search-path ================ APP Command Line ================ APP7 offers a command line mode to execute a computation without using the Graphical User Interface (GUI). pyAPP7 has two classes that simplify the execution of APP from a Python script. The command line mode of APP7 writes the results in ASCII format into a text file (.txt). This file can then be read by pyAPP7. To calculate a mission saved as myMission.mis, type: :: App7.exe -m myMission.mis To calculate a Performance Chart saved as myChart.perf, type: :: App7.exe -pp myChart.perf ===================== Upgrading from pyAPP6 ===================== If you have existing pyAPP6 based scripts, updating to APP7 and pyAPP7 usually requires only the two following steps: - Make sure your APP aircraft, performance and mission files were saved with the latest APP7 GUI version. - Replace all occurrences of pyAPP6 in the import statements ("from pyAPP6 import ..." or "import pyAPP6") with pyAPP7. With these two changes, most code should be backwards compatible. However, in order to improve the code readability, quality and usability of pyAPP, some breaking changes were necessary. The following list shows some of the issues that might be encountered when porting your code from pyAPP6 to pyAPP7: - The unit conversion variables in the module "Units.py" have been renamed (the underscore prefix from pyAPP6 was removed in pyAPP7). - The APP custom data type classes have been moved from "Files.py" to a new module "Datatypes.py". - The name of the variable for the path to the APP execuatble was renamed from APP6Dir to APP7Dir (in the Mission and Performance module). - All functions related to file parsing in "Files.py" and "Global.py" have been moved to the module "FileFunctions.py". - Variable indices for performance and mission results have been changed as more variables have been added to the APP parameter list from APP6 to APP7. The database class automatically handles this, but any script with indices hard coded in will need to be updated during a version upgrade from pyAPP6 to pyAPP7. - Propeller data is stored within the PropThrust class in pyAPP6 while pyAPP7 has a unique propeller class which is a member of the PropThrust and PropElectricThrust classes. - In the class MisOptData, the variable "optimizer" has been renamed to "solver". The old function names and dictionary keys to access the data have been kept for backwards compatibility. - Functions to access the mass have been moved from the class "Mass" to "Config". ======= Authors ======= ALR-Aerospace: - Marc Immer - Micha Brunner - Philipp Juretzko - Vito Colangelo