Merge branch 'master' into release-3.11.0

This commit is contained in:
jonpas 2017-10-20 17:35:01 +02:00
commit 81e4740b60
13 changed files with 44 additions and 30 deletions

View File

@ -139,7 +139,7 @@ while {_TOF < 15 && (_bulletPos select 1) < _targetRange} do {
_windage1 = - atan(_tx / _trueRange);
_windDrift = (_wind2 select 0) * (_TOF - _trueRange / _muzzleVelocity);
_windage2 = - atan(_windDrift / _trueRange);
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _trueRange);
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _trueRange);
};
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));
_kineticEnergy = _kineticEnergy * 0.737562149;
@ -174,7 +174,7 @@ if (_targetRange != 0) then {
_windage1 = - atan(_tx / _targetRange);
_windDrift = (_wind2 select 0) * (_TOF - _targetRange / _muzzleVelocity);
_windage2 = - atan(_windDrift / _targetRange);
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _targetRange);
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _targetRange);
};
_kineticEnergy = 0.5 * (_bulletMass / 1000 * (_bulletSpeed ^ 2));

View File

@ -46,8 +46,8 @@ if (_parseInput) then {
};
switch (_dropUnit) do {
case 0: {
_transonicDrop = _transonicDrop * 3.38;
_subsonicDrop = _subsonicDrop * 3.38;
_transonicDrop = MRAD_TO_MOA(_transonicDrop);
_subsonicDrop = MRAD_TO_MOA(_subsonicDrop);
};
case 2: {
_transonicDrop = _transonicDrop / 1.047;

View File

@ -47,7 +47,7 @@ if (_resetGunList) then {
["9.3×64mm" , 862, 100, 0.0627652, -0.00110727, 3.81, 0, 2, 10, 120, 0, 0, 14.90, 9.30, 35.56, 0.368, 1, "ASM" , [[-15,843],[0,850],[10,857],[15,862],[25,876],[30,885],[35,896]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
[".338LM 250gr" , 872, 100, 0.0604821, -0.00060841, 3.81, 0, 2, 10, 120, 0, 0, 16.20, 8.58, 25.40, 0.645, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
[".338LM 300gr" , 792, 100, 0.0685883, -0.00053585, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
[".338LM 300gr" , 792, 100, 0.0685883, -0.00055706, 3.81, 0, 2, 10, 120, 0, 0, 19.44, 8.58, 25.40, 0.759, 1, "ICAO", [[-15,773],[0,780],[10,787],[15,792],[25,806],[30,815],[35,826]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
[".338LM API526" , 872, 100, 0.0602535, -0.00069220, 3.81, 0, 2, 10, 120, 0, 0, 16.39, 8.58, 25.40, 0.580, 1, "ICAO", [[-15,853],[0,860],[10,867],[15,872],[25,886],[30,895],[35,906]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],
[".300WM Mk248 Mod0" , 857, 100, 0.0621425, -0.00072468, 3.81, 0, 2, 10, 120, 0, 0, 12.31, 7.80, 25.40, 0.537, 1, "ICAO", [[-15,838],[0,845],[10,852],[15,857],[25,871],[30,880],[35,891]] , [[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]], true],

View File

@ -45,9 +45,9 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou
switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevation = _elevation / 3.38;
_windage1 = _windage1 / 3.38;
_windage2 = _windage2 / 3.38;
_elevation = MRAD_TO_MOA(_elevation);
_windage1 = MRAD_TO_MOA(_windage1);
_windage2 = MRAD_TO_MOA(_windage2);
};
case 2: {
_elevation = _elevation * 1.047;
@ -55,7 +55,7 @@ private _speedOfSound = GVAR(temperature) call EFUNC(weather,calculateSpeedOfSou
_windage2 = _windage2 * 1.047;
};
case 3: {
private _clickSize = [1, 1 / 1.047, 3.38] select (GVAR(workingMemory) select 7);
private _clickSize = [1, 1 / 1.047, MOA_TO_MRAD(1)] select (GVAR(workingMemory) select 7);
private _clickNumber = GVAR(workingMemory) select 8;
private _clickInterval = _clickSize / _clickNumber;

View File

@ -41,16 +41,16 @@ private _lead = GVAR(leadOutput) select GVAR(currentTarget);
switch (GVAR(currentScopeUnit)) do {
case 0: {
_elevationAbs = _elevationAbs / 3.38;
_windageAbs = _windageAbs / 3.38;
_elevationAbs = MRAD_TO_MOA(_elevationAbs);
_windageAbs = MRAD_TO_MOA(_windageAbs);
_wind2 = _wind2 / 3.38;
_wind2 = MRAD_TO_MOA(_wind2);
_elevationRel = _elevationRel / 3.38;
_windageRel = _windageRel / 3.38;
_elevationRel = MRAD_TO_MOA(_elevationRel);
_windageRel = MRAD_TO_MOA(_windageRel);
_elevationCur = _elevationCur / 3.38;
_windageCur = _windageCur / 3.38;
_elevationCur = MRAD_TO_MOA(_elevationCur);
_windageCur = MRAD_TO_MOA(_windageCur);
};
case 2: {
_elevationAbs = _elevationAbs * 1.047;
@ -65,7 +65,7 @@ switch (GVAR(currentScopeUnit)) do {
_windageCur = _windageCur * 1.047;
};
case 3: {
private _clickSize = [1, 1 / 1.047, 3.38] select (GVAR(workingMemory) select 7);
private _clickSize = [1, 1 / 1.047, MOA_TO_MRAD(1)] select (GVAR(workingMemory) select 7);
private _clickNumber = GVAR(workingMemory) select 8;
private _clickInterval = _clickSize / _clickNumber;

View File

@ -42,9 +42,9 @@ private _dropData = +GVAR(truingDropDropData);
switch (_dropUnit) do {
case 0: {
_dropData set [0, (_dropData select 0) / 3.38];
_dropData set [1, (_dropData select 1) / 3.38];
_dropData set [2, (_dropData select 2) / 3.38];
_dropData set [0, MRAD_TO_MOA(_dropData select 0)];
_dropData set [1, MRAD_TO_MOA(_dropData select 1)];
_dropData set [2, MRAD_TO_MOA(_dropData select 2)];
};
case 2: {
_dropData set [0, (_dropData select 0) * 1.047];

View File

@ -16,4 +16,11 @@
#include "\z\ace\addons\main\script_macros.hpp"
#define MOA_TO_MRAD(d) (d * 3.43774677) // Conversion factor: 54 / (5 * PI)
#define MRAD_TO_MOA(d) (d * 0.29088821) // Conversion factor: (5 * PI) / 54
#define DEG_TO_MOA(d) (d * 60) // Conversion factor: 60
#define MOA_TO_DEG(d) (d / 60) // Conversion factor: 1 / 60
#define DEG_TO_MRAD(d) (d * 17.45329252) // Conversion factor: (50 * PI) / 9
#define MRAD_TO_DEG(d) (d / 17.45329252) // Conversion factor: 9 / (50 * PI)
#define ATRAGMX_PROFILE_NAMESPACE_VERSION 2.1

View File

@ -445,7 +445,7 @@ class CfgAmmo {
};
class ACE_338_Ball : B_338_Ball {
timeToLive=10;
airFriction=-0.00053585;
airFriction=-0.00055706;
typicalSpeed=826;
ACE_caliber=8.585;
ACE_bulletLength=43.18;

View File

@ -122,17 +122,17 @@ while {_TOF < 6 && (_bulletPos select 1) < _targetRange} do {
_tz = (_lastBulletPos select 2) + (_range - (_lastBulletPos select 1)) * ((_bulletPos select 2) - (_lastBulletPos select 2)) / ((_bulletPos select 1) - (_lastBulletPos select 1));
_elevation = - atan(_tz / _range);
_windage = - atan(_tx / _range);
_lead = (_targetSpeed * _TOF) / (Tan(3.38 / 60) * _range);
_lead = (_targetSpeed * _TOF) / (Tan(MRAD_TO_DEG(1)) * _range);
};
private _elevationString = Str(round(-_elevation * 60 / 3.38 * 10) / 10);
private _elevationString = Str(round(-DEG_TO_MRAD(_elevation) * 10) / 10);
if (_elevationString == "0") then {
_elevationString = "-0.0";
};
if (_elevationString find "." == -1) then {
_elevationString = _elevationString + ".0";
};
private _windageString = Str(round(_windage * 60 / 3.38 * 10) / 10);
private _windageString = Str(round(DEG_TO_MRAD(_windage) * 10) / 10);
if (_windageString find "." == -1) then {
_windageString = _windageString + ".0";
};

View File

@ -15,3 +15,10 @@
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#define MOA_TO_MRAD(d) (d * 3.43774677) // Conversion factor: 54 / (5 * PI)
#define MRAD_TO_MOA(d) (d * 0.29088821) // Conversion factor: (5 * PI) / 54
#define DEG_TO_MOA(d) (d * 60) // Conversion factor: 60
#define MOA_TO_DEG(d) (d / 60) // Conversion factor: 1 / 60
#define DEG_TO_MRAD(d) (d * 17.45329252) // Conversion factor: (50 * PI) / 9
#define MRAD_TO_DEG(d) (d / 17.45329252) // Conversion factor: 9 / (50 * PI)

View File

@ -505,7 +505,7 @@ class CfgAmmo
ACE_bulletLength=43.18;
ACE_bulletMass=19.44;
ACE_ammoTempMuzzleVelocityShifts[]={-26.55, -25.47, -22.85, -20.12, -16.98, -12.80, -7.64, -1.53, 5.96, 15.17, 26.19};
ACE_ballisticCoefficients[]={0.381};
ACE_ballisticCoefficients[]={0.368};
ACE_velocityBoundaries[]={};
ACE_standardAtmosphere="ICAO";
ACE_dragModel=7;

View File

@ -250,10 +250,10 @@ Optimal airFriction: 0.00053639
Ammo Class: ACE_338_Ball
MaxRanges (m): [1200, 1300]
MuzzleVelocities (m/s): [800, 830]
Max. Velocity diff (m/s): 24.93
Max. Drop diff (cm): 10.92
Max. Tof diff (ms): 27.0
Optimal airFriction: 0.00053585
Max. Velocity diff (m/s): 26.22
Max. Drop diff (cm): 12.14
Max. Tof diff (ms): 29.5
Optimal airFriction: 0.00055706
##########################################
Ammo Class: ACE_338_Ball_API526
MaxRanges (m): [1200, 1300]

View File

@ -492,7 +492,7 @@ ammoList = [["B_556x45_Ball", [300, 500, 500], [750, 870, 910], 7, 0.151],
["ACE_106x83mm_Ball", [1500, 1500], [955, 965], 1, 0.72],
["B_338_Ball", [1100, 1300], [880, 925], 7, 0.322],
["B_338_NM_Ball", [1100, 1300], [790, 820], 7, 0.381],
["ACE_338_Ball", [1200, 1300], [800, 830], 7, 0.381],
["ACE_338_Ball", [1200, 1300], [800, 830], 7, 0.368],
["ACE_338_Ball_API526", [1200, 1300], [880, 920], 7, 0.29],
["B_50BW_Ball_F", [300, 400], [510, 596], 1, 0.21],
["B_127x99_Ball", [1300, 1300], [895, 905], 1, 0.67],