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 12-19-10, 07:28 AM   #5491
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 73
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
True true. But I still can't get Antar's formula to work correctly. Comparing the values it returns to the torp line's time doesn't even come close

Here's the code I have for it:

Code:
  # get the target's speed
  ts = Menu.GuiDials.GetValue( GuiDialsWrapper.DialTypes.SOL_SPEED )
  if ts == 0:
   ts = 0.000001
  # get the distance to target
  td = Menu.GuiDials.GetValue( GuiDialsWrapper.DialTypes.SOL_RANGE )
  # get the target's AOB from the TDC dial
  taob = abs( Menu.GuiDials.GetValue( GuiDialsWrapper.DialTypes.SOL_ANGONBOW ) )
  # get the track angle
  tangle = abs( Menu.GuiDials.GetValue( GuiDialsWrapper.DialTypes.SOL_TRACKANGLE ) )
  # calculate 3rd angle of triangle
  auxangle = radians( 180 - taob - ( 180 - tangle ) )
  s_ship = td * ( sin( auxangle ) / sin( radians( 180 - tangle ) ) )
  s_torp = td * ( sin( radians( taob ) ) / sin( radians( 180 - tangle ) ) )
  #to hit torp.time = ship.time
  impacttime = int( round( s_ship / ts ) )
  impacttimemins = impacttime / 60
  impacttimesecs = impacttime - ( impacttimemins * 60 )
I don't understand why we're calculating s_torp when we never use it

Using the TDW_Torp_Tutorial single mission when I set up the shot the torp line says ~2:33 to impact and the caculated values above say 0:35
I guess we forgot to convert knots to m/s. Do you get knots from the speed dial? if yes - multiply it by 0.514444 to get m/s.
Another thing: impacttimemins is int or float/double? If float - then you will always get zero seconds.
Vanilla is offline   Reply With Quote
Old 12-19-10, 08:33 AM   #5492
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Vanilla View Post
I guess we forgot to convert knots to m/s. Do you get knots from the speed dial? if yes - multiply it by 0.514444 to get m/s.
Another thing: impacttimemins is int or float/double? If float - then you will always get zero seconds.
No we didn't. Pulled torp speed from dial in knots and multiplied by 0.5145 to convert to m/s. impacttime is an int and integer division used to find impacttimemins so we're all good there also
TheDarkWraith is offline   Reply With Quote
Old 12-19-10, 08:35 AM   #5493
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Vanilla View Post
Did you have a target locked? AFAIR you need a target for those to appear but I can be wrong on that.
By the way it is funny to see those buttons working still after your target has already sunk.
now that sounds like a bug that needs to be fixed. You have to have either a target selected or locked for those buttons to appear. I'll have to correct them being visible when target is destroyed

EDIT:

updated menu.txt file for v5.7.2 for French uses by pfeillant: http://www.filefront.com/17670290/v5...-pfeillant.7z/

Last edited by TheDarkWraith; 12-19-10 at 09:08 AM.
TheDarkWraith is offline   Reply With Quote
Old 12-19-10, 01:11 PM   #5494
mobucks
Seasoned Skipper
 
Join Date: Jan 2010
Posts: 713
Downloads: 209
Uploads: 0
Default

Good day gentleman. A quick question if I may?

Must i disable the mod in JSGME to make changes to TDWuseroptions.py?

I know, i know, i should search, but I'm bad at that.
mobucks is offline   Reply With Quote
Old 12-19-10, 01:15 PM   #5495
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by mobucks View Post
Good day gentleman. A quick question if I may?

Must i disable the mod in JSGME to make changes to TDWuseroptions.py?

I know, i know, i should search, but I'm bad at that.
if you don't then changes will be temporary and will be deleted when you disable the mod via JSGME. If you want them to be permanent then yes you need to disable first then edit.
TheDarkWraith is offline   Reply With Quote
Old 12-19-10, 03:14 PM   #5496
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

just finishing up v5.8.0. This version adds the ability to add supermarks to the navigation map. Supermarks are identical to navigation fixes except that no navigation information is stored in them (you have the whole thing to add text to). They are also different in that they can be used without real navigation enabled. As with navigation fixes, supermarks can only be placed and viewed on the navigation map. Supermarks are like the regular map tools marker except that you get to add text to it. I've also included a small 'X' to the navigation fixes and supermarks so you can definitively see where the actual position of it is:


If toolhelper is enabled then supermarks are available (if navigation map is open).

v5.8.0 will be releasing here soon

Last edited by TheDarkWraith; 12-19-10 at 03:33 PM.
TheDarkWraith is offline   Reply With Quote
Old 12-19-10, 04:18 PM   #5497
Sammi79
XO
 
Join Date: Jan 2010
Location: Penzance
Posts: 401
Downloads: 272
Uploads: 0
Default Real Navigation questions

Hi TDW,

I noticed something curious whilst using the real nav mod in your NewUI 5.7.2. The digital clock top right shows updated local time yes? This is very cool but in reality our ability to fix longitude would be the only way to guess exact local time - in fact knowing exact local time is unimportant unless trying to guess when local noon is to make a sun fix.

What I noticed however was that the stopwatch also keeps time, but it is seemingly set to GMT. I loaded a saved game and the Navigator fixes my position at start, showing my longitude to be 1.5 degrees East or 1 degree, 2 minutes East, roughly. (for longitude 1 degree = 4 minutes or 240 seconds of arc) Therefore my local time should be 6 minutes ahead of GMT and sure enough, the digital clock reads 16:48 while the stopwatch reads 16:42

Here is a screenshot to describe it better :



So is the stopwatch actually keeping GMT, or is this just a coincidence? I hope it is though, the stopwatch has a second hand (small dial bottom) for accuracy of seconds and longitude measurements are commonly made east or west from 0 degrees (Greenwich Meridian)

I think if this is the case then the digital clock should keep Base Time while the stopwatch should keep GMT. Having the clock update itself to local time constantly makes it hard to time long journeys. The digital clock is currently not suitable for measurements as no seconds are displayed. It should remain purely as a quick travelling time reference.

Anyway, I hope that explains my query. Other thoughts on real navigation :-

Sun and moon angular size should be 0.5 degrees rather than 2.5 or whatever they are at now. The trouble is they will look very small so perhaps decrease the angular value of the camera to offset. The bonus would be that the sunrise sunset times (time from start to rise - end to rise and start to set - end to set) would be accurate and sun measurements could be tested.

Navigator could have an extra 'dead reckoning' style fix with no weather or time limits, smaller errors (+-500m?) but always works from last fixed position including any error.

Phew I bet you wish you never added that real nav mod! but I gotta tell you it is totally making the game for me, SH4 inadequacies in this department were frustrating. Thankyou TDW and contributors for your outstanding work.

Regards,

Sam.
Sammi79 is offline   Reply With Quote
Old 12-19-10, 04:36 PM   #5498
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,448
Downloads: 166
Uploads: 28


Default

Hi TDW

I am using the following in a tutorial file to check user TDC setting on multipule target AOB using the TDC dial:-


Operation|mov|<<aob_delta>>|15.0f|0|0|0
;blah blah (whole tutorial here)
; Functions:
Label|SetTargetAOB|0|0|0|0|0
GetAngle|3|None|0|0|0|0
Operation|mov|<<aob_min>>|<g_TR1>|0|0|0
Operation|-|<<aob_min>>|<aob_delta>|1|0|0
Operation|int|<<aob_min>>|<aob_min>|0|0|0
Operation|mov|<<aob_max>>|<g_TR1>|0|0|0
Operation|+|<<aob_max>>|<aob_delta>|1|0|0
Operation|int|<<aob_max>>|<aob_max>|0|0|0
CheckGUIDialValueInRange|SOL_ANGONBOW|<aob_min>|<a ob_max>|None|0|0
Operation|rtrue|None|0|0|0|0
DisplayText|Your AOB is more than 15 Deg out!|0|0|0|0|5
Jump|WrongAOB|0|0|0|0|0

I have set the + - operations to 1 for dials 180 to -180.

Some target check work fine and others dont.
The ones that dont are out by 180 deg.

Any ideas
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 12-19-10, 04:36 PM   #5499
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Sammi79 View Post
Hi TDW,

I noticed something curious whilst using the real nav mod in your NewUI 5.7.2. The digital clock top right shows updated local time yes? This is very cool but in reality our ability to fix longitude would be the only way to guess exact local time - in fact knowing exact local time is unimportant unless trying to guess when local noon is to make a sun fix.

Digital clock does indeed show updated local time. The reason the digital clock does and not the analog stopwatch is that I have control of the digital clock. The game, via hardcode, controls the updating of the stopwatch. As I can't set the stopwatch's time the only way I could show local time was via the digital clock. Do I need to add seconds display to the digital clock?

What I noticed however was that the stopwatch also keeps time, but it is seemingly set to GMT. I loaded a saved game and the Navigator fixes my position at start, showing my longitude to be 1.5 degrees East or 1 degree, 2 minutes East, roughly. (for longitude 1 degree = 4 minutes or 240 seconds of arc) Therefore my local time should be 6 minutes ahead of GMT and sure enough, the digital clock reads 16:48 while the stopwatch reads 16:42

Stopwatch will always read GMT time.

So is the stopwatch actually keeping GMT, or is this just a coincidence? I hope it is though, the stopwatch has a second hand (small dial bottom) for accuracy of seconds and longitude measurements are commonly made east or west from 0 degrees (Greenwich Meridian)

I think if this is the case then the digital clock should keep Base Time while the stopwatch should keep GMT. Having the clock update itself to local time constantly makes it hard to time long journeys. The digital clock is currently not suitable for measurements as no seconds are displayed. It should remain purely as a quick travelling time reference.

What I'll do is let you be able to select the digital clock to display GMT time or local time. How's that? I was just about to release v5.8.0 but that's ok, I'll incorportate this change

Anyway, I hope that explains my query. Other thoughts on real navigation :-

Sun and moon angular size should be 0.5 degrees rather than 2.5 or whatever they are at now. The trouble is they will look very small so perhaps decrease the angular value of the camera to offset. The bonus would be that the sunrise sunset times (time from start to rise - end to rise and start to set - end to set) would be accurate and sun measurements could be tested.

Wouldn't this be suited more to the environment mod (or an environment mod)? Sorry but I'm not well versed in celestial navigation. How are you getting the sun and moon angular sizes?

Navigator could have an extra 'dead reckoning' style fix with no weather or time limits, smaller errors (+-500m?) but always works from last fixed position including any error.

Hmm...I'll think about it

Phew I bet you wish you never added that real nav mod! but I gotta tell you it is totally making the game for me, SH4 inadequacies in this department were frustrating. Thankyou TDW and contributors for your outstanding work.

I think you'll find the addition of supermarks in v5.8.0 a welcome addition. The regular marker tool that makes X's on the map is useless. It needed an overhaul I still left that map tool available though as I see some uses for it.
See above in yellow.
TheDarkWraith is offline   Reply With Quote
Old 12-19-10, 04:47 PM   #5500
Dissaray
中国水兵
 
Join Date: Oct 2009
Posts: 280
Downloads: 35
Uploads: 0
Default

I've been flaowing your mod here for some time and have been enjoying it very much when I find the time to play. One thing I noticed in the mod is the in-scope targeting wheels; like those form the OLC and MaGUI mods from SH3. I realy liked these tools from those mods and was wondering if they worked in the same way in your mod? As it stands now I have trubble hiting things useing the tools provided in the game, it is mostly a speed and AOB thing and that in-scope wheel is marvolus for figureing that stuf out.
Dissaray is offline   Reply With Quote
Old 12-19-10, 04:49 PM   #5501
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by Dissaray View Post
I've been flaowing your mod here for some time and have been enjoying it very much when I find the time to play. One thing I noticed in the mod is the in-scope targeting wheels; like those form the OLC and MaGUI mods from SH3. I realy liked these tools from those mods and was wondering if they worked in the same way in your mod? As it stands now I have trubble hiting things useing the tools provided in the game, it is mostly a speed and AOB thing and that in-scope wheel is marvolus for figureing that stuf out.
if you're taking about the RAOBF then yes, it's in the mod. There's a button in the torpedo box on the left bottom that says RAOBF. Click it to display the RAOBF on the scope.
TheDarkWraith is offline   Reply With Quote
Old 12-19-10, 04:56 PM   #5502
Dissaray
中国水兵
 
Join Date: Oct 2009
Posts: 280
Downloads: 35
Uploads: 0
Default

Yep that sounds like the thing. Now all I have to do is remember exactly how to use the damn thing But I am sure I can figure that out.
Dissaray is offline   Reply With Quote
Old 12-19-10, 04:58 PM   #5503
Trevally.
Navy Seal
 
Join Date: Apr 2007
Location: AN1536 (Orkney)
Posts: 5,448
Downloads: 166
Uploads: 28


Default

Quote:
Originally Posted by Trevally. View Post
Hi TDW

I am using the following in a tutorial file to check user TDC setting on multipule target AOB using the TDC dial:-


Operation|mov|<<aob_delta>>|15.0f|0|0|0
;blah blah (whole tutorial here)
; Functions:
Label|SetTargetAOB|0|0|0|0|0
GetAngle|3|None|0|0|0|0
Operation|mov|<<aob_min>>|<g_TR1>|0|0|0
Operation|-|<<aob_min>>|<aob_delta>|1|0|0
Operation|int|<<aob_min>>|<aob_min>|0|0|0
Operation|mov|<<aob_max>>|<g_TR1>|0|0|0
Operation|+|<<aob_max>>|<aob_delta>|1|0|0
Operation|int|<<aob_max>>|<aob_max>|0|0|0
CheckGUIDialValueInRange|SOL_ANGONBOW|<aob_min>|<a ob_max>|None|0|0
Operation|rtrue|None|0|0|0|0
DisplayText|Your AOB is more than 15 Deg out!|0|0|0|0|5
Jump|WrongAOB|0|0|0|0|0

I have set the + - operations to 1 for dials 180 to -180.

Some target check work fine and others dont.
The ones that dont are out by 180 deg.

Any ideas
I have also tried setting the yellow numbers to 0 and 2 - as in your speed tutorial.

It also only works with some targets.
__________________
Trevally Mods for SH5
Trevally. is offline   Reply With Quote
Old 12-19-10, 04:58 PM   #5504
Sammi79
XO
 
Join Date: Jan 2010
Location: Penzance
Posts: 401
Downloads: 272
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
What I'll do is let you be able to select the digital clock to display GMT time or local time. How's that? I was just about to release v5.8.0 but that's ok, I'll incorportate this change
Fantastic! but have selection between Base time / Local time + don't worry about seconds display, timing would be done on the stopwatch anyhow (GMT)

Quote:
Originally Posted by TheDarkWraith View Post
Wouldn't this be suited more to the environment mod (or an environment mod)? Sorry but I'm not well versed in celestial navigation. How are you getting the sun and moon angular sizes?
0.5 is the real angular value of the sun, the moon would be 0.499 (but this is only noticeable during total solar eclipse) The angular size of the sun in game can be measured with the RAOBF in the OBS scope providing the sun is low enough to be viewed. It was fairly easy to change in SH4 sky object radius increase or something. I shall have a look in the files myself

Quote:
Originally Posted by TheDarkWraith View Post
I think you'll find the addition of supermarks in v5.8.0 a welcome addition.
wow speechless Is there really only one of you?

Last edited by Sammi79; 12-19-10 at 05:44 PM.
Sammi79 is offline   Reply With Quote
Old 12-19-10, 05:26 PM   #5505
Jaeger
Chief
 
Join Date: Jul 2005
Posts: 316
Downloads: 28
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
just finishing up v5.8.0. This version adds the ability to add supermarks to the navigation map. Supermarks are identical to navigation fixes except that no navigation information is stored in them (you have the whole thing to add text to). They are also different in that they can be used without real navigation enabled. As with navigation fixes, supermarks can only be placed and viewed on the navigation map. Supermarks are like the regular map tools marker except that you get to add text to it. I've also included a small 'X' to the navigation fixes and supermarks so you can definitively see where the actual position of it is:


If toolhelper is enabled then supermarks are available (if navigation map is open).

v5.8.0 will be releasing here soon
TDW, you made my day
__________________
Everything comes to him who waits
Jaeger 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:57 PM.


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.