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

scenProc CreateRectangle Bounding box coordinates number of decimal digits

MatthiasKNU

Resource contributor
Messages
955
Country
germany
Hi Arno!

I noticed something in ScenProc, I'm not sure if it fits like this:
When using the CreateRectangle-step, I am defining the area like this:
Code:
CreateRectangle|6.03165719986;6.18049766541;46.1782983351;46.286104579|String;area|agn
No I get the following error message:
Code:
09:08    CreateRectangle    Error        Bounding box maximum Y value (46286104579) should be larger than minimum Y value (461782983351).
According to the manual this step takes the bounding box coordinates in this format: minlon;maxlon;minlat;maxlat
But that's how I entered the coordinates.

As soon as I switch minlat and maxlat ..
Code:
CreateRectangle|6.03165719986;6.18049766541;46.286104579;46.1782983351|String;area|agn
... everything works.

The minlat has in this case 10 decimal digits, max lat only 9...

I suspect this is due to the different number of decimal digits...
 

MatthiasKNU

Resource contributor
Messages
955
Country
germany
That's not so easy, as I am writing the scenproc config file with my python scripts.
I have now worked around the problem by setting the decimal number in the Python script to 12 digits.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

I have the impression that this is a comma vs dot issue, as the error message does not print the dot. I guess your computer has the decimal character set to a comma? I probably need to change the code of scenProc to work with both,
 

MatthiasKNU

Resource contributor
Messages
955
Country
germany
Ah yes, that could also be...
Yep, decimal character is a comma, as another software needs it this way...
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
And most FS developers put it at dot, since XtoMDL requires that. That's probably why I never noticed this before. I'll check the source code tonight.
 

MatthiasKNU

Resource contributor
Messages
955
Country
germany
I know, for creating bgls I am using my FS computer, there it is set to dot.
But if that's a lot of work - don't worry, it is working with the workaround to ensure that the numbers have the same amount of decimal places...
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
No, it should not be a lot of work. I have made a helper class for myself that does the conversion from string to double in a consistent way independant of the comma or dot settting, but I probably used the default .NET conversion in this step. Should be a minor change to use the right class instead.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Fixed it now, it was indeed the problem I thought. In the next development release it will work OK.
 
Top