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

Terrain drawing synchronized

Messages
533
Country
france
Hello,

I have a simple gauge that uses the GPS terrain and draws a compass rose on top of it. It works fine, but something bothers me: the terrain image (generated by the GPS) is refreshed only once per second, while my compass rose is refreshed 18 times per second, like any other gauge. Consequently, the rose and the terrain animations are not synchronized.
I can change my code to have the compass rose drawn only once per second, but I would like to have it refreshed exactly when the terrain image is refreshed. Is there a way to know when the GPS terrain is drawn?
Or do you know any other way of synchronizing drawings?

Thanks for any help,
Eric
 
I'm afraid I couldn't make it work... Maybe I placed this tag at the wrong place but I made several tests and it had no effect.

Of course, having the terrain drawn 18 times per second is a dream, but I wouldn't like to make it an FPS killer. On the other hand, I refreshed my compass rose only once per second and it appears to be quite good. It is not as reactive as I wish, but at least the drawings are synchronised.

Eric
 
Use an Update section. From the FSX SDK:

Update Objects

Update objects are used to provide time based updates to a gauge. The Flight Simulator GPS system is an example of a complex instrument requiring the use of Update objects.

Property Description
id A string that can be edited to help identify the object.
Frequency
Integer value indicating how often the update should be run, in updates per second. Enter 1 for the slowest frequency of updates (one per second).
Script The expression script to be evaluated at the time of the update. This script might examine the status of various switches, for example, that change how the instrument works.


Do a forum search for this topic - it's been discussed before.

Hope this helps,
 
Unfortunately it doesn't seem to work. Neither with <UpdateAlways> as a part of the <CustomDraw> element nor with <Update Frequency=n>. And btw, a gauge's default refresh rate is 18 f/s., and Frequency affects only the refresh rate of the <Element> set, not the <Update> script area.

Tom
 
Nope, GPS terrain is part of <CustomDraw fs9gps:map ...>,, which has <UpdateAlways> as the only method supposed to manage its refresh rate...

Tom
 
Back
Top