ACE3/docs/wiki/framework/advanced-ballistics-framework.md
jonpas 65df821e2b Add wiki ACEX sections and merge Mission Makers and Framework sections (#4307)
* Update documentation guidelines

* Add version info part 1

* Add version info part 2

* Add removed in version to frontmatter and tag testmissions as removed

* Add version info part 3

* Seaparate ACE3 and ACEX Features/Framework menus, Add ACEX Headless documentation

* Add ACEX support to extract_dependencies.py

* Merge useful-functions into frameworks

* Move class-names to main menu

* Prettify class-names table titles

* Fix table of contents on documentation guidelines and tips

* Merge mission-tools into frameworks

* Merge modules into frameworks

* Rename to Frameworks (plural)

* Fix capitalization in class-names

* Improve wiki menu positioning

* Add 'mod' to documentation guidelines

* Update frameworks sections description for new content

* Update wiki menu descriptions

* Fix class-names 4 digit versions

* More places for descriptions

* Include documentation in PRs if applicable note

* Add short ACE3 and ACEX description page, outlining the difference
2016-09-08 21:19:07 +02:00

2.7 KiB

layout title description group order parent mod version
wiki Advanced Ballistics Framework Explains how to use the Advanced Ballistics framework. framework 5 wiki ace
major minor patch
3 0 0

1. Configs Values

Reference CfgAmmo Reference for examples of bullets with correct configs. It is probably best to modify an example that's close to the bullet you are trying to add.

All values are in METRIC units!

1.1 CfgWeapons

Example: M4

class CfgWeapons {
    class yourWeaponClass {
        // >1:7 inch rifle twist
        // 7 inches * 25.4(mm/in) = 177.8 mm
        // Same as the Capital T in [Miller twist rule](https://en.wikipedia.org/wiki/Miller_twist_rule){:target="_blank"} (convert to metric)
        ACE_barrelTwist = 177.8;

        // >14.5 in (370 mm)
        ACE_barrelLength = 368.3;

        // Right handed is 1, Left is -1, none is 0
        // Leaving blank will default to 1 (almost everything is right-handed)
        // A smooth-bore gun (e.g. shotgun) would be `0`.
        ACE_twistDirection = 1;
    };
};

1.2 CfgAmmo

Example: B_556x45_Ball

class CfgAmmo {
    class yourAmmoClass {
        // Bullet diameter in mm (diameter is a little different from caliber)
        ACE_caliber = 5.69;

        ACE_bulletLength = 23.012;  // Bullet Length in mm
        ACE_bulletMass = 4.0176;  // Mass in grams (example is roughly 62 grains)

        // Array of muzzle velocity shifts in m/s with 11 data points from -15 °C to 35 °C
        // Example: At 0°C the shift will be -21.0
        ACE_ammoTempMuzzleVelocityShifts[] = {-27.20, -26.44, -23.76, -21.00, -17.54, -13.10, -7.95, -1.62, 6.24, 15.48, 27.75};

        //Array of ballistic coefficients (contains one element more than the velocity boundary array)
        ACE_ballisticCoefficients[] = {0.151};

        ACE_velocityBoundaries[] = {};  // Array of velocity boundaries
        ACE_standardAtmosphere = "ASM";  // "ASM" or "ICAO"
        ACE_dragModel = 7;  // Number that specifies the drag model [1, 2, 5, 6, 7, 8]

        // Array of muzzle velocities (same size as barrel length array)
        ACE_muzzleVelocities[] = {723, 764, 796, 825, 843, 866, 878, 892, 906, 915, 922, 900};

        // Array of barrel lengths (same size as muzzle velocity array)
        // Example, when shooting with the M4 barrel (`368.3`mm).
        // The length is between the 5th and 6th barrelLengths (`360.68, 391.16`).
        // So the muzzle velocity will be between 5th and 6th muzzleVelocities (`866, 878`).
        ACE_barrelLengths[] = {210.82, 238.76, 269.24, 299.72, 330.2, 360.68, 391.16, 419.1, 449.58, 480.06, 508.0, 609.6};
    };
};