Commit e390874c authored by Thomas Gubler's avatar Thomas Gubler

wip, arducopter hil model and protocol

parent 5f37d6c9
...@@ -103,11 +103,11 @@ ...@@ -103,11 +103,11 @@
</ground_reactions> </ground_reactions>
<!-- the front and rear motors spin clockwise, and the left and right motors spin counter-clockwise. --> <!-- the front and rear motors spin clockwise, and the left and right motors spin counter-clockwise. -->
<propulsion> <propulsion>
<engine file="a2830-12" name="front"> <engine file="a2830-12" name="right">
<location unit="M"> <location unit="M">
<x> -0.283 </x> <x> 0.000 </x>
<y> 0.00 </y> <y> -0.283 </y>
<z> 0.00 </z> <z> 0.000 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
<pitch> 90.00 </pitch> <pitch> 90.00 </pitch>
...@@ -117,8 +117,8 @@ ...@@ -117,8 +117,8 @@
<feed>0</feed> <feed>0</feed>
<thruster file="prop10x4.5"> <thruster file="prop10x4.5">
<location unit="M"> <location unit="M">
<x> -0.283 </x> <x> 0.000 </x>
<y> 0.00 </y> <y> -0.283 </y>
<z> 0.125 </z> <z> 0.125 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
...@@ -130,11 +130,11 @@ ...@@ -130,11 +130,11 @@
<p_factor> 10 </p_factor> <p_factor> 10 </p_factor>
</thruster> </thruster>
</engine> </engine>
<engine file="a2830-12" name="rear"> <engine file="a2830-12" name="left">
<location unit="M"> <location unit="M">
<x> 0.283 </x> <x> 0.00 </x>
<y> 0.000 </y> <y> 0.283 </y>
<z> 0.000 </z> <z> 0.00 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
<pitch> 90.00 </pitch> <pitch> 90.00 </pitch>
...@@ -144,8 +144,8 @@ ...@@ -144,8 +144,8 @@
<feed>0</feed> <feed>0</feed>
<thruster file="prop10x4.5"> <thruster file="prop10x4.5">
<location unit="M"> <location unit="M">
<x> 0.283 </x> <x> 0.00 </x>
<y> 0.000 </y> <y> 0.283 </y>
<z> 0.125 </z> <z> 0.125 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
...@@ -157,11 +157,12 @@ ...@@ -157,11 +157,12 @@
<p_factor> 10 </p_factor> <p_factor> 10 </p_factor>
</thruster> </thruster>
</engine> </engine>
<engine file="a2830-12" name="left">
<engine file="a2830-12" name="front">
<location unit="M"> <location unit="M">
<x> 0.00 </x> <x> -0.283 </x>
<y> 0.283 </y> <y> 0.00 </y>
<z> 0.00 </z> <z> 0.00 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
<pitch> 90.00 </pitch> <pitch> 90.00 </pitch>
...@@ -171,8 +172,8 @@ ...@@ -171,8 +172,8 @@
<feed>0</feed> <feed>0</feed>
<thruster file="prop10x4.5"> <thruster file="prop10x4.5">
<location unit="M"> <location unit="M">
<x> 0.00 </x> <x> -0.283 </x>
<y> 0.283 </y> <y> 0.00 </y>
<z> 0.125 </z> <z> 0.125 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
...@@ -184,10 +185,10 @@ ...@@ -184,10 +185,10 @@
<p_factor> 10 </p_factor> <p_factor> 10 </p_factor>
</thruster> </thruster>
</engine> </engine>
<engine file="a2830-12" name="right"> <engine file="a2830-12" name="rear">
<location unit="M"> <location unit="M">
<x> 0.000 </x> <x> 0.283 </x>
<y> -0.283 </y> <y> 0.000 </y>
<z> 0.000 </z> <z> 0.000 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
...@@ -198,8 +199,8 @@ ...@@ -198,8 +199,8 @@
<feed>0</feed> <feed>0</feed>
<thruster file="prop10x4.5"> <thruster file="prop10x4.5">
<location unit="M"> <location unit="M">
<x> 0.000 </x> <x> 0.283 </x>
<y> -0.283 </y> <y> 0.000 </y>
<z> 0.125 </z> <z> 0.125 </z>
</location> </location>
<orient unit="DEG"> <orient unit="DEG">
...@@ -211,6 +212,8 @@ ...@@ -211,6 +212,8 @@
<p_factor> 10 </p_factor> <p_factor> 10 </p_factor>
</thruster> </thruster>
</engine> </engine>
<tank type="FUEL" number="0"> <tank type="FUEL" number="0">
<location unit="M"> <location unit="M">
<x> 0.00 </x> <x> 0.00 </x>
...@@ -222,6 +225,7 @@ ...@@ -222,6 +225,7 @@
<contents unit="KG"> 0.0 </contents> <contents unit="KG"> 0.0 </contents>
</tank> </tank>
</propulsion> </propulsion>
<aerodynamics> <aerodynamics>
<axis name="LIFT"> <axis name="LIFT">
</axis> </axis>
......
...@@ -141,6 +141,49 @@ ...@@ -141,6 +141,49 @@
<node>/velocities/airspeed-kt</node> <node>/velocities/airspeed-kt</node>
<factor>0.514444444444444</factor> <!-- knots to mps --> <factor>0.514444444444444</factor> <!-- knots to mps -->
</chunk> </chunk>
<chunk>
<name>airspeed-indicated-mps</name>
<type>float</type>
<format>%.8f</format>
<node>/instrumentation/indicated-speed-kt</node>
<factor>0.514444444444444</factor> <!-- knots to mps -->
</chunk>
<!-- Magnetometer -->
<chunk>
<name>Magnetic Variation (rad)</name>
<type>float</type>
<format>%.8f</format>
<node>/environment/magnetic-variation-deg</node>
<factor>0.01745329251994329576</factor> <!-- degrees to radians -->
</chunk>
<chunk>
<name>Magnetic Dip (rad)</name>
<type>float</type>
<format>%.8f</format>
<node>/environment/magnetic-dip-deg</node>
<factor>0.01745329251994329576</factor> <!-- degrees to radians -->
</chunk>
<!-- Temperature -->
<chunk>
<name>Temperature (deg C)</name>
<type>float</type>
<format>%.8f</format>
<node>/environment/temperature-degc</node>
<factor>1</factor>
</chunk>
<!-- Pressure -->
<chunk>
<name>Pressure (hPa)</name>
<type>float</type>
<format>%.8f</format>
<node>/environment/pressure-inhg</node>
<factor>33.86389</factor> <!-- inhg to hpa -->
</chunk>
</output> </output>
...@@ -152,22 +195,27 @@ ...@@ -152,22 +195,27 @@
<!-- motors, in range 0.0 to 1.0 --> <!-- motors, in range 0.0 to 1.0 -->
<chunk> <chunk>
<name>throttle0</name> <name>throttle0</name>
<type>double</type> <type>float</type>
<node>/controls/engines/engine[0]/throttle</node> <node>/controls/engines/engine[0]/throttle</node>
</chunk> </chunk>
<chunk> <chunk>
<name>throttle1</name> <name>throttle1</name>
<type>double</type> <type>float</type>
<node>/controls/engines/engine[1]/throttle</node> <node>/controls/engines/engine[1]/throttle</node>
</chunk> </chunk>
<chunk> <chunk>
<name>throttle2</name> <name>throttle2</name>
<type>double</type> <type>float</type>
<node>/controls/engines/engine[2]/throttle</node> <node>/controls/engines/engine[2]/throttle</node>
</chunk>
<chunk>
<name>running</name>
<type>bool</type>
<node>/engines/engine/running</node>
</chunk> </chunk>
<chunk> <chunk>
<name>throttle3</name> <name>throttle3</name>
<type>double</type> <type>float</type>
<node>/controls/engines/engine[3]/throttle</node> <node>/controls/engines/engine[3]/throttle</node>
</chunk> </chunk>
...@@ -176,4 +224,4 @@ ...@@ -176,4 +224,4 @@
</generic> </generic>
</PropertyList> </PropertyList>
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment