Board index FlightGear Support

Autopilot adjustment 2.8.0.5

All general support: help on flying, installation, hardware, getting online etc. There are lots of users and developers to help you out.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- where did you download your aircraft/scenery from?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Autopilot adjustment 2.8.0.5

Postby loguk » Sat Aug 18, 2012 9:16 am

I am running 2.8.0.5 (its really great) on Windows 7 using an Nvidia GTX 570M with 1.5GB.

When I use keyboard controls and switch in Autopilot Heading setting and Autopilot Altitude setting they appear on screen OK and work OK, however the numeric keypad keys that should allow adjustment of heading (4 and 6) and the adjustment of altitude (8 and 2) do not affect the autopilot settings, they still act in normal (autopilot off mode) and adjust the standard controls instead.

I am used to these controls, because I have been successfully using them in 2.6 for some time.

Can anyone advise - what have I missed ?

loguk
loguk
 
Posts: 5
Joined: Thu Aug 02, 2012 10:00 pm

Re: Autopilot adjustment 2.8.0.5

Postby polly » Sat Aug 18, 2012 2:05 pm

Well, there was a fix sourced in this area:
https://www.gitorious.org/fg/fgdata/com ... f6c2a040cd
due to some models not being explicit about their autopilot mode.
Numlock is important too, it's the Up/Down & Left/Right keys that should be operative, not the 8/2, 4/6 keys but if you're seeing elevators and ailerons operating then your numlock is probably set properly. If it's not numlock, could you tell what model you are using and how you are setting autopilot ?
User avatar
polly
 
Posts: 455
Joined: Thu Nov 04, 2010 2:45 pm

Re: Autopilot adjustment 2.8.0.5

Postby loguk » Sat Aug 18, 2012 2:51 pm

I am using the Alouette II (easy) helicopter - this is this the craft that reacts as I said.

Following your note I tried my other favourite the Cessna 550 Citation-II and it seemed to have the same problem.

I normally enable Autopilot by using Alt-H and Alt-A, but I have also tried setting them in the F11 panel. As I said, the AP works fine, it is just the keypad adjustment of the numeric values that seems to have got disconnected. You are right the keys are working, just not switching to AP mode - the AP indicators for Altitude and Heading are appearing in the HUD.
loguk
 
Posts: 5
Joined: Thu Aug 02, 2012 10:00 pm

Re: Autopilot adjustment 2.8.0.5

Postby polly » Sat Aug 18, 2012 6:07 pm

Right, for me the Citation-II is working OK. Ctrl-A and Ctrl-H light the corresponding A/P buttons below the NAV-1 display but you must also engage the A/P down to the right of the seat cushion. After that the up/down keys alter the target altitude to the left of the ADF receiver and the Left/Right keys alter the heading bug on the Nav1 display. If they don't, you could browse the properties with F10-Debug-Browse Internal Properties to confirm the autopilot locks are set as needed in controls.nas ( link above) . Once the Autopilot is active, the incAileron function should be setting the A/P targets, not the control surfaces.
User avatar
polly
 
Posts: 455
Joined: Thu Nov 04, 2010 2:45 pm

Re: Autopilot adjustment 2.8.0.5

Postby loguk » Mon Aug 20, 2012 11:14 am

polly,

Thanks for that reply - I understand that.

The Alouette II does not have explicit autopilot support - it does work with the generic autopilot. In version 2.6 using CTRL-A or CTRL-H would set on the autopilot, provide the control automation and switch the use of the relevant arrow keys to act upon the autopilot inputs, also showing the values in the HUD.

The difference in 2.8 seems to be that the Autopilot is still enabled by CTRL-A or CTRL-H, and it works but the redesignation of the control keys no longer takes place, the HUD still shows the values as set in the Autopilot GUI drop down.

Do you think this is intended, or should I report it as an issue - following your note about what had been altered I did try a copy of the controls.nas from the 2.6 installation in place of the 2.8 one, and indeed the control key action was the same as it had been previously in 2.6.

Unfortunately I am now also getting blue screen crashes in my Windows 7 system, so I am rather hobbled in trying to further identify any further what the internal autopilot variable settings are. I hope to resolve that soon however.
loguk
 
Posts: 5
Joined: Thu Aug 02, 2012 10:00 pm

Re: Autopilot adjustment 2.8.0.5

Postby polly » Mon Aug 20, 2012 12:20 pm

Especially if the Citation works OK for you, with the centre pedestal A/P - Master causing the keys to alter target heading / altitude settings then I'd think controls.nas is working as (now) intended. The Alouette doesn't have an autopilot so the property: /autopilot/locks/passive-mode never gets changed from 'nil' even when the heading mode and altitude modes get activated via Ctrl-H and Ctrl-A.
( Unfortunately the fix was done because the Citation-Bravo had the opposite error, keyboard wouldn't operate elevators/ailerons ) .
Could you maybe try adding these sections to a ( backed up) copy of your keyboard.xml ?
Code: Select all
 <key n="127">
  <name>alt-Delete</name>
  <desc>A/P Passive</desc>
   <mod-alt>
   <binding>
    <command>nasal</command>
    <script>
      var node = props.globals.getNode("/autopilot/locks/passive-mode", 1);
      if ( node.getValue() == "true" ) {
        node.setValue( "true" );
      } else {
        node.setValue( "true" );
      }
    </script>
  </binding>
  </mod-alt>
 </key>

 <key n="364">
  <name>alt-Insert</name>
  <desc>A/P Active</desc>
  <mod-alt>
   <binding>
    <command>nasal</command>
    <script>
      var node = props.globals.getNode("/autopilot/locks/passive-mode", 1);
      if ( node.getValue() == "true" ) {
        node.setValue( "false" );
      } else {
        node.setValue( "false" );
      }
    </script>
   </binding>
  </mod-alt>
 </key>



Then, after you select Ctrl-A or Ctrl-H use Alt-Insert to activate "A/P - Master" and Alt-Delete to deactivate. If that works for you I'll make a bug report, to include some key binding into keyboard.xml for autopilot/locks/passive-mode.

Edit I've added a comment to Bugs #748 with a reference to this issue.
User avatar
polly
 
Posts: 455
Joined: Thu Nov 04, 2010 2:45 pm

Re: Autopilot adjustment 2.8.0.5

Postby loguk » Mon Aug 20, 2012 7:31 pm

polly thanks again,

I had to tweak what you gave me a bit mainly due to quoted strings that needed to be BOOLs (I think) - the following worked

Code: Select all
<key n="127">
  <name>alt-Delete</name>
  <desc>A/P Passive</desc>
   <mod-alt>
   <binding>
    <command>nasal</command>
    <script>
      var node = props.globals.getNode("/autopilot/locks/passive-mode", 1);
      node.setValue( 1 );
    </script>
  </binding>
  </mod-alt>
</key>

<key n="364">
  <name>alt-Insert</name>
  <desc>A/P Active</desc>
  <mod-alt>
   <binding>
    <command>nasal</command>
    <script>
      var node = props.globals.getNode("/autopilot/locks/passive-mode", 1);
      node.setValue( 0 );
    </script>
   </binding>
  </mod-alt>
</key>


I can make that do exactly what I want - but the net effect is not really correct. ALT-Del does now disable the keyboard controls affecting the AP values - but - the AP is still running and still affects the aircraft. Likewise the enabler ALT-Ins does let me do what I want - but - the AP switches in on CTRL-A or CTRL-H, its just that I can't adjust the values with the keyboard until I use your new enable sequence Alt-Ins.

I am completely happy for the while because I can do what I need - but somehow exactly what the 'design' requires needs to be implemented - when the time comes I am happy to test fixes.

Thanks again - I will let you rest now :-)

Steve (loguk)
loguk
 
Posts: 5
Joined: Thu Aug 02, 2012 10:00 pm

Re: Autopilot adjustment 2.8.0.5

Postby polly » Mon Aug 20, 2012 9:14 pm

Yes, what you're seeing is 'what we find' because it's all a bit of a hack.
Models without a specific autopilot use Aircraft/Instruments/generic-autopilot.xml, which responds to Ctrl-H, Ctrl-A type hotkeys to run a generic autopilot. Other models, e.g the Citation-Bravo, 777, use the autopilot-passive-mode property to explicitly switch off/on the A/P so that the PID's can be switched active or inactive. The Bravo was setting up heading modes without activating the A/P so I raised the bug stating that cursor keys no longer controlled flight surfaces.
To fix that bug, Thorsten added a test in controls.nas to check autopilot/locks/passive-mode .. since that property isn't managed by the old 'generic' autopilot you are seeing the effect when you try the Alouette. The keyboard code I copied for you is what I use to activate the A/P Master switch, for example on the Citations' pedestal or the 777's A/P Master; for your model it just manipulates the 'passive-mode' flag .. good enough for controls.nas but having no effect on generic autopilot: generic autopilot is still managed via Ctrl-A Ctrl-H etc.
Hopefully the real developers will see either this or the comment I added to the original bug report and consider managing the passive-mode flag in generic autpoilot so that the hotkeys are consistent.
User avatar
polly
 
Posts: 455
Joined: Thu Nov 04, 2010 2:45 pm

Re: Autopilot adjustment 2.8.0.5

Postby clrCoda » Thu Oct 08, 2015 10:10 am

Did the bravo not have a flight director switch?

This broke all the planes using generic A/P and lol a few of my Fg friends that have joined Fg since this breakage have never really seen Fg work as intended. One even painstakenly wrote his own custom Autopilot because the generic didn't work as advertised.

I've moved this train of thought over the the Paper Cut Bugs thread.

Much thanks to Johan G for pointing out when where and how this happened.
Ray
Ray St. Marie
clrCoda
 
Posts: 1228
Joined: Wed Apr 07, 2010 11:04 am


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron