[Code] Deployable Mortar (M252 81mm)
-
Web_cole
- Posts: 1324
- Joined: 2010-03-07 09:51
-
DevilDog812
- Posts: 491
- Joined: 2010-01-26 22:22
Re: [Code] Deployable Mortar (M252 81mm)
AquaticPenguin wrote:+1 for this idea- mobile mortars would be EPIC for insurgents
heh

those holes are rocket tubes
ANTI-WIKILEAKS, PROUD SUPPORTER OF THE MILITARY
-
samogon100500
- Posts: 1134
- Joined: 2009-10-22 12:58
-
maarit
- Posts: 1145
- Joined: 2008-02-04 17:21
Re: [Code] Deployable Mortar (M252 81mm)
exellent.
this is ultimate weapon to end endless fob vs fob wars.
if there gonna be more deployables,we need remake the cratesystem better and more challenging.
more you have crates on fob,more you have deployables.
but good job!!
-
Sniperdog
- Retired PR Developer
- Posts: 1177
- Joined: 2009-02-27 00:06
Re: [Code] Deployable Mortar (M252 81mm)
The problem is for some reason the equations don't correlate precisely with the in game results. The eqation to use should beJonny wrote:If drag is removed from the projectiles you get a simple parabolic trajectory governed by the SUVAT equations.
θ = asin(Rg/v^2)/2
But for some reason it doesn't give me perfect results. I at first thought It might be that my hud was off or that I wasn't being precise enough, but that was until I noticed there was even a pattern to the error between the measured and ballistics equation results.
R-------θ (meas)---θ(calc)------error

As you can see for some reason the angles in the middle between 45 and 90 seem to have a higher degree of inaccuracy. I basically have already fixed this problem (as you can see in the vid) by simply measuring the major values and then using regression.
Last edited by Sniperdog on 2010-05-24 20:15, edited 3 times in total.


Will Stahl aka "Merlin" in the Squad community
-
Sniperdog
- Retired PR Developer
- Posts: 1177
- Joined: 2009-02-27 00:06
Re: [Code] Deployable Mortar (M252 81mm)
I have a feeling its the engine being **** because I'm doing the testing on a perfectly flat test trackJonny wrote:Have you tried accounting for the vertical height difference between point of firing and point of impact? If that doesn't remove most of the error, it might help locate where the actual error is located. It might just be the engine being ****, it doesn't like ballistics.
You are going to have a really hard time accounting for height differences anyway, even if turns out that it is the cause of the error you are getting. People are often going to have try and just walk the rounds in I expect.
Sadly there is no way to do calculations in a bf2 hud so I have to do everything graphically. Making a height correction graphic would be impossible because height correction varies with the range of your shot, and a height correction dial would be extremely confusing to the user.Jonny wrote: Unless you make a ballistics calculator of some kind to be added to the HUD (and give people some extra information to tell the gunners so they know what height the target is at), there isn't much that can change that.
Basically the conclusion I came toJonny wrote: Along with the deviation you will be told to add by the MAs & the limited number of possible angles to fire at, it might turn out that you dont really need to be all that accurate.
That is exactly the equation I used and which produced the values above. I found g to be 14.7 (I found it to 6 sigfigs but am not on the computer I did the calculations on atm) by finding 90 (a vertical shot) then making the lower extent of the barrel exactly 45, measuring the distance of the 45 shot, and finding g using the velocity, angle and distance. I then scaled it down to 9.8 in the projectiles code. The projectile definitely has no drag on it.Jonny wrote: Before you go trying to measure any variables, make sure you are use a non-dimentional form of the equation, it will probably make everything much easier. Use sin(2θ= Rg/v^2, and all the points you get should collapse to a single line if its the right equation (in this case, the line y=x). An accurate value of the actual acceleration of gravity can then be found from a point close to the line of best fit.
The problem could actually be the tracer problem because it does have a tracer effect on it. I'm assuming that if I take it off it will mess things up a lot but I will definitely look into itJonny wrote: If you notice anything weird going on, make sure you check the projectile's code, tracers are fired at about 75% of the velocity you type in and there may be some stray drag thats messing stuff up.
The values you posted look suspiciously like there is still a little drag involved in your projectile code, thats exactly the sort of error I would expect from it.


Will Stahl aka "Merlin" in the Squad community
-
anglomanii
- Posts: 701
- Joined: 2008-12-20 10:38
Re: [Code] Deployable Mortar (M252 81mm)
just a couple of questions.
1. is it possible to translate this over to a 60mm mortar system? ie: M6,M6H,Commando. Official Website of Hirtenberger Defence Systems Austria
2. is it possible to use these calculations (or something similar) for use in a 60mm man portable system. (see above) for use in a deployed (unsupported) role?
3. from your previous posts i cant tell if is possible to keep the site picture level (or at least directed at a target ) when adjusting range?. (not using the mouse to adjust range, maybe WASD?)
1. is it possible to translate this over to a 60mm mortar system? ie: M6,M6H,Commando. Official Website of Hirtenberger Defence Systems Austria
2. is it possible to use these calculations (or something similar) for use in a 60mm man portable system. (see above) for use in a deployed (unsupported) role?
3. from your previous posts i cant tell if is possible to keep the site picture level (or at least directed at a target ) when adjusting range?. (not using the mouse to adjust range, maybe WASD?)
<22:31:15> "Supahpingi": i was actually mastrubating ferosiosly to mike meyers pictures
-
Sniperdog
- Retired PR Developer
- Posts: 1177
- Joined: 2009-02-27 00:06
Re: [Code] Deployable Mortar (M252 81mm)
Jonny wrote:You should really have used a bigger data set to find g. You cant check for measuring errors using only 2 points, you should have at least 4, preferably 8+. You should plot a graph of sin(2θ= R/v^2, then measure the maximum and minimum possible gradients you could have while being within the bounds of the error bars, and that will give you both g and what range it could be in (rather than just a fairly accurate value of g that you can get from the dimentionless graph).
What is your error margin on g, I really dought you got it to 6 SF from just 2 readings?
If you suspect that the tracer bug affects g, too, then you need to take several more measurements: You need to know how long the projectile is in the air for so that you can get the true velocity from R = Utcosθ. You can then get an accurate value for g by reading off the corrected sin(2θ= R/v^2 graph, and can check more accurately for the presence of the tracer bug as will show up directly in the velocity values that you have calculated.
As for a ballistic calculator HUD, I was thinking of some python script to be run when you input some values, and then would display the angle you need to fire at via a message directed at the player on the mortar.
I really dought its worth doing any of that, though. This doesn't require anything close to the accuracy we needed for zeroing rifles. You are probably best off making HUDs assuming it follows a parabolic trajectory exactly, and that you are on level ground, and then concentrate on fixing up the sound effects, projectile damage, adding some extra ammo types, etc. So long as the rounds impact somewhere close (+/- 100m) to the intended target it's fine, it should be walked in by a spotter anyway.
As to finding g the method I used was probably the best for precision. If you know all your variables are extremely precise you should only need 1 measurement to find a value for g. The reason I could find g so accurately was because I could find theta down the many sig figs by simply firing shots straight up and fine tuning the angle ranges in the tweak until the bullet dropped exactly down on where I fired it (after flying for 25 seconds in the air). From there I could find exactly 45 degrees and then measured the range of where the shot fell with an accuracy of a meter at ranges of 2000m+. The only real problem which I realize was the issue now is the velocity I was working with that I assumed to be correct may have been wrong because of the tracer issue
As far as the python goes you cant use python to generate to generate a custom hud text string based on user inputs afaik, but if you know any examples of this being done please let me know.
Your last point is exactly right
Thank you for all the input though Jonny its very helpful
Last edited by Sniperdog on 2010-05-25 11:04, edited 1 time in total.


Will Stahl aka "Merlin" in the Squad community
-
Mosquill
- Retired PR Developer
- Posts: 857
- Joined: 2007-08-12 10:13
Re: [Code] Deployable Mortar (M252 81mm)
FYI, gravity in bf2 is exactly -14.73, and you can control it with physics.gravity command.
Well it can be done without using python, but I don't know if it's even worth the effort, because it's probably not much of a problem anyway.Sniper_dog14 wrote: As far as the python goes you cant use python to generate to generate a custom hud text string based on user inputs afaik, but if you know any examples of this being done please let me know.
-
Imchicken1
- Posts: 512
- Joined: 2008-11-08 05:09
Re: [Code] Deployable Mortar (M252 81mm)
Zomg i want your car =)
Amazing work. Can't wait for this to be in game
Amazing work. Can't wait for this to be in game
-
Arnoldio
- Posts: 4210
- Joined: 2008-07-22 15:04
Re: [Code] Deployable Mortar (M252 81mm)
This is really good! It could fall under the same class as the TOW, so you have to choose wich one to deploy.

Orgies beat masturbation hands down. - Staker
-
myles
- Posts: 1614
- Joined: 2008-11-09 14:34
Re: [Code] Deployable Mortar (M252 81mm)
NICE Panzer-Jagering WORK!!!!!!!
one of the best things iv seen to date for PR
one of the best things iv seen to date for PR
Last edited by Mongolian_dude on 2010-06-02 20:46, edited 1 time in total.
-
Glimmerman
- Retired PR Developer
- Posts: 3237
- Joined: 2007-08-14 11:12
Re: [Code] Deployable Mortar (M252 81mm)
Nice work indeed, now that mortars are doable, arty can be done also i guess 
-
Rudd
- Retired PR Developer
- Posts: 21225
- Joined: 2007-08-15 14:32
Re: [Code] Deployable Mortar (M252 81mm)
seems like a reasonable idea to meChizNizzle wrote:This is really good! It could fall under the same class as the TOW, so you have to choose wich one to deploy.
-
ZephyrDark
- Posts: 319
- Joined: 2010-01-23 20:22
Re: [Code] Deployable Mortar (M252 81mm)
Only problem is that does player manned artillery sound reasonable/plausible on a 4km^2 map?[R-COM]Glimmerman wrote:Nice work indeed, now that mortars are doable, arty can be done also i guess![]()
|TG-31st|Blackpython
-
The Iron Dreamer
- Posts: 444
- Joined: 2009-01-16 22:23
Re: [Code] Deployable Mortar (M252 81mm)
yes it is. it will be like an alt layer, instead of jets/choppers/tank you will get Mobile or stationary artillery.ZephyrDark wrote:Only problem is that does player manned artillery sound reasonable/plausible on a 4km^2 map?
-
ZephyrDark
- Posts: 319
- Joined: 2010-01-23 20:22
Re: [Code] Deployable Mortar (M252 81mm)
How does that affect the fact that with real life artillery ranges don't really make sense on a map where the furthest two points on it are about 5.6km(one corner of the map to the opposite). ZThe Iron Dreamer wrote:yes it is. it will be like an alt layer, instead of jets/choppers/tank you will get Mobile or stationary artillery.
M777 Lightweight 155mm howitzer (LW155)
...
Range: 30-40 km (assisted), 22.5-30 km (unassisted)
...
Minimum Range: 3.7-2.7 km high angle
^^^^ ^^^^
(M777 Lightweight 155mm howitzer (LW155))
M119 105mm Howitzer
http://www.globalsecurity.org/military/ ... -specs.htmPERFORMANCE SPECIFICATION
Major Item............................................... Model M119A1
.............
Maximum Range........................11,500 m w/Chg 7
..................................................14,000 m w/Chg 8
..................................................19,000 m w/M913 RAP
These are just example of US Artillery weapons, and, unless you're firing from atop a hill or mountain at low angle, just doesn't seem useful at all. A mortar's range is much more appropriate for the current PR maps. Artillery just doesn't seem necessary or even plausible due to the ranges, and I don't believe the devs would tweak real life ranges just so they could have player manned artillery in-game.
|TG-31st|Blackpython







Project Reality: Dutch Armed Forces on facebook
