SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [REL] Multiple UIs for SH5 with TDC (https://www.subsim.com/radioroom/showthread.php?t=166093)

TheDarkWraith 04-25-10 08:17 AM

Quote:

Originally Posted by kylania (Post 1372508)
Also seeing something strange. I first got a single ship contact at 9:15. While I still had it deleted, at 10:16 I got another single ship contact.

The first ship's contact time switched to 5 seconds BEFORE the 2nd ship's contact. So one was 10:16:23 and the original changed it time from 9:15 to 10:16:18.

Then when I got a convoy report at 2:32 or something, the first ship contact again changed it's reported time to just before the convoy's spotted time, but second ship contact retained it's sighted time.

Might this be related tot he whole "nothing was initialized yet" thing like early versions of teleport were?

it's related to a word called assuming....which you know what happens when you do that ;) Yep, bit me in the @ss.
The contacts are stored in an array and I assumed that new contacts would be added to the end of the array.....not so! The game adds contacts wherever it wants to in the array. So I had to adjust my code to account for this. This problem no longer exists.

TheDarkWraith 04-25-10 08:42 AM

I'm trying to add another feature to the map contacts but running into a little difficulty. I'm wanting to compute their lattitude and longitude. The game gives me the distance from the origin. Origin is in the Gulf von Guineea west of Kongo (you can find it on your nav map). These distances from origin are in meters. I know that a degree of lattitude is approx. 111km and a degree of longitude is approx 111km at the equator and goes to 0 at the poles. If I divide the distance the game gives me for lattitude by 111000 (in meters) the value comes close but doesn't match what the game puts in the messagebox (say for a radio contact report). The longitude part I haven't derived the mathematical formula for it yet. Can any math majors help me out here?

Philipp_Thomsen 04-25-10 10:11 AM

Quote:

Originally Posted by TheDarkWraith (Post 1372892)
I'm trying to add another feature to the map contacts but running into a little difficulty. I'm wanting to compute their lattitude and longitude. The game gives me the distance from the origin. Origin is in the Gulf von Guineea west of Kongo (you can find it on your nav map). These distances from origin are in meters. I know that a degree of lattitude is approx. 111km and a degree of longitude is approx 111km at the equator and goes to 0 at the poles. If I divide the distance the game gives me for lattitude by 111000 (in meters) the value comes close but doesn't match what the game puts in the messagebox (say for a radio contact report). The longitude part I haven't derived the mathematical formula for it yet. Can any math majors help me out here?

There is some delay between message being generated and message being delivered. How big is the mismatch?

7thSeal 04-25-10 10:15 AM

For those saving the game and restarting for fixing sound issues try hitting Esc and then Esc again to get back into the game. 9 outa 10 times this fixes it for me and don't have to worry about saving and restarting the game. :up:

TheDarkWraith 04-25-10 10:17 AM

Quote:

Originally Posted by Philipp_Thomsen (Post 1372974)
There is some delay between message being generated and message being delivered. How big is the mismatch?

negligible

TheDarkWraith 04-25-10 10:20 AM

making the navigator actually work now :03: He has to keep track of every contact and update the bearing to the contact now. Bearing to contact is updated in real time. Bearings are relative to the bow of your sub. Positive bearings are clockwise and negative bearings are counter-clockwise
http://www.subsim.com/radioroom/pict...pictureid=1895

adding the option for user to change date-time-stamp format. What different formats do you all want?

mm/dd/yy time
dd/mm/yy time
mm/dd/yy military time
dd/mm/yy military time
??

subaxe 04-25-10 11:09 AM

looks better and better

mm/dd/yy military time

that will be my choice for my game :rock:

kylania 04-25-10 11:26 AM

Quote:

Originally Posted by TheDarkWraith (Post 1372892)
These distances from origin are in meters. I know that a degree of lattitude is approx. 111km and a degree of longitude is approx 111km at the equator and goes to 0 at the poles. If I divide the distance the game gives me for lattitude by 111000 (in meters) the value comes close but doesn't match what the game puts in the messagebox (say for a radio contact report). The longitude part I haven't derived the mathematical formula for it yet. Can any math majors help me out here?

Ignore reality! :D The lat/long lines are 120km from each other in game, a square grid rather than the lines-on-a-globe they really are. Should make things much easier.

TheDarkWraith 04-25-10 12:28 PM

Quote:

Originally Posted by kylania (Post 1373033)
Ignore reality! :D The lat/long lines are 120km from each other in game, a square grid rather than the lines-on-a-globe they really are. Should make things much easier.


true they are 120km from each other but the game is factoring in geographical location into the mathematical formula it's using to derive lat and long. I used the costant 120000 (120km) and it still didn't come out right.

EDIT: ok, I have my moments.......the fractional part left over I forgot to factor as 60 minutes to a degree. I'll see what that gives.

McHub532 04-25-10 12:32 PM

Quote:

Originally Posted by TheDarkWraith (Post 1373086)
EDIT: ok, I have my moments.......the fractional part left over I forgot to factor as 60 minutes to a degree. I'll see what that gives.

There are 10 types of people in the world. Those that understand binary and those that don't.

Sorry.. just stray from base 10 and life gets wonky. :)

reaper7 04-25-10 02:10 PM

Quote:

Originally Posted by McHub532 (Post 1373090)
There are 10 types of people in the world. Those that understand binary and those that don't.

Just love that saying. :D

TheDarkWraith 04-25-10 02:37 PM

Quote:

Originally Posted by kylania (Post 1373033)
Ignore reality! :D The lat/long lines are 120km from each other in game, a square grid rather than the lines-on-a-globe they really are. Should make things much easier.

yep. Got it working.

Ok, the TAI information has changed. You now get the contact date-time-stamp and also the bearing to the contact (Bearing) and the heading you need to take to head to the contact (Heading):
http://www.subsim.com/radioroom/pict...pictureid=1896

I've added some information to the nav-map contacts also. Notice in this example that the messagebox's radio report's lat and long match the info displayed for the contact :rock: Bearing is the bearing from the sub's bow to the target (+ is clockwise, - is counter-clockwise, Heading is the heading you would turn to to head to the contact):
http://www.subsim.com/radioroom/pict...pictureid=1897

Bearing and heading are updated in real time. So if you turn the sub those values will change in real time.

When a contact is added to the nav-map, the original lat and long are saved with the contact. They do not get updated.

McHub532 04-25-10 02:46 PM

TheDarkWraith; have I told you today that I love you? :)

Sonarman 04-25-10 02:50 PM

Great work, but maybe it would be better to say "intercept" or "Heading to target" rather than "heading" as this maybe mistakenly interpreted as the contact's heading/course?

TheDarkWraith 04-25-10 02:53 PM

Quote:

Originally Posted by Sonarman (Post 1373198)
Great work, but maybe it would be better to say "intercept" or "Heading to target" rather than "heading" as this maybe mistakenly interpreted as the contact's heading/course?

intercept heading or intercept? I can see how heading could be misleading....


All times are GMT -5. The time now is 11:47 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.