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

Coordinate refresh

Messages
5
Hi, is there any way to get the accurate coordinates (lat, lon) of own aircraft from inside an xml gauge besides (A:PLANE LATITUDE) and (A:PLANE LONGITUDE) ?

I noticed that, even though FSX refreshes these variables almost continuously, they are actually dispersed. In other words, if the aircraft is moving at a constant speed in a straight line, and you try to calculate its speed by measuring the distance and time between adjacent positions, you will get widely different speeds. The smaller the time interval, the greater the differences - up to +/-30% from the actual speed when calculating each 0.10 sec, which means the (lat,lon) can be +/-3 meters off from the actual position.
 
Last edited:
With the ITraffigInf module and the custome parameter you can readout this data e.g.

(C:ITrafficInfo:S:Plane LATITUDE, degrees) (>L:Info_LAT0:0,degrees)
(C:ITrafficInfo:S:PLANE LONGITUDE,degrees) (>L:Info_LON0:0,degrees)

Look also in the SDK.

Dietmar
 
I am thinking this may be only an issue with xml gauges. It's the same with heading, pitch and bank for example - when the xml receives the value, it's a bit off. That's strange as obviously programs like FSRecorder can record very consistent data each frame.
 
The custom parameters I mentioned in my thread can be used in XML gauges as well. I believe that FS recorder is using the same parameters. Could be an interesting question in the FS Recorder forum which you could ask.

Dietmar
 
The custom parameters I mentioned in my thread can be used in XML gauges as well. I believe that FS recorder is using the same parameters. Could be an interesting question in the FS Recorder forum which you could ask.

Dietmar

Dietmar, I think

(C:ITrafficInfo:S:Plane LATITUDE, degrees)
and
(A:Plane LATITUDE, degrees)

will give exactly the same value if the selected aircraft is own aircraft, no ?
 
Yes, you are correct. It is exactly the same number.
May be here is the difference. The read out wit (A: lat.....) gives me the number for example in decimal 53.662583 .
FSX shows me 53° 37.35. If I do a conversion from this FSX format to the decimal format I will get 53.662500. So, It is a diffrence of 0.000083.
Is this the difference you are looking for ?

Dietmar
 
Yes, you are correct. It is exactly the same number.
May be here is the difference. The read out wit (A: lat.....) gives me the number for example in decimal 53.662583 .
FSX shows me 53° 37.35. If I do a conversion from this FSX format to the decimal format I will get 53.662500. So, It is a diffrence of 0.000083.
Is this the difference you are looking for ?

Dietmar

Not quite. What you see on screen is rounded, but it doesn't account for the difference I am talking about.
 
Ok, understand. Do you mean the update frequency (refresh )of the gauge by FSX ? By default it is 18 per second and this is max. You can turn it down in your XML code. Have you done it ?? If it would be let's say 5 you may see this difference. Secondly, you can set a xml parameter to inforce the gauge code still to be activ and updated even you are not in panel view.
May be your problem has something to do with this ???

Dietmar
 
Dietmar, your answer actually gave me a hint as to what to look for and I figured it out by reading some of the other threads.

The problem is very simple - the gauge and the simulator have different refresh rates. So, for example, if you limit your FSX frame rate at 30 fps, and the gauge refreshes at 18 Hz, the gauge will ask for coordinates every 0.05 seconds (1/18) but new coordinates will be available every 0.03 seconds (1/30). So the gauge cannot get the position at exactly the time it asks because the coordinates are discrete, not continuous. This wouldn't be a problem if it can get a time-stamp for when the coordinates were last generated, it then could simply extrapolate as needed. But there is no simvar for this. I think only a SimConnect application can solve this problem.
 
Hi neutrino,

sounds reasonable. Happy that it was hepfull for you. May be that simconnect along with C can be more accurate.

Dietmar
 
Back
Top