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 > Silent Hunter 4: Wolves of the Pacific
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 10-10-20, 10:59 AM   #16
derstosstrupp
Grey Wolf
 
derstosstrupp's Avatar
 
Join Date: Aug 2008
Posts: 879
Downloads: 489
Uploads: 0


Default

If you use your DR as the assumed position and thereby keep the intercepts short, the longitude thing won’t be an issue. Problems arise when you use methods like HO 229 that require plotting from a whole degree of lat/long because the intercepts can be large.

If you do want to use larger intercepts, take the difference in minutes of longitude between assumed position and fix, and divide by the cosine of the latitude. Then shift the fix horizontally by the difference.

So say you plotted from 54 deg N, 2 deg E assumed position and got your fix at 53 deg 48’ N and 2 deg 13’ E. The difference in minutes is 13, so take 13 / cos (53.8) which gives 22. So your fix is 53 deg 48’ N, 2 deg 22’ E..
__________________
Ask me anything about the Type VII or IX!

One-Stop Targeting Shop:
https://drive.google.com/drive/folde...WwBt-1vjW28JbO
My YT Channel:
https://www.youtube.com/channel/UCIJ...9FXbD3S2kgwdPQ
derstosstrupp is offline   Reply With Quote
Old 10-10-20, 02:30 PM   #17
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by derstosstrupp View Post
If you use your DR as the assumed position and thereby keep the intercepts short, the longitude thing won’t be an issue. Problems arise when you use methods like HO 229 that require plotting from a whole degree of lat/long because the intercepts can be large
...

Thanks. I have been taking my shots three-ish hours apart. Is that short enough?
  Reply With Quote
Old 10-11-20, 03:37 AM   #18
Pisces
Silent Hunter
 
Join Date: Dec 2004
Location: AN9771
Posts: 4,892
Downloads: 300
Uploads: 0
Default

Celestial sights taken every 3 hours seems overkill. Consider how far you expect to move from the last place in that time? Dead reckoning should be the major method of progressing your position. Then a few times a day a celestial fix when possible to correct it. There is no sea current or wind drift in the game so you won't be too far off.
__________________
My site downloads: https://ricojansen.nl/downloads
Pisces is offline   Reply With Quote
Old 10-11-20, 06:48 AM   #19
derstosstrupp
Grey Wolf
 
derstosstrupp's Avatar
 
Join Date: Aug 2008
Posts: 879
Downloads: 489
Uploads: 0


Default

Quote:
Originally Posted by Capt Codetrucker View Post
Thanks. I have been taking my shots three-ish hours apart. Is that short enough?
That’s not what I mean. So a key part of celestial navigation is deciding the point from which you plot your intercepts in order to determine lines of position. The distance between the point that you plot from, called the assumed position, and the point along the azimuth toward or away from the body that you plot the perpendicular line of position at is called the intercept. That intercept distance is what I’m talking about. Not distance between sights.

Also, as I mentioned on Discord, if you are doing celestial sights every three hours you will get burned out in no time. I think I suggested to you to keep it to one a day, that is more than sufficient given the fact that, as Pisces said, there’s no set and drift or anything like that in the game.
__________________
Ask me anything about the Type VII or IX!

One-Stop Targeting Shop:
https://drive.google.com/drive/folde...WwBt-1vjW28JbO
My YT Channel:
https://www.youtube.com/channel/UCIJ...9FXbD3S2kgwdPQ
derstosstrupp is offline   Reply With Quote
Old 10-11-20, 11:29 AM   #20
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

FAB Thanks guys.



FYI - I have been doing lots of shots as tests of SHtoStellarium. I have also begun to modify the script to use with FSX props and propliners. It's kind of tough since I also have to code in the altitude, but I digress. All in good time.
  Reply With Quote
Old 10-12-20, 09:24 PM   #21
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by derstosstrupp View Post
...
So say you plotted from 54 deg N, 2 deg E assumed position and got your fix at 53 deg 48’ N and 2 deg 13’ E. The difference in minutes is 13, so take 13 / cos (53.8) which gives 22. So your fix is 53 deg 48’ N, 2 deg 22’ E..
@ derstosstrupp...

Please examine the following to make sure I understand. ALL CAPS are for my comments. I am not yelling.

"So say you plotted [IN SILENT HUNTER] from 54 deg N, 2 deg E assumed position and got your fix at 53 deg 48’ N and 2 deg 13’ E [IN SILENT HUNTER]. The difference in minutes is 13, so take 13 / cos (53.8) which gives 22. So your fix [IN GOOGLE EARTH] is 53 deg 48’ N, 2 deg 22’ E."

So, do I understand correctly or am I backwards?
  Reply With Quote
Old 10-13-20, 06:19 AM   #22
derstosstrupp
Grey Wolf
 
derstosstrupp's Avatar
 
Join Date: Aug 2008
Posts: 879
Downloads: 489
Uploads: 0


Default

Quote:
Originally Posted by Capt Codetrucker View Post
@ derstosstrupp...

Please examine the following to make sure I understand. ALL CAPS are for my comments. I am not yelling.

"So say you plotted [IN SILENT HUNTER] from 54 deg N, 2 deg E assumed position and got your fix at 53 deg 48’ N and 2 deg 13’ E [IN SILENT HUNTER]. The difference in minutes is 13, so take 13 / cos (53.8) which gives 22. So your fix [IN GOOGLE EARTH] is 53 deg 48’ N, 2 deg 22’ E."

So, do I understand correctly or am I backwards?
That’s exactly right yes.
__________________
Ask me anything about the Type VII or IX!

One-Stop Targeting Shop:
https://drive.google.com/drive/folde...WwBt-1vjW28JbO
My YT Channel:
https://www.youtube.com/channel/UCIJ...9FXbD3S2kgwdPQ
derstosstrupp is offline   Reply With Quote
Old 10-13-20, 07:33 PM   #23
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by derstosstrupp View Post
That’s exactly right yes.
Thank you kindly. Now that I understand how this works, I should easily incorporate it in a SHtoStellarium script modification or a linked script. I'll post it once I get it working.
  Reply With Quote
Old 11-21-20, 11:21 PM   #24
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

Sorry, if I got to this late; but, is this what you're looking for? (It's a script written for PYTHON 34, by :

# 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\\Donald\\My Documents\\SH4\\data\\cfg\\SaveGames\\00000000\\Sa veData.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 = input('GMT yyyy/mm/dd :')
time = 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\\sh4.ssc",'w')
stella.write("core.setDate(""+date+"T"+time+":00") \n")
stella.write("core.setObserverLocation("+longitude +", "+latitude+", 2, 0, "SH4 Navigation Point, "+ ocean +"", "earth")");
stella.close()

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

During times of universal deceit, telling the truth becomes a revolutionary act.

~ George Orwell
don1reed is offline   Reply With Quote
Old 11-22-20, 12:12 AM   #25
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

IRL Before GPS, it was the Navigator's task to be on deck with the sextant for his call to prayer, five times per day:

Twilight sextant sights are best made between:

Nautical twilight: Sun 12° below horizon.
Civil Twilight: Sun 6° below horizon.

1) Morning twilight
2) Morning Sun sight
3) Noon Sun sight
4) Afternoon Sun sight
5) Evening twilight

As mentioned above, doing that in game will wear you out, especially if using math sight reduction methods, let alone the time consumption.
Cheers,
__________________

During times of universal deceit, telling the truth becomes a revolutionary act.

~ George Orwell
don1reed is offline   Reply With Quote
Old 08-21-21, 01:16 AM   #26
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Hello,

In case anyone here is not monitoring Discord, the project to integrate Stellarium as a SH4 CellNav platform is continuing. Unfortunately, it has hit a snag. I am confident this effort can be successful if I can discover where to find the date and time of the last/saved position. The position coordinates of the script is successful, but as you know, coordinates without correct time is useless in CelNav.

Can someone point me to the exact file where SH4 saves the exact in-game date and time? I have been looking in every file I can see for two days.

Thanks.
  Reply With Quote
Old 08-21-21, 08:34 AM   #27
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

I have looked for similar data amongst the files before, and my best guess is that it is in one of the binary files, or which I know nothing of the structure. If you look in the CareerTrack.upc file and notice the start location, they use "scientific" number notation, and not a straigt-up number, so I don't know if you would have to look for the long/lat stored the same way in a binary file, or the regular decimal location data. If I'm not mistaken some of those files are encrypted, which would make finding the data rather daunting. Also, a BIG problem with trying to use the Save data is having the player put an executable in the correct folder to gather the required data... It might be easier to have a little pop-up that the player inputs his location into prior to exiting the game... ?? Of course, one has to be careful shelling-out to Windows from the game, since that can cause trouble on some set-ups.

P.S.: it might be that Jeff-Groves could think of a way to "search" through the Save folder binary data with the 010 Editor program, and might make short work of the search...
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 08-21-21, 05:33 PM   #28
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

@propbeanie
I have been wondering about the idea of a standalone app instead of reading SH. I might even make an iOS and Android app, but that presents other problems. Mainly, Stellarium is only available on desktop platforms.
  Reply With Quote
Old 08-22-21, 09:33 AM   #29
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,719
Downloads: 439
Uploads: 2


Default

There are some "alternatives" for the Android and iOS platforms for the pc-based Stellarium, though I have no idea as to their suitability to the task you're after. It would be nice to have a tablet or fone that could take user input of user data, and plot location... it would be even better if the game could allow for that, wouldn't it?... - maybe someday.

https://www.androidfreeware.net/down...tellarium.html
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 08-22-21, 01:04 PM   #30
Capt Codetrucker
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Yes, maybe someday. Actually, I have been ruminating on how far this project might go. I can already see several phases, but for now I am focusing on making the first phase of manual time entry work flawlessly, at least on my SH4. “Phase 2” will be to automate the process which I should be able to do since I found the date/time data in the SaveGame.crp file. It is the log data which is produced that you see when a command is echoed back or a report is given. The file gets longer with every announcement, so the Phase 2 script will have to read to EOF and backread to get the data. It’s doable. The good news is the Phase 1 script may(?) get completed today. 😊
  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 02:42 PM.


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.