Jump to content

Recommended Posts

Squad Mortar Calculator

 

As promised here is an mortar calculator script. Use grid-referencing to input position of mortar and target to get elevation (Milliradians) and Azimuth (Angle in °). 

The link provided works on your smartphone as well. Please provide feedback and ideas for further improvement. 

 

Web-Version

 

Python-Version

 

 

Features:

  • Calculate Azimuth, Elevation and Distance based on mortar and target position.
  • Infinite sub-setting like A1K7K7K8K9 for cruise-missile precision :D
  • Interpolation for elevation-steps 

 

Description:

Refer to grids like this:

C2-KP5-7    = C2K5K7

A1-KP5-5    = A1K5 or A1K5K5

D12-KP3-9  = D12K3K9

 

1. Input Mortar-Position

2. Input Target-Position

3. Dial "Elevation" and "Azimuth" into mortar interface

4. Enjoy!

 

Visual Guide:

DytmjAf.png

Changelog:

Spoiler

v4:

  • added: distance modify

v3:

  • updated output
  • added infinite sub-setting inspired by XXPX1
  • added option (in code) for SPACE delimited input like a5 9 7 8 -> A5KP9K7K8

v2:

  • hard-coded big-grid-scale 
  • faster target input
  • added Elevation Interpolation by XXPX1

v1: -

 

Credits:

  • XXPX1, loff

Other versions:

By  XXPX1

By bravo2zero

By loff

 

You can find a version for the insurgent artillery here:

 

Edited by Maggiefix

Share this post


Link to post
Share on other sites

A much easier way is to get SL to put a green marker on the target then just look at your compass to figure out the distance so you can convert to elevation MM, and just line up the marker on your compass to get direction.

Share this post


Link to post
Share on other sites
40mmrain   
16 minutes ago, Stupid Sexy Flanders said:

A much easier way is to get SL to put a green marker on the target then just look at your compass to figure out the distance so you can convert to elevation MM, and just line up the marker on your compass to get direction.

 

they only give 50m increments. This can be used for better precision.

Share this post


Link to post
Share on other sites

This script provides the freedom to barrage any position on the map with relative high precision without the help of your squadleader.

As of now I do not interpolate between the elevation-steps given by the mortar-interface. It gives you the step where the calculated distance is nearest to. Maybe in the future we find a way for even higher accuracy (<50m)...

Edited by Maggiefix

Share this post


Link to post
Share on other sites

haha wanted to do this today xD

 

hopefully we get V_zero and the grenades mass so we can do a better range calculation. a small keypad can be easily divided in 4 subgrids.

Share this post


Link to post
Share on other sites
wook   
7 hours ago, Maggiefix said:

Maybe in the future we find a way for even higher accuracy (<50m)...

 

Couldn't we come up with our own 25m increments for your calculator?

 

For example, if we graph the Mil differences in each 50m step of the chart we can see that it is exponential. Using some calculus you could get some pretty close approximations for 25m increments (or even smaller).

Share this post


Link to post
Share on other sites
8 hours ago, Stupid Sexy Flanders said:

A much easier way is to get SL to put a green marker on the target then just look at your compass to figure out the distance so you can convert to elevation MM, and just line up the marker on your compass to get direction.

SL markers aren't near accurate enough. Trying to hit something 1000 meters away could give you an error of up to 500 meters alone. The calculator I guess is fine, I haven't used it. I just count and do the math to find a pretty damn exact distance.

Share this post


Link to post
Share on other sites
1 hour ago, wook said:

 

Couldn't we come up with our own 25m increments for your calculator?

 

For example, if we graph the Mil differences in each 50m step of the chart we can see that it is exponential. Using some calculus you could get some pretty close approximations for 25m increments (or even smaller).

Exactly thats my plan :) with numerical integration ^^

Edited by Maggiefix

Share this post


Link to post
Share on other sites

If you could provide a formula that would be dope :D

Or a table with 25m steps...

Edited by Maggiefix

Share this post


Link to post
Share on other sites
XXPX1   
9 hours ago, Maggiefix said:

This script provides the freedom to barrage any position on the map with relative high precision without the help of your squadleader.

As of now I do not interpolate between the elevation-steps given by the mortar-interface. It gives you the step where the calculated distance is nearest to. Maybe in the future we find a way for even higher accuracy (<50m)...

 

Hey Maggiefix,

 

Your project really inspired me so I decided to exercise my linear algebra and wrote one myself on lunch

(note: I have not tested this in game so let me know if the numbers look wrong -- they look right with the few tests I've done).

 

Link

 

Features:

  • Exact elevation (mils) are calculated. (Linear interpolation between given chart points)
  • You can specify as many sub-keypads as you like, with each subkeypad being divided in nine squares. A5K1K5K2K3.... 
  • Assumes grid sizes are 100m (change this hardcoded value if you need but all maps should have standardized grids)

 

I'm not a python developer but it's always fun to try new things. :)

 

Edited by XXPX1

Share this post


Link to post
Share on other sites

Very nice looks as if i could learn some things from you :*. You subsetting-method looks awesome!

Edited by Maggiefix

Share this post


Link to post
Share on other sites
XXPX1   

Thanks :) Feel free to adapt it into your code anyway you'd like. 

 

I'm excited to try the calculators out tonight after work (yours and mine). We definitely have some discrepancies: if I input mortar position B2K5 with target coord G3K2, I get slightly different distances and angles.  (not by too much, but just curious what's going on there)

Edited by XXPX1

Share this post


Link to post
Share on other sites

Yeah will definitely adapt somethings after i understood them :D. (new to coding, was my first "real" script).

 

I had a few good rounds today as a mortar designator, just shouting out the calculated target data to the mortar guys!

Share this post


Link to post
Share on other sites
4 hours ago, Maggiefix said:

Thats the best i could get, ideas anybody?

 

DmqHRK3.png

 

Really nice job, mate! 

You will get a better match with higher polynomial, I'm just not sure it will bring better accuracy:

h=a0+a1*x+a2*x^2+...+a4*x^4

with A (x not scaled):

๋A =

        1579
   -0.086101
  -0.0013167
  1.8505e-006
  -9.0395e-010

 

looks like:

 

Capture.png

 

I think the version on trinket.io still uses simple interpolation between given mils.

Edited by bravo2zero

Share this post


Link to post
Share on other sites
XXPX1   

There really isn't need a need/benefit for a polynomial/cspline interpolation.

 

1) You don't really have enough data points to make an statistically accurate model. (Anything before 800m is rather linear and only throws off the model)

 

2) The area that benefits from a more precise interpolation (1000m+) only has a range of 50-70 mils meaning the linear interpolation will be very close.

 

With that said, I've gotten home and managed to test out the program in the firing range. Happy to report that the very first test managed to hit a techie with 2/3 shells.

 

US Mortar Coordinate on Firing Range: C2K8K1K4

Target Coordinate: C4K4K5K9

 

I've even managed to hit the right target at the 1000m mark without hitting the left which really lets me test the blast radius of the HE shells.

 

Well, time to use this in combat! :)

 

Edited by XXPX1

Share this post


Link to post
Share on other sites

ok guys, at first: nice job from both mortar teams ;)

 

i tested both and the calculator from Maggiefix seems a bit more accurate to me but i like the 2nd too because i can insert several targets without repaeting the mortar position.

 

hopefully we can get the raw data by the devs and calculate the range exactly.

Share this post


Link to post
Share on other sites

Maybe you used older versions, both versions should yield the same results. I rewrote mine a bit for faster target input (inspired by XXPX1 :P ).

Share this post


Link to post
Share on other sites

My take on Calc thing:P

 

Squad Artilery Solution Calc

 

* kept the code clean so its easier to read and modify (yeah, you can do that in 80 lines)

* used a bit different coord format ("A3 5 6" instead of "A3K5K6") -> reads better for me and is easier to dial on tablet layouts

 

Note: fixed azimuth and elevation inaccuracies

 

P.S. kudos to both Maggiefix and XXPX1 for the great ideas

Edited by bravo2zero

Share this post


Link to post
Share on other sites
1 hour ago, Nimbus said:

Your azimuth is a bit off, 0 or North is 180 degrees and >270 is >450, 180 too high.

fixed, thanks for reporting

Share this post


Link to post
Share on other sites

Anybody know if the elevation of the target / mortar effects the range required? By elevation I mean height above sea level. Not really tested things out much myself yet but the calculator I used on the range worked pretty well. However the targets I was aiming at were at the same height / elevation as the mortar. Just want to know if I need to be compensating for it in the range.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×