Jump to content
The simFlight Network Forums

Pause at TOD?


Andreas Stangenes

Recommended Posts

I use SmartCars for a virtual airlines while I fly the a320 in MSF. It needs fsuipc7 to run. I can click "pause at top of descent" in the smartcars, and it will successfully pause the sim at TOD. I imagine it is using fsuipc functions to do that. However, I cant find a way in fsuipc7 to actually set pause at TOD my self without smartcars. Can it be done?

Link to comment
Share on other sites

1 minute ago, Andreas Stangenes said:

I use SmartCars for a virtual airlines while I fly the a320 in MSF. It needs fsuipc7 to run. I can click "pause at top of descent" in the smartcars, and it will successfully pause the sim at TOD. I imagine it is using fsuipc functions to do that. However, I cant find a way in fsuipc7 to actually set pause at TOD my self without smartcars. Can it be done?

You might find this Lua script useful. It lets you pick a future time to pause MSFS.  https://forum.simflight.com/topic/91605-set-future-pause-for-msfs-or-p3d/

 

Al

 

Link to comment
Share on other sites

1 minute ago, ark1320 said:

You might find this Lua script useful. It lets you pick a future time to pause MSFS.  https://forum.simflight.com/topic/91605-set-future-pause-for-msfs-or-p3d/

 

Al

 

Thanks but that is not really what I'm looking for. I am already able to Pause at TOD via smartcars, but I dont always fly for a VA, and I miss being able to manually set this function. 

Link to comment
Share on other sites

16 minutes ago, Andreas Stangenes said:

Thanks but that is not really what I'm looking for. I am already able to Pause at TOD via smartcars, but I dont always fly for a VA, and I miss being able to manually set this function. 

Just to clear, the pause Lua script has nothing to do with smartcars or any VA.  If you can estimate the time until TOD, then you can manually set the sim to pause accordingly. But the script is time based;  I'm not aware of anything inherent in FSUIPC that will calculate the TOD point in NM for you and then pause the sim based on that distance from a BOD waypoint.

Al

Link to comment
Share on other sites

BTW, a good estimate for the distance required for a 3 deg descent is

Descent Dist(NM) = 3 x altitude change in 1000s of feet.  So, for example, if you will need to lose 25,000 ft from the TOD to the BOD, we get

Descent Dist = 3 x 25 = 75NM

And the rate of descent that will be required is

Descent rate(ft/min) = 5 x Ground Speed(NM/hr)    This is a 'ballpark' estimate as well since chances are you ground speed will not be constant throughout the descent.

Al

Link to comment
Share on other sites

So using the above we can estimate the time to TOD as

Time to TOD(hr) = [Current Total Dist to BOD point - Descent Dist]/ Ave Ground Speed

                             =[Current total Dist to BOD point - 3 x Descent Alt Change]/Ave Ground Speed

 

Al

Link to comment
Share on other sites

4 minutes ago, Andreas Stangenes said:

I believe that there are some lvars or something to that effect that now are able to pickup the calculated tod from the sim or the addon. WT CJ4 have a calculated TOD that I can pickup via lvars. 

That could be. At the moment FSUIPC7 cannot access MSFS Lvars or Hvars, but John Dowson has said he is looking into how FSUIPC7 might be able to do so some time in the future.

Al

  • Like 1
Link to comment
Share on other sites

8 minutes ago, Andreas Stangenes said:

Is there a TOD feature for FSUIPC planned?

John will have to answer that, but I don't think any previous version of FSUIPC had that feature. Seems to me FSUIPC would have to know or have access to some details of your flight plan (e.g., the desired BOD waypoint and desired BOD altitude).

Al

Link to comment
Share on other sites

1 hour ago, Andreas Stangenes said:

There is a calculation in the sim itself that can be picked up by fsuipc, and the old fsuipc for p3d etc did have a pause at TOD IIRC. 

Well, interesting. I think the earliest version of FSUIPC I've used is FSUIPC4.  I just don't recall a FSUIPC "TOD feature", and when I search the current Offset Status documentation for FSUIPC6 I don't find any reference to TOD. There certainly is the ability to Pause the sim, or to detect that the sim is Paused (Offsets 0x0262 and 0x0264), but these offsets are not tied to the TOD. There are also events (controls) for Pause Off, Pause On, Pause Toggle, and Pause Set (not sure what this does -- maybe pauses or unpauses the sim based on the state (0 or 1) of a variable). Again, I don't see these events as necessarily tied to TOD.

I expect John or Pete will comment at some point to make things clear.

Al

Link to comment
Share on other sites

1 hour ago, Andreas Stangenes said:

Thanks for that information, Ark 🙂 Also, just to make it clear - the SmartCars program doesnt work without FSUIPC, so when it has a working pause at tod function, I thought it was using FSUIPC to make that happen. 

I'm not familiar with SmartCars, but I can see that if SmartCars knows the flight plan and tracks the flight progress it could calculate a TOD point, and then use FSUIPC to pause the sim when that point is reached. It's calculating the TOD point that I don't think FSUIPC does.

Al

Link to comment
Share on other sites

12 hours ago, Andreas Stangenes said:

Is there a TOD feature for FSUIPC planned?

No, nothing like this is planned.
However, if SmartCars is calculating this using information from FSUIPC, then it should be possible to do this yourself (either via the SDK or using lua)

11 hours ago, Andreas Stangenes said:

There is a calculation in the sim itself that can be picked up by fsuipc, and the old fsuipc for p3d etc did have a pause at TOD IIRC. 

Really - which version of FSUIPC was this? How can this calculation be picked up from the sim itself?

9 hours ago, ark1320 said:

It's calculating the TOD point that I don't think FSUIPC does.

That is correct, as far as I am aware!

John

Link to comment
Share on other sites

3 minutes ago, Andreas Stangenes said:

Thanks for the reply. Could we perhaps get a auto-pause x nm from destination/waypoint? I think that would be useful? 

No. FSUIPC provides the facilities to pause, and the information you need to determine when to pause.
It is up to you to write such a utility (e.g. in lua) to send the pause when you want to.
So this is something that you should do in a lua plug-in. If you then want to share with others, you can add it to the user contributions section.

John

Link to comment
Share on other sites

I understand. I want to point out that I have been paying you for fsuipc and several iterations of it over the last decade or so, so it's not like im asking for a freebie here. I dont program lua codes, so yes I can go ask someone else. But I thought I would hear with you first. FSUIPC has always had several basic functions that come with it (ie. time synchronization), and I dont see why this feature couldn't be a part of that base package. But that's just me. Thank you. 

Link to comment
Share on other sites

This is just not something that should be part of the core FSUIPC, it is something that the lua add-on facility was invented for.

7 minutes ago, Andreas Stangenes said:

it's not like im asking for a freebie here.

Well, from my perspective, you are!

I do not have time to write bespoke lua scripts for all my customers. I can help with this, but users are expected to try and do this themselves.
There are also quite a few experienced lua programmers who also help out a lot, and even provide bespoke lua scripts. If you ask nicely, someone might help you.

I'm just far too busy at the moment (and for the foreseeable future) to start writing bespoke lua scripts upon request.

John

Link to comment
Share on other sites

13 minutes ago, Andreas Stangenes said:

I dont see why this feature couldn't be a part of that base package.

There's really not much point.  The TOD depends on your flight plan, your aircraft, the weather -- a large number of factors. And many folks using flight sim seriously use alternative planners and ATC programs to those provided by default in the simulator.

There's never been any way to get all of the data relevant to computing TOD from any version of FS or P3D (especially when addon applications are in use). It's always an approximation. The easiest thing to do is program a Lua plug-in to simply pause, reading the current altitude, and activating Pause when it sees a substantial decrease in altitude.

But much better would be to use the one of the existing plug-ins already provided by users, to pause at the elapsed time that the TOD is expected - the time which should be provided in your planner.

The lua plug-in facility was provided in FSUIPC (and WideFS) so that users could add their own specialised features. It is not difficult and simple things are simple to implement. i recommend you take a look at some of the examples already provided for you, and also those kindly provided by other users.

Pete

 

 

Link to comment
Share on other sites

Reply to John Dowson.

I understand. What you dont seem to understand is that not everyone who buys your products have done so with the intent of writing lua scripts. I have gotten it over the years because in fsx and p3d it was deemed best practice to assign your axis through fsuipc rather than in the sim itself. I got fsuipc for msf for a different reason, though, and that was because smartcars needed it to hook up with the sim. It has been the only reason I've used fsuipc for the new sim. 

 

So I'll leave it there. I will not wait for a pause at TOD feature from FSUIPC, and I will probably not learn writing lua codes simply to do this one thing. I also am too busy. 

Link to comment
Share on other sites

1 hour ago, Andreas Stangenes said:

I got fsuipc for msf for a different reason, though, and that was because smartcars needed it to hook up with the sim. It has been the only reason I've used fsuipc for the new sim. 

Then you can (probably) just use the freeware version - no need to buy a license.

1 hour ago, Andreas Stangenes said:

What you dont seem to understand is that not everyone who buys your products have done so with the intent of writing lua scripts.

I understand that perfectly well. I expect the vast majority don't know how to program in lua, but I'm also pretty sure that many  do use lua scripts (especially with the increasing popularity of the Honeycomb Alpha & Bravo). And

  - I expect that most people using FSUIPC are running the freeware version, to support 3rd party add-ons such as SmartCars. No license/purchase of FSUIPC required.
    I  support the freeware/unregistered version the same as the registered version
  - FSUIPC can be considered as a 'toolbox', providing facilities for the user to create utilities as required. You cannot expect us to create these - we provide the tools for our users to do so, and also support our users in doing so
  - there are many other experienced lua/fsuipc programmers that help out, and many have written bespoke lua scripts for other users.

John

Link to comment
Share on other sites

3 hours ago, Andreas Stangenes said:

Thanks for the reply. Could we perhaps get a auto-pause x nm from destination/waypoint? I think that would be useful? 

Andreas -- In my view, FSUIPC tries to provide access to as many existing sim events and variables as possible.  Note there is no TOD variable provided by the sim. However, third party add-on programs, such as SimCars (or Lua scripts) can calculate a TOD point based on sim variable information it gets via FSUIPC , and also likely from additional information (flight plan, WX, etc) that the user enters directly into the third party program. So FSUIPC is a utility, a tool, to facilitate such calculations and the subsequent TOD pause.

My $0.02 .

Al

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.