Board index FlightGear Development Aircraft

Introducing the update of the Cessna 337 Skymaster

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: Introducing the update of the Cessna 337 Skymaster

Postby wkitty42 » Sat Jan 05, 2019 1:19 pm

what FDM is this craft using? jsbsim or yasim?
if jsbsim, have you looked at how the c172p does it?

i don't know anything about yasim other than it is fairly simple and makes some assumptions that jsbsim doesn't... it may not have the ability to turn the power off once it is turned on... most of the yasim craft i've flown required me to restart the sim if i messed up some how... (eg: flipping the wrong switch, crashing, etc...)
"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: 5018
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Introducing the update of the Cessna 337 Skymaster

Postby wlbragg » Sat Jan 05, 2019 2:15 pm

It's JSBSim.
I started looking at the electrical system but haven't checked everything. I think controls/lighting/panel-norm may have something to do with it but I haven't traced it throughout the system yet. I did a quick search and did not see where it is created so I am wondering if it is a tied property coming from the core code?
Then again it isn't really associated with the buss creation at the core of the electrical.
I'm investigating more intensely at this moment and should have some answers shortly.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4403
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Introducing the update of the Cessna 337 Skymaster

Postby wlbragg » Sat Jan 05, 2019 2:50 pm

I'm going to post some discoveries as I go so as to not loose them.

If the master switch is on it ever so slowly drains the battery, regardless of alternator switches being on or off.



The following "Avionics Switch" looks suspicious! Why is it assigning every electrical output to 0 regardless of toggle position?

Code: Select all
<animation>
   <type>pick</type>
   <object-name>Switch_21</object-name>
   <visible>true</visible>
   <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
         <command>property-toggle</command>
         <property>controls/switches/master-avionics</property>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/adf</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/audio-panel[0]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/audio-panel[1]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/autopilot</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/avionics-fan</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/dme</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/hsi</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/nav[0]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/nav[1]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/transponder</property>
         <value>0</value>
      </binding>
   </action>
</animation>


These are the conditions for one of the comm radios
instrumentation/comm[0]/serviceable
instrumentation/nav[0]/serviceable
instrumentation/comm[0]/power-btn
/systems/electrical/outputs/nav[0]

This is the condition for its knobs
controls/lighting/panel-norm

Code: Select all
<supplier>
   <name>Battery 1</name>
   <prop>/systems/electrical/suppliers/battery[0]</prop>
   <kind>battery</kind>
   <volts>28</volts>
   <amps>17</amps>
</supplier>

<bus>
    <name>Main Bus</name>
    <prop>/systems/electrical/outputs/bus[0]</prop>
</bus>

<bus>
    <name>Avionics Bus</name>
    <prop>/systems/electrical/outputs/bus[1]</prop>
</bus>

<connector>
   <input>Battery 1</input>
   <output>Main Bus</output>
   <switch>
      <prop>/controls/engines/engine[0]/master-bat</prop>
      <initial-state>off</initial-state>
   </switch>
</connector>


<connector>
   <input>Main Bus</input>
   <output>Avionics Bus</output>
   <switch>
      <prop>/controls/switches/master-avionics</prop>
      <initial-state>off</initial-state>
   </switch>
</connector>


The problem is the "Main Bus" never goes to 0 it is either draining when the battery switch is on or at a constant 28 when it is off.
Why?
The link of "Main Bus" is like a symlink, where is it located and how does it work?
I am at the same place you are @FlyingHigh.
Gary Neely (aka 'Buckaroo') system implements nasal as well as the c172p, is this fundamentally why these aircraft implement nasal solutions?
It would not be difficult at all to simply replace the "system" xml with a nasal alternative, from scratch! But why is this original xml ever used in this manner if it doesn't work?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4403
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Introducing the update of the Cessna 337 Skymaster

Postby wlbragg » Sat Jan 05, 2019 3:59 pm

Or you could use the xml alternative with adjustments that do not use these "symlink's".

For example see https://github.com/arktools/jsbsim/blob ... trical.xml
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4403
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Introducing the update of the Cessna 337 Skymaster

Postby wlbragg » Sat Jan 05, 2019 4:23 pm

I'm not sure how or why this works this way, but the fix is to do essentially what is done in the comm radio code.
In Models/Cessna337.xml starting at 1335, set to 0 all properties controlled by the bus...

Code: Select all
<animation>
   <type>pick</type>
   <object-name>Switch_01</object-name>
   <visible>true</visible>
   <action>
      <button>0</button>
      <repeatable>false</repeatable>
     <binding>
         <command>property-toggle</command> 
         <property>controls/engines/engine[0]/master-bat</property>
      </binding>
    <binding>
         <command>property-assign</command> 
         <property>/systems/electrical/outputs/bus[0]</property>
      <value>0</value>
      </binding>
    <binding>
         <command>property-assign</command> 
         <property>/systems/electrical/outputs/bus[1]</property>
      <value>0</value>
      </binding>
          <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/adf</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/audio-panel[0]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/audio-panel[1]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/autopilot</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/avionics-fan</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/dme</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/hsi</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/nav[0]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/nav[1]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/transponder</property>
         <value>0</value>
      </binding>
   </action>
</animation>
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4403
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Tue Jan 08, 2019 8:03 am

Gary Neely (aka 'Buckaroo') system implements nasal as well as the c172p, is this fundamentally why these aircraft implement nasal solutions?
It would not be difficult at all to simply replace the "system" xml with a nasal alternative, from scratch! But why is this original xml ever used in this manner if it doesn't work?


Good questions, I don't know why. But it seems to me that basic connections and voltage propagations should be easy to accomplish with simple xml (in fact, Gary Neely's system uses simple xml to declare the supplier and output elements and connections between them, but the main engine of his system is the nasal).

I don't understand nasal at the level Gary uses for his system, so I can't find any clues there.
If you do understand nasal at that level, maybe you can notice a clue in there about how his system eradicates the problem when installed in the 337? (I'm talking about the generic nasal file he posted on his website, which is the same file I used in the 337, and which worked like a charm).

I'm going to look at this with fresh eyes in light of the new info you posted, thank you very much for your interest in my post and the research and information you provided. Will post an update good or bad as soon as I have one!
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Sun Jan 13, 2019 2:03 am

wlbragg wrote in Sat Jan 05, 2019 4:23 pm:I'm not sure how or why this works this way, but the fix is to do essentially what is done in the comm radio code.
In Models/Cessna337.xml starting at 1335, set to 0 all properties controlled by the bus...

Code: Select all
<animation>
   <type>pick</type>
   <object-name>Switch_01</object-name>
   <visible>true</visible>
   <action>
      <button>0</button>
      <repeatable>false</repeatable>
     <binding>
         <command>property-toggle</command> 
         <property>controls/engines/engine[0]/master-bat</property>
      </binding>
    <binding>
         <command>property-assign</command> 
         <property>/systems/electrical/outputs/bus[0]</property>
      <value>0</value>
      </binding>
    <binding>
         <command>property-assign</command> 
         <property>/systems/electrical/outputs/bus[1]</property>
      <value>0</value>
      </binding>
          <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/adf</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/audio-panel[0]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/audio-panel[1]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/autopilot</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/avionics-fan</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/dme</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/hsi</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/nav[0]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/nav[1]</property>
         <value>0</value>
      </binding>
      <binding>
         <command>property-assign</command>
         <property>systems/electrical/outputs/transponder</property>
         <value>0</value>
      </binding>
   </action>
</animation>


I looked at this file and considered it for a long time. I also looked at the other code you submitted related to the avionics master switch. To me, they both seem to be programming a workaround to avoid the consequences of the main flaw.

What I think is best is, to whatever extent possible, to not program a workaround, but to avoid the root problem entirely.

What I have done is follow Neey's lead; I have moved the entire electrical system into the "/sim" space where all properties start clean and can be managed anew with XML or Nasal.

Also, while far from having programmed a full solution, I do have something to submit that I believe is of immediate value to the 337 pilot community as a standalone.

Would you review my update?

If so, how to send you the files?

I work on an older laptop with not much disk space left, so I prefer to not have to download a file sharing application. Really, web based email works best for me. Even the entire Cessna337 package can be sent to most email provider addresses, so sending the few files I'd like to send should be a snap via email.

If you don't have an email address for flightgear file sharing, I can suggest gmx dot com or protonmail dot com because the email addresses are free and also they respect user privacy in that they do not require a telephone number in order to set up an account.

Ok that's all for the moment, please let me know if you will review my update, and if so, how to get the files to you.

Thank you!
FlyingHigh
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby legoboyvdlp » Sun Jan 13, 2019 10:01 am

Dropbox is completely web based (although it does have a client as well) - maybe you can upload a .patch or .zip to it and share a link?
User avatar
legoboyvdlp
 
Posts: 6246
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Sun Jan 13, 2019 3:05 pm

legoboyvdlp wrote in Sun Jan 13, 2019 10:01 am:Dropbox is completely web based (although it does have a client as well) - maybe you can upload a .patch or .zip to it and share a link?



I was not aware, ok, in that case, I will make a dropbox account, put a zip in there and then post the link here. Will be in a few days. I want to download a fresh 337 and re-implement, just to be sure everything works again as I have it working now. Thanks .
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby wlbragg » Tue Jan 22, 2019 8:37 am

What I have done is follow Neey's lead; I have moved the entire electrical system into the "/sim" space where all properties start clean and can be managed anew with XML or Nasal.

Sorry for the delay in responding. Yes, I think that is a valid solution. I would be happy to review it once your finished, just let know.
I'm actually in need of a complete electrical system for the J3Cub/PA-18 and was planning on modeling it similar to the c172p. It'll be interesting to see if this the same or yet another alternative.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4403
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Sat Feb 23, 2019 4:35 am

Sorry for my delay in posting.
I'm struggling with dropbox.
Yes, it has a web version, but to me, at least, it is not intuitive.
Tonight I am trying to make a link to my dropbox test file and then to try to post that link here.
Patience please.
If I can learn to post here a link to my dropbox files, I will then post a link to my zip file of my work on the Cessna 337.
In the meantime, I would like to say that in my opinion, the Cessna 337G is one of the nicest aircraft on Flightgear, and it has been stagnant since it was published, and it deserves whatever upgrades we can give it.
Sincerely,
FlyingHigh
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Sat Feb 23, 2019 4:40 am

wlbragg wrote in Tue Jan 22, 2019 8:37 am:
What I have done is follow Neey's lead; I have moved the entire electrical system into the "/sim" space where all properties start clean and can be managed anew with XML or Nasal.

Sorry for the delay in responding. Yes, I think that is a valid solution. I would be happy to review it once your finished, just let know.
I'm actually in need of a complete electrical system for the J3Cub/PA-18 and was planning on modeling it similar to the c172p. It'll be interesting to see if this the same or yet another alternative.



This is my first attempt to post a dropbox link to this forum.
Please if antybody can use the link to find the file, please let me know, thank you.
Here is the link:
https://www.dropbox.com/s/6syq04svsmgu6 ... x.txt?dl=0
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Sat Feb 23, 2019 4:44 am

p.s. the need to use dropbox or any other such service in order to share files, in my opinion, is pure BS.
All of these files can be shared more simply by email among those who are interested.
Just venting because I had to spend 30 minutes or so just to figure out how to make a link to a dropbox file. And before that, and hour just to make an account etc. sorry for my rant, but it's all pure BS. Unnecessary and all a waste of time.
If you are interested in my work on the Cessna337G, just send me your email address either here in the forum, if allowed, or in PM.
thanks for listening to me.
John (FlyingHigh)
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

Re: Introducing the update of the Cessna 337 Skymaster

Postby wlbragg » Sat Feb 23, 2019 5:05 am

Hi John, I was able to access your test file.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4403
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Introducing the update of the Cessna 337 Skymaster

Postby FlyingHigh » Sat Feb 23, 2019 7:15 am

wlbragg wrote in Sat Feb 23, 2019 5:05 am:Hi John, I was able to access your test file.



OK super, here is the link to the zip file of the work I've done on this aircraft:

https://www.dropbox.com/s/xzggdzfb73wvp ... l.zip?dl=0

There is a "readme_2019_electrical_dev.txt" in the root folder which explains the basic goals I was trying to accomplish.

thanks to all who take interest, and feedback and improvements/corrections are hoped for and appreciated.

John
FlyingHigh
 
Posts: 20
Joined: Mon Dec 10, 2018 1:08 am

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 2 guests