I am currently working to integrate a small functionality where on detecting a specific altitude number i want to move the aircraft up or down. I am using generic protocol file and UDP connections in Matlab (also where my custom logic resides). i am using this :
- Code: Select all
--generic=socket,out,10,127.0.0.1,510853,udp,testCom
--generic=socket,in,10,127.0.0.1,510308,udp,testCom
and
my genric protocol have two sections - input and output (output works fine as i am able to fetch the required data)
Input is :
- Code: Select all
<PropertyList>
<generic>
<input>
<binary_mode>false</binary_mode>
<line_separator>newline</line_separator>
<var_separator>:</var_separator>
<chunk>
<name>pitch-deg</name>
<type>float</type>
<node>/orientation/pitch-deg</node>
</chunk>
<chunk>
<name>pitch-trim</name>
<type>float</type>
<node>/controls/flight/elevator-trim</node>
</chunk>
<chunk>
<name>pitch-ip</name>
<type>float</type>
<node>/controls/flight/elevator</node>
</chunk>
</input>
But i am not able to control the aircraft the way I want. What now I want ot understand is how can i override the Yoke / pilot input to control the pitch of the aircraft ?