openap 1.2__tar.gz → 1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. openap-1.4/LICENSE +165 -0
  2. openap-1.4/PKG-INFO +110 -0
  3. {openap-1.2 → openap-1.4}/README.md +5 -2
  4. {openap-1.2 → openap-1.4}/openap/casadi/__init__.py +3 -3
  5. {openap-1.2 → openap-1.4}/openap/casadi/aero_override.py +18 -15
  6. {openap-1.2 → openap-1.4}/openap/casadi/numpy_override.py +1 -0
  7. openap-1.4/openap/contrail.py +120 -0
  8. {openap-1.2 → openap-1.4}/openap/data/aircraft/_synonym.csv +4 -3
  9. {openap-1.2 → openap-1.4}/openap/data/aircraft/a19n.yml +5 -0
  10. {openap-1.2 → openap-1.4}/openap/data/aircraft/a20n.yml +5 -0
  11. {openap-1.2 → openap-1.4}/openap/data/aircraft/a21n.yml +5 -0
  12. {openap-1.2 → openap-1.4}/openap/data/aircraft/a319.yml +5 -0
  13. {openap-1.2 → openap-1.4}/openap/data/aircraft/a320.yml +5 -0
  14. {openap-1.2 → openap-1.4}/openap/data/aircraft/a321.yml +5 -0
  15. {openap-1.2 → openap-1.4}/openap/data/aircraft/a332.yml +5 -0
  16. {openap-1.2 → openap-1.4}/openap/data/aircraft/a333.yml +5 -0
  17. {openap-1.2 → openap-1.4}/openap/data/aircraft/a343.yml +5 -0
  18. {openap-1.2 → openap-1.4}/openap/data/aircraft/a359.yml +6 -0
  19. {openap-1.2 → openap-1.4}/openap/data/aircraft/a388.yml +5 -0
  20. {openap-1.2 → openap-1.4}/openap/data/aircraft/b37m.yml +6 -0
  21. {openap-1.2 → openap-1.4}/openap/data/aircraft/b38m.yml +5 -0
  22. {openap-1.2 → openap-1.4}/openap/data/aircraft/b39m.yml +5 -0
  23. {openap-1.2 → openap-1.4}/openap/data/aircraft/b3xm.yml +6 -0
  24. {openap-1.2 → openap-1.4}/openap/data/aircraft/b734.yml +5 -0
  25. {openap-1.2 → openap-1.4}/openap/data/aircraft/b737.yml +5 -0
  26. {openap-1.2 → openap-1.4}/openap/data/aircraft/b738.yml +5 -0
  27. {openap-1.2 → openap-1.4}/openap/data/aircraft/b739.yml +5 -0
  28. {openap-1.2 → openap-1.4}/openap/data/aircraft/b744.yml +5 -0
  29. {openap-1.2 → openap-1.4}/openap/data/aircraft/b748.yml +5 -0
  30. {openap-1.2 → openap-1.4}/openap/data/aircraft/b752.yml +5 -0
  31. {openap-1.2 → openap-1.4}/openap/data/aircraft/b763.yml +5 -0
  32. {openap-1.2 → openap-1.4}/openap/data/aircraft/b772.yml +5 -0
  33. {openap-1.2 → openap-1.4}/openap/data/aircraft/b773.yml +5 -0
  34. {openap-1.2 → openap-1.4}/openap/data/aircraft/b77w.yml +5 -0
  35. {openap-1.2 → openap-1.4}/openap/data/aircraft/b788.yml +5 -0
  36. {openap-1.2 → openap-1.4}/openap/data/aircraft/b789.yml +5 -0
  37. {openap-1.2 → openap-1.4}/openap/data/aircraft/c550.yml +5 -0
  38. {openap-1.2 → openap-1.4}/openap/data/aircraft/e145.yml +5 -0
  39. {openap-1.2 → openap-1.4}/openap/data/aircraft/e170.yml +5 -0
  40. {openap-1.2 → openap-1.4}/openap/data/aircraft/e190.yml +5 -0
  41. {openap-1.2 → openap-1.4}/openap/data/aircraft/e195.yml +5 -0
  42. {openap-1.2 → openap-1.4}/openap/data/aircraft/e75l.yml +5 -0
  43. openap-1.4/openap/data/aircraft/glf6.yml +45 -0
  44. {openap-1.2 → openap-1.4}/openap/data/dragpolar/_synonym.csv +5 -4
  45. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a20n.yml +0 -2
  46. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a319.yml +0 -2
  47. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a320.yml +0 -2
  48. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a321.yml +0 -2
  49. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a332.yml +0 -2
  50. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a333.yml +0 -2
  51. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a343.yml +0 -2
  52. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a359.yml +0 -2
  53. {openap-1.2 → openap-1.4}/openap/data/dragpolar/a388.yml +0 -2
  54. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b38m.yml +0 -2
  55. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b734.yml +0 -2
  56. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b737.yml +0 -2
  57. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b738.yml +0 -2
  58. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b739.yml +0 -2
  59. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b744.yml +0 -2
  60. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b748.yml +0 -2
  61. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b752.yml +0 -2
  62. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b772.yml +0 -2
  63. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b77w.yml +0 -2
  64. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b788.yml +0 -2
  65. {openap-1.2 → openap-1.4}/openap/data/dragpolar/b789.yml +0 -2
  66. {openap-1.2 → openap-1.4}/openap/data/dragpolar/c550.yml +0 -2
  67. {openap-1.2 → openap-1.4}/openap/data/dragpolar/e190.yml +0 -2
  68. {openap-1.2 → openap-1.4}/openap/data/dragpolar/e195.yml +0 -2
  69. {openap-1.2 → openap-1.4}/openap/data/dragpolar/e75l.yml +0 -2
  70. openap-1.4/openap/data/dragpolar/glf6.yml +13 -0
  71. {openap-1.2 → openap-1.4}/openap/data/engine/engines.csv +418 -418
  72. {openap-1.2 → openap-1.4}/openap/data/nav/airports.csv +2 -0
  73. openap-1.4/openap/data/wrap/_synonym.csv +42 -0
  74. {openap-1.2 → openap-1.4}/openap/drag.py +46 -18
  75. {openap-1.2 → openap-1.4}/openap/emission.py +13 -0
  76. {openap-1.2 → openap-1.4}/openap/extra/__init__.py +4 -2
  77. {openap-1.2 → openap-1.4}/openap/extra/aero.py +2 -2
  78. {openap-1.2 → openap-1.4}/openap/extra/filters.py +26 -22
  79. {openap-1.2 → openap-1.4}/openap/extra/nav.py +21 -13
  80. {openap-1.2 → openap-1.4}/openap/fuel.py +61 -23
  81. {openap-1.2 → openap-1.4}/openap/kinematic.py +61 -39
  82. {openap-1.2 → openap-1.4}/openap/prop.py +10 -10
  83. {openap-1.2 → openap-1.4}/openap/thrust.py +17 -14
  84. openap-1.4/pyproject.toml +42 -0
  85. openap-1.2/MANIFEST.in +0 -1
  86. openap-1.2/PKG-INFO +0 -101
  87. openap-1.2/openap/traj/opt.py +0 -143
  88. openap-1.2/openap.egg-info/PKG-INFO +0 -101
  89. openap-1.2/openap.egg-info/SOURCES.txt +0 -122
  90. openap-1.2/openap.egg-info/dependency_links.txt +0 -1
  91. openap-1.2/openap.egg-info/requires.txt +0 -6
  92. openap-1.2/openap.egg-info/top_level.txt +0 -1
  93. openap-1.2/setup.cfg +0 -4
  94. openap-1.2/setup.py +0 -114
  95. openap-1.2/test/test_actypes.py +0 -18
  96. openap-1.2/test/test_casadi.py +0 -456
  97. openap-1.2/test/test_drag.py +0 -36
  98. openap-1.2/test/test_emission.py +0 -82
  99. openap-1.2/test/test_fuel.py +0 -34
  100. openap-1.2/test/test_kinematic.py +0 -8
  101. openap-1.2/test/test_nav.py +0 -17
  102. openap-1.2/test/test_phase.py +0 -78
  103. openap-1.2/test/test_prop.py +0 -10
  104. openap-1.2/test/test_thrust.py +0 -61
  105. openap-1.2/test/test_trajectory.py +0 -74
  106. {openap-1.2 → openap-1.4}/openap/__init__.py +0 -0
  107. {openap-1.2 → openap-1.4}/openap/data/.gitignore +0 -0
  108. {openap-1.2 → openap-1.4}/openap/data/LICENSE +0 -0
  109. {openap-1.2 → openap-1.4}/openap/data/nav/fix.dat +0 -0
  110. {openap-1.2 → openap-1.4}/openap/data/nav/nav.dat +0 -0
  111. {openap-1.2 → openap-1.4}/openap/data/wrap/a319.txt +0 -0
  112. {openap-1.2 → openap-1.4}/openap/data/wrap/a320.txt +0 -0
  113. {openap-1.2 → openap-1.4}/openap/data/wrap/a321.txt +0 -0
  114. {openap-1.2 → openap-1.4}/openap/data/wrap/a332.txt +0 -0
  115. {openap-1.2 → openap-1.4}/openap/data/wrap/a333.txt +0 -0
  116. {openap-1.2 → openap-1.4}/openap/data/wrap/a343.txt +0 -0
  117. {openap-1.2 → openap-1.4}/openap/data/wrap/a388.txt +0 -0
  118. {openap-1.2 → openap-1.4}/openap/data/wrap/b737.txt +0 -0
  119. {openap-1.2 → openap-1.4}/openap/data/wrap/b738.txt +0 -0
  120. {openap-1.2 → openap-1.4}/openap/data/wrap/b739.txt +0 -0
  121. {openap-1.2 → openap-1.4}/openap/data/wrap/b744.txt +0 -0
  122. {openap-1.2 → openap-1.4}/openap/data/wrap/b752.txt +0 -0
  123. {openap-1.2 → openap-1.4}/openap/data/wrap/b763.txt +0 -0
  124. {openap-1.2 → openap-1.4}/openap/data/wrap/b77w.txt +0 -0
  125. {openap-1.2 → openap-1.4}/openap/data/wrap/b788.txt +0 -0
  126. {openap-1.2 → openap-1.4}/openap/data/wrap/b789.txt +0 -0
  127. {openap-1.2 → openap-1.4}/openap/data/wrap/e190.txt +0 -0
  128. {openap-1.2 → openap-1.4}/openap/extra/statistics.py +0 -0
  129. {openap-1.2 → openap-1.4}/openap/phase.py +0 -0
  130. {openap-1.2 → openap-1.4}/openap/traj/__init__.py +0 -0
  131. {openap-1.2 → openap-1.4}/openap/traj/gen.py +0 -0
openap-1.4/LICENSE ADDED
@@ -0,0 +1,165 @@
1
+ GNU LESSER GENERAL PUBLIC LICENSE
2
+ Version 3, 29 June 2007
3
+
4
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
5
+ Everyone is permitted to copy and distribute verbatim copies
6
+ of this license document, but changing it is not allowed.
7
+
8
+
9
+ This version of the GNU Lesser General Public License incorporates
10
+ the terms and conditions of version 3 of the GNU General Public
11
+ License, supplemented by the additional permissions listed below.
12
+
13
+ 0. Additional Definitions.
14
+
15
+ As used herein, "this License" refers to version 3 of the GNU Lesser
16
+ General Public License, and the "GNU GPL" refers to version 3 of the GNU
17
+ General Public License.
18
+
19
+ "The Library" refers to a covered work governed by this License,
20
+ other than an Application or a Combined Work as defined below.
21
+
22
+ An "Application" is any work that makes use of an interface provided
23
+ by the Library, but which is not otherwise based on the Library.
24
+ Defining a subclass of a class defined by the Library is deemed a mode
25
+ of using an interface provided by the Library.
26
+
27
+ A "Combined Work" is a work produced by combining or linking an
28
+ Application with the Library. The particular version of the Library
29
+ with which the Combined Work was made is also called the "Linked
30
+ Version".
31
+
32
+ The "Minimal Corresponding Source" for a Combined Work means the
33
+ Corresponding Source for the Combined Work, excluding any source code
34
+ for portions of the Combined Work that, considered in isolation, are
35
+ based on the Application, and not on the Linked Version.
36
+
37
+ The "Corresponding Application Code" for a Combined Work means the
38
+ object code and/or source code for the Application, including any data
39
+ and utility programs needed for reproducing the Combined Work from the
40
+ Application, but excluding the System Libraries of the Combined Work.
41
+
42
+ 1. Exception to Section 3 of the GNU GPL.
43
+
44
+ You may convey a covered work under sections 3 and 4 of this License
45
+ without being bound by section 3 of the GNU GPL.
46
+
47
+ 2. Conveying Modified Versions.
48
+
49
+ If you modify a copy of the Library, and, in your modifications, a
50
+ facility refers to a function or data to be supplied by an Application
51
+ that uses the facility (other than as an argument passed when the
52
+ facility is invoked), then you may convey a copy of the modified
53
+ version:
54
+
55
+ a) under this License, provided that you make a good faith effort to
56
+ ensure that, in the event an Application does not supply the
57
+ function or data, the facility still operates, and performs
58
+ whatever part of its purpose remains meaningful, or
59
+
60
+ b) under the GNU GPL, with none of the additional permissions of
61
+ this License applicable to that copy.
62
+
63
+ 3. Object Code Incorporating Material from Library Header Files.
64
+
65
+ The object code form of an Application may incorporate material from
66
+ a header file that is part of the Library. You may convey such object
67
+ code under terms of your choice, provided that, if the incorporated
68
+ material is not limited to numerical parameters, data structure
69
+ layouts and accessors, or small macros, inline functions and templates
70
+ (ten or fewer lines in length), you do both of the following:
71
+
72
+ a) Give prominent notice with each copy of the object code that the
73
+ Library is used in it and that the Library and its use are
74
+ covered by this License.
75
+
76
+ b) Accompany the object code with a copy of the GNU GPL and this license
77
+ document.
78
+
79
+ 4. Combined Works.
80
+
81
+ You may convey a Combined Work under terms of your choice that,
82
+ taken together, effectively do not restrict modification of the
83
+ portions of the Library contained in the Combined Work and reverse
84
+ engineering for debugging such modifications, if you also do each of
85
+ the following:
86
+
87
+ a) Give prominent notice with each copy of the Combined Work that
88
+ the Library is used in it and that the Library and its use are
89
+ covered by this License.
90
+
91
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
92
+ document.
93
+
94
+ c) For a Combined Work that displays copyright notices during
95
+ execution, include the copyright notice for the Library among
96
+ these notices, as well as a reference directing the user to the
97
+ copies of the GNU GPL and this license document.
98
+
99
+ d) Do one of the following:
100
+
101
+ 0) Convey the Minimal Corresponding Source under the terms of this
102
+ License, and the Corresponding Application Code in a form
103
+ suitable for, and under terms that permit, the user to
104
+ recombine or relink the Application with a modified version of
105
+ the Linked Version to produce a modified Combined Work, in the
106
+ manner specified by section 6 of the GNU GPL for conveying
107
+ Corresponding Source.
108
+
109
+ 1) Use a suitable shared library mechanism for linking with the
110
+ Library. A suitable mechanism is one that (a) uses at run time
111
+ a copy of the Library already present on the user's computer
112
+ system, and (b) will operate properly with a modified version
113
+ of the Library that is interface-compatible with the Linked
114
+ Version.
115
+
116
+ e) Provide Installation Information, but only if you would otherwise
117
+ be required to provide such information under section 6 of the
118
+ GNU GPL, and only to the extent that such information is
119
+ necessary to install and execute a modified version of the
120
+ Combined Work produced by recombining or relinking the
121
+ Application with a modified version of the Linked Version. (If
122
+ you use option 4d0, the Installation Information must accompany
123
+ the Minimal Corresponding Source and Corresponding Application
124
+ Code. If you use option 4d1, you must provide the Installation
125
+ Information in the manner specified by section 6 of the GNU GPL
126
+ for conveying Corresponding Source.)
127
+
128
+ 5. Combined Libraries.
129
+
130
+ You may place library facilities that are a work based on the
131
+ Library side by side in a single library together with other library
132
+ facilities that are not Applications and are not covered by this
133
+ License, and convey such a combined library under terms of your
134
+ choice, if you do both of the following:
135
+
136
+ a) Accompany the combined library with a copy of the same work based
137
+ on the Library, uncombined with any other library facilities,
138
+ conveyed under the terms of this License.
139
+
140
+ b) Give prominent notice with the combined library that part of it
141
+ is a work based on the Library, and explaining where to find the
142
+ accompanying uncombined form of the same work.
143
+
144
+ 6. Revised Versions of the GNU Lesser General Public License.
145
+
146
+ The Free Software Foundation may publish revised and/or new versions
147
+ of the GNU Lesser General Public License from time to time. Such new
148
+ versions will be similar in spirit to the present version, but may
149
+ differ in detail to address new problems or concerns.
150
+
151
+ Each version is given a distinguishing version number. If the
152
+ Library as you received it specifies that a certain numbered version
153
+ of the GNU Lesser General Public License "or any later version"
154
+ applies to it, you have the option of following the terms and
155
+ conditions either of that published version or of any later version
156
+ published by the Free Software Foundation. If the Library as you
157
+ received it does not specify a version number of the GNU Lesser
158
+ General Public License, you may choose any version of the GNU Lesser
159
+ General Public License ever published by the Free Software Foundation.
160
+
161
+ If the Library as you received it specifies that a proxy can decide
162
+ whether future versions of the GNU Lesser General Public License shall
163
+ apply, that proxy's public statement of acceptance of any version is
164
+ permanent authorization for you to choose that version for the
165
+ Library.
openap-1.4/PKG-INFO ADDED
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.1
2
+ Name: openap
3
+ Version: 1.4
4
+ Summary: Open Aircraft Performance Model (OpenAP) in Python
5
+ Home-page: https://openap.dev
6
+ License: GNU Lesser General Public License v3 (LGPLv3)
7
+ Author: Junzi Sun
8
+ Author-email: j.sun-1@tudelft.nl
9
+ Requires-Python: >=3.9
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
13
+ Classifier: License :: Other/Proprietary License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
20
+ Requires-Dist: matplotlib (>=3.1)
21
+ Requires-Dist: numpy (>=1.24)
22
+ Requires-Dist: pandas (>=1.2)
23
+ Requires-Dist: pyyaml (>=5.1)
24
+ Requires-Dist: scikit-fuzzy (>=0.4)
25
+ Requires-Dist: scipy (>=1.7)
26
+ Project-URL: Repository, https://github.com/junzis/openap
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Open Aircraft Performance Model (OpenAP) and Toolkit
30
+
31
+ This repository contains the OpenAP model data and Python packages for aircraft performance and emission calculations.
32
+
33
+ More information on user guide and related articles at: [OpenAP.dev](https://openap.dev/)
34
+
35
+ The most recent development fork of OpenAP is: https://github.com/junzis/openap. For discussions and issues, you can use the following links:
36
+
37
+ - https://github.com/junzis/openap/discussions (discussions, feedback and suggestions)
38
+ - https://github.com/junzis/openap/issues (bug reporting)
39
+
40
+
41
+ ## Install
42
+
43
+
44
+ Install the development branch from GitHub:
45
+
46
+ ```sh
47
+ pip install --upgrade git+https://github.com/junzis/openap
48
+ ```
49
+
50
+ Install the latest stable release from pypi:
51
+
52
+ ```sh
53
+ pip install --upgrade openap
54
+ ```
55
+
56
+ Install the latest stable release on conda-forge:
57
+
58
+ ```sh
59
+ conda install openap
60
+ ```
61
+
62
+ ## Content
63
+
64
+ OpenAP library has two parts, which are __OpenAP model data__ and __OpenAP Python packages__.
65
+
66
+
67
+ ### Model data
68
+
69
+ Data in this repository includes:
70
+
71
+ - Aircraft data: Collected from open literature.
72
+ - Engines data: Primarily from ICAO emission data-bank, including fuel flow and emissions.
73
+ - Drag polar data: Exclusively derived from open data ([reference](https://junzis.com/files/openap_dragpolar.pdf)).
74
+ - Kinematic data: Kinematic model (formally [WRAP](https://github.com/junzis/wrap)) describe speed, altitude, and vertical rate.
75
+ - Navigation data: Airport and waypoints obtained from [X-plane ](https://developer.x-plane.com/docs/data-development-documentation/).
76
+
77
+
78
+ ### Python packages
79
+
80
+ The OpenAP Python library includes the following packages:
81
+
82
+ - `prop`: a package for accessing aircraft and engine properties
83
+ - `thrust`: a package for computing aircraft thrust
84
+ - `drag`: a package for computing aircraft drag
85
+ - `fuel`: a package for computing fuel consumption
86
+ - `emission`: a package for computing aircraft emissions
87
+ - `kinematic`: a package for accessing WRAP data
88
+ - `aero`: a package for common aeronautical conversions
89
+ - `nav`: a package for accessing navigation information
90
+ - `segment`: a package for determining climb, cruise, descent, level flight
91
+ - `phase`: a wrapper around `segment`, providing identification of all flight phases
92
+ - `traj`: package contains a set of tools for trajectory generation
93
+
94
+
95
+
96
+ ## Citing OpenAP
97
+
98
+ ```
99
+ @article{sun2020openap,
100
+ title={OpenAP: An open-source aircraft performance model for air transportation studies and simulations},
101
+ author={Sun, Junzi and Hoekstra, Jacco M and Ellerbroek, Joost},
102
+ journal={Aerospace},
103
+ volume={7},
104
+ number={8},
105
+ pages={104},
106
+ year={2020},
107
+ publisher={Multidisciplinary Digital Publishing Institute}
108
+ }
109
+ ```
110
+
@@ -4,7 +4,10 @@ This repository contains the OpenAP model data and Python packages for aircraft
4
4
 
5
5
  More information on user guide and related articles at: [OpenAP.dev](https://openap.dev/)
6
6
 
7
- Use the [junzis/openap/discussions](https://github.com/junzis/openap/discussions) to provide your feedback/suggestions, and use [junzis/openap/issues](https://github.com/junzis/openap/issues) to report bugs.
7
+ The most recent development fork of OpenAP is: https://github.com/junzis/openap. For discussions and issues, you can use the following links:
8
+
9
+ - https://github.com/junzis/openap/discussions (discussions, feedback and suggestions)
10
+ - https://github.com/junzis/openap/issues (bug reporting)
8
11
 
9
12
 
10
13
  ## Install
@@ -22,7 +25,7 @@ Install the latest stable release from pypi:
22
25
  pip install --upgrade openap
23
26
  ```
24
27
 
25
- Install the latest stable release on conda-froge:
28
+ Install the latest stable release on conda-forge:
26
29
 
27
30
  ```sh
28
31
  conda install openap
@@ -26,11 +26,11 @@ class Thrust(thrust.Thrust, metaclass=RemoveDecoratorMeta):
26
26
 
27
27
 
28
28
  class FuelFlow(fuel.FuelFlow, metaclass=RemoveDecoratorMeta):
29
- def __init__(self, ac, eng=None):
29
+ def __init__(self, ac, eng=None, **kwargs):
30
30
  self.Drag = Drag
31
31
  self.Thrust = Thrust
32
- super(FuelFlow, self).__init__(ac=ac, eng=eng)
32
+ super(FuelFlow, self).__init__(ac=ac, eng=eng, **kwargs)
33
33
 
34
34
 
35
35
  class Emission(emission.Emission, metaclass=RemoveDecoratorMeta):
36
- pass
36
+ pass
@@ -24,6 +24,9 @@ beta = -0.0065 # [K/m] ISA temp gradient below tropopause
24
24
  r_earth = 6371000.0 # m, average earth radius
25
25
  a0 = 340.293988 # m/s, sea level speed of sound ISA, sqrt(gamma*R*T0)
26
26
 
27
+ deg = 180 / 3.14159 # radians -> degrees
28
+ rad = 3.14159 / 180 # degrees -> radians
29
+
27
30
 
28
31
  def atmos(h):
29
32
  """Compute press, density and temperature at a given altitude.
@@ -116,10 +119,10 @@ def distance(lat1, lon1, lat2, lon2, h=0):
116
119
 
117
120
  """
118
121
  # convert decimal degrees to radians
119
- lat1 = np.radians(lat1)
120
- lon1 = np.radians(lon1)
121
- lat2 = np.radians(lat2)
122
- lon2 = np.radians(lon2)
122
+ lat1 = lat1 * rad
123
+ lon1 = lon1 * rad
124
+ lat2 = lat2 * rad
125
+ lon2 = lon2 * rad
123
126
 
124
127
  # haversine formula
125
128
  dlon = lon2 - lon1
@@ -143,14 +146,14 @@ def bearing(lat1, lon1, lat2, lon2):
143
146
  SX or MX: Bearing (in degrees). Between 0 and 360.
144
147
 
145
148
  """
146
- lat1 = np.radians(lat1)
147
- lon1 = np.radians(lon1)
148
- lat2 = np.radians(lat2)
149
- lon2 = np.radians(lon2)
149
+ lat1 = lat1 * rad
150
+ lon1 = lon1 * rad
151
+ lat2 = lat2 * rad
152
+ lon2 = lon2 * rad
150
153
  x = np.sin(lon2 - lon1) * np.cos(lat2)
151
154
  y = np.cos(lat1) * np.sin(lat2) - np.sin(lat1) * np.cos(lat2) * np.cos(lon2 - lon1)
152
155
  initial_bearing = np.arctan2(x, y)
153
- initial_bearing = np.degrees(initial_bearing)
156
+ initial_bearing = initial_bearing * deg
154
157
  bearing = (initial_bearing + 360) % 360
155
158
  return bearing
156
159
 
@@ -195,9 +198,9 @@ def latlon(lat1, lon1, d, brg, h=0):
195
198
 
196
199
  """
197
200
  # convert decimal degrees to radians
198
- lat1 = np.radians(lat1)
199
- lon1 = np.radians(lon1)
200
- brg = np.radians(brg)
201
+ lat1 = lat1 * rad
202
+ lon1 = lon1 * rad
203
+ brg = brg * rad
201
204
 
202
205
  # haversine formula
203
206
  lat2 = np.arcsin(
@@ -208,8 +211,8 @@ def latlon(lat1, lon1, d, brg, h=0):
208
211
  np.sin(brg) * np.sin(d / (r_earth + h)) * np.cos(lat1),
209
212
  np.cos(d / (r_earth + h)) - np.sin(lat1) * np.sin(lat2),
210
213
  )
211
- lat2 = np.degrees(lat2)
212
- lon2 = np.degrees(lon2)
214
+ lat2 = lat2 * deg
215
+ lon2 = lon2 * deg
213
216
  return lat2, lon2
214
217
 
215
218
 
@@ -356,7 +359,7 @@ def crossover_alt(v_cas, mach):
356
359
  """
357
360
  mach = 1e-4 if mach < 1e-4 else mach
358
361
  delta = ((0.2 * (v_cas / a0) ** 2 + 1) ** 3.5 - 1) / (
359
- (0.2 * mach ** 2 + 1) ** 3.5 - 1
362
+ (0.2 * mach**2 + 1) ** 3.5 - 1
360
363
  )
361
364
  h = T0 / beta * (delta ** (-1 * R * beta / g0) - 1)
362
365
  return h
@@ -2,6 +2,7 @@ from numpy import *
2
2
  from casadi import * # this override the previous
3
3
 
4
4
  # numpy functions -> casadi functions
5
+ abs = casadi.fabs
5
6
  where = casadi.if_else
6
7
  maximum = casadi.fmax
7
8
  minimum = casadi.fmin
@@ -0,0 +1,120 @@
1
+ # %%
2
+ import numpy as np
3
+ from scipy import optimize
4
+
5
+ # %%
6
+ gas_constant_water_vapor = 461.51
7
+ gas_constant_dry_air = 287.05
8
+ temperature_steam = 372.15
9
+ pressure_steam = 101325
10
+ temperature_ice_point = 273.16
11
+ pressure_ice_point = 611.73
12
+
13
+ ei_water = 1.2232
14
+ spec_air_heat_capacity = 1004
15
+ ratio_mass_water_vapor_air = 0.622
16
+ spec_combustion_heat = 43e6
17
+ propulsion_efficiency = 0.4 # variable
18
+
19
+
20
+ def saturation_pressure_over_water(temperature):
21
+ # Murphy and Koop 2005
22
+ return np.exp(
23
+ 54.842763
24
+ - 6763.22 / temperature
25
+ - 4.210 * np.log(temperature)
26
+ + 0.000367 * temperature
27
+ + np.tanh(0.0415 * (temperature - 218.8))
28
+ * (
29
+ 53.878
30
+ - 1331.22 / temperature
31
+ - 9.44523 * np.log(temperature)
32
+ + 0.014025 * temperature
33
+ )
34
+ )
35
+
36
+
37
+ def saturation_pressure_over_ice(temperature):
38
+ # Murphy and Koop 2005
39
+ return np.exp(
40
+ 9.550426
41
+ - 5723.265 / temperature
42
+ + 3.53068 * np.log(temperature)
43
+ - 0.00728332 * temperature
44
+ )
45
+
46
+
47
+ def relative_humidity(specific_humidity, pressure, temperature, to="ice"):
48
+ assert to in ("ice", "water")
49
+
50
+ if to == "ice":
51
+ saturation_pressure = saturation_pressure_over_ice(temperature)
52
+ else:
53
+ saturation_pressure = saturation_pressure_over_water(temperature)
54
+
55
+ return (
56
+ specific_humidity
57
+ * pressure
58
+ * (gas_constant_water_vapor / gas_constant_dry_air)
59
+ / saturation_pressure
60
+ )
61
+
62
+
63
+ def critical_temperature_water(pressure):
64
+ isobaric_mixing_slope = (
65
+ ei_water
66
+ * spec_air_heat_capacity
67
+ * pressure
68
+ / (
69
+ ratio_mass_water_vapor_air
70
+ * spec_combustion_heat
71
+ * (1 - propulsion_efficiency)
72
+ )
73
+ )
74
+
75
+ crit_temp_water = (
76
+ -46.46
77
+ + 9.43 * np.log(isobaric_mixing_slope - 0.053)
78
+ + 0.72 * (np.log(isobaric_mixing_slope - 0.053)) ** 2
79
+ + 273.15
80
+ )
81
+
82
+ return crit_temp_water
83
+
84
+
85
+ def critical_temperature_water_and_ice(pressure):
86
+ def func(temp_critical, crit_temp_water, isobaric_mixing_slope):
87
+ return (
88
+ saturation_pressure_over_water(crit_temp_water)
89
+ - saturation_pressure_over_ice(temp_critical)
90
+ - (crit_temp_water - temp_critical) * isobaric_mixing_slope
91
+ )
92
+
93
+ isobaric_mixing_slope = (
94
+ ei_water
95
+ * spec_air_heat_capacity
96
+ * pressure
97
+ / (
98
+ ratio_mass_water_vapor_air
99
+ * spec_combustion_heat
100
+ * (1 - propulsion_efficiency)
101
+ )
102
+ )
103
+
104
+ crit_temp_water = (
105
+ -46.46
106
+ + 9.43 * np.log(isobaric_mixing_slope - 0.053)
107
+ + 0.72 * (np.log(isobaric_mixing_slope - 0.053)) ** 2
108
+ + 273.15
109
+ )
110
+
111
+ sol = optimize.root_scalar(
112
+ func,
113
+ args=(crit_temp_water, isobaric_mixing_slope),
114
+ bracket=[100, crit_temp_water],
115
+ method="brentq",
116
+ )
117
+ # print(sol.root, sol.iterations, sol.function_calls)
118
+ crit_temp_ice = sol.root
119
+
120
+ return crit_temp_water, crit_temp_ice
@@ -2,6 +2,7 @@ orig,new
2
2
  a124,b744
3
3
  a306,a332
4
4
  a310,a319
5
+ a318,a319
5
6
  at72,e145
6
7
  at75,e145
7
8
  at76,e145
@@ -14,10 +15,10 @@ c525,c550
14
15
  c56x,c550
15
16
  crj2,e145
16
17
  crj9,e75l
17
- dh8d,e145
18
18
  e290,e190
19
- lj45,c550
19
+ glf5,glf6
20
+ gl5t,glf6
21
+ lj45,glf6
20
22
  md11,b773
21
23
  pc24,c550
22
- sf34,e145
23
24
  su95,e170
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A319neo
2
2
 
3
+ pax:
4
+ max: 160
5
+ low: 120
6
+ high: 150
7
+
3
8
  fuselage:
4
9
  length: 33.84
5
10
  height: 4.14
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A320neo
2
2
 
3
+ pax:
4
+ max: 194
5
+ low: 150
6
+ high: 180
7
+
3
8
  fuselage:
4
9
  length: 37.57
5
10
  height: 4.14
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A321neo
2
2
 
3
+ pax:
4
+ max: 244
5
+ low: 180
6
+ high: 220
7
+
3
8
  fuselage:
4
9
  length: 44.51
5
10
  height: 4.14
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A319
2
2
 
3
+ pax:
4
+ max: 156
5
+ low: 110
6
+ high: 140
7
+
3
8
  fuselage:
4
9
  length: 33.84
5
10
  height: 4.14
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A320
2
2
 
3
+ pax:
4
+ max: 180
5
+ low: 140
6
+ high: 170
7
+
3
8
  fuselage:
4
9
  length: 37.57
5
10
  height: 4.14
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A321
2
2
 
3
+ pax:
4
+ max: 220
5
+ low: 170
6
+ high: 210
7
+
3
8
  fuselage:
4
9
  length: 44.51
5
10
  height: 4.14
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A330-200
2
2
 
3
+ pax:
4
+ max: 406
5
+ low: 220
6
+ high: 260
7
+
3
8
  fuselage:
4
9
  length: 58.82
5
10
  height: 5.64
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A330-300
2
2
 
3
+ pax:
4
+ max: 440
5
+ low: 250
6
+ high: 290
7
+
3
8
  fuselage:
4
9
  length: 63.67
5
10
  height: 5.64
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A340-300
2
2
 
3
+ pax:
4
+ max: 440
5
+ low: 250
6
+ high: 290
7
+
3
8
  fuselage:
4
9
  length: 63.69
5
10
  height: 5.64
@@ -1,5 +1,11 @@
1
1
  aircraft: Airbus A350-900
2
2
 
3
+ pax:
4
+ max: 440
5
+ low: 300
6
+ high: 350
7
+
8
+
3
9
  fuselage:
4
10
  length: 66.8
5
11
  height: 6.09
@@ -1,5 +1,10 @@
1
1
  aircraft: Airbus A380-800
2
2
 
3
+ pax:
4
+ max: 853
5
+ low: 410
6
+ high: 620
7
+
3
8
  fuselage:
4
9
  length: 72.72
5
10
  height: 8.41
@@ -1,5 +1,11 @@
1
1
  aircraft: Boeing 737 MAX 7
2
2
 
3
+ pax:
4
+ max: 172
5
+ low: 138
6
+ high: 153
7
+
8
+
3
9
  fuselage:
4
10
  length: 33.6
5
11
  height: 3.73