Alhard Horstmann Posted June 21, 2021 Report Posted June 21, 2021 (edited) Hello Pete, hello John, hello Forum members I want to calculate and monitor the ETA of my planned flight with this simple calculation: Time = Distance / Speed As I know SimConnect („ESTIMATED CRUISE SPEED“) or Aircraft.cfg („cruise_speed“)) could be read out by FSUIPC. The planned distance could be read out of the imported flight plan. So the data are there. But how to calculate and monitor with FSUIPS or LUA. Do you know a way to implement this calcualtion with FSUIPC or LUA ? Or is there already a solution existing? regards Alhard Edited June 21, 2021 by Alhard Horstmann misspelling
John Dowson Posted June 21, 2021 Report Posted June 21, 2021 14 minutes ago, Alhard Horstmann said: As I know SimConnect („ESTIMATED CRUISE SPEED“) or Aircraft.cfg („cruise_speed“)) could be read out by FSUIPC. This is held in offset 0x060C 15 minutes ago, Alhard Horstmann said: The planned distance could be read out of the imported flight plan. But that would be the total distance, no? Could that be what is in offset 0x61A0 (GPS Route Total Distance)? The current GPS ETA should also be in offset 0x619C, and the ETE in offset 0x6298 - have you tried those?
Alhard Horstmann Posted June 21, 2021 Author Report Posted June 21, 2021 Thanks John, but with what tool do I find these offsets? In your FSUIPC manuals I do not find the usage. An how can I display the values? I am a little confused.
John Dowson Posted June 21, 2021 Report Posted June 21, 2021 5 minutes ago, Alhard Horstmann said: Thanks John, but with what tool do I find these offsets? In your FSUIPC manuals I do not find the usage. That depends on what you want to do with them! Just to read/log the values first, to see if they are populated and something that you can use, try logging them first with the FSUIPC offset logging facility. If they contain the values you need, or the values that you can calculate what you need, you can then write a lua script to read the values, adjust as needed, and then display them, either using the ipc.display function or the lua wnd library
Alhard Horstmann Posted June 22, 2021 Author Report Posted June 22, 2021 Hi John, I was a little irretated by the offset 6298, I didn't find, but I think it was a typo, correct is 6198. Now I found all these offsets about ETA, ETE in the current FSUIPC Offset manual. My goal is following: Standing on a gate with e.g. BB58 and an imported flight plan from EDDN to EDDM with total distance (D) of about 109 nM. Cruise speed (CS) of BB58 is (aircraft.cfg) "cruise_speed = 180.0 //Knots True (KTAS)" Now I want to see the ETA on my screen: Result D/CS = about 40 minutes from now. I know, there are a lot of extra tools for this calculation, but I want to have it with FSUIPC which I am using since many years. My problem of monitoring this value is solved by your proposal with LUA ipc.display function. And I found a solution with SPAD.neXt, to show the value on my Saitek Radio Panel. Now I will configure this and report later. At the end questions : A: from where do you read the offset 61A0 value, from where do you read the offset 619C value and from where do you read the offset 0548 value? B: In what status should the sim stand during your offset readings? I need A/C standing on ground , no speed. Thanks a lot and best regards Alhard
John Dowson Posted June 22, 2021 Report Posted June 22, 2021 24 minutes ago, Alhard Horstmann said: At the end questions : A: from where do you read the offset 61A0 value, from where do you read the offset 619C value and from where do you read the offset 0548 value? I'm not sure I understand...you would read them from your lua script, where else? 25 minutes ago, Alhard Horstmann said: B: In what status should the sim stand during your offset readings? I need A/C standing on ground , no speed. You seem to have answered your own question, i.e. a/c on ground with 0 speed! You could have a lua script that is auto-started (from [Auto] or [Auto.xxx] ini section). In the script, you can use event.timer to call a polling function (maybe every 500ms or so - doesn't need to run too fast). In your polling function, you can check the sim on ground flag (offset 0x0366) and the a/c ground speed (offset 0x02B4) and then, if on ground and speed is 0, read those offsets, do your calculation, and display the text. The timer can keep running until you decide that you want to remove the display, either when the ground speed increases past a certain point, or when you leave the ground (up to you). You can also kill the timer when you do this, so the lua stops running (as I presume its no longer needed once you take off). Alternatively, you could have the lua run on a button or key press, to display the information on a key or button press, and remove it on the next.
Alhard Horstmann Posted June 22, 2021 Author Report Posted June 22, 2021 My question A refers to the source of the offset values. Are these values from the sim by simconnect or from aircraft.cfg or from loaded flightplan? By what interface are you collecting the offset values?
John Dowson Posted June 22, 2021 Report Posted June 22, 2021 1 minute ago, Alhard Horstmann said: My question A refers to the source of the offset values. Are these values from the sim by simconnect or from aircraft.cfg or from loaded flightplan? By what interface are you collecting the offset values? Offset values are either received from the FS via simconnect or calculated from such values by FSUIPC.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now