Changeset 25 in flair-dev for trunk/doc/Flair/_uav_state_machine_8h_source.html
- Timestamp:
- Jun 23, 2016, 10:18:10 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/Flair/_uav_state_machine_8h_source.html
r23 r25 203 203 <div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  };</div> 204 204 <div class="line"><a name="l00102"></a><span class="lineno"> 102</span> </div> 205 <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <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, uint16_t ds3Port = 20000);</div>206 <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  ~<a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a>();</div>205 <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <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>  ~<a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html">UavStateMachine</a>();</div> 207 207 <div class="line"><a name="l00105"></a><span class="lineno"> 105</span> </div> 208 208 <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <span class="keyword">const</span> <a class="code" href="classflair_1_1core_1_1_quaternion.html">core::Quaternion</a> &GetCurrentQuaternion(<span class="keywordtype">void</span>) <span class="keyword">const</span>;</div> … … 212 212 <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <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 213 <div class="line"><a name="l00111"></a><span class="lineno"> 111</span> </div> 214 <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <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>  <span class="keywordtype">void</span> TakeOff(<span class="keywordtype">void</span>);</div>216 <div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordtype">void</span> EmergencyStop(<span class="keywordtype">void</span>);</div>217 <div class="line"><a name="l0011 6"></a><span class="lineno"> 116</span> </div>218 <div class="line"><a name="l0011 9"></a><span class="lineno"> 119</span>  <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>219 <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  </div>220 <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <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>221 <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <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>222 <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  </div>223 <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> AltitudeValues(<span class="keywordtype">float</span> &z, <span class="keywordtype">float</span> &dz) <span class="keyword">const</span>; <span class="comment">// in uav coordinate!</span></div>224 <div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keyword type">void</span> EnterFailSafeMode(<span class="keywordtype">void</span>);</div>225 <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="keywordtype"> bool</span> ExitFailSafeMode(<span class="keywordtype">void</span>);</div>226 <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keywordtype"> void</span> FailSafeAltitudeValues(<span class="keywordtype">float</span> &z, <span class="keywordtype">float</span> &dz) <span class="keyword">const</span>; <span class="comment">// in uav coordinate!</span></div>227 <div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  </div>228 <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <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>229 <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  < span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraSecurityCheck(<span class="keywordtype">void</span>){};</div>230 <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> Extra CheckJoystick(<span class="keywordtype">void</span>){};</div>231 <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> ExtraCheck PushButton(<span class="keywordtype">void</span>){};</div>232 <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  </div>233 <div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordtype">void</span> GetDefaultReferenceAltitude(<span class="keywordtype">float</span> &refAltitude,</div>234 <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordtype">float</span> &refVerticalVelocity);</div>235 <div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetReferenceAltitude(<span class="keywordtype">float</span> &refAltitude,</div>236 <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordtype">float</span> &refVerticalVelocity);</div>237 <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="comment">// float GetDefaultThrustOffset(void);</span></div>238 <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <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>239 <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <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>240 <div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  </div>241 <div class="line"><a name="l001 52"></a><span class="lineno"> 152</span>  <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> &torques);</div>242 <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  </div>243 <div class="line"><a name="l001 64"></a><span class="lineno"> 164</span>  <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> &torques);</div>244 <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  </div>245 <div class="line"><a name="l001 71"></a><span class="lineno"> 171</span>  <span class="comment">// const core::Euler &GetTorques() const;</span></div>246 <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  </div>247 <div class="line"><a name="l001 83"></a><span class="lineno"> 183</span>  <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>248 <div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  </div>249 <div class="line"><a name="l001 95"></a><span class="lineno"> 195</span>  <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>250 <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  </div>251 <div class="line"><a name="l00 202"></a><span class="lineno"> 202</span>  <span class="comment">// float GetThrust() const;</span></div>252 <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  </div>253 <div class="line"><a name="l002 14"></a><span class="lineno"> 214</span>  <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>254 <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  </div>255 <div class="line"><a name="l002 26"></a><span class="lineno"> 226</span>  <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>256 <div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  </div>257 <div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <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>258 <div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  </div>259 <div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <a class="code" href="classflair_1_1gui_1_1_tab.html">gui::Tab</a> *setupLawTab, *graphLawTab;</div>260 <div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  </div>261 <div class="line"><a name="l00232"></a><span class="lineno"> 232</span> < span class="keyword">private</span>:</div>262 <div class="line"><a name="l0023 7"></a><span class="lineno"> 237</span>  <span class="keyword">enum class</span> AltitudeState_t {</div>263 <div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86ac23e2b09ebe6bf4cb5e2a9abe85c0be2">Stopped</a>,</div>264 <div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a 85916c5f3400cfa25d988f05b6736a94">TakingOff</a>,</div>265 <div class="line"><a name="l0024 1"></a><span class="lineno"> 241</span>  <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86afda22026db89cdc5e88b262ad9424b41">Stabilized</a>,</div>266 <div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a 0a0480d215decaf46260e3db52e4dc4c">StartLanding</a>,</div>267 <div class="line"><a name="l0024 4"></a><span class="lineno"> 244</span>  <a class="code" href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86a0912358d703c9a28d93a2707b86161b2">FinishLanding</a></div>268 <div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  };</div>269 <div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  AltitudeState_t altitudeState;</div>270 <div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  <span class="keywordtype">void</span> ProcessAltitudeFiniteStateMachine();</div>271 <div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordtype">void</span> ComputeReferenceAltitude(<span class="keywordtype">float</span> &refAltitude, <span class="keywordtype">float</span> &refVerticalVelocity);</div>272 <div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  </div>273 <div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keywordtype">float</span> groundAltitude; <span class="comment">// effective altitude when the uav leaves the ground</span></div>274 <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <span class="keywordtype">float</span> currentAltitude, currentVerticalSpeed;</div>275 <div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  </div>276 <div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordtype">bool</span> failSafeMode;</div>277 <div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordtype"> void</span> SecurityCheck(<span class="keywordtype">void</span>);</div>278 <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keywordtype">void</span> MandatorySecurityCheck(<span class="keywordtype">void</span>);</div>279 <div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordtype">void</span> CheckJoystick();</div>280 <div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordtype">void</span> GenericCheckJoystick();</div>281 <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keywordtype">void</span> CheckPushButton(<span class="keywordtype">void</span>);</div>282 <div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordtype">void</span> GenericCheckPushButton(<span class="keywordtype">void</span>);</div>283 <div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  <span class="keywordtype">void</span> Run(<span class="keywordtype">void</span>);</div>284 <div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keywordtype">void</span> StopMotors(<span class="keywordtype">void</span>);</div>285 <div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  </div>286 <div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <a class="code" href="classflair_1_1meta_1_1_uav.html">meta::Uav</a> *uav;</div>287 <div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  </div>288 <div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <a class="code" href="classflair_1_1 core_1_1_quaternion.html">core::Quaternion</a> currentQuaternion;</div>289 <div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <a class="code" href="classflair_1_1core_1_1_vector3_d.html">core::Vector3D</a> currentAngularSpeed;</div>290 <div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  </div>291 <div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  < 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>214 <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <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>  <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>  <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>  <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> </div> 219 <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <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> </div> 221 <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <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>  <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> </div> 224 <div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> AltitudeValues(<span class="keywordtype">float</span> &z, <span class="keywordtype">float</span> &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>  <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>  <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>  <span class="keywordtype">void</span> FailSafeAltitudeValues(<span class="keywordtype">float</span> &z, <span class="keywordtype">float</span> &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> </div> 229 <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <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>  <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>  <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>  <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> </div> 234 <div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <span class="keywordtype">void</span> GetDefaultReferenceAltitude(<span class="keywordtype">float</span> &refAltitude,</div> 235 <div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="keywordtype">float</span> &refVerticalVelocity);</div> 236 <div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keyword">virtual</span> <span class="keywordtype">void</span> GetReferenceAltitude(<span class="keywordtype">float</span> &refAltitude,</div> 237 <div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordtype">float</span> &refVerticalVelocity);</div> 238 <div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  <span class="comment">// float GetDefaultThrustOffset(void);</span></div> 239 <div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <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>  <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> </div> 242 <div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <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> &torques);</div> 243 <div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div> 244 <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <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> &torques);</div> 245 <div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div> 246 <div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="comment">// const core::Euler &GetTorques() const;</span></div> 247 <div class="line"><a name="l00173"></a><span class="lineno"> 173</span> </div> 248 <div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <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> </div> 250 <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  <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> </div> 252 <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">// float GetThrust() const;</span></div> 253 <div class="line"><a name="l00204"></a><span class="lineno"> 204</span> </div> 254 <div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <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> </div> 256 <div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <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> </div> 258 <div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  <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> </div> 260 <div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <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> </div> 262 <div class="line"><a name="l00233"></a><span class="lineno"> 233</span> <span class="keyword">private</span>:</div> 263 <div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <span class="keyword">enum class</span> AltitudeState_t {</div> 264 <div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <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>  <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>  <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>  <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>  <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>  };</div> 270 <div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  AltitudeState_t altitudeState;</div> 271 <div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  <span class="keywordtype">void</span> ProcessAltitudeFiniteStateMachine();</div> 272 <div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  <span class="keywordtype">void</span> ComputeReferenceAltitude(<span class="keywordtype">float</span> &refAltitude, <span class="keywordtype">float</span> &refVerticalVelocity);</div> 273 <div class="line"><a name="l00250"></a><span class="lineno"> 250</span> </div> 274 <div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <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>  <span class="keywordtype">float</span> currentAltitude, currentVerticalSpeed;</div> 276 <div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div> 277 <div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordtype">bool</span> failSafeMode;</div> 278 <div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <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>  <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>  <span class="keywordtype">void</span> CheckJoystick();</div> 281 <div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keywordtype">void</span> GenericCheckJoystick();</div> 282 <div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <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>  <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>  <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>  <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> </div> 287 <div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classflair_1_1meta_1_1_uav.html">meta::Uav</a> *uav;</div> 288 <div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <a class="code" href="classflair_1_1sensor_1_1_target_controller.html">sensor::TargetController</a> *controller;</div> 289 <div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div> 290 <div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <a class="code" href="classflair_1_1core_1_1_quaternion.html">core::Quaternion</a> currentQuaternion;</div> 291 <div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <a class="code" href="classflair_1_1core_1_1_vector3_d.html">core::Vector3D</a> currentAngularSpeed;</div> 292 292 <div class="line"><a name="l00269"></a><span class="lineno"> 269</span> </div> 293 <div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keywordtype">void</span> ComputeOrientation(<span class="keywordtype">void</span>);</div> 294 <div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keywordtype">void</span> ComputeAltitude(<span class="keywordtype">void</span>);</div> 295 <div class="line"><a name="l00272"></a><span class="lineno"> 272</span> </div> 296 <div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="keywordtype">void</span> ComputeTorques(<span class="keywordtype">void</span>);</div> 297 <div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> currentTorques, savedDefaultTorques;</div> 298 <div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordtype">bool</span> needToComputeDefaultTorques;</div> 299 <div class="line"><a name="l00276"></a><span class="lineno"> 276</span> </div> 300 <div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordtype">void</span> ComputeThrust(<span class="keywordtype">void</span>);</div> 301 <div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  <span class="keywordtype">float</span> currentThrust, savedDefaultThrust;</div> 302 <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordtype">bool</span> needToComputeDefaultThrust;</div> 303 <div class="line"><a name="l00280"></a><span class="lineno"> 280</span> </div> 304 <div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <a class="code" href="classflair_1_1gui_1_1_push_button.html">gui::PushButton</a> *button_kill, *button_take_off, *button_land,</div> 305 <div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  *button_start_log, *button_stop_log;</div> 306 <div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <a class="code" href="classflair_1_1gui_1_1_grid_layout.html">gui::GridLayout</a> *buttonslayout;</div> 307 <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <a class="code" href="classflair_1_1gui_1_1_double_spin_box.html">gui::DoubleSpinBox</a> *desiredTakeoffAltitude, *desiredLandingAltitude;</div> 308 <div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  AltitudeMode_t altitudeMode;</div> 309 <div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  OrientationMode_t orientationMode;</div> 310 <div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  ThrustMode_t thrustMode;</div> 311 <div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  TorqueMode_t torqueMode;</div> 312 <div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  <span class="keywordtype">bool</span> flagBatteryLow;</div> 313 <div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  <span class="keywordtype">bool</span> flagConnectionLost;</div> 314 <div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordtype">bool</span> flagZTrajectoryFinished;</div> 315 <div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <a class="code" href="classflair_1_1filter_1_1_nested_sat.html">filter::NestedSat</a> *uRoll, *uPitch;</div> 316 <div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <a class="code" href="classflair_1_1filter_1_1_pid.html">filter::Pid</a> *uYaw;</div> 317 <div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <a class="code" href="classflair_1_1filter_1_1_pid_thrust.html">filter::PidThrust</a> *uZ;</div> 318 <div class="line"><a name="l00295"></a><span class="lineno"> 295</span> </div> 319 <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <a class="code" href="classflair_1_1meta_1_1_meta_dual_shock3.html">MetaDualShock3</a> *joy;</div> 320 <div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <a class="code" href="classflair_1_1filter_1_1_trajectory_generator1_d.html">filter::TrajectoryGenerator1D</a> *altitudeTrajectory;</div> 321 <div class="line"><a name="l00298"></a><span class="lineno"> 298</span> };</div> 322 <div class="line"><a name="l00299"></a><span class="lineno"> 299</span> };</div> 323 <div class="line"><a name="l00300"></a><span class="lineno"> 300</span> };</div> 324 <div class="line"><a name="l00301"></a><span class="lineno"> 301</span> <span class="preprocessor">#endif // UAVSTATEMACHINE_H</span></div> 293 <div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <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> 294 <div class="line"><a name="l00271"></a><span class="lineno"> 271</span> </div> 295 <div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keywordtype">void</span> ComputeOrientation(<span class="keywordtype">void</span>);</div> 296 <div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <span class="keywordtype">void</span> ComputeAltitude(<span class="keywordtype">void</span>);</div> 297 <div class="line"><a name="l00274"></a><span class="lineno"> 274</span> </div> 298 <div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keywordtype">void</span> ComputeTorques(<span class="keywordtype">void</span>);</div> 299 <div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <a class="code" href="classflair_1_1core_1_1_euler.html">core::Euler</a> currentTorques, savedDefaultTorques;</div> 300 <div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordtype">bool</span> needToComputeDefaultTorques;</div> 301 <div class="line"><a name="l00278"></a><span class="lineno"> 278</span> </div> 302 <div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <span class="keywordtype">void</span> ComputeThrust(<span class="keywordtype">void</span>);</div> 303 <div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  <span class="keywordtype">float</span> currentThrust, savedDefaultThrust;</div> 304 <div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordtype">bool</span> needToComputeDefaultThrust;</div> 305 <div class="line"><a name="l00282"></a><span class="lineno"> 282</span> </div> 306 <div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <a class="code" href="classflair_1_1gui_1_1_push_button.html">gui::PushButton</a> *button_kill, *button_take_off, *button_land,</div> 307 <div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  *button_start_log, *button_stop_log;</div> 308 <div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <a class="code" href="classflair_1_1gui_1_1_grid_layout.html">gui::GridLayout</a> *buttonslayout;</div> 309 <div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <a class="code" href="classflair_1_1gui_1_1_double_spin_box.html">gui::DoubleSpinBox</a> *desiredTakeoffAltitude, *desiredLandingAltitude;</div> 310 <div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  AltitudeMode_t altitudeMode;</div> 311 <div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  OrientationMode_t orientationMode;</div> 312 <div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  ThrustMode_t thrustMode;</div> 313 <div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  TorqueMode_t torqueMode;</div> 314 <div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordtype">bool</span> flagBatteryLow;</div> 315 <div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  <span class="keywordtype">bool</span> flagConnectionLost;</div> 316 <div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordtype">bool</span> flagCriticalSensorLost;</div> 317 <div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  <span class="keywordtype">bool</span> flagZTrajectoryFinished;</div> 318 <div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordtype">bool</span> safeToFly;</div> 319 <div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  <a class="code" href="classflair_1_1filter_1_1_nested_sat.html">filter::NestedSat</a> *uRoll, *uPitch;</div> 320 <div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  <a class="code" href="classflair_1_1filter_1_1_pid.html">filter::Pid</a> *uYaw;</div> 321 <div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  <a class="code" href="classflair_1_1filter_1_1_pid_thrust.html">filter::PidThrust</a> *uZ;</div> 322 <div class="line"><a name="l00299"></a><span class="lineno"> 299</span> </div> 323 <div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <a class="code" href="classflair_1_1meta_1_1_meta_dual_shock3.html">MetaDualShock3</a> *joy;</div> 324 <div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <a class="code" href="classflair_1_1filter_1_1_trajectory_generator1_d.html">filter::TrajectoryGenerator1D</a> *altitudeTrajectory;</div> 325 <div class="line"><a name="l00302"></a><span class="lineno"> 302</span> };</div> 326 <div class="line"><a name="l00303"></a><span class="lineno"> 303</span> };</div> 327 <div class="line"><a name="l00304"></a><span class="lineno"> 304</span> };</div> 328 <div class="line"><a name="l00305"></a><span class="lineno"> 305</span> <span class="preprocessor">#endif // UAVSTATEMACHINE_H</span></div> 325 329 <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:77</div></div> 326 330 <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> 327 <div class="ttc" id="classflair_1_1meta_1_1_meta_dual_shock3_html"><div class="ttname"><a href="classflair_1_1meta_1_1_meta_dual_shock3.html">flair::meta::MetaDualShock3</a></div><div class="ttdoc">Classe intégrant la manette MetaDualShock3. </div><div class="ttdef"><b>Definition:</b> MetaDualShock3.h:3 7</div></div>331 <div class="ttc" id="classflair_1_1meta_1_1_meta_dual_shock3_html"><div class="ttname"><a href="classflair_1_1meta_1_1_meta_dual_shock3.html">flair::meta::MetaDualShock3</a></div><div class="ttdoc">Classe intégrant la manette MetaDualShock3. </div><div class="ttdef"><b>Definition:</b> MetaDualShock3.h:38</div></div> 328 332 <div class="ttc" id="classflair_1_1meta_1_1_uav_state_machine_html_a8074514837d84114b8b4e2a6e1d7da86afda22026db89cdc5e88b262ad9424b41"><div class="ttname"><a href="classflair_1_1meta_1_1_uav_state_machine.html#a8074514837d84114b8b4e2a6e1d7da86afda22026db89cdc5e88b262ad9424b41">flair::meta::UavStateMachine::AltitudeState_t::Stabilized</a></div></div> 329 333 <div class="ttc" id="classflair_1_1core_1_1_i_o_device_html"><div class="ttname"><a href="classflair_1_1core_1_1_i_o_device.html">flair::core::IODevice</a></div><div class="ttdoc">Abstract class for input/ouput system. </div><div class="ttdef"><b>Definition:</b> IODevice.h:44</div></div> … … 365 369 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> 366 370 <ul> 367 <li class="navelem"><a class="el" href="dir_ 795fcb729bac4b07de678d11c3b7bf3b.html">gsanahuj</a></li><li class="navelem"><a class="el" href="dir_d9f696bd07998dbcfc5b49e19dc5f66d.html">igep</a></li><li class="navelem"><a class="el" href="dir_cecb9d1b9ff0c5bb6bd9d3ae75a47986.html">flair-src</a></li><li class="navelem"><a class="el" href="dir_9733168e1eafb017f79f3cf37481363a.html">lib</a></li><li class="navelem"><a class="el" href="dir_6c25be7f330a41d3c46a1b0f5a7f8efe.html">FlairMeta</a></li><li class="navelem"><a class="el" href="dir_cd6db5e8fcd6e347d64fdb79d4a6d9fc.html">src</a></li><li class="navelem"><b>UavStateMachine.h</b></li>368 <li class="footer">Generated on Wed Jun 22 2016 08:08:41for Flair by371 <li class="navelem"><a class="el" href="dir_2fe3ed085dc13211be8a68ab87a36e2d.html">flair-src</a></li><li class="navelem"><a class="el" href="dir_f7b8606ba27576604b27aa95a2e99d0a.html">lib</a></li><li class="navelem"><a class="el" href="dir_46ebbe1797a3bee323c086955b44dffb.html">FlairMeta</a></li><li class="navelem"><a class="el" href="dir_e2b454fb8dc7253f46c142f5360f332a.html">src</a></li><li class="navelem"><b>UavStateMachine.h</b></li> 372 <li class="footer">Generated on Wed Jun 22 2016 15:34:00 for Flair by 369 373 <a href="http://www.doxygen.org/index.html"> 370 374 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
Note:
See TracChangeset
for help on using the changeset viewer.