Property Tree/Native Protocol Slaving: Difference between revisions

Jump to navigation Jump to search
→‎Success !: http://flightgear.org/forums/viewtopic.php?f=36&t=19858&p=182757#p182754
(→‎Slaving Dynamics (FDM): http://flightgear.org/forums/viewtopic.php?f=36&t=19858)
(→‎Success !: http://flightgear.org/forums/viewtopic.php?f=36&t=19858&p=182757#p182754)
Line 172: Line 172:
=== Success ! ===
=== Success ! ===
* Well I'll be! I added %f formatting to everything, and now everything appears to be working almost perfectly. The shadows are appropriate and the main rotor on the slave appears to be behaving exactly like the one on the master. This is awesome. The only difference I can see is that the animated main rotor shadow appears to have fewer blades on the slave, but if I never find out why and fix it, it will barely matter. I'm completely stoked! All I basically have left to do is put in pretty much the same code for the tail rotor that I did for the main rotor.
* Well I'll be! I added %f formatting to everything, and now everything appears to be working almost perfectly. The shadows are appropriate and the main rotor on the slave appears to be behaving exactly like the one on the master. This is awesome. The only difference I can see is that the animated main rotor shadow appears to have fewer blades on the slave, but if I never find out why and fix it, it will barely matter. I'm completely stoked! All I basically have left to do is put in pretty much the same code for the tail rotor that I did for the main rotor.
<syntaxhighlight lang="xml">
<?xml version="1.0"?>
<PropertyList>
<generic>
  <output>
      <line_separator>newline</line_separator>
      <var_separator>,</var_separator>
     
      <chunk>
        <node>/position/gear-agl-ft</node>
        <type>float</type>
        <format>%1.9f</format>
        </chunk>
<!--     
      <chunk>
        <node>/orientation/pitch-deg</node>
        <type>double</type>
        <format>%f</format>
        </chunk>     
     
      <chunk>
          <node>/orientation/roll-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>  -->
      <chunk>
          <node>/rotors/main/blade/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[1]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[1]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[1]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[2]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[2]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[2]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[3]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[3]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[3]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[4]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[4]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[4]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[5]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[5]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[5]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                                                       
     
  <!--  <chunk>
          <node>/rotors/main/blade[0]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[0]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk> -->
      <chunk>
          <node>/rotors/main/cone-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/cone1-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/cone2-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/cone3-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/cone4-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
     
      <chunk>
          <node>/rotors/main/roll-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>     
     
      <chunk>
          <node>/rotors/main/rpm</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/stall</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/stall-filtered</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/torque</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/yaw-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>     
  </output>
<!-- ******************************************************** --> 
  <input>
      <line_separator>newline</line_separator>
      <var_separator>,</var_separator>
     
      <chunk>
        <node>/position/gear-agl-ft</node>
        <type>float</type>
        <format>%1.9f</format>
        </chunk>
<!--     
      <chunk>
        <node>/orientation/pitch-deg</node>
        <type>double</type>
        <format>%f</format>
        </chunk>     
     
      <chunk>
          <node>/orientation/roll-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>  -->
      <chunk>
          <node>/rotors/main/blade/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[1]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[1]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[1]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[2]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[2]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[2]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[3]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[3]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[3]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[4]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[4]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[4]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[5]/flap-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[5]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/blade[5]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>                                                       
     
  <!--  <chunk>
          <node>/rotors/main/blade[0]/position-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/blade[0]/incidence-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk> -->
      <chunk>
          <node>/rotors/main/cone-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/cone1-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/cone2-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/cone3-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>                   
      <chunk>
          <node>/rotors/main/cone4-deg</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
     
      <chunk>
          <node>/rotors/main/roll-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>     
     
      <chunk>
          <node>/rotors/main/rpm</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/stall</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/stall-filtered</node>
          <type>double</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/torque</node>
          <type>float</type>
        <format>%f</format>
        </chunk>
      <chunk>
          <node>/rotors/main/yaw-deg</node>
          <type>float</type>
        <format>%f</format>
        </chunk>     
  </input>
</generic>
</PropertyList>
</syntaxhighlight>


== Examples ==
== Examples ==

Navigation menu