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

SimConnect Simulator Variables

Messages
75
Country
us-texas
http://www.innergears.com/InnerGears.zip

I have to admit, that I'm on of those odd guys that like long-haul flights. I mean like 12-14 hour flights. I like carrying Passengers or Cargo, and I also like Hurricane flying during the season.

So, I like as real aircraft as I can find and as many useful add-ons to keep me occupied while flying.

My personal favorite is the PMDG 747-400 and PMDG 747-400F, so I am looking forward to the release of those for FSX soon. :)

I like Air-Source.us for it's thousands of scheduled flights, bid flights and on-line or off-line tracking of my flights. I like it's ability to store the details of every flight I've ever made. And, I like it's ability to allow me to take some of the money I've 'made' and 'invest' it into the virtual stock market! :D

I like ActiveSky for it's great looking weather, but also for it's ability to find poor weather conditions, it's Navigation Log with prevailing winds at different altitudes and the ability to see what the destination weather is. The FSX version is out now I think, and it's got a cool new 'Hurricane' ability which I haven't tried yet.

I like FSNav for it's easy ability to plan a flight and having adjustable aircraft speed and fuel characteristics. I like it's ability to predict my fuel usage and estimate my flight time. But, FS-Navs' FSX version won't be out till later this summer I understand.

I like FSPassengers, especially for it's point-rating system. It makes me pay more attention to details. Thankfully, as I have gotten better at flying in Flight Sim? The passengers scream a lot less. :P Unfortunately, the Author says it may be 'several months' before an FSX update is available.

Anyway, If you use FSPassengers then you know, that if you tell FSPassengers how long the flight will be? You get lots of extra points for landing within that scheduled time period. I think it gives you like 15 minutes leeway. So, predicting flight time can become very, very important, especially on the long-haul flights that I like.

Now, there are lots of ways to get a prediction of flight time within Flight Simulator. You can:
1) Create a flightplan within FSNav, and if your aircraft characteristics are accurate? You get a reasonable flight time.
2) Load a flightplan into the Flight Simulator itself, then examine the Navigation Log. This is Flight Sims guestimate.
3) If your flying a real-world scheduled flight using the same aircraft? Check the real carrier flight time.
4) Load a flight plan in ActiveSky and check it's Navigation Log. This log has the advantage of predicting winds. It uses a flight time format of like 12.43 hours, though. So, you'll have to calculate the .43 * 60 to get the minutes part. (12 hours 25 Minutes 48 seconds)
5) If you use an aircraft with a functioning FMC (Flight Management Computer) like the PMDG 747 or the Level-D 767 then, you can find the arrival time in Zulu-time.

The problem with method number 5 is that, because it's Zulu time, I was always counting on my fingers what the flight time translates to. :(

I also wanted to know when, in the real-world time, I would be landing. That way? I could set an alarm for when it was time to descend. I'm sure you can see the necessity of that on a 14 hour flight.

Which brings me to the point of this thread.

A while ago, I used FSUIPC on FS9 to write a little utility to help me keep track of the time details I mentioned above.

So, because I wanted to investigate Simulator Variables and because 'Livai' got me interested in a post called 'Chrono record' about 'System-Variable Time', I decided to re-write that utility using SimConnect.

The result was another Add-On menu item, called 'InnerGears Time' with two submenus. The first is SimConnect Arrival Time and uses, of course SimConnect ONLY. The second is FSUIPC Arrival Time and uses FSUIPC ONLY.

And, if everything goes well? They should operate equally, in fact you should be able to display them side-by-side.

This also demonstrates something else I wanted to know...that you CAN mix and match FSUIPC along with SimConnect.

The FSUIPC method uses a Visual Studios 2005 Timer Control, and the SimConnect version uses the SIMCONNECT_PERIOD.SECOND enumeration.

If you use Vista? Because the FSUIPC method uses the FSUIPC .DLL, you may have the same Administrator Permission issues as Peter Dowson mentions in his Documentation. Please refer to this documentation and use the same procedures to run the InnerGears.exe. If you do not? Well, the FSUIPC version of the utility will appear, but will disappear when you hit 'START'. Other than that? No biggie.

Here is what the Arrival Time Utility (either version) does:
When you click on 'Start', it displays the current Game 'UTC' time. You cannot directly change this control, without changing your game 'time'.

Below that is a control displaying your UTC Arrival Time. Now, see? This is the Zulu-Time that I get from my Flight Management Computer and I enter it in here. And, I update it during flight. Hooray! No more finger-counting! :rolleyes:

Below that is your 'Remaining Flight Time' displayed as hours, minutes, seconds. You cannot directly change this control.

Below that is a display showing the 'Real Arrival' time. This is the real-world time you'll arrive. I'd then set my wake-up alarm based on this time, you see?

Below that is the game time of where you are currently at. For instance, if I am at KIAH? There should be a 5 hour time difference this time of year. If I am flying over New York from Houston on the way to Frankfurt? I should see New York time here.

Have you ever clicked away from Flight Simulator to go look at something else and found that Flight Sim slowed down and the time isn't the same as your real time anymore? I hate that... Thats what the System-Sync check-box is for. It should keep your Flight Sim more in Sync with the seconds on your system clock.

And, the 'Start', 'Stop' button simply starts or stops the timing mechanism.

Personally? I found SimConnect much easier to use than FSUIPC. Sorry, Peter :o

Notice, that there is no timing method built into FSUIPC as there is in SimConnect (SIMCONNECT_PERIOD.SECOND).

Also, Notice, that there is no capability of prioritizing requests for data in FSUIPC as there is in SimConnect.

By that, I mean the ability to assign events to different groups based on the the priority of the API calls or the timing of those calls. For instance, in the Arrival Time Utility, I am calling for the time every second, but how often do I need to update the weather? Every 15 minutes or so? And, how often do I need to update the Aircraft Title? Once?

Along this line? If you do use FSUIPC, There is someone named 'phenty' on 'The simFlight Network' who has created an FSUIPC Client for .Net. Highly Recommended! In fact, the 'FSUIPC Arrival Time Utility' is using it. :)

Try it and see if they run the same, and what you can do with time. So, I think you should be able to attach System-Variable Time to an event in a Mission. Then? 'livai' would have his race-timer!

FlapsOut
 
Last edited:
Personally? I found SimConnect much easier to use than FSUIPC. Sorry, Peter

Why apologise? SimConnect is much more a "programmer's interface". It isn't that good for complete beginners though, but I expect nice wrappers to emerge.

And of course the FSUIPC interface wasn't my design. If I'd had the choice I'd never have done it like that. It was designed by one Adam Szofran, who of course has been working in the Microsoft FS tream (on the graphics side though) for the last two or three FS versions.

I had to stick to the same interface and extend it to allow extra features simply because the whole point of it in the first place was to present a common interface across FS versions. It serves to allow plenty of ready-made applications for each new FS version, which is why I wrote it and continued to maintain it! ;-)

There are still more FSX-compatible applications using FSUIPC than using SimConnect directly, but I fully expect that to change with time. This is why I worked hard with the FS team to make sure the SimConnect interface would be up to the task. It still falls short in some areas, but goes a bit better in others. Eventually everyone will be using SimConnect because MS will be committed to extending and maintaining it forever whilst I bow out and go flying for a change! ;-)

My only real dislike of SimConnect is the extra (and very variable) latency caused by its use of TCP/IP protocols when talking between SimConnect.DLL and FSX. The fact that it is even doing this for an in-process client like FSUIPC4.DLL is doubly annoying, as it makes FSUIPC4 look bad as well. I am maintaining pressure on MS to get that improved.

Notice, that there is no timing method built into FSUIPC as there is in SimConnect (SIMCONNECT_PERIOD.SECOND).
Also, Notice, that there is no capability of prioritizing requests for data in FSUIPC as there is in SimConnect.

Ah, but notice that the reason is that there is no need in FSUIPC, as it is a synchronous interface system, whereas SimConnect is designed from the outset to be a Client-Server setup, with queues and priorities and possibly delayed and fragmented responses a natural result. It is quite nice for those used to handling things in that way -- but I do notice lots of lazy programming going on where responses aren't being tied to requests sufficiently (or even at all) to identify errors correctly.

As I say, it's a programmer's interface, and it needs properly designed programs to do it justice.

Regards

Pete
 
SimConnect Vs. FSUIPC + FSUIPC Client

Peter,

I'm sorry for my delay in responding, but when you talk? Dweebs like me do well to listen and 'THINK' ;)

I apoligized before because I see, or would like to see, a new Era approaching, but, we all have to give 'Major Kudos' to your work involved in keeping us all in the game, done by yourself by the way...

Hehe, you think any of us would bother with a Generic Microsoft Flight Sim of ANY version for more than 10 minutes, if there were not the add-ons that many created, but were made possible by your FSUIPC?
Yes, your FSUIPC...
The history of the work keeping it up-to-date far outweighs the original programming idea.
Yeah, Adam Szofran may have had an idea, but you kept it alive. ;)

Now? As a fellow professional 'C' programmer? If your argument is to avoid legal responsibility for anything wrong in the original design?
I fully understand and concur! That darn Adam! What was he thinking!?! LOL

"It's not a Bug! It's an undocumented feature!" :P

But, serious now:

SimConnect is much more a "programmer's interface". It isn't that good for complete beginners though, but I expect nice wrappers to emerge.

So, you see a simplification of the SimConnect API, i.e. yet more wrappers coming?

Eventually everyone will be using SimConnect because MS will be committed to extending and maintaining it forever whilst I bow out and go flying for a change! ;-)

I'm one of those strange guys that actually LIKE being a co-pilot, and I'm a fairly good one too, if you ever want to go flying in a PMDG 747-400 in FSX. :)

My only real dislike of SimConnect is the extra (and very variable) latency caused by its use of TCP/IP protocols when talking between SimConnect.DLL and FSX.

Wait! Your saying that when I run a SImConnect Utility locally? That I am communicating with FSX via TCP/IP? I don't understand...

The fact that it is even doing this for an in-process client like FSUIPC4.DLL is doubly annoying, as it makes FSUIPC4 look bad as well.

Has anyone considered a .Net Remoting approach? I've had some pretty good results.

Ah, but notice that the reason is that there is no need in FSUIPC, as it is a synchronous interface system, whereas SimConnect is designed from the outset to be a Client-Server setup, with queues and priorities and possibly delayed and fragmented responses a natural result.

I can thread off FSUIPC calls, but SimConnect might be an issue...ok, I see that...

It is quite nice for those used to handling things in that way

You mean Windows Programmers? Which prompts me to ask, "Is it true, that even the FSX version of FSUIPC is written in straight 'C'? :)

but I do notice lots of lazy programming going on where responses aren't being tied to requests sufficiently (or even at all) to identify errors correctly.

K, I'll assume you mean me, but please don't name-names! LOL

As I say, it's a programmer's interface, and it needs properly designed programs to do it justice.

You know? I once wrote a Co-Pilot program for FS9. Any number of people could join the pilot, but only one person could be assigned as the co-pilot, see? It was multi-threaded, used FSUIPC synchronously. Exchanged hundreds of pieces of data with the other users...The cool thing was? You never joined a session. You flew in your own session using only a .Net Remoting (I tried Web Services first :() link between everyone.

And? I tested it from Zululand to Australia and it sent, processed and returned data in 300-400 milliseconds.

Thats nice work Peter! You did ok ;)

Regards
Mike
 
If your argument is to avoid legal responsibility for anything wrong in the original design? I fully understand and concur! That darn Adam! What was he thinking!?! LOL

LOL. No no, you can't blame Adam for doing it like he did. It was quick-and-easy, or maybe quick-and-dirty if you like, but it worked and it wasn't his 'day job' as it turned out to be mine, albeit unpaid for the first four years or so.

So, you see a simplification of the SimConnect API, i.e. yet more wrappers coming?

Not from Microsoft, no -- other folks are surely already making them just as they've done for FSUIPC?

Wait! Your saying that when I run a SImConnect Utility locally? That I am communicating with FSX via TCP/IP? I don't understand...

Yes. Not just locally, even if you are doing it from a DLL or Gauge inside FSX itself.

Has anyone considered a .Net Remoting approach? I've had some pretty good results.

Sorry, I don't really know what that means.

Remember I'm strictly a low-level guy, nuts and bolts. I know C, but ASM was my main programming language. ASM for mainframes since 1963. I did engineering development and test programs, operating systems, compilers, machine simulators, bootstraps. None of this high level stuff like C++, .NET and managed code!

I can thread off FSUIPC calls, but SimConnect might be an issue...ok, I see that...

I don't think multithreading is an issue for external SimConnect clients, but it might be for internal ones because of the receiving thread activities.

... Which prompts me to ask, "Is it true, that even the FSX version of FSUIPC is written in straight 'C'? :)

All my FS programs are in "straight C", sometimes with some ASM code where needed. There are still several significant sections of ASM in FSUIPC3, out of necessity (to do with hacks down into private class data in FS9's innards, or calls to deep down virtual functions). None left in FSUIPC4 because SimConnect does (or in some cases hopefully will) provide the goods, albeit not as efficiently as I'd like.

Regards

Pete
 
Back
Top