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

Ade-gp 0.0.39

GHD

Messages
12,244
Country
england
All polylines are now consistent, common vertices are coincident. Just the lat/long conversion to be fixed:





Even managed to get a resonable result on the sheared parking line :)

 
Gents, I've been offline all day with Internet problems. VERY frustrating!!!

I was trying to post the fiollowing message this morning when things went south"

An object compiled by ADE_GP and displayed in FSX does not appear in the proper position relative to the User Aircraft.

From my investigation, it appears that the longitude ADE provides to the GP editor is incorrect (close, but that only counts in "horseshoes").;)

First I positioned the aircraft over the vertex of a ground poly on the ADE display and recorded the aircraft's lat/lon as N60.124935297. E10.905852645 from ADE's red status line. Then I called for the GP Editor from that poly and intercepted the input message. The position of that vertex (in radians) was stated as 1.0493780829..., 0.3474229599.... .

The aircraft's position converted to radians is 1.0493780834812..., 0.347422669072... .

The converted latitude value matches to the 9th decimal place, while for longitude, only the first six decimal places agree. The value of the 7th decimal place for longitude is about 0.4m for a total error of about 1.2m - which is the apparent offset once the poly is compiled and displayed in FSX. The difference in latitude is inconsequentially small.

During my investigation, I evaluated the effects of round earth vs flat earth. At these distances (~ 1km), the differences are in the oder of a couple of mm. So, I think that as a possible cause has been eliminated.

Sorry to "pile on", but "them's the facts".

It's well-past bedtime now, so I'll catch-p in the morning.

Don
 
Then the question arises - what formula (algorithm) does FS use to determine the number of meters per degree of longitude. If someone can tell me that then I can use that in ADE instead of the current method which uses the haversine formula

Code:
111319.44444444444444 x Cos(latitude)

Placement of an object on the ADE display is done by getting the offsets in meters between the object coordinates and the ARP coordinates. It the formula above ADE uses the latitude of the object not the latitude of the reference point. latitude is in radians

Getting coordinates of an object (when dragged for example) is effectively the reverse of the above.

Changing the method of calculation in ADE is straight forward. The thing that matters is that the formula used replicates the formula used in FS.
 
recorded the aircraft's lat/lon as N60.124935297. E10.905852645 from ADE's red status line. Then I called for the GP Editor from that poly and intercepted the input message. The position of that vertex (in radians) was stated as 1.0493780829..., 0.3474229599.... .

The aircraft's position converted to radians is 1.0493780834812..., 0.347422669072... .

I don't understand Don. By my reckoning,

60.124935297 degrees is 1.0493780834812 radians

10.905852645 degrees is 0.1903430363926 radians

Where do you get 0.3474229599 for the longitude?

Are you saying that the value passed by ADE is not the same as the value displayed by ADE at the top of the screen?

All I can say is that I use photo-scenery and the positions in ADE correlate to the photo and to the values displayed by TCalcX.

You are using 64 bit arithmetic?
 
Last edited:
Hi Don,

It doesn't matter whether the values passed by ADE to the GP editor are 'incorrect'. The only requirement is that they are the same values that are passed to BglComp.

If the GP editor conversion to asm is correct, vertices from BglComp output and the compiled asm should display in exactly the same position in FSX.

They don't, so, can I suggest that the problem is in the conversion to asm format.
 
I have run some tests this morning also. This is with FS9. I confirmed that ADE uses the same formula as shown here:

http://www.fsdeveloper.com/wiki/index.php?title=Conversion_between_geographic_and_FS_XY_coordinates

I ran some tests to compare the location of the user aircraft against ADE using a stock airport. I found that although the coordinate numbers as displayed in ADE vary somewhat between the mouse coords and those sent by the user aircraft the user aircraft is positioned.

The screenshots below show a taxisign to the far top right of KHUT

The first two shots show the user aircraft located on the reference point of the sign in ADE and the user aircraft position in FS9. As far as I can see they are coincident.

image259.png


image260.png


The next two shots show the position of the GP Poly in FS9. I placed the top left vertex of the poly using copy/paste coordinates to ensure that that corner was coincident with the sign reference point. For some reason the poly disappeared in top down view as I zoomed in but the second shot from the cockpit shows the location of the top left corner is not coincident with the sign reference point.

image258.png


image261.png


I checked the calculation of coordinate values that ADE sends to the GP Editor. The value being used is the full double value for latitude and longitude. This is converted to radians before being sent. I checked the inbound and outbound values of coordinates. Apologies for the large screenshots. The first shows the values being sent to the GP Editor for a newly created GP Poly. The 15 decimal precision numbers are the coordinates of the vertices.

image262.png


This shows the returning data coming from the editor. Again you can see the vertex coordinates now from the editor. U/V data is also there now

image263.png


As far as I can tell ADE is getting back exactly what it sent. The final screenshot is taken from the point at which ADE calls the GP compiler and shows the values being sent. Again I think they are identical to those values ADE has for the vertices.

image264.png
 
Jon,

Can you create an apron with the same vertices as a polygon and show the coordinates sent to BglComp as well as those sent to the GP editor?
 
Let me see George

They are sent as degrees rather than radians but I can show the values as sent to BglComp in degrees and y'all can convert to radians I am sure ;)
 
Last edited:
Let and y'all can convert to radians I am sure ;)

Well, if you give us the conversion factor ;)

All I am trying to elucidate is that if the values sent to BglComp and the GP editor are the same.

If they display differently in FSX then the editor must not be converting the values to asm to give the correct FSX display.
 
OK

I created an apron with four vertices. I then used the copy/paste coord function to copy the coordinates of the GPPoly corners to the Apron Corners. So the apron should be exactly co-incident with the poly.

This is the XML that ADE sends to BglComp for that apron:

image265.png


I am sure someone will convert those to radians for me.

This is the ADE display at the point where the apron and poly are:

image266.png


image269.png


This is the user aircraft in FS when placed in ADE on the corner of the apron

image267.png


This shows the GP poly that appears offset from the apron

image268.png
 
The values for the top left vertex

0.66446069304610494047910057329345
-1.7078011159665381253286164242398

Seem to be the same as those sent to the GP Compiler up to the 15 decimal place???
 
Jon, could I suggest you and I take the offset issue off-line.

There is no doubt a problem. ADE appears to be using a different conversion factor for longitude for GP vertices that it does for other elements. Whether that, in fact is truie, or there's something else at work here is a design issue.

Don
 
BTW, George,
I don't understand Don. By my reckoning,

60.124935297 degrees is 1.0493780834812 radians

10.905852645 degrees is 0.1903430363926 radians

Where do you get 0.3474229599 for the longitude?

Your confusion is understandable.. "10.905..." was a typo. It was meant to be "19.905..."

Don
 
Hi,

Perhaps just one more thing:
I set an effect at a precise point in ADE (160), ADE threw an exception telling me something about a gp poly I never put in AFAIK (:confused:) (I sent the error repoprt), I tried it again in the 155 and loaded the previously made effect in 155 into 160, saved and compiled. I compared . The difference between the ADE positions and FSX is once more 12 ft (LON) both in 155 and in 160 ?!?
 
Hi,

Perhaps just one more thing:
I set an effect at a precise point in ADE (160), ADE threw an exception telling me something about a gp poly I never put in AFAIK (:confused:) (I sent the error repoprt), I tried it again in the 155 and loaded the previously made effect in 155 into 160, saved and compiled. I compared . The difference between the ADE positions and FSX is once more 12 ft (LON) both in 155 and in 160 ?!?

12 feet for the effect?

please email me the project file
 
Last edited:
Will do.

(Sorry for the wrong statement before. I did have one polyline in the workfile made with a previous update of Don's gp editor. Maybe that explains the crash).
 
Forget it Jon,

Whetever I did, do not waste your time:o.
Everything fits again (do not have the faintest why but the coords of the effect in FSX coincide exactly with the locations of the two ADE versions again ).
Sorry:o.
Except the crash because of a preciously made line with the gp editor, of course:).
 
Forget it Jon,

Whetever I did, do not waste your time:o.
Everything fits again (do not have the faintest why but the coords of the effect in FSX coincide exactly with the locations of the two ADE versions again ).
Sorry:o.
Except the crash because of a preciously made line with the gp editor, of course:).

No problem Roby :)
 
Sorry but each time I add a poly line and want to compile, ADE crashes (report sent).
Using 4854 and 0039 gp
 
Back
Top