UBOAT
[2025.1]Real Navigation
450 Comments
Mouse Rat 3 hours ago 
Any chance you can remove "locking" as part of the mod.
kjones12 24 Jun @ 4:06pm 
Wish-List Add a way to set bearing tool to uboats current heading since the sub is missing the bearing tool points the 0 bearing up or North but then you have to the relative course calculations again :/
BattlePants#2233 6 Apr @ 2:25am 
this mod doesn't seem to work for 2022.1 for me at least ;((
KaKuchKe_SpaiN 28 Mar @ 7:31am 
It's working properly again. Thank you very much! :steamthumbsup:
Don D Dwain 13 Mar @ 7:54am 
P.S. Radio signals are more realistic due to vast distances, where a lighthouse has a limited visual range due to weather conditions, and distance. There are no actual radio signals in the game for navigation that I know of, so it has to be imaginary.
Don D Dwain 13 Mar @ 7:54am 
Sorry I will update my last confusing comment, lol. I saw a comment somewhere in here about being able to center the map on the last position known. An easy fix without changing any files, and is more consistent with history, is to place at least 2 points on the map (name them whatever you like, (exp: lighthouse, radio station, etc.) as long as it is on land or a fixed position and at least 2 points. On your last updated position, draw a line from 2 of however many positions you created, and intersect them to your position, extend the line a little further than your actual position so then it appears as an "X" on the map. Simply move those lines from that point, when you update your position again. After you save the game, then on Reload, it should be very easy to find your last updated coordinates.
cr8z_cuban 6 Mar @ 12:28am 
So I tested it quite a bit, and on my end everything seems on point. Also an easier explination to your question would have been: In your mod you have the line "odoContactDistanceInt += Mathf.RoundToInt(odoIncrementalDistance);". Mathf.RoundToInt() rounds the distance to the nearest whole number before adding it to the odometer. If the result is below 0.5 meters, it rounds down to 0, meaning no distance is added to the odometer. If the movement is above 0.5 meters, it rounds to 1 meter. So unless the movement is large enough to round up, it won’t register at all. I didnt change this, so by the logic it should still be accurate. I did a couple more tweaks for ease of use for myself. distance under 25km in meters, and over 25km in xx.xx format. Love the mod, just was pulled into the black hole of trying to improve it a little for myself and since it worked, figured id share!
cr8z_cuban 5 Mar @ 1:24pm 
-"position2" stores the submarine's current position for this frame.
-The line "float odoIncrementalDistance = Vector2.Distance(odoLastPosition, position2) * 1000" calculates the distance moved since the last frame.
-Change: "odoLastPosition = position2" - This updates the reference point to the current position, ensuring that the next frame's distance is always measured from the most recent position instead of an old, outdated reference.
-"odoContactDistanceInt += Mathf.RoundToInt(odoIncrementalDistance)" - This adds the calculated distance to the total odometer reading.

Sorry, didnt fit all in one comment.

Everything seemed extremely accurate during an attack last night. also might I add this doesnt mess at all with the estimated location/actual location. Its up to you where you choose your reference point for calculations!
cr8z_cuban 5 Mar @ 1:20pm 
Vector2 position2 = new Vector2(__instance.SandboxEntity.Position.x, __instance.SandboxEntity.Position.y);
float odoIncrementalDistance = Vector2.Distance(odoLastPosition, position2) * 1000;
odoLastPosition = position2;
odoContactDistanceInt += Mathf.RoundToInt(odoIncrementalDistance);

The distance calculation remains identical—it still measures only the distance between the last recorded position "odoLastPosition" and the current position "position2".
cr8z_cuban 5 Mar @ 1:20pm 
Should be no accumulation of errors.
Original method of calculating distance:
odoIncrementalDistance = Vector2.Distance(odoLastPosition, position2) * 1000;

-"odoLastPosition" last recorded position of the submarine.
-"position2" is the current position.
-"Vector2.Distance(odoLastPosition, position2)" measures distance traveled since the last position update.
-This was then added to "odoContactDistanceInt", which keeps track of total traveled distance.
The mod measures distance between these two points and added it to the odometer total.
The problem is it only tracks distance between those 2 points, hence counting down when going back.

What I did keeps the same logic, but ensures "odoLastPosition" is properly updated before the next calculation:
Matta  [author] 5 Mar @ 2:48am 
@cr8z_cuban
Getting this to work was one of the planned updates-- have you tested whether its accurate?
I'm worried there could be an accumulation of small errors.
cr8z_cuban 4 Mar @ 6:51pm 
Also, if the Odometer popup is annoying, heres how to get rid of it:

In C:\Program Files (x86)\Steam\steamapps\workshop\content\494840\2618451929\Source\RealNavigationPatch.cs, Find:
if (eventData.button == PointerEventData.InputButton.Left)
{
odoContactDistanceInt = 0;
tutorialTicket = tutorialUI.Open(locale["Parameters/Odometer Null"], 10);
tutorialTicket.Pause = false;
tutorialTicket.CloseByClick = true;
}

Replace this section with:
if (eventData.button == PointerEventData.InputButton.Left)
{
odoContactDistanceInt = 0;
}
cr8z_cuban 4 Mar @ 5:11pm 
I found a fix for it. In C:\Program Files (x86)\Steam\steamapps\workshop\content\494840\2618451929\Source. Open Realnavigationpatch.cs in a text editor (I use word pad) Find the line "float odoContactDistance = (Mathf.Sqrt(Vector2.SqrMagnitude(odoLastPosition - position2))) * 1000;" Replace it with "float odoIncrementalDistance = Vector2.Distance(odoLastPosition, position2) * 1000;
odoLastPosition = position2;
odoContactDistanceInt += Mathf.RoundToInt(odoIncrementalDistance);" . Make sure you only delete EXACTLY the code provided, and not a space more or less. If you do you will mess up the code.

Ive been driving in a circle for an hour and the odometer continues to count up. The odometer reset works as its supposed to.
cr8z_cuban 4 Mar @ 4:10pm 
Is there any way to have the odometer track actual distance taveled, and not just from last known point? As some have pointed out this causes the odometer to count backwards when going towards last known point. not a huge deal, but it eliminates the ability to accurately plot your location after a turn, which then makes a submurged 4 bearing method much less accurate.
Matta  [author] 3 Mar @ 10:36am 
@jtone1234 did you reactivate it in MODConfig.xlsx?
jtone1234 2 Mar @ 8:10pm 
It looks like Hard Mode doesn't work anymore after this last update either :(
Maverick_1957 2 Mar @ 2:34am 
Thank you much Matta.
Sam Wise 1 Mar @ 6:06am 
Wonderful! Good job guys!
Matta  [author] 1 Mar @ 5:44am 
I just updated the mod using the fixes by Ostik and DARKNESS! Big thanks to them :)
cr8z_cuban 27 Feb @ 6:22pm 
Glad I could help
LAntorcha 27 Feb @ 5:59pm 
Thx @cr8z_cuban. Seems the Bifrost takes some time updating numbers between a new mod activation and another.

And the KTB missing lines probably is my fault.
Again, thanks @ostik for the hotfix!
cr8z_cuban 27 Feb @ 5:11pm 
@ostik Dude youre a godsend! Working fine I tried to go down the rabbit hole of finding the problem with the help of chat gpt, with no luck. I dont know code lol. @LAntorcha As to Projekt bitfrost, its working fine for me with this, and 39 other mods lol. close the game and go to C:\Users\your_username\AppData\LocalLow\Deep Water Studio\UBOAT and delete youre cache, data sheets, and temp folder. sometimes the appdata foder is hidden. google it on how to un hide it. you wont lose any save data, just makes the game rewrite potentially corrupted files. if that dooesnt work, unsub and resub from your mods, and delete the folders i mentioned before you launch. it should work
ostik 27 Feb @ 3:08pm 
you can fix it manualy in \494840\2618451929\Source\Actions\SwitchSextantAction.cs
instead
"
base.UseDevice(character, "Use", null, int.MinValue, null, false, true, false);
"
place
"
base.UseDevice(character, "Use", null, int.MinValue, null, false, SlotUsageFlags.IgnoreOtherCharacters, false);
"
ostik 27 Feb @ 2:58pm 
I'll try to re-upload the mod with the fix if the author doesn't do it.
KaKuchKe_SpaiN 26 Feb @ 11:44am 
The same thing happens to me, it is no longer possible to perform a measurement with Sextant.
LAntorcha 26 Feb @ 11:34am 
School of Real Navigation
Learn how to fix our true position from a lighthouse.

This is a list of the Lighthouses i have found so far:

Wilhelmshaven Lighthouse 53º33N 8º10E
La Pallice Lighthouse1 46º9N 1º15W
La Pallice Lighthouse2 46º10N 1º13W
La Pallice Lighthouse3 46º10N 1º13W
Helgoland Lighthouse 54º11N 7º54E
Brest Lighthouse 48º22N 4º31W
La Spezia Lighthouse 44º6N 9º49E
GavJam 26 Feb @ 12:59am 
same here - it is no longer possible to take a measurement from Sextant.
don donno 26 Feb @ 12:38am 
dear good... thank you!
cr8z_cuban 26 Feb @ 12:11am 
Bro youre a lifesaver! I cant wait. Definitely making a backup this time.
Matta  [author] 25 Feb @ 11:46pm 
I'll be able to take a look this weekend!
LAntorcha 25 Feb @ 12:10pm 
Is there any fast way to locate Map Lighthouses?
Any .xlsx were they are?

I wish this mod was working again.
WyG Splitter 25 Feb @ 10:01am 
Plz save us creator!
Kerberos 25 Feb @ 4:27am 
The mod no longer works for me today. someone has an idea?
Maverick_1957 25 Feb @ 3:33am 
yes, i comfirm, today, after patch 12, no more possible to use sextant.
don donno 25 Feb @ 2:26am 
Yep, i think the last patch kinda messed up the sextant :(
Don D Dwain 24 Feb @ 5:20pm 
Loved the mod until patch 12.....you might have to go take a look, the officer now does not use the sextant, at least not for me. Sorry about the bad news.
PapaOscar 23 Feb @ 1:25am 
Any plan to allow sextant readings to be manually performed?
TexasHambone 9 Feb @ 11:36am 
It would be best if the sextant position and the estimated position used military time found in the game instead of local time as this is the standard for real-life nautical navigation.
R6ckStar 7 Feb @ 7:54pm 
@DARKNESS do you mean replacing with or adding those lines below?
Urban79 31 Jan @ 8:08pm 
Is this mod working with patch 23?
Don D Dwain 14 Jan @ 4:19pm 
@er.tz
Not sure if this will help, but move away from your last position and note odometer, then turn around and move back towards the last position you started the odometer from, this should result in a counting backwards, or closing on your last position.
Don D Dwain 8 Jan @ 7:44am 
I have an idea, but I have no idea if it can be done or if it would work. So far I find this Navigation mod to add to this game the touch it needs for a higher degree of realism. I also have a Mod for the Functional RDF antenna. So I thought if it could be done, how nice it would be to be able to use direction finding to fix your position as done realistically by setting 30 min, an hour, or whatever interval, to add a plotted position automatically only when the RDF is up and a radio man is at the station, and of course on the surface. Just an idea.
DARKNESS 15 Dec, 2024 @ 10:49pm 
@worstl - mod working fine for me.
DARKNESS 15 Dec, 2024 @ 10:49pm 
Tired of map not remembering last position? Here's the fix:

- Navigate to the mod's Source folder and open "RealNavigationPatch.cs" with Notepad++.

- Find the following section (line 822)

{
LoadMapFlag = true;
if (___mainCamera.MapController.Mode == MapCameraController.MapDisplayMode.Normal || ___mainCamera.MapController.Mode == MapCameraController.MapDisplayMode.WorldMap || ___mainCamera.MapController.Mode == MapCameraController.MapDisplayMode.TacticalMap)
___mainCamera.MapController.Mode = MapCameraController.MapDisplayMode.Normal;
}

- Paste over with the following:

{
LoadMapFlag = true;
if (___mainCamera.MapController.Mode == MapCameraController.MapDisplayMode.Normal || ___mainCamera.MapController.Mode == MapCameraController.MapDisplayMode.TacticalMap)
___mainCamera.MapController.Mode = MapCameraController.MapDisplayMode.Normal;
}


Your wrists will thank me.
SackAbreisser69 23 Nov, 2024 @ 3:07pm 
is it just me or did the mod partially stop working after the latest patch? I still have the sextant but it's greyed out no matter the weather situation. The odometer on the map is also gone
er.tz 3 Nov, 2024 @ 12:58am 
There's a strange bug where the odometer counts backwards instead of forwards. I don't know under what conditions it can be replicated, but it happens very occasionally. There is also a text file named harmony.log.txt that is located on the desktop, and I don't think that's the desired location.
sm417 1 Nov, 2024 @ 5:33am 
Ansonsten wie immer eine meiner Standart Mods beim Game..:steamthumbsup:
sm417 1 Nov, 2024 @ 5:33am 
Hi..nach dem Starten des Mods / Spieles habe ich noch eine Harmony/log/txt Datei auf meinem Desktop..im WWW steht, das der Autor der Mod dann wahrscheinlich diese Mod mit Harmony erstellt hat aber danach vergessen wurde, das Programm Harmony zu beenden..oder so ähnlich.
Ist das irgendwie von Bedeutung für den Autor??
Wilhelm Weirich 29 Oct, 2024 @ 9:50am 
@Trihne yes that was the Point! :)
Trihne 26 Oct, 2024 @ 10:50am 
Had to google translate the last comment, but he asks if the sextant action could take 120 seconds instead of being instant. I think that's a great idea