Jump to content
The simFlight Network Forums

Help with "altitude hold"


Recommended Posts

Hello

I'm working on a old Honeywell Sperry SP-150 autopilot, and has so far managed to interface all the functions by modifying the .INI file.

The only trouble I'm experiencing is the ALT HOLD function. The aircraft should maintain the altitude it was at, when the switch was engaged. (It usually means that the aircraft levells of, and then descents/climbs to adjust the altitude)

As far as I'm concerned the FSUIPC command is AP_ALT_VAR_SET_ENGLISH. The "control nr." is 66124 - and here's the problem - the parameter changes depending on the altitude. (i.e. the parameter would be 35000 if the ALT HOLD was engaged at fl350)

The line under the "buttons section" in the .INI file would in this case look like this:

#=P1,xx,C66124,35000

But how can I make the parameter change depending on the ac's actual altitude?

P.s. I'm using fs9 and the DreamFleet 727.

Thanks,

Lasse

Link to comment
Share on other sites

The only trouble I'm experiencing is the ALT HOLD function. The aircraft should maintain the altitude it was at, when the switch was engaged. (It usually means that the aircraft levells of, and then descents/climbs to adjust the altitude)

Yes.

As far as I'm concerned the FSUIPC command is AP_ALT_VAR_SET_ENGLISH. The "control nr." is 66124 - and here's the problem - the parameter changes depending on the altitude. (i.e. the parameter would be 35000 if the ALT HOLD was engaged at fl350)

But why use this? Why not just assign to the AP ALT HOLD control, which holds at the current altitude (or nearest 100 feet, depending on aircraft I think)? Only the AP PANEL controls use the values pre-set on the panel. There are separate toggle, on and off controls too for Alt Hold.

Regards

Pete

Link to comment
Share on other sites

The thing is that I'm flying the Boeing 727. This aircraft has an older autopilot (Honeywell Sperry SP-150). Basicly it only has two main functions. The HDG SEL, which turns the aeroplane to the requested heading (set on the HSI), and ALT HOLD which makes the airplane maintain the altitude it was at when the ALT HOLD was selected.

This old autopilot does'nt have a altitude display, therefore the autopilot cannot climb or descent to a preset altitude.

By "desired" i meant the altitude fsuipc (or fs?) was telling the aircraft to maintain.

Regards,

Lasse

Link to comment
Share on other sites

This old autopilot does'nt have a altitude display, therefore the autopilot cannot climb or descent to a preset altitude.

Okay, then you'd need first to monitor what it is set to. Try FSUIPC's Logging tab, right hand side. Enter offset 07D6 as type U16. Check 2FS display2 or "Advdisplay2 below. FSUIPC will dsplay the value on screen. It's in metres.

By "desired" i meant the altitude fsuipc (or fs?) was telling the aircraft to maintain.

FS does these things, not FSUIPC.

BTW, how come the add-on aircraft you are using doesn't work in any case? It should have been implemented with the autopilot already coded to work they way it should.

Regards

Pete

Link to comment
Share on other sites

  • 4 years later...
Hello Pete,
 
I'm doing some coding on Air Manager for the bendix king kap 140 autopilot.
I had to do some come with Linda to read the offset from FSX/P3D and with the values assign the correct ipcontrol.
I wanted to do the same for the AP_ALT_HOLD and AP_PANEL_ALTITUDE_HOLD controls. What I wanted to do is if the airplane is running the autopilot in altitude hold mode (VS to engage the altitude selected) is to push the button and change to the ALT HOLD mode, which will level the airplane out to the closest/current altitude.
However seems like both communicates on the offset 07C8 (AUTOPILOT ALTITUDE LOCK) so I can't determine which one is being assigned. Since I want to use a single push button I don't know which one to turn on and off at each push action.
I tried to trace it in FSUIPC using different type (S8, S32, etc) but most of them just return 1 for on and 0 for off. Have you ever come across this? Any chance I could read them independently  from the simulator?
I did not find anything related to this on the forum.
 
Thanks,
Filipe
Link to comment
Share on other sites

22 minutes ago, Filipe Bessa said:

However seems like both communicates on the offset 07C8 (AUTOPILOT ALTITUDE LOCK)

Well, not exactly. There's only one altitude hold option in an autopilot. The Difference in the two controls is what they do first -- the Alt Hold control is to hold at the current altitude -- so it sets the current altitude to be held. The Panel Alt Hold says to hold when reaching the already set altitude.

So, once at that altitude, they are of course indistiguishable. You can tell which one was pressed by checking if the current altitude is the same (or, probably better, very close) to the AP set altitude.

26 minutes ago, Filipe Bessa said:

I tried to trace it in FSUIPC using different type (S8, S32, etc) but most of them just return 1 for on and 0 for off.

Sorry, I don't know what you mean by this.  I think you may be misunderstanding the whole point of the offset data bank. The FS controls are sent to FS as SimConnect Events. They don't write to any offsets. The offset you are reading is a RESULT not a CONTROL! Pretty much all FSUIPC offsets are there to provide information about internal FS values. They contain DATA, not CONTROLS or COMMANDS.

Now for more flexibility and to implement many advanced functions, programs can write to FSUIPC offsets, but this doesn't do anything directly. FSUIPC sees the write and, for most of them, uses this to generate the appropriate FS control, or sometimes a sequence of controls.

Pete

 

Link to comment
Share on other sites

Hi Pete,

Thanks for the very quick answer. 
Yes, I wanted to read the result of the offset 07C8 hoping it was going to give me two different values depending on the controls sent via FSX/FSUIPC. Since there are the AP_ALT_HOLD and AP_AUTOPILOT_HOLD controls I thought they'd give different read values on this offset.. my bad misunderstanding!!

I had the same idea so I'll probably code in Linda to read the offset 07D4 for the autopilot hold altitude var and the current altitude on the 3324 offset. If it is within (+-) 100ft difference and 07D0 offset reads 1 then do nothing (already leveled out), otherwise change to the ALT Hold (65726) so the airplane will level out and the autopilot altitude will be reset. The idea is to when approaching using AP the simmer can press the button to level out on the MDA, or in another situation climbing or descending.

Will see how it goes..


Thanks,
Filipe 

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.