Jump to content
The simFlight Network Forums

Capturing glideslope via 0x0800


Recommended Posts

I'm working on a simple autopilot app, and can't make ends meet on this.

********* FSUIPC4, Version 4.70b by Pete Dowson *********

Running in "Microsoft Flight Simulator X", Version: 10.0.61472.0 (SimConnect: 10.0.61259.0)

Here goes the use case:

Aircraft is flying established on localizer and in altitude presribed by ILS.

AP master, ALT HOLD and APR HOLD are engaged (0x07BC, 0x0800, 0x07FC and 0x07D0 are equal to 1 (U32))

I am writing to these offsets from my application, and lights on AP panel illuminate correctly and aircraft does what it is supposed to do (captures localizer and holds the altitude).

However, no matter what I do, it just misses IAF and doesn't follow glideslope, ALT light still on as is 0x07D0 offset.

If I do the same procedure using buttons on the panel, it actually captures GS, ALT light goes off,and 0x07D0 returns 0.

Now what am I doing wrong?

I tried setting alone 0x0800, or both 0x800 and 0x07FC in same procedure - same result.

//// this is how it looks when APR button is set on panel in FSX

15148306 Monitor IPC:07FC (U32) = 1

15148306 SimRead: 07FC="AUTOPILOT GLIDESLOPE HOLD"

INT32: 1 (0x00000001)

15148306 Monitor IPC:0800 (U32) = 1

15148306 SimRead: 0800="AUTOPILOT APPROACH HOLD"

INT32: 1 (0x00000001)

// and this is how it looks when the button is I write the 0x800 and 0x7FC remotely

14004304 Monitor IPC:07FC (U32) = 1

14004304 Monitor IPC:0800 (U32) = 1

Any suggestions?

Link to comment
Share on other sites

I am writing to these offsets from my application, and lights on AP panel illuminate correctly and aircraft does what it is supposed to do (captures localizer and holds the altitude).

However, no matter what I do, it just misses IAF and doesn't follow glideslope, ALT light still on as is 0x07D0 offset.

Where is the GS diamond on the PFD? Does it go solid? Are you below the GS at the IAF?

If I do the same procedure using buttons on the panel, it actually captures GS, ALT light goes off,and 0x07D0 returns 0.

I'm not really an expert on how FS does these things, but all FSUIPC is doing when you write to those offsets is send the exact same FS controls as you get sent when using the panel*. You can verify this by logging Events in both cases and compare. Maybe that will show what you are doing differently?

* Actually, just checking: FSUIPC uses the ON and OFF controls whilst the mouse click obviously uses the toggling controls.

//// this is how it looks when APR button is set on panel in FSX

15148306 Monitor IPC:07FC (U32) = 1

15148306 SimRead: 07FC="AUTOPILOT GLIDESLOPE HOLD"

INT32: 1 (0x00000001)

15148306 Monitor IPC:0800 (U32) = 1

15148306 SimRead: 0800="AUTOPILOT APPROACH HOLD"

INT32: 1 (0x00000001)

// and this is how it looks when the button is I write the 0x800 and 0x7FC remotely

14004304 Monitor IPC:07FC (U32) = 1

14004304 Monitor IPC:0800 (U32) = 1

Yes, that makes sense, because the logging of the SimConnect read only happens when it supplies a different value to the one already set in FSUIPC's memory, which you've just written.

Compare events.

Regards

Pete

Link to comment
Share on other sites

Pete, thanks for a quick reply, this has been actually very helpful!

Here is what I found out.

When I click APR button on panel, I get this:

5100375 *** EVENT: Cntrl= 65724 (0x000100bc), Param= 0 (0x00000000) AP_APR_HOLD

5100437 Monitor IPC:07FC (U32) = 1

5100437 SimRead: 07FC="AUTOPILOT GLIDESLOPE HOLD"

INT32: 1 (0x00000001)

5100437 Monitor IPC:0800 (U32) = 1

5100437 SimRead: 0800="AUTOPILOT APPROACH HOLD"

INT32: 1 (0x00000001)

When I write to offsets, I get this:

5112746 Monitor IPC:07FC (U32) = 1

5112746 Monitor IPC:0800 (U32) = 1

5112746 *** EVENT: Cntrl= 65806 (0x0001010e), Param= 0 (0x00000000) AP_APR_HOLD_ON

5112746 *** EVENT: Cntrl= 65805 (0x0001010d), Param= 0 (0x00000000) AP_LOC_HOLD_ON

See the AP_LOC_HOLD_ON... that shouldn't be there, as it actually turns off GS (http://msdn.microsoft.com/en-us/library/cc526980.aspx#AircraftAutopilotIDs).

So after all, writing only to 0x07FC does the trick.

5855966 Monitor IPC:07FC (U32) = 1

5855966 *** EVENT: Cntrl= 65806 (0x0001010e), Param= 0 (0x00000000) AP_APR_HOLD_ON

which is followed by automatic inhibit of

6012731 Monitor IPC:07D0 (U32) = 0

6012731 SimRead: 07D0="AUTOPILOT ALTITUDE LOCK"

INT32: 0 (0x00000000)

as the aircraft captures glideslope.

So far only tested on FSX.

Link to comment
Share on other sites

When I write to offsets, I get this:

5112746 Monitor IPC:07FC (U32) = 1

5112746 Monitor IPC:0800 (U32) = 1

5112746 *** EVENT: Cntrl= 65806 (0x0001010e), Param= 0 (0x00000000) AP_APR_HOLD_ON

5112746 *** EVENT: Cntrl= 65805 (0x0001010d), Param= 0 (0x00000000) AP_LOC_HOLD_ON

See the AP_LOC_HOLD_ON... that shouldn't be there, as it actually turns off GS (http://msdn.microsof...aftAutopilotIDs).

Ah, yes. In fact you'd normally have them the other way round, 0800 first, quite a way out then the then, later usually, 07FC.

I think you should be locking onto the localiser earlier, waiting for the GS diamond to start moving (GS needle read-out) then enabling GS/APP. Pretty much as the pilot would do.

Regards

Pete

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.