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 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 01-11-12, 05:17 AM   #166
Ad Günther Lütjens
Nub
 
Join Date: Jan 2010
Posts: 3
Downloads: 75
Uploads: 0
Default

+1
all Link invalid.
Please.
Ad Günther Lütjens is offline   Reply With Quote
Old 01-11-12, 08:35 AM   #167
don1reed
Ace of the Deep
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

Using the Python/Stellarium method for Celestial Navigation with SH3 & SH4.

The Script is in your [here is example of what mine looks like]

My Documents/SH3/data/cfg/Careers/(skippers name)/1/(skippers name).map

Every time you save a game, SH3/SH4 updates this file to your PRECISE location on the F5 Chart.

Here is what my Python script file looks like, note what I've highlighted in RED below. I happen to play multi-games and this is the game I play on fridays:

+++++++++++++++++++++++++++++++++++++++++++++++

# By Michael Jones, 01/01/2008. mjones004@ameritech.net
# Revised 11/29/2009 to work with Stellarium 0.10.2
# This program reads the latitude and longitude data for a
# sub in Silent Hunter III, IV and creates a startup script for
# Stellarium. This sets the Date, Time and Location of the
# sub in Stellarium, allowing players to use celestial navigation in the game.

import string, os, sys

####### Edit Locations here ############

# Change the directory on the next line to point to SaveData.map in your saved game directory.
savedgame = "C:\\Users\\Gamer\\My Documents\\JAG\\data\\cfg\\Careers\\z\\0\\Fri.map"
# Set the Stellarium directory
stellocation = "C:\\Stellarium"

####### End Editable locations #########

# read savegame.
f=open(savedgame,'r')
content= f.read()
f.close()
# find lat & Lon in the file
start = content.find("Waypoint")
longst = content.find("Pt0=",start)
longnd = content.find(",",longst)
latnd = content.find(",",longnd+1)
# convert to dec deg
longitude = float(content[longst+4:longnd])/120000
latitude = float(content[longnd+1:latnd])/120000

# get date&time (input)
date = raw_input('GMT yyyy/mm/dd :')
time = raw_input('GMT hh:mm :')

# set the ocean label
if (-90 < longitude <= 30):
ocean = "Atlantic Ocean"
elif (30 < longitude <= 105):
ocean = "Indian Ocean"
elif (longitude <= -90 or longitude > 105):
ocean = "Pacific Ocean"

# Write startup script.
date = date.replace('/', ':')
longitude = str(longitude)
latitude = str(latitude)

stella=open(stellocation + "\\scripts\\JAG.ssc",'w')
stella.write("core.setDate(\""+date+"T"+time+":00\ ")\n")
stella.write("core.setObserverLocation("+longitude +", "+latitude+", 2, 0, \"SH3 Navigation Point, "+ ocean +"\", \"earth\")");
stella.close()

# now open stellarium and take your star sights
prog = "start /d \""+ stellocation +"\" stellarium.exe --startup-script sh3.ssc"
os.system(prog)
sys.exit()
++++++++++++++++++++++++++++++++++++++++++++++++

Inside this scrip file is the formula the game uses for determining your geo coord when it updates your *.map file.

Real Navigators plot their positions five times per day (There's something religious about that. ;-) )

Body: Sun and sometimes Sun and/or Moon, used for Running Fixes.
Daylight sights:
1. Ante Meridian (A.M.)
2. Meridian (Noon)
3. Post Meridan (P.M.)

Body: Stars, Moon, & Planets, used for Fixes.
4. Evening Twilight sights. (Round of three bodies)
5. Morning Twilight sights. (Round of three bodies)

Inside my *.map file: (Located at the bottom of the file)

[Waypoint]
Pt8=44333.77,6863332.00,0.00

If I divide 44333.77 by 120000, I get = 0.369448, changing into degrees and minutes = 0° 22.2 E. Why East, you ask, well because it's a positive number (N and E are positive numbers)continuing
6863332.00/120000 = 57.194433 = 57° 11.6N.

The Python script file, when working properly, allows the player to input Game date and Time (GMT). It sends this data to Stellarium and allows the player to select the celestial bodies necessary to obtain a fix.

Stellarium provides the player with body's Azimuth and Altitude of the sight to the precise second of time. If a round of stars is to be obtained, one must allow seconds to ellapse between each sight to reenact what the real navigator does. Real life doesn't have a pause button.

Getting Python and Stellarium to work hand in hand is a tedious business, admittedly, and for those interested in TC other than TCx1, Celestial Navigation in SH3 is not recommended.
Then there is the issue with newer versions of Python don't get me started on that. (I once had grey hair, now I have none.)

edit:

Both Python and Stellarium are stand-alone programs and as such, it requires the player to save his game, then open python, input the date/time, which then opens Stellarium, then player must obtain the data for his virtual sights, go to Almanac for war years, then reduce the sights via either
Nories,
HO-211,
HO-229,
HO-249,
Concise Sight Reduction Tables,
or
pure math:
sin Hc = sin Lat sin dec + cos Lat cos dec cos LHA
cos Z = sin dec - sin Lat sin Hc / cos Lat cos Hc

You'll soon find you have no time left to enjoy playing the game; but, if you're determined...
Remember...Real Celestial Navigation is like doing your own Taxes five times per day. LoL

Cheers
__________________
[SIGPIC][/SIGPIC]
During times of universal deceit, telling the truth becomes a revolutionary act.

~ George Orwell

Last edited by don1reed; 01-11-12 at 09:40 AM.
don1reed is offline   Reply With Quote
Old 01-11-12, 10:45 AM   #168
CaliEs
Loader
 
Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
Default

Quote:
Originally Posted by Ad Günther Lütjens View Post
+1
all Link invalid.
Please.
http://files.mail.ru/9MBEOS (49MB)
__________________
Dietrich von Carlewitz, 2nd Lt.
U-29

Last edited by CaliEs; 01-11-12 at 11:20 AM.
CaliEs is offline   Reply With Quote
Old 01-11-12, 11:51 AM   #169
CaliEs
Loader
 
Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
Default

Quote:
Originally Posted by don1reed View Post
Using the Python/Stellarium method for Celestial Navigation with SH3
Awesome. Very valueable information.

In the known nautical almancs from 1939-1945 the polaris star tables ( )are missing, which are unique for every year. Do you have those Polar star tables for the time 1939 ff. ?
__________________
Dietrich von Carlewitz, 2nd Lt.
U-29
CaliEs is offline   Reply With Quote
Old 01-11-12, 12:43 PM   #170
don1reed
Ace of the Deep
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

There is a free almanac, here:

http://www.tecepe.com.br/scripts/AlmanacPagesISAPI.isa


just type in the date you're interested in, i.e., 1/11/1939 for example.
__________________
[SIGPIC][/SIGPIC]
During times of universal deceit, telling the truth becomes a revolutionary act.

~ George Orwell
don1reed is offline   Reply With Quote
Old 01-11-12, 01:34 PM   #171
Ad Günther Lütjens
Nub
 
Join Date: Jan 2010
Posts: 3
Downloads: 75
Uploads: 0
Default

Bigs thanks CaliEs
Ad Günther Lütjens is offline   Reply With Quote
Old 01-12-12, 09:18 AM   #172
CaliEs
Loader
 
Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
Default

Real navigation depends on exact time measurement. But i see no clock with a hand for seconds. Only the stopwatch exists but to top it all, the stopwatch goes wrong: the stopwatch-minute is faster than the u-boat-clock-minute.
In all sh3-threads (topic search) i have not found a single demand/question about the lack of a seconds-display. I am shocked right now.

Even for dead-reckoning its essentual to know when i have stopped my engines: at 15:00:00 or at 15:00:55. At a speed of 17kts it makes a difference of 1/2 km.
__________________
Dietrich von Carlewitz, 2nd Lt.
U-29
CaliEs is offline   Reply With Quote
Old 01-12-12, 02:29 PM   #173
vanjast
Sea Lord
 
Join Date: Jun 2006
Location: Somewhere else now
Posts: 1,696
Downloads: 808
Uploads: 4
Default

Quote:
In all sh3-threads (topic search) i have not found a single demand/question about the lack of a seconds-display. I am shocked right now.
Even for dead-reckoning its essentual to know when i have stopped my engines: at 15:00:00 or at 15:00:55. At a speed of 17kts it makes a difference of 1/2 km.
The mod was never going to be that accurate .... for many reasons beyond our control. It was just an educational idea to make it more difficult to play

Oh.. hi all, I've just risen from the depths..
vanjast is offline   Reply With Quote
Old 01-12-12, 05:10 PM   #174
CaliEs
Loader
 
Join Date: Oct 2011
Posts: 89
Downloads: 27
Uploads: 0
Default

Quote:
Originally Posted by vanjast View Post
The mod was never going to be that accurate .... for many reasons beyond our control. It was just an educational idea to make it more difficult to play
What the hell are you talking about? I just was shocked about the fact that no one in those 20000 SH-3 threads has asked about the lack of a seconds-display.

I was not talking about the idea someone is really so dumb to believe that the SH3-sky is so accurat designed/modelled to get from there a position fix. Because celestial navigation depends on exact time (seconds) and a precision of one hundredth(!) of a degree. The way to fix your position with stars is - as it described by donreed here at 01-11-2012 07:35 AM - to combine SH3 with the stellarium-software.
__________________
Dietrich von Carlewitz, 2nd Lt.
U-29
CaliEs is offline   Reply With Quote
Old 01-13-12, 03:49 AM   #175
vanjast
Sea Lord
 
Join Date: Jun 2006
Location: Somewhere else now
Posts: 1,696
Downloads: 808
Uploads: 4
Default

Well, you being shocked why the seconds indicator was not mentioned, and implying that not having this indicator would put you out by 500m or more, with regard to navigation. Maybe the forum doesn't think that this is important.

Linking SH3 skies/time/position to stellarium implies that SH3 must be 'accurate' enough as one has to use these as references for stellarium.

vanjast is offline   Reply With Quote
Old 01-13-12, 08:18 AM   #176
don1reed
Ace of the Deep
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

@CaliEs

Stellarium provides the seconds necessary to reduce the sight to a fix.

Another stand-alone program that's been around since the days of AOTD is MQK.

It allows you to input a four digit Kriegsmarine grid and transforms it into geo coord. I use it to give me an Assumed Position for my sight reductions.

I only use the celestial canopy in SH3 to determine whether celestial bodies are visible or not. It determines if an actual sight can be taken.

The other thing that is wrong about SH3 is SUNRISE and SUNSET.

Rise occurs when the upper limb breaks surface, NOT when it's half above the horizon; and likewise, Set occurs when the upper limb dips below the horizon.

Cheers
__________________
[SIGPIC][/SIGPIC]
During times of universal deceit, telling the truth becomes a revolutionary act.

~ George Orwell
don1reed is offline   Reply With Quote
Old 01-14-12, 01:42 PM   #177
vanjast
Sea Lord
 
Join Date: Jun 2006
Location: Somewhere else now
Posts: 1,696
Downloads: 808
Uploads: 4
Default

Quote:
Originally Posted by don1reed View Post
@CaliEs
Rise occurs when the upper limb breaks surface, NOT when it's half above the horizon; and likewise, Set occurs when the upper limb dips below the horizon.
Cheers
This problem is more noticable at the higher lattitudes, where the sun takes for ever to get halfway. I vaguely remember using the time that the interior light switches from red to normal, and visa versa, as an indication of sunrise/set - this seemed to be more accurate.

I just need to fire up SH3 again..

Last edited by vanjast; 01-14-12 at 03:42 PM.
vanjast is offline   Reply With Quote
Old 01-14-12, 01:57 PM   #178
don1reed
Ace of the Deep
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

I know what you mean, Van. Since the DRM was removed from SHV, I've been investigating those waters.

Cheers
__________________
[SIGPIC][/SIGPIC]
During times of universal deceit, telling the truth becomes a revolutionary act.

~ George Orwell
don1reed is offline   Reply With Quote
Old 01-26-12, 11:16 AM   #179
JeromeHeretic
Machinist's Mate
 
Join Date: Jun 2011
Location: N 50 4 E 14 25
Posts: 127
Downloads: 266
Uploads: 0
Default

Quote:
Originally Posted by CaliEs View Post
Even for dead-reckoning its essentual to know when i have stopped my engines: at 15:00:00 or at 15:00:55. At a speed of 17kts it makes a difference of 1/2 km.
And why it is so important for you, when from sextant you are able to read data +-50km on clear water?
In coastal waters you navigate via a lighthouses, when you are in the middle of ocean 100km is nothink important. When you search for reported contact, you must have at first a lot of luck, because report of contact is with error about 50km, you know your position with error about 50 km, convoy is runing in some random zig-zag course, visibility is about 25km... like this it in WWII was. When you want to simulate this, you must have on mind, that realy is not a problem in the dark night break your ship by hiting a land, when you are near of coast, or near some island. Enjoy hard living of real WWII seaman :-)

Imagine, that your board clock make an error about +-5 seconds per day and value of this error depends on weather, temperature and a lot of other things.
For example depth in which your boat is. As you go down, pressure inside of boat is much higher as atmosferical and clock go slower. Mechanical watch in summer go slower as in winter (quartz watch go quicker when hot).

As long as you are out of port, the error of your board clock is bigger.
You can set up your clock only when you exactly know, where you are - so, for example when you drive over atlantic and see some coastal lighthouse in USA and you are sure which one it is. That's a moment, when you can correct your time, because you know local noon and you know your longitude. And when you do it, you don't know if you measure better time as is error of your clock :-) Realy, it was not easy to be a seaman. :-)
JeromeHeretic is offline   Reply With Quote
Old 05-24-12, 01:04 PM   #180
Janus
XO
 
Join Date: Mar 2005
Posts: 434
Downloads: 25
Uploads: 0
Default

Is this mod still hosted somewhere?
Janus is offline   Reply With Quote
Reply


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 10:50 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.