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 07-08-13, 10:24 AM   #1
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
For electric engines this is how the game calculates theoretical maximum speed for given bell
Quote:
Originally Posted by TheDarkWraith View Post
Reverse bell on electrics. Dead back slow - 1:
Thank you TDW, I am converting your routines into formulas, and putting them on a graph
gap is offline   Reply With Quote
Old 07-08-13, 10:43 AM   #2
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Thank you TDW, I am converting your routines into formulas, and putting them on a graph
I'll have diesel values here in a bit. Just found an error in the engine ratios patch that affects AI subs battery capacity. Loading new version currently.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 10:46 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

v1.0.126.0 released. See post #1

Starting with v1.0.126.0 Revised the Engine ratios patch to fix bug of AI sub's battery capacity being incorrectly reported to the game
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 10:49 AM   #4
Sjizzle
Count Dracula
 
Sjizzle's Avatar
 
Join Date: Aug 2012
Location: 46°13′N, 24°47′E
Posts: 1,807
Downloads: 405
Uploads: 0


Default

Quote:
Originally Posted by TheDarkWraith View Post
v1.0.126.0 released.
Thanks TDW
Sjizzle is offline   Reply With Quote
Old 07-08-13, 10:53 AM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

For diesel engines this is how the game calculates theoretical maximum speed for given bell:

XMM registers can be thought of floating point registers for this discussion
My sub was a VIIC. I asked for a forward bell (ahead slow - 1). I was surfaced thus using diesel engines. Engine ratios patch disabled.

XMM0 set to 0.0
load 1.0 into XMM2
load value into XMM1 dealing with current engine type in use (for diesels this is 8.857989)
multiply XMM1 by ordered bell (engine ratio asked for)
load XMM1 into XMM0
add XMM2 to XMM0
divide XMM0 by engine type in use value (for diesels this is 2387200.0)
multiply XMM0 by engine type in use value (for diesels this is 3086.243)
multiply XMM0 by XMM1
multiply XMM0 by XMM1
raise XMM0 to the power of 0.3333333 (XMM0^0.333333)
multiply XMM0 by engine type in use value (for diesels this was 30.99133)

XMM0 contains theoretical maximum speed for ordered bell (for this it was 11.26) for that engine (done for each engine)

Actual speed attained ~ 3.25 knots

Maybe the value in XMM0 is not theoretical maximum speed but rather RPM

EDIT: can't be RPM because I went to external cam and the props are turning way faster than 11 RPM...

Last edited by TheDarkWraith; 07-08-13 at 11:05 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-08-13, 12:14 PM   #6
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,160
Downloads: 793
Uploads: 10
Default

So here's the graph of the functions you have just described:



As you can see, their curves are pretty similar, and they resemble a "flattened" sigmoid. I have some doubts about the last diesel constant you have stated though:

Quote:
(for diesels this was 30.99133)
as it would be identical to the corresponding electric constant, and for a bell ratio of 0.20 (AheadSlow), it gives an XMM0 value of 6.94 instead of 11.26; on the contrary, the electric XMM0 value returned by your constant is 7.56, as espected.

Something to note about the other constants:

(3,913995+1)*7432,328*(3,913995)^2/559500≈(8,857989+1)*3086,243*(8,857989)^2/2387200≈1

Constants apart, what is weird about those routines is the absence of max_speed sim file setting as a parameter, and the big difference between the XMM0 values returned by them and actual speeds attained
gap is offline   Reply With Quote
Old 07-08-13, 01:41 PM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,959
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
as it would be identical to the corresponding electric constant, and for a bell ratio of 0.20 (AheadSlow), it gives an XMM0 value of 6.94 instead of 11.26; on the contrary, the electric XMM0 value returned by your constant is 7.56, as espected.
I double checked that last constant for electric and diesels and it's the same.

You have to remember that I gave the function that does this calculation it's name. I have no clue whether the name I gave it corresponds to it's true meaning or is just a wild guess. I do know that it works with the engine ratio selected and the final value is used in the engines to determine speed of the sub. I haven't traced down where the actual max speed of the unit (as defined in .dat file) is used yet. When I do it will probably unlock the remaining mysteries about how speed is calculated.
TheDarkWraith is offline   Reply With Quote
Reply

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 04:09 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.