SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Modern-Era Subsims > Dangerous Waters > DW Mod Workshop
Forget password? Reset here

Reply
 
Thread Tools Search this Thread Display Modes
Old 01-17-19, 01:04 PM   #1
Jace11
Seasoned Skipper
 
Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
Default Doctine Question Relative Bearings

I was looking at some doctines for evasion of weapons, contacts etc

I found this in Actuv's rather complicated SubAvoidSub and when I looked at
it, it didn't make sense to me.

func Tactic1 {
IF RelativeBearing OwnCrs TgtBrg < 0 THEN {
OrdCrs = ( TgtBrg + 150 + rnd 30 mod 360 )
} ELSE {
OrdCrs = ( TgtBrg + 210 - rnd 30 mod 360 )
} ENDIF
BEARSOUTH
}

I checked the doctrine format document and RelativeBearing

RelativeBearing <value1> <value2> Returns the relative bearing from <value1> to <value2>

But don't relative bearings work through 360 degrees, unlike say TgTAOB which is plus / minus degrees for stb and port?

So, ignoring BEARSOUTH, doesn't this function always give an ordered course of tgt brg + 210 (plus rnd) every time... The condition will always return a positive value?

Sorry but boring, but I've seen this often in the doctrines. I think I have something wrong.

This one works well for detecting incoming torps:

( abs RelativeBearing TgtCrs ( TgtBrg + 180 mod 360 ) < 35 )

This requires the absolute value because you modulo? And could end up with a -ve number easily...?

Duh, ok i think I found my mistake OwnCrs can be greater than TgtBrg, obvious really...

Last edited by Jace11; 01-17-19 at 03:06 PM.
Jace11 is offline   Reply With Quote
Reply

Tags
bea

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 03:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.