Board index FlightGear Support Flying

Cessna C172P keyboard control

Controlling your aircraft, using the autopilot etc.

Cessna C172P keyboard control

Postby sati » Mon May 23, 2022 2:18 am

Is it possible to control the Cessna autopilot via keyboard?
I am looking especially to trim the elevator up or down (yoke control). Toggling the autopilot itself and NAV1 on/off would also be nice to have.
sati
 
Posts: 6
Joined: Sat Apr 16, 2022 1:42 pm

Re: Cessna C172P keyboard control

Postby wlbragg » Mon May 23, 2022 5:48 pm

Maybe that should be a function of the autopilot module. To simulate a yoke control via keyboard. Is that a commonly tied function to the yoke of aircraft's from that model of autopilot? Is there any other autopilot functions tied to controls on the yoke?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna C172P keyboard control

Postby sati » Tue May 24, 2022 1:03 pm

Is that a commonly tied function to the yoke of aircraft's from that model of autopilot?


As described over here:
http://www-mdp.eng.cam.ac.uk/web/CD/eng ... #autopilot

We can control the vertical speed (VS) of the aircraft by pressing the UP/DN button on the autopilot console. This would translate to a pulling or pushing of the yoke, which affects in turn the aircraft's pitch.

Presently, these functions can only be performed via the mouse, interacting with the virtual cockpit.
sati
 
Posts: 6
Joined: Sat Apr 16, 2022 1:42 pm

Re: Cessna C172P keyboard control

Postby sati » Tue May 24, 2022 1:12 pm

wlbragg wrote in Mon May 23, 2022 5:48 pm: Is there any other autopilot functions tied to controls on the yoke?


Banking of the aircraft the the left/right can be done on autopilot by moving the heading bug with HDG enagaged. This, too would affect changes on the yoke, which changes the bearing of the aircraft.

As far as I know, there is also no means of invoking this function via keyboard.
sati
 
Posts: 6
Joined: Sat Apr 16, 2022 1:42 pm

Re: Cessna C172P keyboard control

Postby wlbragg » Tue May 24, 2022 4:57 pm

I might have misunderstood. I thought you were referring to possible autopilot controls that were tied into a control button or knob on the yoke. What I think you're asking for is quick key commands for various autopilot control features.
If so, that is a reasonable request. It may be difficult however to find available key bindings unless one was to use a modifier key + a key for all autopilot functions.
Do you know if the default autopilot that ships with FG, the original or the new one that was being developed by Josh, has any key bindings assigned to it?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna C172P keyboard control

Postby sati » Tue May 24, 2022 5:20 pm

wlbragg wrote in Tue May 24, 2022 4:57 pm:I might have misunderstood. I thought you were referring to possible autopilot controls that were tied into a control button or knob on the yoke. What I think you're asking for is quick key commands for various autopilot control features.
If so, that is a reasonable request. It may be difficult however to find available key bindings unless one was to use a modifier key + a key for all autopilot functions.
Do you know if the default autopilot that ships with FG, the original or the new one that was being developed by Josh, has any key bindings assigned to it?


According to this wiki, there are various key-combinations that are specific to autopilot controls, but (1) none work for the default autopilot and (2) there are no controls available for VS and the heading bug.
sati
 
Posts: 6
Joined: Sat Apr 16, 2022 1:42 pm

Re: Cessna C172P keyboard control

Postby TheEagle » Tue May 24, 2022 6:20 pm

@sati:
1. they do work for me
2. with the default autopilot (which is not available on the C172P) you can change the heading bug setting with the left and right arrow keys (in heading mode only, of course). As for the VS, try engaging vertical speed hold and press the up / down arrow keys and see if it works (again, just with the default autopilot - not on the C172P)

@wlbragg: since the default autopilot isn't available on the C172P anyways, why bother about respecting the default autopilot's key bindings ?
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Cessna C172P keyboard control

Postby wkitty42 » Tue May 24, 2022 7:19 pm

sati wrote in Tue May 24, 2022 1:12 pm:As far as I know, there is also no means of invoking this function via keyboard.

you are correct... IIRC there was a conscience decision by the lead dev of this version of the c172p to have everything in the craft as clickable for operation with little to no keyboard input other than what FG offers for control of the craft... even the generic autopilot was disabled so you have to use the one in the craft by clicking on the buttons just like you would push then IRL...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cessna C172P keyboard control

Postby ludomotico » Tue May 24, 2022 9:14 pm

Not using the default autopilot in FlightGear and, as a result, not using the keyboard, was a decision of the original author of the C172P.

In fact, there is a developer branch that recovers the autopilot menu and the keyboard, but the autopilot itself works much worse than the current autopilot and it is unusable.

Regarding buttons on the yoke, there is usually a button to quickly switch the autopilot on/off and a pair buttons to operate the vertical trim (if autopilot is off) or VS (if autopilot is ON)
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Cessna C172P keyboard control

Postby wlbragg » Wed May 25, 2022 3:42 am

If someone could identify the standard key bindings for the default autopilot and those bindings are not in conflict with other controls of the c172p I would suggest posting that information. Either someone on the c172p dev team ( possibly myself) or maybe the creator of the current upgraded KAP140 would consider adding or creating those bindings. I've been taking a break from development but I have been wanting to start back up. This might be a good project to get back into the groove.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7587
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Cessna C172P keyboard control

Postby sati » Wed May 25, 2022 3:53 am

I am a software developer myself. I might be able to help out too.

I think a possible approach might be to simply bind those functions to the 4-6 and right-left arrow keys for bearing, and 8-2 and up/down arrow keys for VS when autopilot is toggled on. Since the yoke no longer responds to these keys in autopilot mode, they are free anyway.

This would be somewhat similar to the functioning of the default autopilot, according to @TheEagle's description above. I've not used the default autopilot before, so I don't know exactly how it works.
sati
 
Posts: 6
Joined: Sat Apr 16, 2022 1:42 pm

Re: Cessna C172P keyboard control

Postby wkitty42 » Wed May 25, 2022 2:03 pm

it may be worth noting that the default autopilot has also recently been replaced with a new one... operation should be much better than the previous default AP... i don't know if it is available in the latest FG release, though...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Cessna C172P keyboard control

Postby Ysop » Wed May 25, 2022 3:49 pm

sati, is you intention to have a C172 with super-easy flying option? Normally there is time enough to use the mouse, if the AP is activated.

For a different aircraft we had the discussion, that it makes very much sense to have
- heading
- altitude preselector
as keys.

This allows to dial in heading and altitude in, as it is being done as a memory help even when manual flying in controlled airspace (or uncontrolled, but a bit less important).
User avatar
Ysop
 
Posts: 1348
Joined: Thu Oct 25, 2018 10:06 pm
Version: 2020.3.18
OS: ubuntu 22.04

Re: Cessna C172P keyboard control

Postby sati » Wed May 25, 2022 6:39 pm

@Ysop, I am presently reliant on the AP ROL function to fly properly. The plane would likely spin and crash after a while if I use the mouse.
sati
 
Posts: 6
Joined: Sat Apr 16, 2022 1:42 pm

Re: Cessna C172P keyboard control

Postby Ysop » Wed May 25, 2022 8:29 pm

With a mouse it takes quite a bit of concentration. Some excellent pilots do that. Personally I feel a bit better connected to the virtual aircraft with a joystick.

It might be an idea, that you switch to a different airplane, which is a bit more stable and could make your life during learning phase a bit easier.
With an apology for not mentioning other airplanes, the PA28-161 is also an excellent trainer aircraft, but more on the stable side.
User avatar
Ysop
 
Posts: 1348
Joined: Thu Oct 25, 2018 10:06 pm
Version: 2020.3.18
OS: ubuntu 22.04


Return to Flying

Who is online

Users browsing this forum: No registered users and 3 guests