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

Reply
 
Thread Tools Display Modes
Old 03-23-08, 04:12 AM   #151
castorp345
Sonar Guy
 
Join Date: Apr 2005
Location: People's Republic of Cambridge
Posts: 379
Downloads: 118
Uploads: 0
Default

@ 6SJ7GT : thanks for those. i'll take a gander and see what can be done.

pursuant to adding this sort of weather-based randomization(s) though, does anyone have any suggestions as to what would constitute acceptable values of distortion/'noise'? i'm thinking that, at beaufort 0 and all-stop, a base fuzziness around the actual value would be circa 15 arcsecond [as given in Dutton's in Navigation & Piloting : " A highly skilled and experienced navigator can determine position to an accuracy of about 0.25-nautical-mile (460 m)"]... as sea state/engine bell increase this randomized value should correspondingly do so as well, but by how much? you real-world experienced navigational hands out there: how far off would your nominal shot be in heavy seas?

cheers all,
hc
castorp345 is offline   Reply With Quote
Old 03-23-08, 07:54 AM   #152
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

castorp345 I believe the only way to prove your theory is to make a model that is directly proportional to the sea state and speed. We would gladly assist in testing it for you.

Most sextant work is done at standand speed and below. Running at flank and/or full indicates some sort of battle-action and would prevent navigational duties except on larger vessels.

You should be aware that the larger the ship platform the more stable it is for taking sights; however, weather changes all no matter the speed.
__________________

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

~ George Orwell
don1reed is offline   Reply With Quote
Old 03-23-08, 09:21 AM   #153
castorp345
Sonar Guy
 
Join Date: Apr 2005
Location: People's Republic of Cambridge
Posts: 379
Downloads: 118
Uploads: 0
Default

Quote:
Originally Posted by don1reed
I believe the only way to prove your theory is to make a model that is directly proportional to the sea state and speed.
agreed!
the question is: what would be an appropriate value for the maximum allowable distortion? ie, if our randomization factor is 15 arcsecond at 0 wind 0 and 0 speed, what would make sense for it to be at 15 wind (sh4's maximum) and 0 speed? additionally, what range of randomization values would make sense with the boat at speed? ie assuming 0 wind, would it make sense to, say, double the distortion factor per bell to arrive at maximum allowable distortion? so (with 0 wind) at all-stop we'd have 15 arcsecond, @ 1/3 ~ 30 arcsecond, @ 2/3 ~ 1 arcminute, @ standard ~ 2 arcminute, @ full ~ 4 arcminute, and finally arriving at flank ~ 8 arcminute as maximum allowable distortion (again, excluding sea state)...
:hmm:
castorp345 is offline   Reply With Quote
Old 03-23-08, 10:07 AM   #154
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

Alas, I'm not a modder, but I see the math problem you propose as this:





my redition is very rough but I believe this is what you mean(?)
__________________

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

~ George Orwell
don1reed is offline   Reply With Quote
Old 03-23-08, 11:24 AM   #155
castorp345
Sonar Guy
 
Join Date: Apr 2005
Location: People's Republic of Cambridge
Posts: 379
Downloads: 118
Uploads: 0
Default

Quote:
Originally Posted by don1reed
Alas, I'm not a modder, but I see the math problem you propose as this:





my redition is very rough but I believe this is what you mean(?)

that's essentially it...
but the question still remains: does 8 MOA seem like a reasonable maximum amount of error to introduce? might this randomization factor be higher or lower? how far off-the-mark is it likely that an experienced navigator taking a shot would be in heavy seas?

cheers
hc
castorp345 is offline   Reply With Quote
Old 03-23-08, 12:41 PM   #156
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

Easily, and could be even more depending on the conditions. It does vary.

edit: ...but...

8 moa is a good place to start to get a feel for it in game.
__________________

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

~ George Orwell
don1reed is offline   Reply With Quote
Old 03-23-08, 07:14 PM   #157
castorp345
Sonar Guy
 
Join Date: Apr 2005
Location: People's Republic of Cambridge
Posts: 379
Downloads: 118
Uploads: 0
Default

Quote:
Originally Posted by don1reed
8 moa is a good place to start to get a feel for it in game.
ok, i'll start with 8moa and get myself familiar with python.
'will report back with a modded script as soon as i've got it under hand.

many thanks again
cheers
hc
castorp345 is offline   Reply With Quote
Old 03-23-08, 08:20 PM   #158
6SJ7GT
A-ganger
 
Join Date: Mar 2008
Location: Wi. USA
Posts: 71
Downloads: 10
Uploads: 1
Default

A little randomization would make an interesting addition.

I don't know if changing the sub coordinates in the SaveData.map file would change the sub location, or if the map gets the sub location from some other file. It shouldn't be too hard to test.
6SJ7GT is offline   Reply With Quote
Old 03-23-08, 08:31 PM   #159
robgee
Nub
 
Join Date: Mar 2008
Posts: 2
Downloads: 0
Uploads: 0
Default Im Lost

This from King of the Newbies! I just downloaded SH 4 with the latest patch and can't get out of navigation training 101. My problem is "Where is the designated zone"? I zoom out of the map and my ship seems to be located sw of Pearl Harbor but can't find where the designated zone to dock is.
Thanks,
rg
robgee is offline   Reply With Quote
Old 03-23-08, 09:15 PM   #160
6SJ7GT
A-ganger
 
Join Date: Mar 2008
Location: Wi. USA
Posts: 71
Downloads: 10
Uploads: 1
Default

RG, welcome to SH4.
You have to get to the star on the north side of the island. When you are close to it you complete nav training.

HC, I did a quick test and changing the sub waypoint on SaveData.map does not seem to change the sub position. If we can find a text file that sets the sub position we might be able to append the randomized position back into the game.

Here is a short python script for random numbers:

random.py:
#start script
import random

random.seed()

dr1 = random.randint(0,133)

dr =dr1*.01

print dr
#end


Looks like Don is in my control room. With his nav skill I would be pretty sure of our location.



Cheers,
Mike
6SJ7GT is offline   Reply With Quote
Old 03-24-08, 04:07 AM   #161
castorp345
Sonar Guy
 
Join Date: Apr 2005
Location: People's Republic of Cambridge
Posts: 379
Downloads: 118
Uploads: 0
Default

thanks for that, Mike.

here's what I came up with...

I've taken the liberty of modifying your original script so that the long/lat handed to stellarium are given 'fuzziness' based on user-entered values of wind speed and boat speed. note that even with values of 0 there will still be some randomization (up to apx 30 arcsecond). I also realized that, in order for the script to work, it is necessary for the user to have set course waypoints in the in-game plot prior to saving (which, for me at least, kind of defeats the purpose of a 'real navigation' approach)... my suggested solution for this is to maximum zoom-in on the game map and set a waypoint that is 1nm along the desired course bearing prior to saving. After saving i'd suggest deleting this waypoint and zooming back out. This way the python script gets the correct base value without "giving away" the actual location (provided of course that one has used the original 'real navigation' mod's suggested blank cont_line and unit_sub files to not reveal map location).

in any event, here's the modified script:

Code:
#By Michael Jones, 01/01/2008.
#This program reads the latitude and longitude data for a
#sub in Silent Hunter 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.
#
#Modified by Castorp345 to include randomization, 03/24/2008.

import string

import random
random.seed()

#read savegame. Change the directory on the next line to point to SaveData.map in your saved game directory.
#NB you must have plotted waypoints in-game for this to work!
f=open("C:\\Documents and Settings\\Administrator\\My Documents\\SH4\\data\\cfg\\SaveGames\\00000001\\SaveData.map",'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, wind speed, & boat speed (input)
date = raw_input('yyyy/mm/dd :')
time = raw_input('hh:mm :')
wind = float(raw_input('wind speed :'))
speed = float(raw_input('own speed :'))

#perform randomization operations on location coordinates
wind1 = random.uniform(0,((wind + 1) * .0083125))
wind2 = random.uniform(0,((wind + 1) * .0083125))
speed1 = random.uniform(0,((speed + 1) * .0083125))
speed2 = random.uniform(0,((speed + 1) * .0083125))
longitude = longitude + wind1 - wind2 + speed1 - speed2
latitude = latitude + wind1 - wind2 + speed1 - speed2

#Write startup script. Change the next line to suit for your Stellarium startup script.
stella=open("C:\\Program Files\\Stellarium\\scripts\\startup.sts",'w')
stella.write("date utc "+date+"T"+time+":00\n")
stella.write("moveto lon "+str(longitude)+"\n")
stella.write("moveto lat "+str(latitude)+"\n")
stella.write("script action end\n")
stella.close()

#now open stellarium and take your star sights
i'll be curious to know how these randomizations work for everyone!


cheers
hc

edit: removed "(x86)" from directory pointer

Last edited by castorp345; 03-25-08 at 10:09 AM.
castorp345 is offline   Reply With Quote
Old 03-24-08, 03:46 PM   #162
6SJ7GT
A-ganger
 
Join Date: Mar 2008
Location: Wi. USA
Posts: 71
Downloads: 10
Uploads: 1
Default

hc,
I found the problem with no waypoint once or twice. I didn't have to set a waypoint, but I went back into the game and looked at the map before resaving, after that there was a waypoint in the saved game.

Also, might want to try some long runs in the game manually, I think Don noticed some drift previously, and I had a run of ~10 hours at 8 kts westerly, came out to 6.5 kts. I think going in and out of the game during that run affected it as the game always starts with the sub stopped. This doesn't seem to be a problem if you are navigating to a set waypoint as the game takes the sub right to that point.

I'm also using the no sub marker on map mod, there is still a waypoint in the SaveData.map file.

Mike
6SJ7GT is offline   Reply With Quote
Old 03-24-08, 04:19 PM   #163
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

I second the motion for the Welcome, robgee !

Let us know if your nav is working alright (?)

Like, 6SJ7GT, said...set a course for that big yellow star (Zoom out so you can see it).

-...-

@ 6SJ7GT: Nice pic

@ castorp345: cut 'n pasting now...let you know.

Later,

Don
__________________

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

~ George Orwell
don1reed is offline   Reply With Quote
Old 03-24-08, 04:50 PM   #164
6SJ7GT
A-ganger
 
Join Date: Mar 2008
Location: Wi. USA
Posts: 71
Downloads: 10
Uploads: 1
Default

One other thing, we should try to find where the sub position is set in the savegame. We may be able to put the sub at the randomized position. This could be a problem if you are near land and the new random position is onshore.

-.. --- -. , .- .-. . -.-- --- ..- .- .... .- -- ..--.. -.- ----. -- -.. .---

Mike
6SJ7GT is offline   Reply With Quote
Old 03-24-08, 05:02 PM   #165
don1reed
Ace of the Deep
 
don1reed's Avatar
 
Join Date: Dec 2004
Location: Valhalla: Silent Generation
Posts: 1,149
Downloads: 910
Uploads: 0
Default

@castorp345: I changed the directory file to suit my system, but can't get it to work(?) After running python it's supposed to ask for date & time, right? If so, I got something runamuck...

@6SJ7GT: used to be WK0H, Mike...but, that was years ago...

thought I recognized your Handheld on the table in one of your pics. Is that 2m or higher?
__________________

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

~ George Orwell
don1reed 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 05:49 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.