• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

AI Boat Traffic Question

my kml file in txt format

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<name>1000.kml</name>
<Style id="s_ylw-pushpin">
<IconStyle>
<scale>1.1</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<Style id="s_ylw-pushpin_hl">
<IconStyle>
<scale>1.3</scale>
<Icon>
<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
</Icon>
<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>
</IconStyle>
</Style>
<StyleMap id="m_ylw-pushpin">
<Pair>
<key>normal</key>
<styleUrl>#s_ylw-pushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#s_ylw-pushpin_hl</styleUrl>
</Pair>
</StyleMap>
<Placemark>
<name>1000</name>
<styleUrl>#m_ylw-pushpin</styleUrl>
<LineString>
<tessellate>1</tessellate>
<coordinates>
114.1692046440547,22.29295233335595,0 114.1575383994498,22.29297388917986,0 114.1016449674889,22.30500311933288,0 114.0717283467589,22.3579273066455,0 114.0564248293502,22.35755875981291,0 114.021578887046,22.34581496801121,0 113.9540183200264,22.34709634302082,0 113.9294515342725,22.34000943421818,0 113.7973547846599,22.29328200300865,0 113.7249411046527,22.25276628434058,0 113.6168174957209,22.19995599107926,0 113.5942914968757,22.19185141215189,0 113.5702050566464,22.18511591730586,0 113.5572721760812,22.18175424987251,0 113.5539674299383,22.18542503045374,0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>
 
Okay, we can work with that.

The content of the Boats_test.txt should look like this:
Code:
AC#1,10,"ai_Barque Statsraad Lehmkuhl"
It is important that your boat is also registered in the sim.

The content of the Plans_test.txt should look like this:
Code:
AC#1,Barque,1%,8Hr,00:00:00,03:52:06,1000,normal,cargo,04:00:00,07:52:06,1000,reverse,cargo
The boat would start at 00:00 / 08:00 / 16:00 UTC....
And need 03:52:06 hours:minutes:seconds for the way there...
The return trip would start at 04:00 / 12:00 / 20:00 UTC respectively....
And for the way back also 03:52:06 hours:minutes:seconds need...

The content of the Routes_test.kml should look like this:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<name>File created with kml.KMLWriter</name>
<Placemark>
<name>1000</name>
<Style>
<LineStyle>
<color>ff0000ff</color>
<width>2</width>
</LineStyle>
</Style>
<LineString>
<tessellate>1</tessellate>
<coordinates>114.1692046440547,22.29295233335595,0
114.1575383994498,22.29297388917986,0
114.1016449674889,22.30500311933288,0
114.0717283467589,22.3579273066455,0
114.0564248293502,22.35755875981291,0
114.021578887046,22.34581496801121,0
113.9540183200264,22.34709634302082,0
113.9294515342725,22.34000943421818,0
113.7973547846599,22.29328200300865,0
113.7249411046527,22.25276628434058,0
113.6168174957209,22.19995599107926,0
113.5942914968757,22.19185141215189,0
113.5702050566464,22.18511591730586,0
113.5572721760812,22.18175424987251,0
113.5539674299383,22.18542503045374,0
</coordinates>
</LineString>
</Placemark>
</Document>
</kml>

These entries work for me without any problems.
Attached is the created Traffic_test.bgl...

If you now compare your entries with mine, you will see where your mistakes are.
 

Attachments

  • traffic_test.bgl
    901 bytes · Views: 13
BushPilot- Thank you again for your wonderful help! The compile works. I also studied yous and altered my files properly and they compiled as well. Just for fun I put both in. I got two ships once I saw one start out a full ship length then stop. I saw no further action, so I advanced the time by a few seconds. The first ship went further a sort ways and stopped. I repeated this... both ships moved. But I then advanced the time by about one minute. They both moved nicely after that.

I took out my traffic file and I got the same thing. I then took out yours and put mine in... still the same.

Is this normal... takes a bit for these guys to "get going"? Anyway- both traffic files send the ship to its destination. I think it then disappears... I assume it reappears at the proper time and returns. Just some silly questions.... new to this kind of traffic file. ;) Bob
 
rgr and thank you so much. a raise, a promotion, a six pack, pizza, and a two way trip for two to Fiji, for weeks.
Where can I send the invoice? ;)


Since there are certainly others reading along here,
I have also tested it again with Bob's Routes*.kml Google Earth file, this works fine.

Bob, so only your Boats*txt and your Plans*.txt were broken.


Is this normal... takes a bit for these guys to "get going"? Anyway- both traffic files send the ship to its destination. I think it then disappears... I assume it reappears at the proper time and returns.
Boat traffic behaves somewhat differently than aircraft traffic.
Boat traffic is implemented very simply.

Since there are no parking spaces for boats like there are for airplanes, it is very very difficult or impossible to dock them at a quay.

Also boats do not always follow the given path and sometimes take a shortcut.
If you have such a place, you can prevent this.
You just have to set several coordinates points close to each other.
On the open sea this does not matter.
Only if the boat must go through narrow passages.

From the set start time it takes about 1min until the boat starts.
And it can also happen that a boat does not show up.
But this is rarely noticed, unless you wait extra for it.

If you like boats and want to get deeper into the matter, then here (https://www.simdocks.de/) Manfred would be the right contact.

And you surely already know the boat traffic of Henrik here (https://www.fsdeveloper.com/forum/t...affic-fsx-p3d-and-msfs2020.436946/post-829818)...
 
If I were a millionaire I would accept the invoice wholeheartedly. Sadly I am of the Cessna set instead of the jet set. hahaha I did readust my kml so it goes under that bridge in the right place over at Macau. I just can't figure out how to delete a point without dumping the whole line. help files help somewhat. Maybe I should hold ctl+shit+alt+left mouse button, left leg up and hold my tongue right! hahaha Anyway thanx again for the help. Will keep in touch.
 
You open your kml file in Google Earth.

Click with the left mouse button on the small triangle/arrow in front of "File created with kml.KMLWriter" and your route (1000) opens.
If the kml file has already been used in ABTC, there is now an outward and a return route.

Then mark the first route (left mouse button) and click with the right mouse button on your route (1000) and select properties.

Now the coordinate points of your route are visible.
These can now be moved, deleted or new ones added.

Then save the route as a new kml and recompile it in ATBC.

For better visibility I have changed the color of the route.

Google_Earth_kml.jpg
 
Yep- done did dat! ;) My Q is how do I delete a point? I have one point that causes the ship to back up a whole lot. I know there will always be some backing up, but I'd like to get rid of one point without having to lose the line and redo the whole thing.
 
If you are as far as on my picture, then you see the individual coordinate points as small red squares on the route line.
The mouse pointer should now also be a square (a kind of visor).
Move the mouse pointer over a coordinate point, it changes its color and you press the delete key on the keyboard.
The coordinate point is then deleted, but the route is not interrupted.
 
my ship keeps stopping sail a few minutes then stops. Have to advance the time a few seconds then it continues. or perhaps running the sim at 4x messes up the ship's brains?
 
Last edited:
These ship traffics have trouble if you have you ships and / or leisure boats sliders too high?
my ship keeps stopping sail a few minutes then stops. Have to advance the time a few seconds then it continues. or perhaps running the sim at 4x messes up the ship's brains?

The only thing I can advise....
Adjust the sliders for the traffic (whether airplane, car or boat) with care.
The Ai traffic puts so much load on the PC that you can make any PC give up with enough Ai traffic.
 
my friend says he like lots of boats to show so he runs his 100%. I tried mine at 80%... it was better for a while. I tried mine at just above what my traffic file says... still stops. I will try lowering my ai traffic and report back. Even tried your kml you made for me... same thing so I will check this out.
 
Just tried with all sliders very low.... same thing. Maybe the ship is not too good?

You can also try a standard P3D ship.
Under SimObjekcs/Boats you have a large selection of standard ships.

Did it work with deleting the coordinate point in the kml file with Google Earth?
 
yes- got the point deleted. Thanx. I think I found what's ailin' me ship traffic. I suspect there is an anomaly circa Hong Kong harbor in P3D4.4 taxing around my float plane runs aground. earlier I had made a water runway for my friend only to be advised that he was running aground. I found I had forgotten to change the rwy from asphalt to water. That solved our problem. BUT! Now we find in so many places we have the same running aground.
If the ship gets up to the first bridge, 'around the corner' so to speak we're home free. ... no 'stalls all the way to Macau.

What I did was to make an apron link as water, making it very wide so I would not have to be pin-point accurate, covering my "route". I made links all the way up to the bridge. I think I have this one licked! will report back.
 
Yes, you have to be inventive sometimes.

A water-polygon might have been a better choice.
I don't know if a water-apron can also represent waves.

The water-polygon can be set with ADE or SBuilderX.
 
ah! I forgot about ADE and water polys. The trouble I have is trying to find the right one - ocean perennial, etc that will work. I will try this another time. Usually folks try to steer me towards TMViewer which I have had no or little luck with, poor instruction, and if I get there I don't see water polys labeled as ocean, bay, etc. I se plenty of roads, but even then it does not t ell me what kind of road it is... 2 lane, divided... etc. Oh well. hahaha
 
Top