Page 8 of 12

How To Use Torpedoes

Posted: Thu Jan 29, 2004 1:18 am
by Rogue {RKn}
GameRat Yes m8, as soon as I saw it I understood what ya ment :) I had a go a few times and enev got a few shots close lol at extreme ranges so I am sure it can be used.

East That would be great! for people like me who need something simple lol

Ofcourse there is the option of puting in an auto Tgt Officer or maybe a Tgt computer into the game at a later stage, where we could do the calcs.

On a very positive note I had no trouble at all jumping in and out of the game to the SS.

How To Use Torpedoes

Posted: Thu Jan 29, 2004 1:34 am
by GameRat
Hey Rogue {RKn},

That is good news to hear you can go from game to excel without any problems.

I have tried to contact the author of the Weapons officer program to ask a few questions; but while I was searching the SH 2 forum ... I noticed somone saying they wanted to put this program on a palm, but could not because it was password protected (same reason you can't see the code) and he could not find the author to get the password thing figured out. Hopefully there is some kind of work-around.

David

How To Use Torpedoes

Posted: Thu Jan 29, 2004 4:18 am
by Rogue {RKn}
GameRat Yes that would be good m8.

If we have no joy I do know a guy that used to make SS for a living, he may be up for making one to suit enigma!: if I ask him nice LOL.

I have no idea how hard it would be to work out the formulars.

How To Use Torpedoes

Posted: Fri Jan 30, 2004 5:40 pm
by Panzer47
OK, above I have posted a few worth while posts that should explain in detail the whys and the how you need to formulate the proper gyro angle. There are really two parts to it, finding the bearing of the submarine from the perspective of the target, and then using that angle to solve for the correct torpedo gyro angle. Below I have summarized in pseudo code what a sterotypical program would look like that can be used to solve for that gyro angle. I list all the variables used and needed and what they represent, for those who are extremely lazy (*cough* Shad *cough*) you can just use these equations and get the job done. So without anymore stalling....:

Notes :

// This is a comment line

<= Less then

>= Greater then

sin-1 is the Inverse sin function

Required Information:
  • Torpedo Speed = V(p)
  • Target Speed = V(t)
  • Target Heading = H(t)
  • Submarine Heading = H(s)
  • Bearing to Target = B(t)
Looking For:
  • Bearing to Submarine = B(s)
  • Gyro Angle = A
Step 1: Finding True North Relative B(t)

If (B(t) <= 180)

{ B(t) = H(s) + B(t) }

If (B(t) > 180)

{ B(t) = H(s) - (360 - B(t)) }

// Angle Clean up Section

// Full Circles or angles less then zero are no good

// So we fix that here

If (B(t) >= 360)

{ B(t) = B(t) - 360 }

If (B(t) < 360)

{ B(t) = B(t) + 360 }

Step 2: Find the Reverse True North Bearing

B(t) = B(t) + 180

//Angle Clean Up

If (B(t) >= 360)

{ B(t) = B(t) - 360

Step 3: Finding Bearing to Sub From Traget B(s)

If (B(t) > 180)

{ B(s) = H(t) + (360 - B(t)) }

If (B(t) <= 180)

{ B(s) = B(t) - H(t) }

//Angle Clean Up

If (B(s) >= 360)

{ B(s) = B(s) - 360 }

If (B(s) < 360)

{ B(s) = B(s) + 360 }

Step 4: Solving for the Gyro Angle A

// I broke this into 3 equations to make it easy on the eye and brain

X = V(t) / V(p)

X = X * sin B(s)

A = sin-1 (X)

Thats all there is to it, we have A

Now for those of the more ... cerebral persuasion, there is a lot more we can do to refine this equation. This is a good rough esitimation of where the torpedo will need to travel but, there are other factors will would want to consider if we really want to make this an accurate TDC simulation. The things we would have to consider are:
  • Distance to the torpedo tubes from the perscope (aim point)
  • The distance the torpedo travels until it begins to turn to its gyro angle
  • The distance the torpedo travels while turning to its gyro angle
  • The distance the target travels while the torpedo is fired and turns
None of these factors are very large by themselves but, combine all of these along with aiming at a very distant target and the error could easily be as much as several degrees. That is more then enough to miss a target completely. For now however, this is a good guide and rule of thumb. I'll be doing more research into making the equations more complex and therefore a bit more accurate. Mainly to see if it really makes much difference and if it will require substantially more work from the users. Enjoy

How To Use Torpedoes

Posted: Wed Feb 04, 2004 10:57 am
by Donoby
Panzer nice try but.....errors in your programm:

First to clear the angle it's not
If (B(t) >= 360)
{ B(t) = B(t) - 360 }

If (B(t) < 360)

{ B(t) = B(t) + 360 }
But

If (B(t) >= 360)

{ B(t) = B(t) - 360 }

If (B(t) < 0) <-------------- 0 not 360

{ B(t) = B(t) + 360 }

Same for the other "clear angle"

And the program doesn't work with your first example you used in your method. But it works with the second example....Your nearly there, you just need to tell your calculator if the target is going "in the same way as you" or going "in the opposite way of you", and when you've done that, just inverse the formulas for the Step3. If you don't understand my post when reading it the first time, well search and find your error and you'll see clear afterward.

How To Use Torpedoes

Posted: Wed Feb 04, 2004 3:00 pm
by Panzer47
Dang I thought I had accounted for that.... I remember it popped up before when I was working on this. For some reason I convinced myself I had taken care of it. Now I have to remember what the heck I was thinking then... I'll take another look at it.

How To Use Torpedoes

Posted: Wed Feb 11, 2004 3:42 pm
by Panzer47
OK after many a cup of coffee, mad hystercial manical laughter, and occasionally a good idea... I ahve come up with the latest and greatest system of formulas. This method takes the simplification of the entire problem to a whole new level of laziness. Mathmatical and equational laziness, you will have to actually do SOME thing to get your answers to pop out. This approach fixes the shocking variety of errors I made in previous attempts (I have no idea what I was smoking then) and distills the essence of it down to its component brillance. And as and added bonus I even throw in a bit at the end to tell you how much time should be taken for the torpedo to reach the target because, well, I'm just that kind of guy/geek.

1. Finding True North Relative Bearing to Target

Need:

Bt = Bearing to Target Relative to Sub Heading

Hs(n) = Heading of Sub relative to True North

Will Get:

Bt(n) = Bearing to Target Relative to True North from Sub

Code: Select all

Bt(n) = Hs(n) + Bt
if (Bt(n) >= 360)
 { Bt(n) = Bt(n) - 360 }
2. Finding Reverse True North Bearing

Need:

Bt(n) = Bearing to Target Relative to True North from Sub ** from Section 1 above

Will Get:

Bs(n) = Bearing to Sub relative to True North from Target

Code: Select all

Bs(n) = Bt(n) + 180
if ( Bt(n) >= 360)
{ Bs(n) = Bs(n) - 360 }
3. Find Bearing to Sub Relative to Target Heading

Need:

Bs(n) = Bearing to Sub relative to True North from Target ** from Section 2

Ht(n) = Heading of Target realtive to North

Will Get:

Bs = Bearing to Sub Relative to Target's Heading

Code: Select all

Bs = Bs(n) - Ht(n)
if ( Bs > 180)
{ Bs = Ht(n) + (360 - Bs(n) ) }
if ( Bs < -180 )
{ Bs = Bs(n) + (360 - Ht(n) ) }

if ( Bs < 0) ? ** See Notes **
{ Bs = Bs * -1 }
4. Solve for Gyro Angle

Need:

Vp = Speed of Torpedo (knots)

Vt = Speed of Target (knots)

Bs = Bearing to Sub Relative to Target's Heading ** from Section 3

Will Get:

A = Gyro Angle to set Torpedos

Code: Select all

A = Sin-1 ( ( Sin B) * (Vt/Vp) )
5. Finding Time to Impact ** See Notes **

Need:

R = Range to Target (meters)

Bs = Bearing to Sub Relative to Target's Heading ** from Section 3

A = Gyro Angle ** from Section 4

Vp = Speed of Torpedo (knots)

Will Get:

T = Time to Target (seconds)

Code: Select all

if ( A >= (180- A - Bs) ?AND ( A >= Bs)
{ x = R * Tan B }
else
{ x = R / ( cos A) }

T = x / ( .7851 * Vp)
NOTES:

Section 1: Basically we are just looking for the bearing to the target but, we need to make it relative to True North instead of to the bearing of sub. When you look at a ship its bearing is according to which direction you are pointing, we need to account for that and find out what that bearing is according to North.

Section 2: Really easy bit, we basically just need to know what the opposite dirction would be. Duh... its 180 degrees. We just have to remember not to go over 360 degrees.

Section 3: Now we already have that North relative bearing back to the sub, we now need to make it back to being relative but, to the target's heading this time. We figure out what that angle should be relative to the target's heading then spit out the result. It is entirely possible to get a negative answer here, thats not wrong at all. Thats merely reflecting whether the sub is port of starboard of the target's track, you could use that yourself if you wanted to compute other things but, I am ignoring it for simplicty. That is why I have that "* -1" part there.

Section 4: Taken from the Silent Hunter manuel how to find the gyro angle.

Section 5: This part is entirely extra It just figures out how long the torpedos should be running until they hit the target. I could explain the math behind it but... well I don't want to take pages to do it. Its basically using the SOHCAHTOA rule from high scholl trig, angles A + B + C and the range R to find the remianing side depending on which angle is the hypotonuese or the largest angle. Finding how many meters per second per knot goes and that computed distance in meters.

Now I await for you to point out whats wrong with this. Go on! I know you want to!

How To Use Torpedoes

Posted: Wed Feb 11, 2004 5:37 pm
by Donoby
Nothing personnal panzer, it's not that I'm jealous because you seemed to have to found a good portable TDC, but.............

.....Your section 4 is wrong, it's not Vp/Vt but Vt/Vp.....sorry ;)

and there's something strange in section 5, the 0.7851...whats that?? and the final formula seems wrong too....should it be more like :

T=x/(0.7851*Vp)....

Well just helping!

How To Use Torpedoes

Posted: Wed Feb 11, 2004 8:46 pm
by Panzer47
There always one....

OK I'll fix that Vp/Vt thing I was just going from memory at that point, I guessed wrong.

The mysterious 0.7851 is the number used to determine how many meters per second something is going if it is going 1 knot. So if I'm correct 1 knot equals about 0.7851 meters per second. I used 40 knots = 22 yards/sec as my original data (from the Silent Hunter manual) and just coverted to m/s.

How To Use Torpedoes

Posted: Sun Feb 15, 2004 2:36 pm
by blase
Geeez! I thought I could shoot torps until I had the opportunity to read this formula :D

Now I'm pretty sure I can't hit anything - I had serious problems with maths at my college...

I can still try to do this the old-fashioned way like "aim-fire", but now, with the knowledge of Harry Panzer's Magickal Formula I bet my brain wouldn't work the same, inefficient way as it used to ;)

enigma!: