Index: tags/0.2.0/Version
===================================================================
--- tags/0.2.0/Version	(revision 72)
+++ tags/0.2.0/Version	(revision 72)
@@ -0,0 +1,1 @@
+flair-bin 0.2.0
Index: tags/0.2.0/models/city_tile.xml
===================================================================
--- tags/0.2.0/models/city_tile.xml	(revision 72)
+++ tags/0.2.0/models/city_tile.xml	(revision 72)
@@ -0,0 +1,10 @@
+<scene>
+	<params>
+		<archive id="0" path="city_tile.zip" />
+		<mesh id="0" model="Street_environment_V01.obj" >
+			<position x="0" y="0" z="0" />
+			<rotation x="0" y="0" z="0" />
+			<scale x="100" y="100" z="100" />
+		</mesh>
+	</params>
+</scene>
Index: tags/0.2.0/models/indoor_flight_arena.xml
===================================================================
--- tags/0.2.0/models/indoor_flight_arena.xml	(revision 72)
+++ tags/0.2.0/models/indoor_flight_arena.xml	(revision 72)
@@ -0,0 +1,23 @@
+<scene>
+	<params>
+		<archive id="0" path="indoor_flight_arena.zip" />
+		<mesh id="0" model="voliere.bsp" >
+			<position x="0" y="0" z="0" />
+			<rotation x="0" y="0" z="0" />
+			<scale x="10" y="10" z="3" />
+		</mesh>
+		<camera name="fixed camera 1">
+			<position x="-5" y="-5" z="-2.5" />
+			<lookat x="0" y="0" z="0" />
+		</camera>
+		<camera name="fixed camera 2">
+			<position x="-5" y="5" z="-2.5" />
+		</camera>
+		<camera name="fixed camera 3">
+			<position x="5" y="-5" z="-2.5" />
+		</camera>
+		<camera name="fixed camera 4">
+			<position x="5" y="5" z="-2.5" />
+		</camera>
+	</params>
+</scene>
Index: tags/0.2.0/models/indoor_flight_arena_with_line.xml
===================================================================
--- tags/0.2.0/models/indoor_flight_arena_with_line.xml	(revision 72)
+++ tags/0.2.0/models/indoor_flight_arena_with_line.xml	(revision 72)
@@ -0,0 +1,30 @@
+<scene>
+	<params>
+		<archive id="0" path="indoor_flight_arena.zip" />
+		<mesh id="0" model="voliere.bsp" >
+			<position x="0" y="0" z="0" />
+			<rotation x="0" y="0" z="0" />
+			<scale x="10" y="10" z="3" />
+		</mesh>
+		<camera name="fixed camera 1">
+			<position x="-5" y="-5" z="-2.5" />
+			<lookat x="0" y="0" z="0" />
+		</camera>
+		<camera name="fixed camera 2">
+			<position x="-5" y="5" z="-2.5" />
+		</camera>
+		<camera name="fixed camera 3">
+			<position x="5" y="-5" z="-2.5" />
+		</camera>
+		<camera name="fixed camera 4">
+			<position x="5" y="5" z="-2.5" />
+		</camera>
+	</params>
+	<objects>
+		<mesh id="0" model="suivideligne.obj" >
+			<position x="0" y="0" z="0" />
+			<rotation x="-1.57" y="0" z="0" />
+			<scale x="0.07" y="0.07" z="0.07" />
+		</mesh>
+	</objects>
+</scene>
Index: tags/0.2.0/models/scene.dtd
===================================================================
--- tags/0.2.0/models/scene.dtd	(revision 72)
+++ tags/0.2.0/models/scene.dtd	(revision 72)
@@ -0,0 +1,48 @@
+<!ELEMENT scene (params, objects)>
+<!ELEMENT params (archive+, mesh)>
+<!ELEMENT archive EMPTY>
+<!ELEMENT objects (mesh+)>
+<!ELEMENT mesh (position, rotation, scale)>
+<!ELEMENT position EMPTY>
+<!ELEMENT rotation EMPTY>
+<!ELEMENT scale EMPTY>
+<!ELEMENT color EMPTY>
+
+<!ATTLIST scene title CDATA "Untitled">
+<!ATTLIST archive path CDATA #REQUIRED>
+<!ATTLIST archive id CDATA #REQUIRED>
+<!ATTLIST mesh model CDATA #REQUIRED>
+<!ATTLIST mesh id CDATA #REQUIRED>
+<!ATTLIST position x CDATA "0">
+<!ATTLIST position y CDATA "0">
+<!ATTLIST position z CDATA "0">
+<!ATTLIST rotation x CDATA "0">
+<!ATTLIST rotation y CDATA "0">
+<!ATTLIST rotation z CDATA "0">
+<!ATTLIST scale x CDATA "1">
+<!ATTLIST scale y CDATA "1">
+<!ATTLIST scale z CDATA "1">
+<!ATTLIST color r CDATA "0"
+                g CDATA "0"
+                b CDATA "0"
+                a CDATA "255"
+>
+<!ELEMENT cylinder (position, rotation, scale,color?)>
+<!ELEMENT eight (position, rotation, scale)>
+<!ATTLIST cylinder radius CDATA #REQUIRED>
+<!ATTLIST cylinder length CDATA #REQUIRED>
+<!ATTLIST cylinder tesselation CDATA "160">
+<!ATTLIST eight width CDATA #REQUIRED>
+<!ATTLIST eight length CDATA #REQUIRED>
+<!ATTLIST eight height CDATA #REQUIRED>
+<!ELEMENT camera (position,lookat)>
+<!ATTLIST camera name CDATA #REQUIRED>
+<!ATTLIST lookat x CDATA "0">
+<!ATTLIST lookat y CDATA "0">
+<!ATTLIST lookat z CDATA "0">
+
+
+
+
+
+
Index: tags/0.2.0/models/suivideligne.mtl
===================================================================
--- tags/0.2.0/models/suivideligne.mtl	(revision 72)
+++ tags/0.2.0/models/suivideligne.mtl	(revision 72)
@@ -0,0 +1,37 @@
+# WaveFront *.mtl file (generated by Autodesk ATF)
+
+newmtl 191,191,191
+Ka 0.749020 0.749020 0.749020
+Kd 0.749020 0.749020 0.749020
+Ks 0.000000 0.000000 0.000000
+Ns 300.000000
+d 1.000000
+
+newmtl 196,194,204
+Ka 0.768627 0.760784 0.800000
+Kd 0.768627 0.760784 0.800000
+Ks 0.768627 0.760784 0.800000
+Ns 1000.000000
+d 1.000000
+
+newmtl 173,173,173
+Ka 0.678431 0.678431 0.678431
+Kd 0.678431 0.678431 0.678431
+Ks 0.678431 0.678431 0.678431
+Ns 1000.000000
+d 1.000000
+
+newmtl 190,188,186
+Ka 0.745098 0.737255 0.729412
+Kd 0.745098 0.737255 0.729412
+Ks 0.745098 0.737255 0.729412
+Ns 1000.000000
+d 1.000000
+
+newmtl 199,143,28
+Ka 0.780392 0.560784 0.109804
+Kd 0.780392 0.560784 0.109804
+Ks 0.780392 0.560784 0.109804
+Ns 1000.000000
+d 1.000000
+
Index: tags/0.2.0/tools/scripts/dualshock3.sh
===================================================================
--- tags/0.2.0/tools/scripts/dualshock3.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/dualshock3.sh	(revision 72)
@@ -0,0 +1,20 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+#on kernel >=4.13, ds3 is seen as a mouse
+/usr/bin/xinput set-prop 'Sony PLAYSTATION(R)3 Controller' 'Device Enabled' 0
+
+#This script is the only one that calls itself with sudo.
+#As a consequence, only one exception is needed in sudoers (the following 2 lines)
+#  Defaults!/opt/flair/flair-bin/tools/scripts/dualshock3.sh setenv
+#  uav ALL=(root) /opt/flair/flair-bin/tools/scripts/dualshock3.sh
+
+#we must run as root
+if [ $EUID -ne 0 ]; then
+  exec sudo -E $0 $*
+fi
+
+. ${FLAIR_ROOT}/flair-bin/tools/scripts/ubuntu_cgroup_hack.sh
+
+export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
+${FLAIR_ROOT}/flair-bin/tools/$ARCH_DIR/unix/dualshock3 $*
Index: tags/0.2.0/tools/scripts/dualshock3.xml
===================================================================
--- tags/0.2.0/tools/scripts/dualshock3.xml	(revision 72)
+++ tags/0.2.0/tools/scripts/dualshock3.xml	(revision 72)
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<root name="Manager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="dualshock3">
+      <TabWidget name="dualshock3">
+        <Tab name="Settings">
+          <GroupBox name="DualShock3">
+            <SpinBox name="dead zone:" value="8" />
+            <Label name="battery charge level" />
+            <CheckBox name="enabled" value="1" />
+          </GroupBox>
+        </Tab>
+        <Tab name="Measures">
+          <DataPlot1D name="left stick x-axis" period="100"
+          enabled="1" />
+          <DataPlot1D name="left stick y-axis" period="100"
+          enabled="1" />
+          <DataPlot1D name="right stick x-axis" period="100"
+          enabled="1" />
+          <DataPlot1D name="right stick y-axis" period="100"
+          enabled="1" />
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <TabWidget name="App_TabWidget">
+    <Tab name="dualshock3">
+      <PushButton name="save config on target" value="1" />
+    </Tab>
+  </TabWidget>
+</root>
Index: tags/0.2.0/tools/scripts/dualshock3_bt.sh
===================================================================
--- tags/0.2.0/tools/scripts/dualshock3_bt.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/dualshock3_bt.sh	(revision 72)
@@ -0,0 +1,11 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+# $1 is the drone ip
+if [ "$#" -ne 1 ] ; then
+  echo "Usage: $0 drone_ip_address"
+  exit 1
+fi
+
+${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.sh -a ${1}:20000 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.xml
+
Index: tags/0.2.0/tools/scripts/dualshock3_local_bt.sh
===================================================================
--- tags/0.2.0/tools/scripts/dualshock3_local_bt.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/dualshock3_local_bt.sh	(revision 72)
@@ -0,0 +1,2 @@
+#! /bin/bash
+${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3_bt.sh 127.0.0.1
Index: tags/0.2.0/tools/scripts/dualshock3_local_usb.sh
===================================================================
--- tags/0.2.0/tools/scripts/dualshock3_local_usb.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/dualshock3_local_usb.sh	(revision 72)
@@ -0,0 +1,2 @@
+#! /bin/bash
+${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3_usb.sh 127.0.0.1
Index: tags/0.2.0/tools/scripts/dualshock3_usb.sh
===================================================================
--- tags/0.2.0/tools/scripts/dualshock3_usb.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/dualshock3_usb.sh	(revision 72)
@@ -0,0 +1,11 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+# $1 is the drone ip
+if [ "$#" -ne 1 ] ; then
+  echo "Usage: $0 drone_ip_address"
+  exit 1
+fi
+
+$FLAIR_ROOT/flair-bin/tools/scripts/dualshock3.sh -a ${1}:20000 -c usb -t 100 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/dualshock3.xml
+
Index: tags/0.2.0/tools/scripts/launch_flairgcs.sh
===================================================================
--- tags/0.2.0/tools/scripts/launch_flairgcs.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/launch_flairgcs.sh	(revision 72)
@@ -0,0 +1,27 @@
+#! /bin/sh
+ARCH_DIR=$(uname -m)
+
+#defaults options values
+PORT=9000
+NAME="FlairGCS"
+
+usage() {
+  USAGE="usage: $0 [-n name] [-p port] [-?]|[-h]"
+  echo $USAGE;
+  exit 1
+}
+
+while getopts h?n:p: OPT; do
+  case $OPT in
+  n)      NAME=$OPTARG;;
+  p)      PORT=$OPTARG;;
+  h|\?)     usage;;
+  esac
+done
+shift `expr $OPTIND - 1`
+
+#bail out in case unknown options remain
+[ "$1" = "--" ] && usage 
+
+export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
+${FLAIR_ROOT}/flair-bin/tools/${ARCH_DIR}/unix/flairgcs -n $NAME -p $PORT
Index: tags/0.2.0/tools/scripts/mavlink.xml
===================================================================
--- tags/0.2.0/tools/scripts/mavlink.xml	(revision 72)
+++ tags/0.2.0/tools/scripts/mavlink.xml	(revision 72)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<root name="Manager">
+  <TabWidget name="Main_TabWidget">
+    <Tab name="GuiGcs">
+      <TabWidget name="GuiGcs">
+        <Tab name="Settings">
+          <GroupBox name="Controls">
+            <PushButton name="Start mission" value="0"/>
+            <PushButton name="Stop mission" value="0"/>
+            <PushButton name="Pause mission" value="0"/>
+          </GroupBox>
+          <GroupBox name="Add mission command">
+            <ComboBox name="Select command" value="0"/>
+            <DoubleSpinBox name="Param1" value="0"/>
+            <DoubleSpinBox name="Latitude" value="1.5"/>
+            <DoubleSpinBox name="Param2" value="0"/>
+            <DoubleSpinBox name="Longitude" value="-1.5"/>
+            <DoubleSpinBox name="Param3" value="0"/>
+            <DoubleSpinBox name="Altitude" value="2"/>
+            <PushButton name="Add mission cmd" value="1"/>
+            <PushButton name="Del mission cmd" value="1"/>
+            <PushButton name="Send mission" value="0"/>
+          </GroupBox>
+          <GroupBox name="Show mission items">
+            <ListWidget name="Mission cmd list" value="1" item0="TAKEOFF|0|0|0|1.5|2.0|3.0" item1="WAYPOINT|0|0|0|2.0|2.0|3.0"/>
+          </GroupBox>
+        </Tab>
+      </TabWidget>
+    </Tab>
+  </TabWidget>
+  <TabWidget name="App_TabWidget">
+    <Tab name="MavPlanner">
+      <PushButton name="save config on target" value="1"/>
+    </Tab>
+  </TabWidget>
+<PushButton name="save config on target (MavPlanner)" value="1"/></root>
Index: tags/0.2.0/tools/scripts/mavplanner_flair_launch.sh
===================================================================
--- tags/0.2.0/tools/scripts/mavplanner_flair_launch.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/mavplanner_flair_launch.sh	(revision 72)
@@ -0,0 +1,12 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+. ${FLAIR_ROOT}/flair-bin/tools/scripts/ubuntu_cgroup_hack.sh
+
+#we must run as root
+if [ $EUID -ne 0 ]; then
+  exec sudo -E $0 $*
+fi
+
+export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
+${FLAIR_ROOT}/flair-bin/tools/$ARCH_DIR/unix/MavPlanner -x ${FLAIR_ROOT}/flair-bin/tools/scripts/mavlink.xml -m "gcs" -a 127.0.0.1 -p 9000 --outputPort 5555 --outputAddress 127.0.0.1
Index: tags/0.2.0/tools/scripts/mavplanner_forward_launch.sh
===================================================================
--- tags/0.2.0/tools/scripts/mavplanner_forward_launch.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/mavplanner_forward_launch.sh	(revision 72)
@@ -0,0 +1,12 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+. ${FLAIR_ROOT}/flair-bin/tools/scripts/ubuntu_cgroup_hack.sh
+
+#we must run as root
+if [ $EUID -ne 0 ]; then
+  exec sudo -E $0 $*
+fi
+
+export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
+${FLAIR_ROOT}/flair-bin/tools/$ARCH_DIR/unix/MavPlanner --inputAddress 127.0.0.1 --inputPort 5036 -x ${FLAIR_ROOT}/flair-bin/tools/scripts/mavlink.xml -m "forward" --outputAddress 127.0.0.1 --outputPort 5037 -a 127.0.0.1 -p 9000
Index: tags/0.2.0/tools/scripts/mavplanner_gcs_launch.sh
===================================================================
--- tags/0.2.0/tools/scripts/mavplanner_gcs_launch.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/mavplanner_gcs_launch.sh	(revision 72)
@@ -0,0 +1,12 @@
+#! /bin/bash
+ARCH_DIR=$(uname -m)
+
+. ${FLAIR_ROOT}/flair-bin/tools/scripts/ubuntu_cgroup_hack.sh
+
+#we must run as root
+if [ $EUID -ne 0 ]; then
+  exec sudo -E $0 $*
+fi
+
+export LD_LIBRARY_PATH="${OECORE_HOST_SYSROOT}/usr/lib:${OECORE_HOST_SYSROOT}/lib"
+${FLAIR_ROOT}/flair-bin/tools/$ARCH_DIR/unix/MavPlanner -x ${FLAIR_ROOT}/flair-bin/tools/scripts/mavlink.xml -m "gcs" --outputAddress 127.0.0.1 --outputPort 5036 -a 127.0.0.1 -p 9000
Index: tags/0.2.0/tools/scripts/ubuntu_cgroup_hack.sh
===================================================================
--- tags/0.2.0/tools/scripts/ubuntu_cgroup_hack.sh	(revision 72)
+++ tags/0.2.0/tools/scripts/ubuntu_cgroup_hack.sh	(revision 72)
@@ -0,0 +1,16 @@
+if [ -f /etc/lsb-release ]; then
+  . /etc/lsb-release
+fi
+
+if [ _$DISTRIB_ID == _Ubuntu ]; then
+  #we must run as root
+  if [ $EUID -ne 0 ]; then
+    exec sudo -E $0 $*
+  fi
+
+  #we must run in root cgroup to escape possible restrictions on scheduling
+  if [ -d /sys/fs/cgroup/cpu ]; then
+    echo $$ > /sys/fs/cgroup/cpu/tasks
+  fi
+fi
+
