API
Contents
API#
This section details the components of the mmqprop application. The information generated here is extracted automatically from the application code.
Primary mmqprop class#
Command Line Event Loop#
This class is responsible for loading all installed command plugins, creating the application context for this run and starting the user command loop. A simple > prompt is provided as a prompt. The app_debug flag can be set in the code to debug the application during development.
Application Context#
The Context class constructs a data store passed to all commands.
- class mmqprop.Context.Context[source]#
Bases:
objectmanages data passed between commands
- CD = []#
- CL = []#
- CM = []#
- airfoil = 'simplex'#
- airfoil_data = ()#
- argcount = 0#
- data_dir = 'data'#
- debug = False#
- model = 'hodson-wart'#
- model_data = {}#
- motorfile = 'default_motor'#
- propfile = 'default_prop'#
Application Command Plugins#
Each application command is implemented in a separate file with a name starting with cmd_. New commands can be added by simple writing a new file and placing it in the commands directory.
Load Standard QPROP Data Files#
These files support loading example data files found in the QPROP Fortran source files.
Basic File Input#
The input files have a Fortram flavor, using the ! character to start an end-of-line comment. Thif file provides code that loads a neded file, deletes all comments, and returns a simple list of data chinks from the file.
The next file processes a propeller data file.
- class mmqprop.Propeller.Propeller(ctx, fname='data/default_prop')[source]#
Bases:
objectLoad standard QPROP propeller file from data dir
Next, we process a motor data file