Performance files of aircraft in War Thunder calculated based on datamine. They are visualized as graphs at wtapc.org.
Currently those are files with:
- Engine power of all piston engine aircraft in War Thunder from -4km to 20km altitude(military power and WEP).
- Empty mass, fuel mass and armament mass of all piston engine aircraft.
- Names of flight-model files and ingame names of all piston engine aircraft.
Accuracy vs ingame engine power is within 99%-101% for vast majority of planes and 95%-105% for the rest.
Importantly, this repository contains all the scripts used to calculate them, based on War Thunder flight-model files from the public datamine.
The goal is to calculate most important performance metrics like
- climb rate at different speeds and altitudes
- top speeds.
Discord of WTAPC
GitHub repository of wtapc.org
Install pipx, with:
- First - install newest Python if you don't have it.
- Then clone this repository into your empty project.
- This repo uses Poetry for virtual environment, so to install it, follow these annoying steps:
3.1 Install pipx cause Poery recommends thatpy -m pip install --user pipx
3.2 Add pipx installation directoryto Path variable if it's not there.
3.3 Install poetry using pipx, not pip!pipx install poetry
3.4 Make poetry path to Path variable withpython3 -m pipx ensurepath
3.5 update poetry.lock file just to be surepoetry lock --no-update
3.6 *If you use Visual Studio Code: runpoetry config virtualenvs.in-project true
so that virtual environments are noticed by VS
3.7 Finally create v-env with the needed packages viapoetry install
.
Done, everything should work good.
Scripts are in performance_calculators
.
If you want to recalculate engine power, mass etc. files based of the newest WT datamine version:
- run
batch_runner.py
. It runs all the scripts of the repository and is interactive so you can choose what to run.
If you want to compare those calculations with actual engine power data from War Thunder:
- Climb in a plane of your choice in War Thunder test flight, at a constant IAS or TAS speed while logging engine power and altitude with WTRTI.
- Put the log .csv file in 'ingame_power_log_files' folder.
- Open
local_power_graph_script.py
and put the name of the log intoTEST_file_dir
. - Choose the same plane in
fm_files
, same speed and speed type. - Run the script and enjoy a graphs like this one!
If you want to learn how engine power is calculated in War Thunder, study plane_power_calculator.py
, the most important file in the repository. But it's very complicated (long and not coded very well). It took over a year to make via trial and error.
If you want to compare performace of different planes, better wait and once completed visit wtapc.org, it's more user friendly.
Pre-made .json files are in output_files
.
In engine power files 'military' refers to 100% throttle power setting in game, while WEP (War Emergency Power) is 110%.
They contain long arrays of numbers, which are engine power values at 0 forward speed (no ram air effect). Altitude is implicit - first value is at -3990m, second at 3980m, then at 3970m etc.... up to the last value in each array with engine power at 20000m.
The reason engine power starts at -4km is to account for ram air effect. When a plane is flying very fast at sea level, air is rammed at high pressure into the engine air intake so it's effectively at -1 <-> -3km depending on the air intake ram efficiency. If those values weren't calculated it'd not be possible to plot WT engine power at low altitude and high speed.
speed_mult
in those .json files is the efficiency of the air intake at transferring dynamic pressure of air into the super/turbocharger - efficiency of the air ram effect. it's an important variable used by rameffect_er
function, needed by the website to apply the air ram effect to the values from .json.
-
P-63 A-10, A-5 and C5 engine power graphs don't match ingame engine power very well. These 3 are calculated in a unique way; engine power above critical altitude doesn't drop proportionally to air pressure drop (concave), but in a convex way, and that's difficult to model. (look for
ConstRPM_bends_above_crit_alt
function inplane_power_calculator
, it's made to distinguish them). -
Tu-1 power is almost precise but also not exact.
-
Planes with constant pitch propeller have differnt RPMs at different speeds, and these scripts don't account for that. As a result, at low speeds those planes have more power on the graphs than in game. To resolve that propeller torque needs to be calculated and prop governor simulated.
-
Trottling losses below "AltitudeConstRPM" of 2nd and 3rd supercharger gear of some planes are imprecise (eg. Mosquitos).
- Propeller efficiency -> thrust -> thrust to weight of propeller aircraft
- Thrust and thrust to weight of jets
- The goal - climb rates and top speeds of all aircraft at all altitudes
For propeller efficiency and prop thrust, there's prop_efficiency_calculator.py
, which doesn't work yet.
-
gszabi99 and Oshida - Providing a reliable up to date datamine of WT flight-model files, essential for the project to even exist.
-
_avb_ - Making WTRTI, a tool necessary to make ingame engine power/altitude graphs. I used them as a comparison to calculated engine power during development. Without WTRTI, the project would take many more years to get to this stage.
-
Xelph - Helping to set up repo and GitHub Pages of wtapc.org. Advice on website-making and propeller efficiency.
-
dogeness Explaining how aero piston engines works IRL and in WT (a good read here), which helped figure out how to calculate engine power. Advice on graphs layout.
-
AdamTheEnginerd - A very big inspiration to start visualizing aircraft performance.