Jump to content
The simFlight Network Forums

FSUIPC setting value incorrectly for 1 or 2 specific headings


Recommended Posts

Hello,

This isn't a huge issue, I have it working well for my purposes and won't be a factor, but it is something I found strange. 

I've been building a home cockpit and when I got to working on the FCU display for the Aerosoft A318-A321 series of planes I ran into this.

When monitoring the Offset for Heading Value which is 0x07CC I run into this issue.  The FSUIPC monitor shows as I'm reducing the HDG setting when I hit 273deg it outputs the number 182, when I then continue and turn it to 272, it returns to output 272.  When I then increase the value by one you see 273, but when I then turn to 274 it outputs a value of 364, and when I continue on the next value is 275.

The strange thing is the simulator is the simulator shows the correct values, and when I monitor the Lvars that are affected by the change they are also showing the correct information.  Below I made a quick video of it happening, unfortunately when I filmed it I had the FSUIPC monitor covered up, but it also shows what the mobiflight program is showing, for the FSUIPC value.   As I said before, since it's only the one heading and the sim seems to not see a problem I can work with it, just found it interesting.  Also in the video apparently I scrolled to the wrong part of my Lua script before I hit record, sorry but the video is not showing the correct stuff, it is below.

 

https://www.youtube.com/watch?v=bB_gmUtw_nE

 

-- Reads autopilot heading setting
function AP_HDG_Setting()
	Heading_Set=ipc.readLvar("L:AB_AP_HDG_Select")
	ipc.writeUW(0x07CC, Heading_Set)
end


-- check to see if Lvars have changed then call up the proper function
event.Lvar("L:AB_AP_HDG_Select",100,"AP_HDG_Setting")

 

 

******** FSUIPC4, Version 4.974 (24th February 2018) by Pete Dowson *********
Windows 10 Enterprise 64 Bit reported as Build 18363, Release ID: 1909 (OS 10.0)
fsx.exe version = 10.0.62615.0
Reading options from "D:\Install games in here\Steam\steamapps\common\FSX\Modules\FSUIPC4.ini"
Running inside FSX Steam Edition on Windows 10
Module base=5EE10000
User Name="-------------"
User Addr="-------sm@hotmail.com"
FSUIPC4 Key is provided

 

 4344 D:\Install games in here\Steam\steamapps\common\FSX\SimObjects\Airplanes\Aerosoft Airbus A319 CFM\A319.air
     9687 Weather Mode now = Theme
    17172 User Aircraft ID 1 supplied, now being used
    17187 Aircraft loaded: running normally now ...
    24453 System time = 07/06/2020 18:49:05, Simulator time = 18:48:50 (22:48Z)
    24469 Aircraft="Airbus A319 American Airlines N8001N"

Link to comment
Share on other sites

6 hours ago, Joe_Snuffy said:

When monitoring the Offset for Heading Value which is 0x07CC I run into this issue.  The FSUIPC monitor shows as I'm reducing the HDG setting when I hit 273deg it outputs the number 182, when I then continue and turn it to 272, it returns to output 272.  When I then increase the value by one you see 273, but when I then turn to 274 it outputs a value of 364, and when I continue on the next value is 275.

As with most of the offsets populated by FSUIPC, 07CC is merely a result of SimConnect supplying a value, in this case the SimVar called "AUTOPILOT HEADING LOCK DIR". If you add 07CC to the Monitor facility on the right-hand side of the Logging tab in FSUIPC Options, and check 'normal log' below, then the FSUIPC log will show that incoming SimVar in its original form. (Use the Console log option to see it in real time).

It sounds like that aircraft is very slow updating the actual Sim's AP Heading value, or is updating it incorrectly or maybe not at all. Such sophisticated add-ons tend to implement their own Autopilot so are not dependent on the operation of the Sim one -- you may even find that the AP Master switch in the Sim (offset 07BC) is always off (zero). If not it may only be in use for part of its facilities.

6 hours ago, Joe_Snuffy said:

when I monitor the Lvars that are affected by the change they are also showing the correct information.

Yes, L:Vars are internal to the add-ons own gauges and are implemented as their form of "SimVars" when the operations are independent of the Sim's subsystems.

If you are concerned, check offset 07CC with a default aircraft, or at least one which doesn't take over or replace the built in autopilot.

I use a full cockpit software implementation external to the sim itself (ProSim737). All of the display values are then under its control, the subsystems in the sim itself not being involved.

Pete

 

Link to comment
Share on other sites

Thank you for the response Pete.  I may look in to this a bit more, as you have stated, but I'm okay with it working this way.  A week ago it would jump 90 degrees+ when I hit those numbers and it would set the Aircraft to those incorrect values, this seems to keep the AC at the correct values and is usable. 

Link to comment
Share on other sites

1 hour ago, Joe_Snuffy said:

A week ago it would jump 90 degrees+ when I hit those numbers and it would set the Aircraft to those incorrect values,

In that case it's a bug in the add-on aircraft code. I would ask in their support forum. As I said, FSUIPC doesn't manipulate these offset values apart from the cnversion, and you can see if that is correct quite easily using the logging.

Pete

 

Link to comment
Share on other sites

7 hours ago, Pete Dowson said:

In that case it's a bug in the add-on aircraft code.

 

That's what I was thinking.  The Mobiflight guys really don't like us using the planes main offsets for this stuff, so at their suggestion I tested it with a free offset, I think I used 0x66D7, for testing.  When I did use that offset the anomaly does not present itself, when I switched back, it reappears.  As I told them, it's not a big issue for me since it's not actually telling the plane the wrong heading.   Once I'm done using the free offsets I have left for other things I'm adding, I may swap this function over to a free one if I have them to use.  

Otherwise thanks for the responses and for a great tool, I wish I knew how to code like that, still, learning just this simple stuff has been interesting.

edit: BTW the test was done just with the Lua running and no other programs or add-ons.

Edited by Joe_Snuffy
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.