SUBSIM Radio Room Forums



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

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-07-13, 05:56 PM   #1
tscharlii
Watch
 
Join Date: Dec 2011
Posts: 26
Downloads: 17
Uploads: 0
Default

Alright. Here are the steps to reproduce.

Mods:
Generic Mod Enabler - v2.6.0.157
[C:\Ubisoft\Silent Hunter 5\MODS]

NewUIs_TDC_7_1_0_ByTheDarkWraith
NewUIs_TDC_7_1_0_Real_Navigation
Manos Scopes-patch for 16x9

Also have the TDW hydrophone exe fixes activated.

1. Load up the historical mission TDW Torp Tutorial.
2. Make sure, your sub is NOT heading North. Turn to heading 320 degrees by making a 40 degrees turn to port/left.
3. The contact should be at around 106 degrees. Go to the sonarman, activate the hydrophone station and point the needle to 106 degrees.
4. Ask the sonar man to follow the selected target (see picture). He responds: "Sonarman: no near contact to follow"
5. You can, however, make him pick up the contact by pointing the needle to 66 degrees

The aforementioned changes to /data/Scripts/Stations/Hydrophone.py fix this issue.

tscharlii is offline   Reply With Quote
Old 10-08-13, 05:19 PM   #2
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by tscharlii View Post
Alright. Here are the steps to reproduce.

Mods:
Generic Mod Enabler - v2.6.0.157
[C:\Ubisoft\Silent Hunter 5\MODS]

NewUIs_TDC_7_1_0_ByTheDarkWraith
NewUIs_TDC_7_1_0_Real_Navigation
Manos Scopes-patch for 16x9

Also have the TDW hydrophone exe fixes activated.

1. Load up the historical mission TDW Torp Tutorial.
2. Make sure, your sub is NOT heading North. Turn to heading 320 degrees by making a 40 degrees turn to port/left.
3. The contact should be at around 106 degrees. Go to the sonarman, activate the hydrophone station and point the needle to 106 degrees.
4. Ask the sonar man to follow the selected target (see picture). He responds: "Sonarman: no near contact to follow"
5. You can, however, make him pick up the contact by pointing the needle to 66 degrees

The aforementioned changes to /data/Scripts/Stations/Hydrophone.py fix this issue.
Hi tscharlii, sorry for the late reply; I somehow overlooked your post. Just a little suggestion: maybe you could release your tweak as a patch, for people to test that mission with and without it
gap is offline   Reply With Quote
Old 10-21-13, 03:31 AM   #3
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Quote:
Originally Posted by tscharlii View Post
Alright. Here are the steps to reproduce.

Mods:
Generic Mod Enabler - v2.6.0.157
[C:\Ubisoft\Silent Hunter 5\MODS]

NewUIs_TDC_7_1_0_ByTheDarkWraith
NewUIs_TDC_7_1_0_Real_Navigation
Manos Scopes-patch for 16x9

Also have the TDW hydrophone exe fixes activated.

1. Load up the historical mission TDW Torp Tutorial.
2. Make sure, your sub is NOT heading North. Turn to heading 320 degrees by making a 40 degrees turn to port/left.
3. The contact should be at around 106 degrees. Go to the sonarman, activate the hydrophone station and point the needle to 106 degrees.
4. Ask the sonar man to follow the selected target (see picture). He responds: "Sonarman: no near contact to follow"
5. You can, however, make him pick up the contact by pointing the needle to 66 degrees

The aforementioned changes to /data/Scripts/Stations/Hydrophone.py fix this issue.
I can confirm the bugreport as a valid one. TDW used true bearing where he should have used relative bearing.
plj is offline   Reply With Quote
Old 10-21-13, 08:39 AM   #4
tscharlii
Watch
 
Join Date: Dec 2011
Posts: 26
Downloads: 17
Uploads: 0
Default

Quote:
Originally Posted by plj View Post
I can confirm the bugreport as a valid one. TDW used true bearing where he should have used relative bearing.
Good thing you asked in the other thread, how confident I am with the fix proposal. I looked at it again, and I think the code that selects the hydrophone contact to follow deserves even more reviewing.

TDWs original Code in HydrophoneFollowNearestContact(): (/data/Scripts/Stations/Hydrophone.py)
Code:
        for contact in contacts:
            if sub.HeadingDEGToContact( contact ) >= ( hydroangle - sweeprange ) and sub.HeadingDEGToContact( contact ) <= ( hydroangle + sweeprange ) and sub.RangeToContact( contact ) <= maxrange:
                if hydrocontact == None:
                    hydrocontact = contact
                else:
                    if sub.HeadingDEGToContact( contact ) <= sub.HeadingDEGToContact( hydrocontact ) and sub.RangeToContact( contact ) < sub.RangeToContact( hydrocontact ):
                        hydrocontact = contact
In my opinion it should read (Be careful, if you copy paste from here, the indentation has to be done using tabs, not spaces. Python is quite picky about this. Better download the mod below):
Code:
        for contact in contacts:
            if TDWUtils.GetContactHeading( sub.HeadingDEGToContact( contact ) - sub.HeadingDEG ) >= ( hydroangle - sweeprange ) and TDWUtils.GetContactHeading( sub.HeadingDEGToContact( contact ) - sub.HeadingDEG ) <= ( hydroangle + sweeprange ) and sub.RangeToContact( contact ) <= maxrange:
                if hydrocontact == None:
                    hydrocontact = contact
                else:
                    if sub.RangeToContact( contact ) < sub.RangeToContact( hydrocontact ):
                        hydrocontact = contact
The semantics of this is: Follow the nearest contact within maxrange on hydrophone needle bearing plus-minus sweeprange

The change in the second line ensures the code deals with bearings relative to the sub's course instead of true, north-aligned bearings.
The change in the sixth line ommits a bogus if-condition. Why only select the nearest contact, if it also happens to be at a lesser bearing than other contacts in that area, and otherwise follow a contact further away. The command is called "Hydrophone follow nearest contact", after all.

This fix is available as a mod, activate it via JSGME after TDWs NewUIs:
http://www.deguero.de/jel/Hydrophone..._0_To_7_5_0.7z
tscharlii is offline   Reply With Quote
Old 10-21-13, 09:05 AM   #5
plj
Captain
 
Join Date: Sep 2013
Posts: 542
Downloads: 70
Uploads: 0
Default

Much appreciated, will test and report back!
plj is offline   Reply With Quote
Reply

Tags
dbrn, favorite, new ui

Thread Tools
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 08:51 AM.


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