User Tools

Site Tools


tools:a3flightmodeltool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tools:a3flightmodeltool [2026/07/19 15:34] – created rocktools:a3flightmodeltool [2026/07/20 12:28] (current) rock
Line 7: Line 7:
 ===== Pages ===== ===== Pages =====
  
-  * [[tools:arma3_flight_graph_tool:workflow|Step by step workflow]] +  * [[/tools:a3flightmodeltool#arma_3_flight_model_graph_tool_workflow|Step by step workflow]] 
-  * [[tools:arma3_flight_graph_tool:data_sources|Finding the source data]] +  * [[tools:a3flightmodeltool#finding_flight_model_source_data|Finding the source data]] 
-  * [[tools:arma3_flight_graph_tool:field_reference|Field reference]] +  * [[tools:a3flightmodeltool#flight_model_field_reference|Field reference]] 
-  * [[tools:arma3_flight_graph_tool:formulas|Formulas and estimates]] +  * [[tools:a3flightmodeltool#flight_model_formulas_and_estimates|Formulas and estimates]] 
-  * [[tools:arma3_flight_graph_tool:tuning_checklist|In-game tuning checklist]]+  * [[tools:a3flightmodeltool#in-game_flight_model_tuning_checklist|In-game tuning checklist]]
  
 ===== What the tool does ===== ===== What the tool does =====
Line 36: Line 36:
   * [[https://community.bohemia.net/wiki/CfgVehicles_Config_Reference|Bohemia Interactive - CfgVehicles config reference]]   * [[https://community.bohemia.net/wiki/CfgVehicles_Config_Reference|Bohemia Interactive - CfgVehicles config reference]]
  
-====== Arma 3 Flight Model Graph Tool Workflow ======+====== Flight Model Graph Tool Workflow ======
  
 Follow this process for each aircraft type. Do not tune duplicate editor variants separately unless they use genuinely different physics values. Follow this process for each aircraft type. Do not tune duplicate editor variants separately unless they use genuinely different physics values.
Line 172: Line 172:
  
 ^ Aircraft ^ Typical extracted config path ^ ^ Aircraft ^ Typical extracted config path ^
-| A-143 Buzzard | ''Q:\a3\air_f_gamma\Plane_Fighter_03\config.cpp''+| A-143 Buzzard | ''P:\a3\air_f_gamma\Plane_Fighter_03\config.cpp''
-| A-149 Gryphon | ''Q:\a3\air_f_jets\Plane_Fighter_04\config.cpp''+| A-149 Gryphon | ''P:\a3\air_f_jets\Plane_Fighter_04\config.cpp''
-| A-164 Wipeout | ''Q:\a3\air_f_epc\Plane_CAS_01\config.cpp''+| A-164 Wipeout | ''P:\a3\air_f_epc\Plane_CAS_01\config.cpp''
-| Caesar BTT | ''Q:\a3\air_f_exp\Plane_Civil_01\config.cpp''+| Caesar BTT | ''P:\a3\air_f_exp\Plane_Civil_01\config.cpp''
-| F/A-181 Black Wasp II | ''Q:\a3\air_f_jets\Plane_Fighter_01\config.cpp''+| F/A-181 Black Wasp II | ''P:\a3\air_f_jets\Plane_Fighter_01\config.cpp''
-| KH-3A Fenghuang | ''Q:\a3\air_f_exp\UAV_04\config.cpp''+| KH-3A Fenghuang | ''P:\a3\air_f_exp\UAV_04\config.cpp''
-| MQ-4A Greyhawk | ''Q:\a3\drones_f\Air_F_Gamma\UAV_02\config.cpp''+| MQ-4A Greyhawk | ''P:\a3\drones_f\Air_F_Gamma\UAV_02\config.cpp''
-| To-199 Neophron | ''Q:\a3\air_f_epc\Plane_CAS_02\config.cpp''+| To-199 Neophron | ''P:\a3\air_f_epc\Plane_CAS_02\config.cpp''
-| To-201 Shikra | ''Q:\a3\air_f_jets\Plane_Fighter_02\config.cpp''+| To-201 Shikra | ''P:\a3\air_f_jets\Plane_Fighter_02\config.cpp''
-| UCAV Sentinel | ''Q:\a3\air_f_jets\UAV_05\config.cpp''+| UCAV Sentinel | ''P:\a3\air_f_jets\UAV_05\config.cpp''
-| V-44 X Blackfish | ''Q:\a3\air_f_exp\VTOL_01\config.cpp''+| V-44 X Blackfish | ''P:\a3\air_f_exp\VTOL_01\config.cpp''
-| Y-32 Xi'an | ''Q:\a3\air_f_exp\VTOL_02\config.cpp'' | +| Y-32 Xi'an | ''P:\a3\air_f_exp\VTOL_02\config.cpp'' |
- +
-Search examples: +
- +
-<code> +
-rtk rg -n -i 'class .*Plane|simulation *= *"airplanex"|envelope\[]|thrustCoef\[]' Q:\a3 +
-rtk rg -n 'class I_Plane_Fighter_04_F|class Plane_Fighter_04_Base_F' Q:\a3 +
-</code>+
  
 ===== Your addon config ===== ===== Your addon config =====
Line 266: Line 259:
  
 Run the same test after each change. If the test method changes, do not compare the numbers as if they came from the same run. Run the same test after each change. If the test method changes, do not compare the numbers as if they came from the same run.
 +
 +====== Flight Model Field Reference ======
 +
 +This page maps the tool fields to Arma 3 config values and explains how to source or calculate each value.
 +
 +===== Identity =====
 +
 +^ Tool field ^ Config field ^ Meaning ^ How to fill it ^
 +| Class name | ''class MyPlane_F'' | Exact ''CfgVehicles'' class being tuned. | Copy from the addon config. Keep stable because inheritance, pylons, factions, scripts, and editor entries may reference it. |
 +| Display name | ''displayName'' | Editor-facing label. | Use only as a readable label. Do not use display names as identifiers. |
 +| Simulation | ''simulation'' | PlaneX aircraft should use ''airplaneX'' or inherited equivalent. | Verify the parent class. This tool is not for RotorLib Advanced Flight Model XML. |
 +| Source note | Tool note | Evidence trail for the current values. | Record source class, source file, inherited parent, measured data, and in-game test notes. |
 +
 +===== Flight model inputs =====
 +
 +^ Tool field ^ Exported? ^ Meaning ^ How to calculate or source it ^
 +| ''maxSpeed km/h'' | Yes, ''maxSpeed'' | Main speed reference used by PlaneX graph arrays and AI behaviour. | Use real level-flight max speed, existing config, or close BIS class. Tune thrust and drag until in-game level speed converges near this value. |
 +| ''mass kg'' | No | Tool-side mass for drag, climb, and power-to-weight estimates. | Use Geometry LOD mass or sourced aircraft mass. If unknown, start from a similar BIS aircraft and update after model mass is known. |
 +| ''base thrust N'' | No | Tool-side base thrust used with ''thrustCoef[]'' to estimate available thrust. | Use known engine thrust if available. If only power is known, estimate from ''thrust_N = power_W / speed_mps''. Otherwise calibrate until thrust and drag balance near top speed. |
 +| ''structural limit +g'' | No | Positive G reference used for graph warnings and envelope overlays. | Use published aircraft data or a conservative design target. Validate sustained turns and pull-ups in game. |
 +| ''structural limit -g'' | No | Negative G reference used for graph warnings. | Use published aircraft data or a conservative target lower than positive G for most aircraft. |
 +| ''stallSpeedForced km/h'' | Yes, if above 0 | Explicit stall reference where supported. | Leave 0 if the tool should estimate stall from ''envelope[]''. Set only if you have a sourced or tested stall speed. |
 +| ''landingSpeed km/h'' | Yes, ''landingSpeed'' | AI/autopilot landing reference speed. | Start at 1.20 to 1.35 times landing-configuration stall speed, then validate approach, flare, and runway behaviour. |
 +
 +===== Graph arrays =====
 +
 +^ Tool field ^ Exported config field ^ Speed range ^ Meaning ^ Tuning rule ^
 +| ''envelope[]'' | ''envelope[]'' | 0% to 125% of ''maxSpeed'' | Lift/load-factor curve in G. | Put the 1 g crossing near clean stall, peak around maneuvering speed, then taper high-speed lift. |
 +| ''thrustCoef[]'' | ''thrustCoef[]'' | 0% to 150% of ''maxSpeed'' | Speed-based multiplier for available thrust. | Shape acceleration and high-speed falloff so thrust and drag balance near intended top speed. |
 +| ''aileronCoef[]'' | ''aileronCoef[]'' | 0% to 150% of ''maxSpeed'' | Roll authority by speed. | Preserve low-speed control, avoid excessive high-speed roll response. |
 +| ''elevatorCoef[]'' | ''elevatorCoef[]'' | 0% to 150% of ''maxSpeed'' | Pitch authority by speed. | Tune rotation, flare, stall recovery, and high-speed G control alongside ''envelope[]''. |
 +| ''rudderCoef[]'' | ''rudderCoef[]'' | 0% to 150% of ''maxSpeed'' | Yaw authority by speed. | Keep enough low-speed runway authority, taper high-speed yaw to avoid abrupt lateral response. |
 +
 +The current editor uses 14 draggable points for each graph array. Imported arrays with a different count are resampled for editing.
 +
 +===== Drag and altitude =====
 +
 +^ Tool field ^ Config field ^ Meaning ^ How to tune ^
 +| ''airFrictionCoefs0[]'' | ''airFrictionCoefs0[]'' | Constant term of the PlaneX axis drag formula. | Use three model-space X/Y/Z values. Start from a similar BIS aircraft. |
 +| ''airFrictionCoefs1[]'' | ''airFrictionCoefs1[]'' | Linear term of the PlaneX axis drag formula. | Adjust broad drag behaviour across the speed range. |
 +| ''airFrictionCoefs2[]'' | ''airFrictionCoefs2[]'' | Quadratic term of the PlaneX axis drag formula. | Tune high-speed drag and level-flight top speed. |
 +| ''flapsFrictionCoef'' | ''flapsFrictionCoef'' | Additional drag when flaps are deployed. | Raise until approach speed and descent angle are useful without excessive braking. |
 +| ''gearsUpFrictionCoef'' | ''gearsUpFrictionCoef'' | Landing gear drag coefficient. | Tune gear-down speed loss and approach drag. Keep fixed-gear aircraft conservative. |
 +| ''airBrakeFrictionCoef'' | ''airBrakeFrictionCoef'' | Airbrake drag coefficient. | Tune dive recovery and combat-speed deceleration. Use 0 or omit if the aircraft has no airbrake. |
 +| ''altFullForce m'' | ''altFullForce'' | Altitude where thrust starts degrading. | Use engine type and target service profile. Below this, thrust remains at full force in the tool model. |
 +| ''altNoForce m'' | ''altNoForce'' | Altitude where thrust influence reaches zero. | Keep above ''altFullForce''. Validate climb and level speed at altitude. |
 +
 +===== Control scalars =====
 +
 +^ Tool field ^ Config field ^ Meaning ^ How to tune ^
 +| ''aileronSensitivity'' | ''aileronSensitivity'' | Broad scalar for roll response. | Use for whole-aircraft roll heaviness after the speed curve is shaped. |
 +| ''elevatorSensitivity'' | ''elevatorSensitivity'' | Broad scalar for pitch response. | Use for whole-aircraft pitch heaviness after ''elevatorCoef[]'' and ''envelope[]'' are plausible. |
 +| ''rudderInfluence'' | ''rudderInfluence'' | Broad yaw/rudder influence. | Tune with ''rudderCoef[]'' and runway handling. Very high values can make yaw feel arcade-like. |
 +
 +===== Exported snippet fields =====
 +
 +The tool exports:
 +
 +  * ''displayName''
 +  * ''simulation''
 +  * ''maxSpeed''
 +  * ''landingSpeed''
 +  * ''stallSpeedForced'' when above 0
 +  * ''envelope[]''
 +  * ''thrustCoef[]''
 +  * ''airFrictionCoefs0[]''
 +  * ''airFrictionCoefs1[]''
 +  * ''airFrictionCoefs2[]''
 +  * ''aileronCoef[]''
 +  * ''elevatorCoef[]''
 +  * ''rudderCoef[]''
 +  * ''aileronSensitivity''
 +  * ''elevatorSensitivity''
 +  * ''rudderInfluence''
 +  * ''flapsFrictionCoef''
 +  * ''gearsUpFrictionCoef''
 +  * ''airBrakeFrictionCoef''
 +  * ''altFullForce''
 +  * ''altNoForce''
 +
 +====== Flight Model Formulas and Estimates ======
 +
 +These formulas explain how the tool places graph points and how to calculate useful starting values.
 +
 +===== Unit conversions =====
 +
 +^ Convert ^ Formula ^
 +| km/h to m/s | ''speed_mps = speed_kmh / 3.6'' |
 +| m/s to km/h | ''speed_kmh = speed_mps * 3.6'' |
 +| horsepower to watts | ''power_W = hp * 745.7'' |
 +| kilowatts to watts | ''power_W = kW * 1000'' |
 +| kilograms force to newtons | ''force_N = kgf * 9.80665'' |
 +
 +===== Graph point speed stations =====
 +
 +For a graph array with ''N'' editable points and zero-based point index ''i'':
 +
 +<code ->
 +station_speed_kmh = maxSpeed_kmh * range * i / (N - 1)
 +</code>
 +
 +The current tool uses ''N = 14''.
 +
 +^ Array ^ Range multiplier ^ Last point ^
 +| ''envelope[]'' | 1.25 | 125% of ''maxSpeed'' |
 +| ''thrustCoef[]'' | 1.50 | 150% of ''maxSpeed'' |
 +| ''aileronCoef[]'' | 1.50 | 150% of ''maxSpeed'' |
 +| ''elevatorCoef[]'' | 1.50 | 150% of ''maxSpeed'' |
 +| ''rudderCoef[]'' | 1.50 | 150% of ''maxSpeed'' |
 +
 +Example for ''maxSpeed = 800'' and ''envelope[]'' point 6:
 +
 +<code ->
 +station_speed_kmh = 800 * 1.25 * 6 / 13
 +station_speed_kmh = 461.5
 +</code>
 +
 +===== Estimating stall from envelope[] =====
 +
 +When ''stallSpeedForced'' is 0, use the speed where ''envelope[]'' crosses 1 g as the clean stall estimate.
 +
 +If two adjacent points surround 1 g, interpolate between them:
 +
 +<code ->
 +t = (1 - lower_g) / (upper_g - lower_g)
 +stall_speed = lower_speed + t * (upper_speed - lower_speed)
 +</code>
 +
 +If no two points cross 1 g, the curve does not provide a useful clean stall estimate.
 +
 +===== Landing speed starting point =====
 +
 +Use landing-configuration stall speed if known:
 +
 +<code ->
 +landingSpeed = landing_stall_speed * 1.20 to 1.35
 +</code>
 +
 +Use the lower end for light aircraft with forgiving handling and the upper end for heavy, fast, or AI-sensitive aircraft.
 +
 +===== Maneuvering envelope starting point =====
 +
 +A practical initial shape:
 +
 +  * Below stall: below 1 g.
 +  * Around stall: crosses 1 g.
 +  * Maneuvering region: rises toward the desired positive G target.
 +  * High speed: tapers so the aircraft cannot sustain unrealistic maximum-speed turns.
 +
 +Use this relationship as a rough check:
 +
 +<code ->
 +approx_maneuver_speed = stall_speed * sqrt(positive_limit_g)
 +</code>
 +
 +This is only a tuning guide; Arma behaviour still needs in-game validation.
 +
 +===== PlaneX air friction formula =====
 +
 +Bohemia documents PlaneX air friction as a per-axis model-space calculation using ''airFrictionCoefs2[]'', ''airFrictionCoefs1[]'', and ''airFrictionCoefs0[]''.
 +
 +In simplified form for each axis:
 +
 +<code ->
 +friction_force = v * abs(v) * coef2 + v * coef1 + sign(v) * coef0
 +</code>
 +
 +The arrays contain three values:
 +
 +<code ->
 +airFrictionCoefs0[] = { X, Y, Z };
 +airFrictionCoefs1[] = { X, Y, Z };
 +airFrictionCoefs2[] = { X, Y, Z };
 +</code>
 +
 +Use the same axis ordering as the source config. Preserve signs and decimal precision when copying values.
 +
 +===== Base thrust estimate =====
 +
 +''base thrust N'' is a tool-side graph input, not an exported PlaneX config value.
 +
 +If static thrust is known:
 +
 +<code ->
 +baseThrustN = known_static_thrust_N
 +</code>
 +
 +If engine power is known instead:
 +
 +<code ->
 +baseThrustN = power_W / target_speed_mps
 +</code>
 +
 +For prop aircraft, choose a low to medium target speed near best climb or cruise. For jets, start with known static thrust if possible.
 +
 +If no thrust or power data exists, copy a similar BIS preset and calibrate until the Thrust and Drag views balance near the intended top speed.
 +
 +===== Climb estimate =====
 +
 +The tool estimates climb from excess power:
 +
 +<code ->
 +excess_thrust_N = thrust_N - drag_N
 +excess_power_W = excess_thrust_N * speed_mps
 +climb_mps = excess_power_W / (mass_kg * 9.80665)
 +</code>
 +
 +Use this only for comparison between tuning passes. Final climb rate must be checked in game because Arma control response, AI behaviour, payload, altitude, and model setup all affect the result.
 +
 +===== Altitude thrust factor =====
 +
 +A useful tuning assumption:
 +
 +  * Below ''altFullForce'', thrust remains fully available.
 +  * Between ''altFullForce'' and ''altNoForce'', thrust progressively reduces.
 +  * At or above ''altNoForce'', thrust influence reaches zero.
 +
 +Keep ''altNoForce'' higher than ''altFullForce''. If the values are too close, aircraft performance can collapse abruptly with altitude.
 +
 +====== In-game Flight Model Tuning Checklist ======
 +
 +Use this checklist after every meaningful curve or drag change.
 +
 +===== Preflight setup =====
 +
 +  * Build a temporary test class or keep the tuned class isolated in a test addon.
 +  * Use a fixed fuel and payload state.
 +  * Use clear weather and no wind.
 +  * Test at known altitude bands.
 +  * Record the config version or commit.
 +  * Record which preset or aircraft class was used as the baseline.
 +
 +===== Import sanity checks =====
 +
 +^ Check ^ Pass condition ^
 +| Class and parent | Correct aircraft class inherits from the intended parent. |
 +| ''simulation'' | Aircraft uses ''airplaneX'' or inherits it from the parent class. |
 +| Arrays | Graph arrays contain numeric values and no missing commas. |
 +| Drag arrays | ''airFrictionCoefs0/1/2[]'' each contain three numeric values. |
 +| Altitude limits | ''altNoForce'' is higher than ''altFullForce''. |
 +| Landing speed | ''landingSpeed'' is above the selected stall estimate. |
 +
 +===== Level flight tests =====
 +
 +Run level flight tests at:
 +
 +  * Sea level or low altitude.
 +  * Typical combat altitude.
 +  * Near ''altFullForce''.
 +  * Above ''altFullForce'' but below ''altNoForce''.
 +
 +Record:
 +
 +^ Test ^ Record ^
 +| Acceleration | Time from low speed to cruise speed. |
 +| Cruise | Stable speed at normal throttle and altitude. |
 +| Maximum level speed | Stable top speed at full throttle. |
 +| Altitude performance | Speed and climb degradation with altitude. |
 +
 +If top speed is too high, increase high-speed drag or reduce high-speed ''thrustCoef[]''. If acceleration is too weak but top speed is right, raise low/mid-speed ''thrustCoef[]'' and compensate high-speed drag if needed.
 +
 +===== Stall tests =====
 +
 +Test clean, flaps, and landing configuration.
 +
 +^ Test ^ Expected behaviour ^
 +| Clean stall | Stall begins near the target clean stall speed. |
 +| Flaps stall | Stall speed is lower or landing behaviour improves without becoming unstable. |
 +| Stall warning | Warning is useful before loss of control if configured. |
 +| Recovery | Nose-down recovery is possible without excessive altitude loss for the aircraft type. |
 +
 +If the clean stall is too fast, raise low-speed ''envelope[]'' around the 1 g crossing. If it is too slow, lower the same region.
 +
 +===== Takeoff tests =====
 +
 +Record:
 +
 +  * Rotation speed.
 +  * Lift-off speed.
 +  * Runway distance.
 +  * Pitch authority at rotation.
 +  * Gear-up acceleration.
 +
 +If the aircraft will not rotate, adjust low-speed ''elevatorCoef[]'' or ''elevatorSensitivity''. If it rotates but will not lift, adjust low-speed ''envelope[]''.
 +
 +===== Landing tests =====
 +
 +Record:
 +
 +  * Stable approach speed.
 +  * Sink rate.
 +  * Flare authority.
 +  * Touchdown speed.
 +  * Runway stopping distance.
 +  * AI approach behaviour if AI use matters.
 +
 +If approach is too fast, check ''landingSpeed'', flap drag, and low-speed lift. If the aircraft floats excessively, reduce low-speed lift or flap effect.
 +
 +===== Control tests =====
 +
 +^ Axis ^ What to check ^ Main fields ^
 +| Roll | Roll rate at takeoff, cruise, and high speed. | ''aileronCoef[]'', ''aileronSensitivity'' |
 +| Pitch | Rotation, flare, pull-up, and stall recovery. | ''elevatorCoef[]'', ''elevatorSensitivity'', ''envelope[]'' |
 +| Yaw | Runway tracking, slips, and high-speed yaw stability. | ''rudderCoef[]'', ''rudderInfluence'' |
 +
 +Use arrays for speed-specific problems. Use scalar fields when the whole aircraft feels too light or too heavy.
 +
 +===== Drag device tests =====
 +
 +^ Device ^ Test ^
 +| Flaps | Approach descent rate, speed loss, landing stability. |
 +| Gear | Gear-down speed loss and approach drag. |
 +| Airbrake | Dive recovery, combat deceleration, and high-speed braking. |
 +
 +Tune one device at a time. Do not change flap, gear, and airbrake drag together unless you are deliberately doing a broad reset.
 +
 +===== Test record template =====
 +
 +^ Field ^ Value ^
 +| Aircraft class |   |
 +| Config version |   |
 +| Baseline preset/class |   |
 +| Payload/fuel |   |
 +| Altitude |   |
 +| Weather/wind |   |
 +| Changed fields |   |
 +| Result |   |
 +| Next action |   |
 +
 +===== Acceptance criteria =====
 +
 +A tuning pass is ready to move forward when:
 +
 +  * The exported config loads without errors.
 +  * The aircraft can take off, climb, cruise, land, and recover from stalls.
 +  * The aircraft reaches a plausible level-flight maximum speed.
 +  * Altitude performance degrades smoothly.
 +  * Controls are useful at low speed and not excessive at high speed.
 +  * AI behaviour is acceptable for the intended role.
 +  * Source notes identify which values are extracted, estimated, or calibrated.
 +
  
tools/a3flightmodeltool.1784475289.txt.gz · Last modified: by rock