Throttle Percent LVAR/Offset Formatting Issue

Post any technical issues here. This forum gets priority from our staff.
new reply
AmeenGuy
Airman Basic
Posts: 9
Joined: 06 Sep 2019, 10:14

Throttle Percent LVAR/Offset Formatting Issue

Post by AmeenGuy »

Hi,
I made a post recently regarding tracking the c172's throttle percentage to which I was told to look at the Offset/LVAR listing for the throttle command to implement.
The command is: (L:Throttle1Position,percent)

I had tried replacing the old command in the code_s.xml file that came with the c172 model, and noticed some changes, but not proper changes. My program was still yielding some rather spontaneous numbers.

How should I go about implementing the correct Offset/LVAR for the throttle, and what syntax should I use?

Thanks for the help!

User avatar
Nick - A2A
A2A Captain
Posts: 13779
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by Nick - A2A »

Hello,

Please can you give us a bit more info about which software you're interfacing with here. I assume this is a home cockpit built of some sort, but I'm a bit unclear as to what you're trying to achieve.

Thanks,
Nick
A2A Simulations Inc.

AmeenGuy
Airman Basic
Posts: 9
Joined: 06 Sep 2019, 10:14

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by AmeenGuy »

I am using the Prepar3D app, and am trying to properly monitor the throttle lever percentage every second using a simconnect add on program in C++. However, I keep getting spontaneous numbers. One of the members had told me I was using the improper Offset/LVAR and gave me a list for them. I am just unsure of the syntax or location I would need to implement the proper throttle LVAR into my program. I tried editing the code_s.xml file, which slightly change the results, but not to properly tracking the throttle lever percentage.

User avatar
Nick - A2A
A2A Captain
Posts: 13779
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by Nick - A2A »

Okay, thanks but I'm still a bit unclear: are you writing software in C++ to interface to the Accu-Sim C172, or is this third-party software which you've obtained from elsewhere?

Thanks,
Nick
A2A Simulations Inc.

AmeenGuy
Airman Basic
Posts: 9
Joined: 06 Sep 2019, 10:14

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by AmeenGuy »

I am writing my own code in C++ using similar formatting to the SimConnect API, to interface to the C172.

Thanks.

User avatar
Nick - A2A
A2A Captain
Posts: 13779
Joined: 06 Jun 2014, 13:06
Location: UK

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by Nick - A2A »

Please can you give us a bit more information about the software you're writing AmeenGuy: what it does and who it's intended for?

Thanks,
Nick
A2A Simulations Inc.

AmeenGuy
Airman Basic
Posts: 9
Joined: 06 Sep 2019, 10:14

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by AmeenGuy »

I am trying to track the C172's throttle percentage in Prepar3d by using some SimConnect commands. In short, the program requests data every second from the Prepar3D server about the throttle percentage of the airplane. I am using the AddToDataDefinition function with parameters "GENERAL ENG THROTTLE LEVER POSITION:1" and "Percent over 100" . This program works for all of the P3D default airplanes, but not for the A2A C172R add-on plane. The C172R model yields a few random number when the engine is off. When the engine is on, it seems to spit out rather spontaneous numbers, each one different than the number from the previous second, rather than the actual throttle's percent.

Right now I just need to printout the throttle lever's percentage every second to the console.
After I get the proper results, I intend to expand on this and create a step-by-step guide to helping a new pilot start and take-off with the C172 model.

User avatar
some1 - A2A
A2A Lieutenant Colonel
Posts: 1832
Joined: 03 Aug 2008, 11:56

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by some1 - A2A »

The (L:Throttle1Position) is a local simulation variable. You can access it from XML or C++ gauge, but you can't access it remotely from Simconnect, at least not directly. You would need some custom code on the simulator side, that reads the variable and sends the value at another app either using Siconnect custom data feature, or TCP/IP, pipes, etc.
Michael Krawczyk

AmeenGuy
Airman Basic
Posts: 9
Joined: 06 Sep 2019, 10:14

Re: Throttle Percent LVAR/Offset Formatting Issue

Post by AmeenGuy »

How would I best approach completing this task?

Thanks.

new reply

Return to “C172 Trainer Tech Support”

Who is online

Users browsing this forum: No registered users and 21 guests