Board index FlightGear Support Hardware

Manually configuring a joystick - FlightGear vs FSX vs XP11

Joysticks, pedals, monitors.

Re: Piper PA28 Warrior II

Postby Robertfm » Tue Nov 12, 2019 11:22 pm

@Adrian: The button referred to earlier on the 'Virtual Yoke' only de-activates the AP. Looking at it simply from an 'electrical standpoint' an on/off switch is simply that. So such a switch could be on numerous different appliances, and it would not matter what the other functions of the different devices were, the switch has a simple purpose. I am assuming that would be the case with any on/off button on an AP, but I guess as you are the experts I will concede it can't be done.
Last edited by bugman on Tue Nov 12, 2019 11:31 pm, edited 1 time in total.
Reason: Please do not quote the entire previous post.
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

Re: Piper PA28 Warrior II

Postby Maerchenprinz » Wed Nov 13, 2019 12:52 am

Robertfm wrote in Tue Nov 12, 2019 11:22 pm: The button referred to earlier on the 'Virtual Yoke' only de-activates the AP. Looking at it simply from an 'electrical standpoint' an on/off switch is simply that.


This may be true in this special case; Anyway, a switch simply labelled "AP Off" may not just put something off in other cases, instead it may trigger a series of events - e.g. an alarm, a different flight envelope for the FBW. a signal to the trim tabs, not-Off-but-Disconnect, wait-for-a-second-push, etc.
It would be really hard to resume all of this by one command in FG with its big amount of various aircraft, with some using custom, some using standard FG AP, and some maintained, others unmaintained...

A good hint: If the specific aircraft has custom keys for AP-control, search for the code snippets (often in *-set.xml), and change or copy them as needed. Key assignments start with <key n="xy"> and end with </key>, e.g.:
Code: Select all
      <key n="100">
      <name>d</name>
      <desc>AP (DIS-)ENGAGE</desc>
      <repeatable>false</repeatable>
       <binding>
       <command>nasal</command>
        <script>
   if( getprop("an24/AP-28l1/internal/engaged" ) == 0.0 ){
   instruments.engage_ap();
   }
   else {
   setprop("an24/AP-28l1/internal/kv", 0.0 );
   setprop("an24/AP-28l1/internal/horizon-mode", 0.0 );
   setprop("an24/AP-28l1/internal/engaged", 0.0 );
   }
        </script>
       </binding>
      </key>


It's by the way always a good hint to look into the files of an aircraft; One might not understand much at a first glance, but then gets to understand it increasingly faster!

Ciao,

Adrian
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: Piper PA28 Warrior II

Postby Thorsten » Wed Nov 13, 2019 6:41 am

So why can FSX/Xplane do it.


For the same reason FSX can't really do a Shuttle - it's very restricted.

FG has a generic AP which can level wings, fly a course and hold altitude. You can assign functions to command that generic AP to your piece of hardware. If every plane would use that generic AP, you would have the situation of FSX.

In reality, the generic AP is not very realistic - so many craft come with their own. For instance, a wing leveler makes no sense in a helicopter, and generally trying to control a helicopter with the generic AP will get you killed faster than you can say oops. Yet helicopters can have APs - they just work rather differently. They're custom-written. Complex planes like the A-320 which can autoland have a custom AP. Rockets need custom APs.

The Shuttle DAP disconnects when a rather specific set of events is met - so you definitely can not disconnect it with a single button and be realistic.

So to the degree that planes in APs use non-generic and more realistic APs, you can not assign one function to command them any more.

TL;DR: FSX can do it because FSX sacrifices realism for ease of use.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Piper PA28 Warrior II

Postby Robertfm » Wed Nov 13, 2019 10:25 am

'TL;DR: FSX can do it because FSX sacrifices realism for ease of use.' Surely if FG want to attract a wider audience who like me simply want to fly without having to have a degree in Computer programming a little less realism would maybe a good thing. I really do prefer FG to the few attempts I have had at flying FSX, so in many respects FG is easier to fly than FSX.
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

Re: Piper PA28 Warrior II

Postby Thorsten » Wed Nov 13, 2019 10:52 am

Surely if FG want to attract a wider audience who like me simply want to fly without having to have a degree in Computer programming a little less realism would maybe a good thing.


FG doesn't want to do that though. We want our sandbox to create aircraft as realistic as we like, and the people who enjoy flying them can fly them, the people who prefer ease of use can install a commercial sim.

There's absolutely nothing we gain from attracting a wider audience without a degree in computer science - we don't get any revenue for more users, we just would get higher demand on resources (download bandwidth, MP server slots, support requests,...) If tomorrow half of the FSX users would decide to use FG, we'd be all in BIG trouble.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Piper PA28 Warrior II

Postby Robertfm » Wed Nov 13, 2019 11:11 am

I think you have summed up why people like Saitek/Logitech and other producers of flight sim kit never include FG coding.
Last edited by bugman on Wed Nov 13, 2019 1:35 pm, edited 1 time in total.
Reason: Please do not quote entire posts (forum rule 8).
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

Re: Piper PA28 Warrior II

Postby SurferTim » Wed Nov 13, 2019 11:37 am

What coding are you discussing here? Logitech builds joysticks and other game-type controllers. Most use a USB joystick interface.

It is up to the app using the devices to do the coding for that app. I just wrote one for the BU0836A. It didn't include any "coding" for FlightGear or X-Plane.
Last edited by bugman on Thu Nov 14, 2019 9:48 am, edited 1 time in total.
Reason: Please do not quote the entire previous post.
Fly low. Fly slow. Land on a dime. Twin Otter. https://github.com/SurferTim/dhc6p
My other aircraft is a Citation-X https://github.com/SurferTim/CitationX
PirateAir videos at https://www.youtube.com/user/SurferTim850
User avatar
SurferTim
 
Posts: 1708
Joined: Sun Dec 09, 2018 6:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2020.4.0
OS: Ubuntu 18.04

Re: Piper PA28 Warrior II

Postby Robertfm » Wed Nov 13, 2019 11:55 am

What I mean is the devices are plug and play in FSX, Xplane etc, not FG. The AP panel and switch panel that Saitek make has been well documented as not working in FG. I have seen other companies products that are not made for FG, but for the other flight sims.
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

Re: Piper PA28 Warrior II

Postby Thorsten » Wed Nov 13, 2019 12:00 pm

I think you have summed up why people like Saitek/Logitech and other producers of flight sim kit never include FG coding.


Yes, I think I've explained a few posts earlier why general ready-made assignments of HW to functions inside the FG simulations are conceptually impossible (and would not be considered useful by aircraft maintainers), so I am glad you finally got the point.

I'm not sure though why you still feel complaining about the fact that the FG mission statement doesn't focus on your needs will help - learning to customize a config file on the other hand would help you quite a bit. FG is what it is and you got it for free - if you do not like what you got, you haven't lost any investment.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Piper PA28 Warrior II

Postby SurferTim » Wed Nov 13, 2019 12:02 pm

Robertfm wrote in Wed Nov 13, 2019 11:55 am:What I mean is the devices are plug and play in FSX, Xplane etc, not FG. The AP panel and switch panel that Saitek make has been well documented as not working in FG. I have seen other companies products that are not made for FG, but for the other flight sims.

II don't know about the AP panels. I designed my own using Python.

That would be a challenge facing the FlightGear community to do the interfacing. At least that would be the default approach.

Does Logitech provide a user manual or datasheet for the panels in question?

Edit: I am going to reverse my decision on that. The radio and switch panels require device drivers. They are not a standard joystick interface.
Fly low. Fly slow. Land on a dime. Twin Otter. https://github.com/SurferTim/dhc6p
My other aircraft is a Citation-X https://github.com/SurferTim/CitationX
PirateAir videos at https://www.youtube.com/user/SurferTim850
User avatar
SurferTim
 
Posts: 1708
Joined: Sun Dec 09, 2018 6:49 pm
Location: Miramar Beach, FL
Callsign: Pirate
Version: 2020.4.0
OS: Ubuntu 18.04

Re: Piper PA28 Warrior II

Postby Richard » Wed Nov 13, 2019 1:17 pm

As I've previously said if there is a generic button or axis that could be added to the joystick configuration dialog then let me know what it is called and what aircraft it should be available for and I'll investigate adding it.

Autopilot disconnect is pretty common as a function - but unfortunately I rather suspect that there isn't a generic property that works across all aircraft; so even if I add "autopilot disconnect" to the dialog there will need to be model changes to make it work.

This is why FSX and X-Plane can provide the ability to bind these buttons because (generally) with both of these simulators aircraft have to share builtin systems (such as autopilot) and thus the button assignments are completely under control of the simulator developers.

There has been talk of a new joystick / keyboard configuration system for FlightGear that will allow aircraft to specify what functions are available to be bound and therefore allow a dialog to show this - but this is only at the discussion stage and even if implemented tomorrow (which it won't be) it would require adoption by aircraft developers before being useful (which is usually a minimum of a few months)
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: Piper PA28 Warrior II

Postby Maerchenprinz » Wed Nov 13, 2019 4:54 pm

Robertfm wrote in Wed Nov 13, 2019 11:55 am:What I mean is the devices are plug and play in FSX, Xplane etc, not FG.

The underlying reason for this is the same reason why FSX etc. APs are often fancy looking tommyrot.
Real life aircraft aren't plug and play with especially FSX... :D
A possible solution might be to force every aircraft designer to use the generic FG autopilot, and have 90+% aircraft with totally unrealistic behaviour, and hell of a lot work for a degradation in quality.
D-ECHO wrote:Could we please split the part about joystick bindings off?

I'm game!

Ciao,

Adrian
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: Piper PA28 Warrior II

Postby Robertfm » Wed Nov 13, 2019 8:21 pm

Some clearly went to the trouble of writing the code to set buttons for the T16000 and whilst I don't understand it totally I assume if you change the plane name it will work on any plane that has the KAP140 & Centurion111. http://wiki.flightgear.org/Joystick_autopilot_bindings
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

Re: Piper PA28 Warrior II

Postby Thorsten » Wed Nov 13, 2019 9:54 pm

I assume if you change the plane name it will work on any plane that has the KAP140 & Centurion111


Then just go ahead and do it. :D
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Piper PA28 Warrior II

Postby Robertfm » Wed Nov 13, 2019 9:57 pm

Helpful as ever. Perhaps you could tell me what has gone wrong with Joystick Calibration tool. It was working earlier today but then all I get is.
Image
Robertfm
 
Posts: 1721
Joined: Thu Apr 25, 2019 5:56 pm
Callsign: RFM1
Version: 2020.3.11
OS: W10 v 19041.746

PreviousNext

Return to Hardware

Who is online

Users browsing this forum: No registered users and 3 guests