Strike Commander Jet Format :
=============================

By Fabien Sanglard
January 21st, 2014
Updated by remi leonard
August 4th, 2025
August 19, 2026

Jets are self-contained in IFF files: Everything is there:

Aerodynamic properties.
Damage area and HP.
Appearance.
Flight dynamics data.
Thrust characteristics.

## File Structure

Strike Commander jet files use the IFF (Interchange File Format) structure with the following hierarchy:

```
REAL
├── OBJT
│   ├── INFO        - Basic object information
│   ├── JETP        - Jet-specific properties
│   │   ├── DYNM    - Dynamics container
│   │   │   ├── DYNM - 4-byte sub-chunk
│   │   │   ├── ORDY - Empty chunk (0 bytes)
│   │   │   ├── STBL - 4-byte sub-chunk
│   │   │   ├── ATMO - 4-byte sub-chunk
│   │   │   ├── GRAV - Empty chunk (0 bytes), gravity enabled flag
│   │   │   ├── THRS - Thrust characteristics
│   │   │   └── JDYN - Flight dynamics data
│   │   ├── WEAP    - Weapons systems
│   │   ├── DAMG    - Damage model
│   │   └── ...     - Other jet properties
│   └── EXTE        - External references
└── APPR            - Appearance/3D model data
    └── POLY        - Polygon data
        ├── VERT    - Vertices
        ├── TRIS    - Triangles
        └── TXMS    - Texture mapping
```

## JDYN Chunk - Flight Dynamics Data

The JDYN (Jet Dynamics) chunk contains the core aerodynamic and flight
characteristics of the aircraft. This data is used by the flight
simulation system to calculate aircraft behavior each tick.

All multi-byte integers are little-endian. Most 32-bit fields are
24.8 fixed-point (divide by 256 to get the real value); this is noted
per field below.

### JDYN Structure (73 bytes total)

| Offset | Size | Type       | Field Name              | Description |
|--------|------|------------|--------------------------|-------------|
| 0      | 4    | fixed24.8  | FUEL                     | Fuel consumption target |
| 4      | 4    | fixed24.8  | field_new_02             | |
| 8      | 4    | fixed24.8  | boost_modifier_a         | Afterburner stage-1 multiplier, added to a base of 1.0 |
| 12     | 4    | fixed24.8  | boost_modifier_b         | Afterburner stage-2 multiplier, added on top of stage 1 |
| 16     | 4    | fixed24.8  | drag_modifier_a          | Conditional drag correction |
| 20     | 4    | fixed24.8  | drag_modifier_b          | Conditional drag correction |
| 24     | 4    | fixed24.8  | inertia_like             | Per-tick clamp on pitch rate change |
| 28     | 4    | fixed24.8  | pitch_rate_gain          | Pitch gain, also used as a lift gain |
| 32     | 1    | uint8      | rate_threshold           | Threshold, used as (value - 5) |
| 33     | 1    | uint8      | ctrl_modifier_a          | Additive term in roll and in the AoA/sideslip force |
| 34     | 1    | uint8      | ctrl_modifier_b          | Additive term in roll and in the AoA/sideslip force |
| 35     | 4    | fixed24.8  | envelope_vs_limit        | Vertical speed threshold for the flight-envelope gate |
| 39     | 4    | fixed24.8  | envelope_speed_limit     | Horizontal speed threshold for the flight-envelope gate |
| 43     | 1    | uint8      | envelope_bank_limit      | Bank angle threshold (degrees) for the flight-envelope gate |
| 44     | 1    | uint8      | envelope_pitch_limit     | Pitch angle threshold (degrees) for the flight-envelope gate |
| 45     | 1    | uint8      | envelope_pitch_margin    | Lower margin on the pitch angle threshold (degrees) |
| 46     | 4    | fixed24.8  | min_airspeed             | Stall speed threshold |
| 50     | 4    | fixed24.8  | drag_coefficient         | Drag coefficient (Cd*AoA^2 + (Cd/8)*sideslip^2) |
| 54     | 4    | fixed24.8  | airframe_response_scale  | Roll responsiveness scale; also used as the AoA/sideslip force gain |
| 58     | 1    | int8       | aileron                  | Roll rate clamp |
| 59     | 1    | uint8      | gouverne                 | Yaw gain |
| 60     | 1    | int8       | MAX_G                    | Load factor limit |
| 61     | 2    | int16      | field_22                 | |
| 63     | 2    | int16      | field_23                 | |
| 65     | 2    | int16      | field_24                 | |
| 67     | 4    | int32      | field_25                 | |
| 71     | 1    | int8       | field_26                 | |
| 72     | 1    | int8       | field_27                 | |

Roll, pitch and yaw rates are not stored in JDYN — they are computed
every tick from the fields above, combined with stick/rudder input
and current flight state.

### Example values

| Field | 747 | F-16 | F-22 | Learjet |
|---|---:|---:|---:|---:|
| ctrl_modifier_a | 3 | 3 | 3 | 3 |
| ctrl_modifier_b | 5 | 5 | 5 | 5 |
| envelope_pitch_margin | 5 | 5 | 5 | 5 |
| min_airspeed | 180.0 | 170.0 | 200.0 | 140.0 |
| drag_coefficient | 10.0 | 20.0 | 10.0 | 10.0 |
| airframe_response_scale | 70.0 | 4.6 | 7.0 | 5.0 |
| aileron | 20 | 30 | 40 | 25 |
| gouverne | 10 | 10 | 10 | 10 |
| MAX_G | 5 | 9 | 9 | 8 |
| envelope_vs_limit | 10.0 | 20.0 | 10.0 | 10.0 |
| envelope_speed_limit | 180.0 | 170.0 | 200.0 | 140.0 |
| envelope_bank_limit | 60 | 20 | 60 | 60 |
| envelope_pitch_limit | 20 | 40 | 25 | 30 |

## THRS Chunk - Thrust Characteristics

### THRS Structure (7 bytes)

| Offset | Size | Type      | Field Name         | Description |
|--------|------|-----------|---------------------|-------------|
| 0      | 4    | fixed24.8 | thrust_base          | Base engine thrust |
| 4      | 1    | int8      | afterburner_flag     | -1 when the aircraft has no afterburner |
| 5      | 1    | int8      | engine_param_1       | |
| 6      | 1    | int8      | engine_param_2       | |

### Example values

| Field | 747 | F-16 | F-22 | Learjet |
|---|---:|---:|---:|---:|
| thrust_base | 825560.0 | 150000.0 | 222000.0 | 50000.0 |
| afterburner_flag | -1 | -103 | -76 | -1 |
| engine_param_1 | 122 | -76 | -56 | -91 |
| engine_param_2 | 120 | -94 | -46 | -92 |

## File Format Notes

- All multi-byte integers are stored in little-endian format
- Most 32-bit numeric values in the JDYN chunk are 24.8 fixed-point
- The IFF chunk structure allows for extensibility
- The format supports both military jets and civilian aircraft (C-130, 747, Learjet)

## Related Files

Flight dynamics data has been extracted and analyzed in CSV format:
- `doc/jdynn_data/*.JDYN.csv` - JDYN chunk analysis for various aircraft
- `doc/jdynn_data/*.THRS.csv` - THRS chunk analysis for various aircraft