mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Commented all advanced ballistics functions
This commit is contained in:
parent
a8cbcb14d3
commit
c9ad2b279d
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Displays a wind info (colored arrow) in the top left corner of the screen
|
||||
*
|
||||
* Arguments:
|
||||
* 0: temperature - degrees celcius <float>
|
||||
* 1: pressure - hPa <float>
|
||||
* 2: relativeHumidity - value between 0.0 and 1.0 <float>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: density of air - kg * m^(-3) <float>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "defines.h"
|
||||
|
||||
|
@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the ammo temperature induced muzzle velocity shift
|
||||
*
|
||||
* Arguments:
|
||||
* 0: ammo - classname <string>
|
||||
* 1: temperature - degrees celcius <float>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: muzzle velocity shift - m/s <float>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_ammo", "_temperature", "_muzzleVelocityTable", "_muzzleVelocityShift", "_temperatureIndexA", "_temperatureIndexB", "_temperatureRatio"];
|
||||
|
@ -1,3 +1,20 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the atmospherically corrected ballistic coefficient
|
||||
*
|
||||
* Arguments:
|
||||
* 0: ballistic coefficient - G1-G7 <float>
|
||||
* 1: temperature - degrees celcius <float>
|
||||
* 2: pressure - hPa <float>
|
||||
* 3: relativeHumidity - value between 0.0 and 1.0 <float>
|
||||
* 4: atmosphereModel - ICAO or ASM <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* corrected ballistic coefficient <float>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
#include "defines.h"
|
||||
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the muzzle velocity shift caused by different barrel lengths
|
||||
*
|
||||
* Arguments:
|
||||
* 0: ammo - classname <string>
|
||||
* 0: weapon - classname <string>
|
||||
* 1: muzzle velocity - m/s <float>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: muzzle velocity shift - m/s <float>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_ammo", "_weapon", "_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity", "_lowerIndex", "_upperIndex", "_barrelLengthRatio", "_muzzleVelocityNew"];
|
||||
|
@ -1,3 +1,16 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the terrain hellmann exponent at a given world position
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _this - world position <posASL>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: hellmann exponent <float>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_hellmann_exponents", "_hellmann_index", "_windSource", "_nearObjects", "_isWater"];
|
||||
|
@ -1,3 +1,19 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the retardation of the bullet
|
||||
*
|
||||
* Arguments:
|
||||
* 0: drag model - 1-7 <integer>
|
||||
* 1: drag coefficient - bc <float>
|
||||
* 2: velocity - m/s <float>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: retardation - m/(s^2) <float>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Source: GNU Exterior Ballistics
|
||||
|
@ -1,3 +1,16 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the terrain roughness length at a given world position
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _this - world position <posASL>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: roughness length <float>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_roughness_lengths", "_windSource", "_nearBuildings", "_isWater"];
|
||||
|
@ -1,3 +1,23 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the stability factor of a bullet
|
||||
*
|
||||
* Arguments:
|
||||
* 0: caliber - inches <float>
|
||||
* 1: bullet length - inches <float>
|
||||
* 2: bullet mass - grains <float>
|
||||
* 3: barrel twist - inches <float>
|
||||
* 4: muzzle velocity shift - m/s <float>
|
||||
* 5: temperature - degrees celcius <float>
|
||||
* 6: barometric Pressure - hPA <float>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: stability factor <float>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
private ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure", "_l", "_t", "_stabilityFactor"];
|
||||
_caliber = _this select 0;
|
||||
_bulletLength = _this select 1;
|
||||
|
@ -1,3 +1,16 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Calculates the true wind speed at a given world position
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _this - world position <posASL>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: wind speed - m/s <float>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_windSpeed", "_windDir", "_height", "_newWindSpeed", "_windSource", "_roughnessLength"];
|
||||
|
@ -1,3 +1,14 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Displays a protractor in the top left corner of the screen
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define __dsp (uiNamespace getVariable "RscProtractor")
|
||||
|
@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Author: Glowbal, Ruthberg
|
||||
* Handles wind deflection for projectiles.
|
||||
*
|
||||
* Handles advanced ballistics for (BulletBase) projectiles
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit - Object the event handler is assigned to <OBJECT>
|
||||
@ -14,9 +15,6 @@
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [clientFiredBIS-XEH] call ace_winddeflection_fnc_handleFired
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
@ -1,3 +1,14 @@
|
||||
/*
|
||||
* Author: Ruthberg
|
||||
*
|
||||
* Displays a wind info (colored arrow) in the top left corner of the screen
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define __dsp (uiNamespace getVariable "RscWindIntuitive")
|
||||
|
Loading…
Reference in New Issue
Block a user