• 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.

AeroFly FS 2 support in scenProc

Hi,

I don't think the OGR libraries I use to read the data use these bounds. But I can check.

Providing some bounding box is not hard either. You can make it a user variable so that you can overwrite it when running in batch mode.
 
Hi Arno, Would you be able to add aeroway in the same places as highway in the osmconf.ini for your next release please? I have manually added it myself to allow the creation of taxiway night lighting.
 
OK, I'll check. You added it for the lines I guess, for polygons it is already there I think.
 
I have added it to the lines section now, so it will be in the next development release.
 
Hi Arno, I have come across a problem with the position used in the TSC. I was doing some cultivation and using the scenProc generated TSC, no cultivation appeared in Aerofly. But when I added the cultivation file name to the airport TSC, the cultivation appeared.

After a bit of trial and error with the scenProc TSC file, I think I understand how Aerofly uses the values in the TSC. When Aerofly loads, it looks at the position in any TSC and the size value in that TSC. It then establishes an area around the TSC position based on the size value. If your aircraft with within that area, objects in the TSC/TOC are displayed. If not, then the objects in the TSC/TOC are not displayed. Aerofly can handle multiple TSC/TOC files when it performs this calculation. I think it uses different logic when you are on the move.

In the case of my missing cultivation, the position in the TSC was some 70 kilometers from the airport where I was looking for the cultivation. But my OSM source file was only for a small area only around the airport. I am assuming the problem with the TSC position was caused by roads or powerlines that extend outside the OSM selection area. By a bit of trial and error I found that using a size of 27000 saw the cultivation appear at the airport, while a size of 26000 resulted in the cultivation being missing. So the size value in the TSC file is not metres distance, as I had thought, but a measure of area. Only guessing.

Using a bounding box for the SplitGrid command solved the problem, and moved the TSC position to within the area covered by the OSM extract. But that is a manual process that must be performed every time you use different OSM source data.

So I wanted to know what logic was used to decide on the position for the TSC. If you are not able to automate the bounding box as discussed with TomSimMuc, then I think we will need a different method of deriving the TSC position.
 
Hi,

scenproc should take the center of the grid cell for the position if there is only cultivation. If you also have objects placed it takes them into account.

Was your situation with or without objects?
 
I was testing taxiway lights on a smaller airport, so only had CreateAF2Light commands in my test script, but this included other lights as well. I disabled all lights except taxiway lights and it still used the same TSC position 70kms distant. So it looks like it is using a centre point based on all objects is the source file rather that all objects in the output file. Would that be right?
 
I think it uses the center of the grid cell. Did you run splitgrid and if so with which size?

I'll change it so that the TOC bounds are taking into account as well.
 
Regarding OSM bounds:
I normally use a script like this to download OSM tiles which are identical to AFS2 tile limits. The names & coordinates are derived from a KML grid10, which Vogel69 has written.

.ps1 Script:
Set-ExecutionPolicy Bypass -scope Process -Force
$client = new-object System.Net.WebClient
$client.DownloadFile("https://overpass-api.de/api/map?bbox=11.25,47.6871713625865,11.6015625,47.9203473517393","F:\Geoconvert\Out\8800_A700_Seeshaupt.OSM")

These bounds are automatically contained in the OSM file.
A lot of problems with the center calculation and empty TSCs (without a corresponding toc) would disappear, if you could respect the bounds given in theses OSMs.

Also the software ObjectGen from Lenidcamper takes these bounds into account.
 
I don't read the osm files directly, it's a library OGR that does it. I don't think it has an option to restrict to the bounds, it just returns all the data that is in there.

But if you want to clip the data you can specify a bounding box in the SplitGrid step. That's the same FS developers do when they want exact bounds.
 
I think it uses the center of the grid cell. Did you run splitgrid and if so with which size?

I'll change it so that the TOC bounds are taking into account as well.

I was using SplitGrid|0.03|*|building="*", then Mergegrid before using CreateAF2Light. The only AF2 lights created were within the airport boundary, and n o other objects at all, but the position of the TSC was some 70kms distant. The TSC itself also had no 3d objects.
 
OK, understood. I would have to check what MergeGrid does to the bounding box that is passed to the TSC file.
 
Hi,

I have updated the calculation of the position and size in the header now. It now takes the TSC file objects and cultivation objects all into account. So it should be accurate now. It will be in the next development release.
 
Thank you for adding the xref objects.
Just one remark to your example and the entries in your AF2_config.ini:

xref object must NOT be called with their trailer "_virtual".
So flood_light2 or tower00_medium_blue_ds_05_08_08 would be OK as argument.

example:
#Create XREF Objects
CreateAF2XRef|man_made="flood_light"|FloodLight01|hdg
CreateAF2XRef|man_made="flood_light2"|FloodLight02|hdg
CreateAF2XRef|man_made="lkw"|lkw_00|hdg

hc_4965.jpg
 
a request for the xref objects:
If they are postioned along a line (i.e. cars) could you assign the direction of the line to the heading with an optional offset (for i.e. rectangular to it)?
 
Thanks for the feedback, I'll update the ini file and the manual.

As for the heading, if the point features you use don't have a heading attribute, you can use the step to derive the heading from the nearest line to add such an attribute. That step should be used before the step that creates the xref objects.
 
Hi Arno,
I'm a new user french with some questions about the mergegrid function.

My datas are in shapefile format (vegetation coverage) covering 3°x3°, i process them in a batch process :

ImportOGR|D:\Geo\VEG_FULL_REP.shp|@0@|NATURE|AUTODETECT

with the syntax in my batch file :

"F:\Aerofly SF2\scenproc\scenProc.exe" "F:\Aerofly SF2\scenproc\Template_test.spc" /run /log "D:\Geo\0.log" 2;2.25;42;42.25;
"F:\Aerofly SF2\scenproc\scenProc.exe" "F:\Aerofly SF2\scenproc\Template_test.spc" /run /log "D:\Geo\0.log" 2.25;2.5;42;42.25
...........

and the exportation line of my script is :

ExportTSC|D:\Geo\Scenproc\|Veg_

To reduce the file size, i use the mergegrid as :

SplitGrid|0.05|*|NATURE="*"

Here's the problem :
Precedently i used : SplitGrid|0.05|*
so i splitted polygons in cells; but if a shapefile polygon is partially out the importOGR selection zone, it is fully excluded and i have a "hole" in the coverage.

Now i tried
SplitGrid|0.05|*|NATURE="*"
If a shapefile polygon is partially out the importOGR, a cell is eventually created and the polygon is always is in a cell (the one containig its center, you said this somewhere).

But as i am in batch mode, this supplementary cell can overwrite a cell with same name created sooner in the batch.
The solution is to change the export prefix name "Veg_" in my ExportTSC|D:\Geo\Scenproc\|Veg_ expression, but i didn't success to use batch variable to change it...
If you could give me some precisions about the batch variables...
Thanks
 
Hi,

You should not need to use the Split Grid extra filter. That is only for features, like buildings, that you don't want to split and include in the cell the center is in. But for vegetation that's not what you want. These polygons should just go split along the border to create a vegetation polygon in each cell.
 
Hi, thanks for your answer
But if y use SplitGrid|0.05|* , all the data from shapefile polygone having a part (even a small one) out of the ImportOGR area filter are missing. Initially i hoped they would be splitted, with the "inner" part ok, but the whole parts are missing. And i have holes in my garden...
Is it possible to change export file name using batch variable ? The alternate solution is to move by DOS command the file in separate directory between runs, but it is not optimal.
 
Back
Top