Jump to content
Sign in to follow this  
Nordin

Calculating ETA on artillery rounds..

Recommended Posts

In BIS new artillery computer the user get a ETA time for the rounds to hit and I would like to use the same method for use in my Support script...

Does anyone know how they calculate it?

Thanks!

Nordin

SAM scripter

Share this post


Link to post
Share on other sites

It's called a "TOF" (time of flight) report and is given back to the observer on shot. Maybe FDC has ETA shown on their computer I don't know. And "splash" 5 seconds before impact. And "laser on" (for laser guided shells) minimum 10 seconds before that (or at highest point of flight, whichever is highest iirc). Are you using real guns to fire or createVehicle'd shells?

For real guns I really don't know how it's done (I prefer scripted ones), but I'm sure you can find similar calculations in the gunnery/fdc handbook/field manual. Since it's internal we don't have access to how its calculated. Maybe BIS wants to share this with us?

For scripted guns you can do pretty much whatever you like. Although it returns a two part array [TOF value, spoken tof array] here is what I use for my artillery and mortar systems (highly unrealistic and artificial, and enemy AI one is a bit more simplified):

Xf_TimeOfFlight = {
private ["_num_arti","_pos","_tof","_array","_res"];
_num_arti = _this select 0;
if (_num_arti == 1) then {
	_dist = getMarkerPos "mArtillery" distance getPos D_AriTarget;
	_tof = 22;
	if (_dist > 8159) then {
		_tof = 70;
	} else {
		if (_dist > 6266) then {
			_tof = 55;
		} else {
			if (_dist > 4821) then {
				_tof = 40;
			} else {
				if (_dist > 4028) then {
					_tof = 32;
				} else {
					if (_dist > 2097) then {
						_tof = 26;
					};
				};
			};
		};
	};
} else {
	_dist = getMarkerPos "mMortarIcon" distance getPos D_AriTarget2;
	_tof = 10;
	if (_dist > 3000) then {
		_tof = 36;
	} else {
		if (_dist > 2200) then {
			_tof = 28;
		} else {
			if (_dist > 1600) then {
				_tof = 22;
			} else {
				if (_dist > 1000) then {
					_tof = 14;
				};
			};
		};
	};
};
_tof = round (_tof + (random 6));
_array = toArray format ["%1",_tof];
_one = parseNumber toString [(_array select 0)];
_two = parseNumber toString [(_array select 1)];
_array = [];
_vocal = [];
{
	_vocal = switch _x do {
		case 0: {"zero2"};
		case 1: {"one2"};
		case 2: {"two2"};
		case 3: {"three2"};
		case 4: {"four2"};
		case 5: {"five2"};
		case 6: {"six2"};
		case 7: {"seven2"};
		case 8: {"eight2"};
		case 9: {"nine2"};
		default {"zero2"};
	};
	_array set [count _array, _vocal];
	_array set [count _array, "Pause"];
} forEach [_one,_two];
_res = [_tof,_array];
_res
};

Share this post


Link to post
Share on other sites

Or you just query the ARTY module functions to get the numbers from the ballistics tables like I did.... :eek:

The function TargetETA in the ECHO fire director system has all the details.

Share this post


Link to post
Share on other sites

Thanks mate will take a look as soon as the download mirror is up again.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×