Board index FlightGear Support Interfacing

SenecaII fgpanel Attitude Gyro

Connecting two computers, using generic protocol, connecting with Matlab?

SenecaII fgpanel Attitude Gyro

Postby dhudach » Wed May 15, 2019 12:03 am

I'm trying to set up fgpanel for the SenecaII. There already exist some fgpanel xml files in the Panels folder that I used to get started. For the ATI, in the actual SenecaII cockpit setup xml file, it uses SenecaII/Models/AI/AttitudeGyro.xml. In the sample fgpanel configuration, it uses the ATI from the Cessna 172. The problem is that the degree offset knob in the plane (browsing internal properties) alters property /instrumentation/attitude-indicator/pitch-reference-offset-deg. However, when I send that property in the protocol file to fgpanel, the ATI doesn't respond. And I think it's because in the ati-c172s.xml file, there is no such property. It's actually horizon-offset-deg for the Cessna 172 ATI. If I use SenecaII/Models/AI/AttitudeGyro.xml in the fgpanel xml file instead of ati-c172s.xml, nothing renders for the ATI. I know it's finding the file, because as a test I used a bad filename and fgpanel terminated immediately because it couldn't find the file. I have found that some instrument xml files display in fgpanel, some don't and I don't know why.

So what I would like is to be able to display the SenecaII ATI in fgpanel and in general, how do I make sure that anything that's displayed in the plane cockpit will display properly in fgpanel. If that can't be done, is there a way to map the SenecaII property or properties to what the Cessna 172 uses. In other words, from the SenecaII protocol file, I'm sending /instrumentation/attitude-indicator/pitch-reference-offset-deg to fgpanel but the Cessna 172 ATI has no such property. Is there a way to have the Cessna 172 ATI recognize the property. I actually tried making a copy of the Cessna 172 ATI xml file and changed the properties from horizon-offset-deg to pitch-reference-offset-deg. The ATI displays ok, but the property doesn't seem to be recognized because it doesn't move when I adjust the ATi knob.

I do see the same horizon-offset-deg property for the SenecaII Gyro in the property browser, but when I adjust it, the only property that changes is pitch-reference-offset-deg.

So aside from the specific information I need, is there something in general that I can always go to that will help me resolve these issues on my own. For the most part I start with the PLANE-set.xml file when I am trying to resolve these issues. But it's not helping me in this case.

Thanks,
Dave
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: SenecaII fgpanel Attitude Gyro

Postby Johan G » Thu May 16, 2019 11:58 am

It is likely that the two different aircraft uses two different properties even if they seem to use the same attitude indicator (AI).

What I would recommend is opening the property browser while in FlightGear and playing around with the various knobs to see which properties the knobs are connected to, and also dive into the XML configuration files for the instruments/systems of the two aircraft (looks like the relevant files are Aircraft/c172p/Models/Interior/Panel/Instruments/AI/AI.xml, Aircraft/SenecaII/Models/AI/AttitudeGyro.xml and Aircraft/SenecaII/Models/AI/AI.xml).

While there are some properties that are used the same way in different aircraft, a lot of them will differ between aircraft. What properties to use is pretty much up to the aircraft developer, probably because very different aircraft would have intrinsically different needs (like simple steam gauge instruments in a Cub versus complex interconnected systems in an Airbus).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: SenecaII fgpanel Attitude Gyro

Postby dhudach » Thu May 16, 2019 12:17 pm

Thanks for the information. I planned to write today with an update. Over the past few days, I basically did the steps and research you mentioned. I verified the relevant properties for the ATI instruments for the 172 and SenecaII. I then made a copy of the Cessna 172 ATI instrument xml file, placed it into the SenecaII Panels directory and changed the properties to match what the SenecaII ATI is using. In my fgpanel xml file, I include my ATI copy and it does work. The only issue is that rotating the dial in the sim panel for the ATI moves the indicator in fgpanel in the opposite direction as the one in the sim (up instead of down, down instead of up). I tried changing the <step> property in my ATI copy from positive to negative values but it had no effect. At this point I'm not going to worry too much about it. It's a tweak I can figure out as I go along.

But the more general question is this. Why is it that some instrument xml files do not display in fgpanel. Aside from the Gyro, I also tried to get GearIndicator.xml for the SenecaII to display in fgpanel and like the SenecaII ATI, it also won't display. And I know fgpanel is finding the xml file because if I give it a bad file name, fgpanel terminates in error immediately not finding the file. My hunch is that if the instrument xml file includes a definition ".ac" file, it won't display. That's just a hunch based on what I've noticed. Is there a work around to that? Is it because fgfs 'builds and assembles' some of these objects from ".ac" files on the fly and fgpanel doesn't?

Thanks for your help and for the information.

Dave
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: SenecaII fgpanel Attitude Gyro

Postby Johan G » Thu May 16, 2019 1:00 pm

dhudach wrote in Thu May 16, 2019 12:17 pm:Why is it that some instrument xml files do not display in fgpanel. Aside from the Gyro, I also tried to get GearIndicator.xml for the SenecaII to display in fgpanel and like the SenecaII ATI, it also won't display. And I know fgpanel is finding the xml file because if I give it a bad file name, fgpanel terminates in error immediately not finding the file. My hunch is that if the instrument xml file includes a definition ".ac" file, it won't display. That's just a hunch based on what I've noticed. Is there a work around to that? Is it because fgfs 'builds and assembles' some of these objects from ".ac" files on the fly and fgpanel doesn't?

I am not all that familiar with FGPanel but have tweaked a few aircraft a little. If I understand things correctly, FGPanel needs the 2D representation of the instruments configured in xml files. Using the configuration files for the animation of the 3D models (the .ac files) representing the instruments will not work.

Unfortunately the documentation for the FGPanel configuration files is a bit... lacking :roll: (see links to the readme files at the bottom of the FGPanel article on the wiki, permalink), so you will probably have to look at existing configuration files and replace the parameters used by the instruments and knobs. It seems that typically the FGPanel configuration files are located in the Aricraft/Aircraft name/Panel directory of an aircraft (though it would not surprise me if sometimes the 3D instruments would have ended up there.

If you figure it out, want to help other trying and have time for it, you could help by improving the documentation on the wiki page (or by contacting the FGPanel maintainer with additions to the readme files).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: SenecaII fgpanel Attitude Gyro

Postby dhudach » Thu May 16, 2019 1:11 pm

Ok, thanks again for responding. If I get to a point where I have figured out some things I will definitely provide some documentation.

Dave
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: SenecaII fgpanel Attitude Gyro

Postby dhudach » Thu May 16, 2019 2:08 pm

By the way, thanks for the fgpanel link. I have read it and probably most of the others I can find. I'm in the process of building a SenecaII cockpit using two Arduino 2560 boards, some home built flight controls and fgpanel for much of the instrumentation. I'm in the early stages but have now managed to get fgpanel working and am able to control the instrument dials from Arduino. So far so good. I would have actually preferred the Cessna 310, but the instrument panel is lacking a bit in instruments and some sophistication. The SenecaII will work for me.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am

Re: SenecaII fgpanel Attitude Gyro

Postby Johan G » Fri May 17, 2019 2:28 pm

Regarding the lacking documentation, I took a look at the commit history for the FGPanel readme. It seems that FGPanel is based on stripped down code for the 2D panels in FlightGear. Thus it seems that the readme files for the 2D panels, FGData/Docs/README.xmlpanel, and README.xmlpanel.html could be of use. :)

Edit: Added links to those readme files to the FGPanel wiki article (perm, diff).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: SenecaII fgpanel Attitude Gyro

Postby dhudach » Fri May 17, 2019 3:07 pm

Ok. Thanks for the added information.
Flight Instruction Elevator Control: pull back = houses get smaller, push forward = houses get bigger.
dhudach
 
Posts: 118
Joined: Tue Apr 14, 2015 12:46 am


Return to Interfacing

Who is online

Users browsing this forum: No registered users and 3 guests