Ignore:
Timestamp:
Jan 19, 2017, 3:06:46 PM (4 years ago)
Author:
Sanahuja Guillaume
Message:

m

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/Flair/_uav_state_machine_8h_source.html

    r44 r47  
    166166<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="keyword">namespace </span>meta {</div>
    167167<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;</div>
    168 <div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classflair_1_1meta_1_1_uav_state_machine.html">   66</a></span>&#160;<span class="keyword">class </span><a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a> : <span class="keyword">public</span> <a class="code" href="classflair_1_1core_1_1_thread.html">core::Thread</a> {</div>
    169 <div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="keyword">protected</span>:</div>
    170 <div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;  <span class="keyword">enum class</span> AltitudeMode_t { Manual, Custom };</div>
    171 <div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keyword">const</span> AltitudeMode_t &amp;GetAltitudeMode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> altitudeMode; }</div>
    172 <div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="keywordtype">bool</span> SetAltitudeMode(<span class="keyword">const</span> AltitudeMode_t &amp;altitudeMode);</div>
    173 <div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div>
    174 <div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;  <span class="comment">// uses TrajectoryGenerator1D *altitudeTrajectory to go to desiredAltitude</span></div>
    175 <div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="comment">// available in mode AltitudeMode_t::Manual</span></div>
    176 <div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="comment">// return true if goto is possible</span></div>
    177 <div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="keywordtype">bool</span> GotoAltitude(<span class="keywordtype">float</span> desiredAltitude);</div>
    178 <div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div>
    179 <div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;  <span class="keyword">enum class</span> OrientationMode_t { Manual, Custom };</div>
    180 <div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keyword">const</span> OrientationMode_t &amp;GetOrientationMode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div>
    181 <div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <span class="keywordflow">return</span> orientationMode;</div>
    182 <div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;  }</div>
    183 <div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  <span class="keywordtype">bool</span> SetOrientationMode(<span class="keyword">const</span> OrientationMode_t &amp;orientationMode);</div>
    184 <div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div>
    185 <div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keyword">enum class</span> ThrustMode_t { Default, Custom };</div>
    186 <div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keyword">const</span> ThrustMode_t &amp;GetThrustMode()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> thrustMode; }</div>
    187 <div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keywordtype">bool</span> SetThrustMode(<span class="keyword">const</span> ThrustMode_t &amp;thrustMode);</div>
    188 <div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div>
    189 <div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  <span class="keyword">enum class</span> TorqueMode_t { Default, Custom };</div>
    190 <div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keyword">const</span> TorqueMode_t &amp;GetTorqueMode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> torqueMode; }</div>
    191 <div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keywordtype">bool</span> SetTorqueMode(<span class="keyword">const</span> TorqueMode_t &amp;torqueMode);</div>
    192 <div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div>
    193 <div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;  <span class="keyword">enum class</span> Event_t {</div>
    194 <div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    EnteringFailSafeMode,</div>
    195 <div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    EnteringControlLoop,</div>
    196 <div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    StartLanding,</div>
    197 <div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    FinishLanding,</div>
    198 <div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    Stopped,</div>
    199 <div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    TakingOff,</div>
    200 <div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    EmergencyStop,</div>
    201 <div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    Stabilized, <span class="comment">// as soon as uav is 3cm far from the ground</span></div>
    202 <div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    ZTrajectoryFinished,</div>
    203 <div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;  };</div>
    204 <div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;</div>
    205 <div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;        <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a>(<a class="code" href="classflair_1_1meta_1_1_uav.html">meta::Uav</a>* uav, <a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a>* controller);</div>
    206 <div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        ~<a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a>();</div>
    207 <div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div>
    208 <div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_quaternion.html">core::Quaternion</a> &amp;GetCurrentQuaternion(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    209 <div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div>
    210 <div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_vector3_d.html">core::Vector3D</a> &amp;GetCurrentAngularSpeed(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    211 <div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div>
    212 <div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1meta_1_1_uav.html">meta::Uav</a> *GetUav(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    213 <div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div>
    214 <div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordtype">void</span> Land(<span class="keywordtype">void</span>);</div>
    215 <div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordtype">void</span> EmergencyLand(<span class="keywordtype">void</span>);</div>
    216 <div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordtype">void</span> TakeOff(<span class="keywordtype">void</span>);</div>
    217 <div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;        <span class="keywordtype">void</span> EmergencyStop(<span class="keywordtype">void</span>);</div>
    218 <div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div>
    219 <div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a734a11e3bbedd8dd1726b2c450353da5">SignalEvent</a>(Event_t event);</div>
    220 <div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
    221 <div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    222 <div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetDefaultOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    223 <div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div>
    224 <div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> AltitudeValues(<span class="keywordtype">float</span> &amp;z, <span class="keywordtype">float</span> &amp;dz) <span class="keyword">const</span>; <span class="comment">// in uav coordinate!</span></div>
    225 <div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <span class="keywordtype">void</span> EnterFailSafeMode(<span class="keywordtype">void</span>);</div>
    226 <div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <span class="keywordtype">bool</span> ExitFailSafeMode(<span class="keywordtype">void</span>);</div>
    227 <div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;  <span class="keywordtype">void</span> FailSafeAltitudeValues(<span class="keywordtype">float</span> &amp;z, <span class="keywordtype">float</span> &amp;dz) <span class="keyword">const</span>; <span class="comment">// in uav coordinate!</span></div>
    228 <div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div>
    229 <div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_grid_layout.html">gui::GridLayout</a> *GetButtonsLayout(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    230 <div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraSecurityCheck(<span class="keywordtype">void</span>){};</div>
    231 <div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraCheckJoystick(<span class="keywordtype">void</span>){};</div>
    232 <div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraCheckPushButton(<span class="keywordtype">void</span>){};</div>
    233 <div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;</div>
    234 <div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;  <span class="keywordtype">void</span> GetDefaultReferenceAltitude(<span class="keywordtype">float</span> &amp;refAltitude,</div>
    235 <div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;                                   <span class="keywordtype">float</span> &amp;refVerticalVelocity);</div>
    236 <div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetReferenceAltitude(<span class="keywordtype">float</span> &amp;refAltitude,</div>
    237 <div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;                                    <span class="keywordtype">float</span> &amp;refVerticalVelocity);</div>
    238 <div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <span class="comment">// float GetDefaultThrustOffset(void);</span></div>
    239 <div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetDefaultReferenceOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    240 <div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetReferenceOrientation(<span class="keywordtype">void</span>);</div>
    241 <div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div>
    242 <div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a239d9f75ff1a46752c2b06c37726336a">ComputeCustomTorques</a>(<a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> &amp;torques);</div>
    243 <div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div>
    244 <div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#ac93d0d595a86a014c27375c973f693a8">ComputeDefaultTorques</a>(<a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> &amp;torques);</div>
    245 <div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;</div>
    246 <div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;  <span class="comment">// const core::Euler &amp;GetTorques() const;</span></div>
    247 <div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;</div>
    248 <div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a6af7f575d90ef500717a999ea4c4afef">ComputeCustomThrust</a>(<span class="keywordtype">void</span>);</div>
    249 <div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div>
    250 <div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;  <span class="keywordtype">float</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#ab25472bbf51a7baf97ec5e9cfc148f8b">ComputeDefaultThrust</a>(<span class="keywordtype">void</span>);</div>
    251 <div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div>
    252 <div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;  <span class="comment">// float GetThrust() const;</span></div>
    253 <div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div>
    254 <div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#ab737f2861d5c1901a0f62f54fe2c0855">AddDeviceToControlLawLog</a>(<span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_i_o_device.html">core::IODevice</a> *device);</div>
    255 <div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;</div>
    256 <div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#aa642bfeb1d97dec839088e2256a3699b">AddDataToControlLawLog</a>(<span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1io__data.html">core::io_data</a> *data);</div>
    257 <div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div>
    258 <div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a> *GetJoystick(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
    259 <div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div>
    260 <div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_tab.html">gui::Tab</a> *setupLawTab, *graphLawTab;</div>
    261 <div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div>
    262 <div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="keyword">private</span>:</div>
    263 <div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;  <span class="keyword">enum class</span> AltitudeState_t {</div>
    264 <div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86ac23e2b09ebe6bf4cb5e2a9abe85c0be2">Stopped</a>,      </div>
    265 <div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a85916c5f3400cfa25d988f05b6736a94">TakingOff</a>,    </div>
    266 <div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86afda22026db89cdc5e88b262ad9424b41">Stabilized</a>,   </div>
    267 <div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a0a0480d215decaf46260e3db52e4dc4c">StartLanding</a>, </div>
    268 <div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a0912358d703c9a28d93a2707b86161b2">FinishLanding</a> </div>
    269 <div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;  };</div>
    270 <div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  AltitudeState_t altitudeState;</div>
    271 <div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  <span class="keywordtype">void</span> ProcessAltitudeFiniteStateMachine();</div>
    272 <div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;  <span class="keywordtype">void</span> ComputeReferenceAltitude(<span class="keywordtype">float</span> &amp;refAltitude, <span class="keywordtype">float</span> &amp;refVerticalVelocity);</div>
    273 <div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div>
    274 <div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;  <span class="keywordtype">float</span> groundAltitude; <span class="comment">// effective altitude when the uav leaves the ground</span></div>
    275 <div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;  <span class="keywordtype">float</span> currentAltitude, currentVerticalSpeed;</div>
    276 <div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;</div>
    277 <div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  <span class="keywordtype">bool</span> failSafeMode;</div>
    278 <div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  <span class="keywordtype">void</span> SecurityCheck(<span class="keywordtype">void</span>);</div>
    279 <div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;  <span class="keywordtype">void</span> MandatorySecurityCheck(<span class="keywordtype">void</span>);</div>
    280 <div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;  <span class="keywordtype">void</span> CheckJoystick();</div>
    281 <div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;  <span class="keywordtype">void</span> GenericCheckJoystick();</div>
    282 <div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;  <span class="keywordtype">void</span> CheckPushButton(<span class="keywordtype">void</span>);</div>
    283 <div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;  <span class="keywordtype">void</span> GenericCheckPushButton(<span class="keywordtype">void</span>);</div>
    284 <div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;  <span class="keywordtype">void</span> Run(<span class="keywordtype">void</span>);</div>
    285 <div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;  <span class="keywordtype">void</span> StopMotors(<span class="keywordtype">void</span>);</div>
    286 <div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;  <span class="keywordtype">bool</span> IsValuePossible(<span class="keywordtype">float</span> value,std::string desc);</div>
    287 <div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;</div>
    288 <div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;  <a class="code" href="classflair_1_1meta_1_1_uav.html">meta::Uav</a> *uav;</div>
    289 <div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;  <a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a> *controller;</div>
    290 <div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;</div>
    291 <div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;  <a class="code" href="classflair_1_1core_1_1_quaternion.html">core::Quaternion</a> currentQuaternion;</div>
    292 <div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;  <a class="code" href="classflair_1_1core_1_1_vector3_d.html">core::Vector3D</a> currentAngularSpeed;</div>
    293 <div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div>
    294 <div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *ComputeReferenceOrientation(<span class="keywordtype">void</span>);</div>
    295 <div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;</div>
    296 <div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;  <span class="keywordtype">void</span> ComputeOrientation(<span class="keywordtype">void</span>);</div>
    297 <div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;  <span class="keywordtype">void</span> ComputeAltitude(<span class="keywordtype">void</span>);</div>
    298 <div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div>
    299 <div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  <span class="keywordtype">void</span> ComputeTorques(<span class="keywordtype">void</span>);</div>
    300 <div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  <a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> currentTorques, savedDefaultTorques;</div>
    301 <div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;  <span class="keywordtype">bool</span> needToComputeDefaultTorques;</div>
    302 <div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div>
    303 <div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  <span class="keywordtype">void</span> ComputeThrust(<span class="keywordtype">void</span>);</div>
    304 <div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;  <span class="keywordtype">float</span> currentThrust, savedDefaultThrust;</div>
    305 <div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;  <span class="keywordtype">bool</span> needToComputeDefaultThrust;</div>
    306 <div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;</div>
    307 <div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_push_button.html">gui::PushButton</a> *button_kill, *button_take_off, *button_land,</div>
    308 <div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;      *button_start_log, *button_stop_log;</div>
    309 <div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_grid_layout.html">gui::GridLayout</a> *buttonslayout;</div>
    310 <div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_double_spin_box.html">gui::DoubleSpinBox</a> *desiredTakeoffAltitude, *desiredLandingAltitude;</div>
    311 <div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  AltitudeMode_t altitudeMode;</div>
    312 <div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  OrientationMode_t orientationMode;</div>
    313 <div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  ThrustMode_t thrustMode;</div>
    314 <div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  TorqueMode_t torqueMode;</div>
    315 <div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;  <span class="keywordtype">bool</span> flagBatteryLow;</div>
    316 <div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  <span class="keywordtype">bool</span> flagConnectionLost;</div>
    317 <div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  <span class="keywordtype">bool</span> flagCriticalSensorLost;</div>
    318 <div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  <span class="keywordtype">bool</span> flagZTrajectoryFinished;</div>
    319 <div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  <span class="keywordtype">bool</span> safeToFly;</div>
    320 <div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_nested_sat.html">filter::NestedSat</a> *uRoll, *uPitch;</div>
    321 <div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_pid.html">filter::Pid</a> *uYaw;</div>
    322 <div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_pid_thrust.html">filter::PidThrust</a> *uZ;</div>
    323 <div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;</div>
    324 <div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;  <a class="code" href="classflair_1_1meta_1_1_meta_dual_shock3.html">MetaDualShock3</a> *joy;</div>
    325 <div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_trajectory_generator1_d.html">filter::TrajectoryGenerator1D</a> *altitudeTrajectory;</div>
     168<div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="classflair_1_1meta_1_1_uav_state_machine.html">   67</a></span>&#160;<span class="keyword">class </span><a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a> : <span class="keyword">public</span> <a class="code" href="classflair_1_1core_1_1_thread.html">core::Thread</a> {</div>
     169<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="keyword">protected</span>:</div>
     170<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  <span class="keyword">enum class</span> AltitudeMode_t { Manual, Custom };</div>
     171<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;  <span class="keyword">const</span> AltitudeMode_t &amp;GetAltitudeMode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> altitudeMode; }</div>
     172<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;  <span class="keywordtype">bool</span> SetAltitudeMode(<span class="keyword">const</span> AltitudeMode_t &amp;altitudeMode);</div>
     173<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div>
     174<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  <span class="comment">// uses TrajectoryGenerator1D *altitudeTrajectory to go to desiredAltitude</span></div>
     175<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;  <span class="comment">// available in mode AltitudeMode_t::Manual</span></div>
     176<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;  <span class="comment">// return true if goto is possible</span></div>
     177<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordtype">bool</span> GotoAltitude(<span class="keywordtype">float</span> desiredAltitude);</div>
     178<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div>
     179<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;  <span class="keyword">enum class</span> OrientationMode_t { Manual, Custom };</div>
     180<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;  <span class="keyword">const</span> OrientationMode_t &amp;GetOrientationMode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{</div>
     181<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;    <span class="keywordflow">return</span> orientationMode;</div>
     182<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;  }</div>
     183<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;  <span class="keywordtype">bool</span> SetOrientationMode(<span class="keyword">const</span> OrientationMode_t &amp;orientationMode);</div>
     184<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
     185<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;  <span class="keyword">enum class</span> ThrustMode_t { Default, Custom };</div>
     186<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;  <span class="keyword">const</span> ThrustMode_t &amp;GetThrustMode()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> thrustMode; }</div>
     187<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;  <span class="keywordtype">bool</span> SetThrustMode(<span class="keyword">const</span> ThrustMode_t &amp;thrustMode);</div>
     188<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;</div>
     189<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;  <span class="keyword">enum class</span> TorqueMode_t { Default, Custom };</div>
     190<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;  <span class="keyword">const</span> TorqueMode_t &amp;GetTorqueMode(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> torqueMode; }</div>
     191<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keywordtype">bool</span> SetTorqueMode(<span class="keyword">const</span> TorqueMode_t &amp;torqueMode);</div>
     192<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div>
     193<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;  <span class="keyword">enum class</span> Event_t {</div>
     194<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;    EnteringFailSafeMode,</div>
     195<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    EnteringControlLoop,</div>
     196<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    StartLanding,</div>
     197<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    FinishLanding,</div>
     198<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    Stopped,</div>
     199<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    TakingOff,</div>
     200<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    EmergencyStop,</div>
     201<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    Stabilized, <span class="comment">// as soon as uav is 3cm far from the ground</span></div>
     202<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    ZTrajectoryFinished,</div>
     203<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;  };</div>
     204<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div>
     205<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;        <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a>(<a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a>* controller);</div>
     206<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;        ~<a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a>();</div>
     207<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;</div>
     208<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_quaternion.html">core::Quaternion</a> &amp;GetCurrentQuaternion(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     209<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;</div>
     210<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_vector3_d.html">core::Vector3D</a> &amp;GetCurrentAngularSpeed(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     211<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;</div>
     212<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        <span class="keywordtype">void</span> Land(<span class="keywordtype">void</span>);</div>
     213<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;        <span class="keywordtype">void</span> EmergencyLand(<span class="keywordtype">void</span>);</div>
     214<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;        <span class="keywordtype">void</span> TakeOff(<span class="keywordtype">void</span>);</div>
     215<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;        <span class="keywordtype">void</span> EmergencyStop(<span class="keywordtype">void</span>);</div>
     216<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;</div>
     217<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a734a11e3bbedd8dd1726b2c450353da5">SignalEvent</a>(Event_t event);</div>
     218<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div>
     219<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     220<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetDefaultOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     221<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
     222<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> AltitudeValues(<span class="keywordtype">float</span> &amp;z, <span class="keywordtype">float</span> &amp;dz) <span class="keyword">const</span>; <span class="comment">// in uav coordinate!</span></div>
     223<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="keywordtype">void</span> EnterFailSafeMode(<span class="keywordtype">void</span>);</div>
     224<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;  <span class="keywordtype">bool</span> ExitFailSafeMode(<span class="keywordtype">void</span>);</div>
     225<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;  <span class="keywordtype">void</span> FailSafeAltitudeValues(<span class="keywordtype">float</span> &amp;z, <span class="keywordtype">float</span> &amp;dz) <span class="keyword">const</span>; <span class="comment">// in uav coordinate!</span></div>
     226<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div>
     227<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_grid_layout.html">gui::GridLayout</a> *GetButtonsLayout(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     228<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraSecurityCheck(<span class="keywordtype">void</span>){};</div>
     229<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraCheckJoystick(<span class="keywordtype">void</span>){};</div>
     230<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraCheckPushButton(<span class="keywordtype">void</span>){};</div>
     231<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;</div>
     232<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  <span class="keywordtype">void</span> GetDefaultReferenceAltitude(<span class="keywordtype">float</span> &amp;refAltitude,</div>
     233<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;                                   <span class="keywordtype">float</span> &amp;refVerticalVelocity);</div>
     234<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetReferenceAltitude(<span class="keywordtype">float</span> &amp;refAltitude,</div>
     235<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;                                    <span class="keywordtype">float</span> &amp;refVerticalVelocity);</div>
     236<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;  <span class="comment">// float GetDefaultThrustOffset(void);</span></div>
     237<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetDefaultReferenceOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     238<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;  <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *GetReferenceOrientation(<span class="keywordtype">void</span>);</div>
     239<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;</div>
     240<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a239d9f75ff1a46752c2b06c37726336a">ComputeCustomTorques</a>(<a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> &amp;torques);</div>
     241<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;</div>
     242<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#ac93d0d595a86a014c27375c973f693a8">ComputeDefaultTorques</a>(<a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> &amp;torques);</div>
     243<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div>
     244<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;  <span class="comment">// const core::Euler &amp;GetTorques() const;</span></div>
     245<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;</div>
     246<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;  <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a6af7f575d90ef500717a999ea4c4afef">ComputeCustomThrust</a>(<span class="keywordtype">void</span>);</div>
     247<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;</div>
     248<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;  <span class="keywordtype">float</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#ab25472bbf51a7baf97ec5e9cfc148f8b">ComputeDefaultThrust</a>(<span class="keywordtype">void</span>);</div>
     249<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;</div>
     250<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;  <span class="comment">// float GetThrust() const;</span></div>
     251<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div>
     252<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#ab737f2861d5c1901a0f62f54fe2c0855">AddDeviceToControlLawLog</a>(<span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_i_o_device.html">core::IODevice</a> *device);</div>
     253<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div>
     254<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#aa642bfeb1d97dec839088e2256a3699b">AddDataToControlLawLog</a>(<span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1io__data.html">core::io_data</a> *data);</div>
     255<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div>
     256<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a> *GetJoystick(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div>
     257<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;</div>
     258<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_tab.html">gui::Tab</a> *setupLawTab, *graphLawTab;</div>
     259<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;</div>
     260<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;<span class="keyword">private</span>:</div>
     261<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;  <span class="keyword">enum class</span> AltitudeState_t {</div>
     262<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86ac23e2b09ebe6bf4cb5e2a9abe85c0be2">Stopped</a>,      </div>
     263<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a85916c5f3400cfa25d988f05b6736a94">TakingOff</a>,    </div>
     264<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86afda22026db89cdc5e88b262ad9424b41">Stabilized</a>,   </div>
     265<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a0a0480d215decaf46260e3db52e4dc4c">StartLanding</a>, </div>
     266<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;    <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a0912358d703c9a28d93a2707b86161b2">FinishLanding</a> </div>
     267<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;  };</div>
     268<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;  AltitudeState_t altitudeState;</div>
     269<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  <span class="keywordtype">void</span> ProcessAltitudeFiniteStateMachine();</div>
     270<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;  <span class="keywordtype">void</span> ComputeReferenceAltitude(<span class="keywordtype">float</span> &amp;refAltitude, <span class="keywordtype">float</span> &amp;refVerticalVelocity);</div>
     271<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;</div>
     272<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;  <span class="keywordtype">float</span> groundAltitude; <span class="comment">// effective altitude when the uav leaves the ground</span></div>
     273<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;  <span class="keywordtype">float</span> currentAltitude, currentVerticalSpeed;</div>
     274<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div>
     275<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;  <span class="keywordtype">bool</span> failSafeMode;</div>
     276<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;  <span class="keywordtype">void</span> SecurityCheck(<span class="keywordtype">void</span>);</div>
     277<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  <span class="keywordtype">void</span> MandatorySecurityCheck(<span class="keywordtype">void</span>);</div>
     278<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;  <span class="keywordtype">void</span> CheckJoystick();</div>
     279<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;  <span class="keywordtype">void</span> GenericCheckJoystick();</div>
     280<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;  <span class="keywordtype">void</span> CheckPushButton(<span class="keywordtype">void</span>);</div>
     281<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;  <span class="keywordtype">void</span> GenericCheckPushButton(<span class="keywordtype">void</span>);</div>
     282<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;  <span class="keywordtype">void</span> Run(<span class="keywordtype">void</span>);</div>
     283<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;  <span class="keywordtype">void</span> StopMotors(<span class="keywordtype">void</span>);</div>
     284<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;  <span class="keywordtype">bool</span> IsValuePossible(<span class="keywordtype">float</span> value,std::string desc);</div>
     285<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;</div>
     286<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;  <a class="code" href="classflair_1_1meta_1_1_uav.html">meta::Uav</a> *uav;</div>
     287<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;  <a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a> *controller;</div>
     288<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div>
     289<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;  <a class="code" href="classflair_1_1core_1_1_quaternion.html">core::Quaternion</a> currentQuaternion;</div>
     290<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;  <a class="code" href="classflair_1_1core_1_1_vector3_d.html">core::Vector3D</a> currentAngularSpeed;</div>
     291<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div>
     292<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_ahrs_data.html">core::AhrsData</a> *ComputeReferenceOrientation(<span class="keywordtype">void</span>);</div>
     293<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;</div>
     294<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;  <span class="keywordtype">void</span> ComputeOrientation(<span class="keywordtype">void</span>);</div>
     295<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;  <span class="keywordtype">void</span> ComputeAltitude(<span class="keywordtype">void</span>);</div>
     296<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;</div>
     297<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  <span class="keywordtype">void</span> ComputeTorques(<span class="keywordtype">void</span>);</div>
     298<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;  <a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> currentTorques, savedDefaultTorques;</div>
     299<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;  <span class="keywordtype">bool</span> needToComputeDefaultTorques;</div>
     300<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;</div>
     301<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;  <span class="keywordtype">void</span> ComputeThrust(<span class="keywordtype">void</span>);</div>
     302<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  <span class="keywordtype">float</span> currentThrust, savedDefaultThrust;</div>
     303<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;  <span class="keywordtype">bool</span> needToComputeDefaultThrust;</div>
     304<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;</div>
     305<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_push_button.html">gui::PushButton</a> *button_kill, *button_take_off, *button_land,</div>
     306<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;      *button_start_log, *button_stop_log;</div>
     307<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_grid_layout.html">gui::GridLayout</a> *buttonslayout;</div>
     308<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;  <a class="code" href="classflair_1_1gui_1_1_double_spin_box.html">gui::DoubleSpinBox</a> *desiredTakeoffAltitude, *desiredLandingAltitude;</div>
     309<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;  AltitudeMode_t altitudeMode;</div>
     310<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;  OrientationMode_t orientationMode;</div>
     311<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;  ThrustMode_t thrustMode;</div>
     312<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  TorqueMode_t torqueMode;</div>
     313<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;  <span class="keywordtype">bool</span> flagBatteryLow;</div>
     314<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;  <span class="keywordtype">bool</span> flagConnectionLost;</div>
     315<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;  <span class="keywordtype">bool</span> flagCriticalSensorLost;</div>
     316<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;  <span class="keywordtype">bool</span> flagZTrajectoryFinished;</div>
     317<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  <span class="keywordtype">bool</span> safeToFly;</div>
     318<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_nested_sat.html">filter::NestedSat</a> *uRoll, *uPitch;</div>
     319<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_pid.html">filter::Pid</a> *uYaw;</div>
     320<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_pid_thrust.html">filter::PidThrust</a> *uZ;</div>
     321<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div>
     322<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  <a class="code" href="classflair_1_1meta_1_1_meta_dual_shock3.html">MetaDualShock3</a> *joy;</div>
     323<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;  <a class="code" href="classflair_1_1filter_1_1_trajectory_generator1_d.html">filter::TrajectoryGenerator1D</a> *altitudeTrajectory;</div>
     324<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;};</div>
    326325<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;};</div>
    327326<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;};</div>
    328 <div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;};</div>
    329 <div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;<span class="preprocessor">#endif // UAVSTATEMACHINE_H</span></div>
     327<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;<span class="preprocessor">#endif // UAVSTATEMACHINE_H</span></div>
    330328<div class="ttc" id="classflair_1_1core_1_1io__data_html"><div class="ttname"><a href="classflair_1_1core_1_1io__data.html">flair::core::io_data</a></div><div class="ttdoc">Abstract class for data types. </div><div class="ttdef"><b>Definition:</b> io_data.h:94</div></div>
    331329<div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html_a734a11e3bbedd8dd1726b2c450353da5"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html#a734a11e3bbedd8dd1726b2c450353da5">flair::meta::UavStateMachine::SignalEvent</a></div><div class="ttdeci">virtual void SignalEvent(Event_t event)</div><div class="ttdoc">Used to signal an event. </div></div>
     
    344342<div class="ttc" id="classflair_1_1core_1_1_ahrs_data_html"><div class="ttname"><a href="classflair_1_1core_1_1_ahrs_data.html">flair::core::AhrsData</a></div><div class="ttdoc">Class defining AHRS datas. </div><div class="ttdef"><b>Definition:</b> AhrsData.h:30</div></div>
    345343<div class="ttc" id="_vector3_d_8h_html"><div class="ttname"><a href="_vector3_d_8h.html">Vector3D.h</a></div><div class="ttdoc">Class defining a 3D vector. </div></div>
    346 <div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html">flair::meta::UavStateMachine</a></div><div class="ttdoc">State machine for UAV. </div><div class="ttdef"><b>Definition:</b> UavStateMachine.h:66</div></div>
     344<div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html">flair::meta::UavStateMachine</a></div><div class="ttdoc">State machine for UAV The Thread is created with the FrameworkManager as parent. FrameworkManager mus...</div><div class="ttdef"><b>Definition:</b> UavStateMachine.h:67</div></div>
    347345<div class="ttc" id="classflair_1_1sensor_1_1_target_controller_html"><div class="ttname"><a href="classflair_1_1sensor_1_1_target_controller.html">flair::sensor::TargetController</a></div><div class="ttdoc">Base Class for target side remote controls. </div><div class="ttdef"><b>Definition:</b> TargetController.h:49</div></div>
    348346<div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html_a8074514837d84114b8b4e2a6e1d7da86a85916c5f3400cfa25d988f05b6736a94"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a85916c5f3400cfa25d988f05b6736a94">flair::meta::UavStateMachine::AltitudeState_t::TakingOff</a></div></div>
     
    359357<div class="ttc" id="classflair_1_1core_1_1_thread_html"><div class="ttname"><a href="classflair_1_1core_1_1_thread.html">flair::core::Thread</a></div><div class="ttdoc">Abstract class for a thread. </div><div class="ttdef"><b>Definition:</b> Thread.h:38</div></div>
    360358<div class="ttc" id="classflair_1_1gui_1_1_double_spin_box_html"><div class="ttname"><a href="classflair_1_1gui_1_1_double_spin_box.html">flair::gui::DoubleSpinBox</a></div><div class="ttdoc">Class displaying a QDoubleSpinBox on the ground station. </div><div class="ttdef"><b>Definition:</b> DoubleSpinBox.h:28</div></div>
    361 <div class="ttc" id="classflair_1_1meta_1_1_uav_html"><div class="ttname"><a href="classflair_1_1meta_1_1_uav.html">flair::meta::Uav</a></div><div class="ttdoc">Base class to construct sensors/actuators depending on uav type. </div><div class="ttdef"><b>Definition:</b> Uav.h:47</div></div>
     359<div class="ttc" id="classflair_1_1meta_1_1_uav_html"><div class="ttname"><a href="classflair_1_1meta_1_1_uav.html">flair::meta::Uav</a></div><div class="ttdoc">Base class to construct sensors/actuators depending on uav type. The Object is created with the Frame...</div><div class="ttdef"><b>Definition:</b> Uav.h:45</div></div>
    362360<div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html_aa642bfeb1d97dec839088e2256a3699b"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html#aa642bfeb1d97dec839088e2256a3699b">flair::meta::UavStateMachine::AddDataToControlLawLog</a></div><div class="ttdeci">void AddDataToControlLawLog(const core::io_data *data)</div><div class="ttdoc">Add an io_data to the control law logs. </div></div>
    363361<div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html_ac93d0d595a86a014c27375c973f693a8"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html#ac93d0d595a86a014c27375c973f693a8">flair::meta::UavStateMachine::ComputeDefaultTorques</a></div><div class="ttdeci">void ComputeDefaultTorques(core::Euler &amp;torques)</div><div class="ttdoc">Compute Default Torques. </div></div>
     
    371369  <ul>
    372370    <li class="navelem"><a class="el" href="dir_33c2ee9b1665499374b4225c427cf176.html">igep</a></li><li class="navelem"><a class="el" href="dir_f1fe274389177bd7e17de7949c4ffada.html">flair-src</a></li><li class="navelem"><a class="el" href="dir_3ef62148cf94871b4b6ee5d6e3a989c1.html">lib</a></li><li class="navelem"><a class="el" href="dir_e44722efdb10e7ceda2dbbaecca58ed3.html">FlairMeta</a></li><li class="navelem"><a class="el" href="dir_ed462f49eec2f2c269d321a045b86103.html">src</a></li><li class="navelem"><b>UavStateMachine.h</b></li>
    373     <li class="footer">Generated on Thu Jan 5 2017 11:01:22 for Flair by
     371    <li class="footer">Generated on Tue Jan 17 2017 09:52:30 for Flair by
    374372    <a href="http://www.doxygen.org/index.html">
    375373    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
Note: See TracChangeset for help on using the changeset viewer.