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] Trevally - Harbour Pilot Scripts (https://www.subsim.com/radioroom/showthread.php?t=174525)

TheDarkWraith 09-24-10 12:56 PM

Quote:

Originally Posted by Trevally. (Post 1501378)
Fantastic work TDW:rock:

Just finished a test leaving Bremen harbour. Everything worked as it should.:up:

There was one small issue - as boat approaches waypoint there are small adjustments to heading:-

These are printed in messege box. This is ok.
Each adjustment is also spoken. This could be annoying as there can be about 5 to 10 adjustment for each waypoint.

Would there be a way to reduce this or prevent the spoken adjustment.

Unfortunately no. The small adjustments are caused by the error angle exceeding 2 degrees. I set the time between updates as long as possible to prevent as many of these annoyances as possible. Any longer time degrades the navigation ability.

Thinking ahead I'm going to make another change to the Navigate_from_file command. I'm going to include a TITLE header in the files. This will let you define the name of the navigation script and the description will be just that - a description of what it does. This is for looking into the future of what I can do with this. Thus patch 3 will be releasing here soon.

EDIT:

I'm going to try something and send it to you for testing to see if it works or not. It deals with precision navigation or not....give me a little while to code it...

Trevally. 09-24-10 01:33 PM

Sure TDW will do

TheDarkWraith 09-24-10 03:03 PM

ok was able to code in a non-precision navigation. No matter whether you're using non-precision or precision navigation at just a little over the half way point to the next waypoint a course change command will be issued to ensure the sub is on course to the next waypoint. If using non-precision navigation that's the only course change you'll see until the next waypoint. If using precision navigation then if the course error between sub's course and waypoint is > 2 degrees then a course change will be issued. If using non-precision navigation then at 100m before the waypoint the next course change command will be issued. If using precision navigation then at 50m before the next waypoint the next couse change command will be given.

You define precision or non-precision navigation in the waypoints (parameter 7) and the message for that waypoint has moved to parameter 8

Patch 3 will be available here very soon....

Trevally. 09-24-10 03:10 PM

Thats perfect. Exactly what was needed:up:

TheDarkWraith 09-24-10 03:17 PM

Quote:

Originally Posted by Trevally. (Post 1501530)
Thats perfect. Exactly what was needed:up:

patch 3 released. See my UIs thread to download.
I'm very curious to see how the non-precision navigation works in rough seas and/or long distances :hmmm: Maybe you can give me some feedback on this? The worst thing it can do is never issue a course change command for the next waypoint if the distance between sub and the next waypoint is > 100m. I'm hoping that the a little over half way distance course check and the 100m radius of the waypoint will be enough for the non-precision navigation. I tested it at distances of 2000m and medium seas and all was well.

Trevally. 09-24-10 04:26 PM

Just finished the first test on non-precision.
It was bremen harbour.
Tested before patch 3 and work well.
Tested after adding non-procesion and noticed the following:-

Heading over short distance worked well.
Reduce heading checks worked well.
Response to next heading caused boat to overshoot. (basically the boat had to perform a u turn. The boat ended in the correct direction, but the u was wider than it should have been.)

All that showed me is that I should have used precision for the narrow areas of the harbour. (I should have done this anyway)
I did end the u turn at the correct heading.

I need to do more tests using precision and non-precision in the right conditions.

Trevally. 09-24-10 05:14 PM

Tested again with precision and Bremen worked.

Tested Brest with non precision, worked.

Tested Bergen with non precision, worked until long leg (over 25km). Boat missed waypoint. I need to add extra waypoints midway or use precision for long ones.

All other tests failed to start:-

Kiel_Canal
La_Pallace
La_Spezia
St_Nazaire

Not sure why these failed (all have _) any suggestions?

I will check for errors in nav file.

TheDarkWraith 09-24-10 05:41 PM

Quote:

Originally Posted by Trevally. (Post 1501598)
Just finished the first test on non-precision.
It was bremen harbour.
Tested before patch 3 and work well.
Tested after adding non-procesion and noticed the following:-

Heading over short distance worked well.
Reduce heading checks worked well.
Response to next heading caused boat to overshoot. (basically the boat had to perform a u turn. The boat ended in the correct direction, but the u was wider than it should have been.)

All that showed me is that I should have used precision for the narrow areas of the harbour. (I should have done this anyway)
I did end the u turn at the correct heading.

I need to do more tests using precision and non-precision in the right conditions.

I can add more heading checks for the non-precision navigation. I could add 3/4, 1/2, and 1/4 checks. That would help with the long distances and the overshoot.

TheDarkWraith 09-24-10 05:43 PM

Quote:

Originally Posted by Trevally. (Post 1501634)
All other tests failed to start:-

Kiel_Canal
La_Pallace
La_Spezia
St_Nazaire

Not sure why these failed (all have _) any suggestions?

I will check for errors in nav file.

what did you see in the messagebox when you tried to 'play' these? Did you see the title + stopped? If so, there's problems with your nav file.

Trevally. 09-24-10 05:56 PM

Yes I got messae started then a few seconds later stopped.

This is the nav file for kiel:-

[TITLE]
Keil Harbour & Canal Pilot Outbound
[TITLE_END]
[DESCRIPTION]
Keil Pilot will take you out of the harbour and through the canal
You may adjust speed and TC
[DESCRIPTION_END]
[PRECONDITION]
0,0,0
[PRECONDITION_END]
1217296,6519393,-1,1,0,13,1,None
1217492,6522331,-1,9999,9999,9999,1,Beware shipping
1215642,6525437,-1,9999,9999,9999,1,None
1214560,6525407,-1,9999,9999,9999,1,None
1210739,6524863,-1,9999,9999,9999,1,None
1207299,6522652,-1,9999,9999,9999,1,None
1203949,6521318,-1,9999,9999,9999,-1,None
1202073,6518866,-1,9999,9999,9999,1,None
1199720,6518008,-1,9999,9999,9999,-1,None
1196367,6518266,-1,9999,9999,9999,-1,None
1191664,6520565,-1,9999,9999,9999,1,None
1189264,6522032,-1,9999,9999,9999,-1,None
1183621,6521750,-1,9999,9999,9999,1,None
1180503,6519766,-1,9999,9999,9999,-1,Click postpone as you pass harbour
1176697,6515888,-1,9999,9999,9999,1,None
1175849,6512433,-1,9999,9999,9999,-1,None
1174579,6510787,-1,9999,9999,9999,1,None
1171741,6509756,-1,9999,9999,9999,-1,None
1168756,6505472,-1,9999,9999,9999,1,None
1163923,6503171,-1,9999,9999,9999,-1,None
1160271,6502760,-1,9999,9999,9999,-1,None
1151378,6500289,-1,9999,9999,9999,1,None
1147814,6499882,-1,9999,9999,9999,-1,None
1143029,6499952,-1,9999,9999,9999,1,None
1140377,6498626,-1,9999,9999,9999,-1,None
1135524,6495105,-1,9999,9999,9999,-1,None
1133211,6493867,-1,9999,9999,9999,1,None
1125810,6485977,-1,9999,9999,9999,-1,Beware shipping
1116119,6480658,-1,9999,9999,9999,1,None
1110153,6475466,-1,9999,9999,9999,-1,Beware shipping
1101946,6470002,-1,9999,9999,9999,-1,Click postpone as you pass harbour
1093454,6465764,-1,9999,9999,9999,1,Beware shipping
1092064,6464208,-1,9999,9999,9999,-1,None
1063491,6466791,-1,9999,9999,9999,1,Beware shipping


Spot anything?

Trevally. 09-24-10 06:01 PM

and this is the automation file:-

[AS]
Kiel Harbour & Canal Outbound
[CATEGORY]
Harbour Pilot
[COMMANDS]
Print_message,0,0,Harbour Pilot onboard,0,0,0,5
Navigate_from_file,0,0,KielCanalOutbound,0,0,0,10
Print_message,0,0,Harbour Pilot is off your boat,0,0,0,5
Print_message,0,0,Good Hunting,0,0,0,5
[COMMANDS_END]
[DESCRIPTION]
Start pilot in bunker
Feel free to adjust speed and TC
after you start script
[DESCRIPTION_END]

Trevally. 09-24-10 06:11 PM

Quote:

I can add more heading checks for the non-precision navigation. I could add 3/4, 1/2, and 1/4 checks. That would help with the long distances and the overshoot
Thanks TDW that would be great

TheDarkWraith 09-24-10 06:31 PM

Quote:

Originally Posted by Trevally. (Post 1501677)
Yes I got messae started then a few seconds later stopped.

This is the nav file for kiel:-

[TITLE]
Keil Harbour & Canal Pilot Outbound
[TITLE_END]
[DESCRIPTION]
Keil Pilot will take you out of the harbour and through the canal
You may adjust speed and TC
[DESCRIPTION_END]
[PRECONDITION]
0,0,0
[PRECONDITION_END]
Spot anything?

how many waypoints does it make through before it stops? And how do you know when it stops? Do you see any messages from the waypoints at all?

Have buddy coming over tonight. Will look into this and adding the additional distance checks tomorrow.

Trevally. 09-24-10 06:48 PM

It stopped right after it started.

Print message worked then it stopped.

I just redid it with copy and paste to new shn file and it worked.
I made it 90% through before I lost a long waypiont leg.:D

I will try the same with the others

Quote:

Have buddy coming over tonight. Will look into this and adding the additional distance checks tomorrow.
Thanks again TDW and have a good night

DavyJonesFootlocker 09-24-10 06:59 PM

Get this mod working I'm tired eyeballing that harbour wall...:D


All times are GMT -5. The time now is 05:16 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.