Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Jan 7, 2025
1 parent 97bffd5 commit 4b7e3a6
Show file tree
Hide file tree
Showing 8 changed files with 271 additions and 251 deletions.
15 changes: 8 additions & 7 deletions docs/hardware_2Barometer_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,14 @@
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> </div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span> <span class="comment">/*</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment"> * TODO: Switch to latest version of library (0.3.9) when we get hardware to verify</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment"> */</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> <span class="keywordtype">float</span> pressure = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(<a class="code hl_function" href="hardware_2Barometer_8cpp.html#a53407e2f423e02aa72c9c7dbcac6849b">MS</a>.getPressure() * 0.01 + 26.03);</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">float</span> temperature = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(<a class="code hl_function" href="hardware_2Barometer_8cpp.html#a53407e2f423e02aa72c9c7dbcac6849b">MS</a>.getTemperature() * 0.01);</div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">float</span> altitude = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(-log(pressure * 0.000987) * (temperature + 273.15) * 29.254);</div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structBarometer.html">Barometer</a>(temperature, pressure, altitude);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span>}</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment"> * Equation derived from https://en.wikipedia.org/wiki/Atmospheric_pressure#Altitude_variation</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="comment"> */</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> <span class="keywordtype">float</span> pressure = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(<a class="code hl_function" href="hardware_2Barometer_8cpp.html#a53407e2f423e02aa72c9c7dbcac6849b">MS</a>.getPressure() * 0.01 + 26.03); <span class="comment">// getPressure is in milibars so it&#39;s milibars * 0.01?</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span> <span class="keywordtype">float</span> temperature = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(<a class="code hl_function" href="hardware_2Barometer_8cpp.html#a53407e2f423e02aa72c9c7dbcac6849b">MS</a>.getTemperature() * 0.01); <span class="comment">// Celcius</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> <span class="keywordtype">float</span> altitude = <span class="keyword">static_cast&lt;</span><span class="keywordtype">float</span><span class="keyword">&gt;</span>(-log(pressure * 0.000987) * (temperature + 273.15) * 29.254);</div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span> </div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span> <span class="keywordflow">return</span> <a class="code hl_struct" href="structBarometer.html">Barometer</a>(temperature, pressure, altitude);</div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span>}</div>
<div class="ttc" id="aerrors_8h_html_a59e56af19e754a6aa26a612ebf91d05f"><div class="ttname"><a href="errors_8h.html#a59e56af19e754a6aa26a612ebf91d05f">ErrorCode</a></div><div class="ttdeci">ErrorCode</div><div class="ttdoc">list of all error codes that can arise</div><div class="ttdef"><b>Definition:</b> <a href="errors_8h_source.html#l00008">errors.h:8</a></div></div>
<div class="ttc" id="aerrors_8h_html_a59e56af19e754a6aa26a612ebf91d05faef9104c292609ba6db320509be8fe27f"><div class="ttname"><a href="errors_8h.html#a59e56af19e754a6aa26a612ebf91d05faef9104c292609ba6db320509be8fe27f">NoError</a></div><div class="ttdeci">@ NoError</div><div class="ttdef"><b>Definition:</b> <a href="errors_8h_source.html#l00009">errors.h:9</a></div></div>
<div class="ttc" id="ahardware_2Barometer_8cpp_html_a53407e2f423e02aa72c9c7dbcac6849b"><div class="ttname"><a href="hardware_2Barometer_8cpp.html#a53407e2f423e02aa72c9c7dbcac6849b">MS</a></div><div class="ttdeci">MS5611 MS(MS5611_CS)</div></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/hardware_2main_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
<div class="ttc" id="astructRocketSystems_html_a458a0c0abf9f82fad99d7f4fc2630122"><div class="ttname"><a href="structRocketSystems.html#a458a0c0abf9f82fad99d7f4fc2630122">RocketSystems::log_sink</a></div><div class="ttdeci">LogSink &amp; log_sink</div><div class="ttdef"><b>Definition:</b> <a href="systems_8h_source.html#l00049">systems.h:49</a></div></div>
<div class="ttc" id="astructSerialPatch_html_a6dec8f1fe1c59cb90c39c1427d94620d"><div class="ttname"><a href="structSerialPatch.html#a6dec8f1fe1c59cb90c39c1427d94620d">SerialPatch::println</a></div><div class="ttdeci">void println(T t)</div><div class="ttdef"><b>Definition:</b> <a href="arduino__emulation_8h_source.html#l00014">arduino_emulation.h:14</a></div></div>
<div class="ttc" id="astructSerialPatch_html_af225c6d34531a61fc5c7f0b72e45898a"><div class="ttname"><a href="structSerialPatch.html#af225c6d34531a61fc5c7f0b72e45898a">SerialPatch::begin</a></div><div class="ttdeci">void begin(int baudrate)</div><div class="ttdef"><b>Definition:</b> <a href="arduino__emulation_8cpp_source.html#l00011">arduino_emulation.cpp:11</a></div></div>
<div class="ttc" id="asystems_8cpp_html_a7678b869b133b9ea5fe1a8fe71946d1a"><div class="ttname"><a href="systems_8cpp.html#a7678b869b133b9ea5fe1a8fe71946d1a">begin_systems</a></div><div class="ttdeci">void begin_systems(RocketSystems *config)</div><div class="ttdoc">Initializes the systems, and then creates and starts the thread for each system. If initialization fa...</div><div class="ttdef"><b>Definition:</b> <a href="systems_8cpp_source.html#l00224">systems.cpp:224</a></div></div>
<div class="ttc" id="asystems_8cpp_html_a7678b869b133b9ea5fe1a8fe71946d1a"><div class="ttname"><a href="systems_8cpp.html#a7678b869b133b9ea5fe1a8fe71946d1a">begin_systems</a></div><div class="ttdeci">void begin_systems(RocketSystems *config)</div><div class="ttdoc">Initializes the systems, and then creates and starts the thread for each system. If initialization fa...</div><div class="ttdef"><b>Definition:</b> <a href="systems_8cpp_source.html#l00242">systems.cpp:242</a></div></div>
<div class="ttc" id="asystems_8h_html"><div class="ttname"><a href="systems_8h.html">systems.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
Expand Down
6 changes: 3 additions & 3 deletions docs/sensor__data_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>};</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"><a class="line" href="structBarometer.html"> 115</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structBarometer.html">Barometer</a> {</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="structBarometer.html#ac2c18c9ab21041b0f2133c3b473310cc"> 116</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structBarometer.html#ac2c18c9ab21041b0f2133c3b473310cc">temperature</a> = 0;</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="structBarometer.html#a1c1d755b487ccd6582eceb146896fcba"> 117</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structBarometer.html#a1c1d755b487ccd6582eceb146896fcba">pressure</a> = 0;</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="structBarometer.html#aa874e2036aba7f739bfe0a101ad3008b"> 118</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structBarometer.html#aa874e2036aba7f739bfe0a101ad3008b">altitude</a> = 0;</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"><a class="line" href="structBarometer.html#ac2c18c9ab21041b0f2133c3b473310cc"> 116</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structBarometer.html#ac2c18c9ab21041b0f2133c3b473310cc">temperature</a> = 0; <span class="comment">// Temperature in Celcius</span></div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="structBarometer.html#a1c1d755b487ccd6582eceb146896fcba"> 117</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structBarometer.html#a1c1d755b487ccd6582eceb146896fcba">pressure</a> = 0; <span class="comment">// Pressure in millibars</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="structBarometer.html#aa874e2036aba7f739bfe0a101ad3008b"> 118</a></span> <span class="keywordtype">float</span> <a class="code hl_variable" href="structBarometer.html#aa874e2036aba7f739bfe0a101ad3008b">altitude</a> = 0; <span class="comment">// Altitude in meters (above sea level?)</span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"><a class="line" href="structBarometer.html#a736afd443927c12a0209d0bebb70b9fd"> 120</a></span> <a class="code hl_function" href="structBarometer.html#a736afd443927c12a0209d0bebb70b9fd">Barometer</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"><a class="line" href="structBarometer.html#add666cf46ccb7b5695198412ebf28c82"> 121</a></span> <a class="code hl_function" href="structBarometer.html#add666cf46ccb7b5695198412ebf28c82">Barometer</a>(<span class="keywordtype">float</span> t, <span class="keywordtype">float</span> p, <span class="keywordtype">float</span> a) : <a class="code hl_variable" href="structBarometer.html#ac2c18c9ab21041b0f2133c3b473310cc">temperature</a>(t), <a class="code hl_variable" href="structBarometer.html#a1c1d755b487ccd6582eceb146896fcba">pressure</a>(p), <a class="code hl_variable" href="structBarometer.html#aa874e2036aba7f739bfe0a101ad3008b">altitude</a>(a) {}</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/silsim_2main_8cpp_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
<div class="ttc" id="astructSimulatedRocket_html_ab60eb23e8bfbf220e3b3817ff1e52a0b"><div class="ttname"><a href="structSimulatedRocket.html#ab60eb23e8bfbf220e3b3817ff1e52a0b">SimulatedRocket::velocity</a></div><div class="ttdeci">double velocity</div><div class="ttdef"><b>Definition:</b> <a href="simulation_8h_source.html#l00036">simulation.h:36</a></div></div>
<div class="ttc" id="astructSimulation_html"><div class="ttname"><a href="structSimulation.html">Simulation</a></div><div class="ttdef"><b>Definition:</b> <a href="simulation_8h_source.html#l00045">simulation.h:45</a></div></div>
<div class="ttc" id="astructVoltageSensor_html"><div class="ttname"><a href="structVoltageSensor.html">VoltageSensor</a></div><div class="ttdef"><b>Definition:</b> <a href="hardware_2sensors_8h_source.html#l00058">sensors.h:58</a></div></div>
<div class="ttc" id="asystems_8cpp_html_a7678b869b133b9ea5fe1a8fe71946d1a"><div class="ttname"><a href="systems_8cpp.html#a7678b869b133b9ea5fe1a8fe71946d1a">begin_systems</a></div><div class="ttdeci">void begin_systems(RocketSystems *config)</div><div class="ttdoc">Initializes the systems, and then creates and starts the thread for each system. If initialization fa...</div><div class="ttdef"><b>Definition:</b> <a href="systems_8cpp_source.html#l00224">systems.cpp:224</a></div></div>
<div class="ttc" id="asystems_8cpp_html_a7678b869b133b9ea5fe1a8fe71946d1a"><div class="ttname"><a href="systems_8cpp.html#a7678b869b133b9ea5fe1a8fe71946d1a">begin_systems</a></div><div class="ttdeci">void begin_systems(RocketSystems *config)</div><div class="ttdoc">Initializes the systems, and then creates and starts the thread for each system. If initialization fa...</div><div class="ttdef"><b>Definition:</b> <a href="systems_8cpp_source.html#l00242">systems.cpp:242</a></div></div>
<div class="ttc" id="asystems_8h_html"><div class="ttname"><a href="systems_8h.html">systems.h</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
Expand Down
22 changes: 11 additions & 11 deletions docs/systems_8cpp.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a4547493089d63386b029161f
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00190">190</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00208">208</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand All @@ -169,7 +169,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a7678b869b133b9ea5fe1a8fe

<p>Initializes the systems, and then creates and starts the thread for each system. If initialization fails, then this enters an infinite loop. </p>

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00224">224</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00242">242</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -199,7 +199,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#afd10120bf0e98ca4da83c525
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00038">38</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00056">56</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -259,7 +259,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ae7434349f63975ea26c39d84
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00119">119</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00137">137</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -289,7 +289,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#aea0eabebd2395a6642c4f67d
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00099">99</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00117">117</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -319,7 +319,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a0052aaff9db989c040891ed6
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00072">72</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00090">90</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -349,7 +349,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#aa626d5e646121511c99a835e
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00127">127</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00145">145</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -412,7 +412,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a2a8f58889115c0127246cfae
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00063">63</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00081">81</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -442,7 +442,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#ae52ad8eef10a32213af00184
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00052">52</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00070">70</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down Expand Up @@ -472,7 +472,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#acab3f6c1bdd5abfe96db6ed9
</table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00164">164</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00182">182</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand All @@ -494,7 +494,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#aac1889a32ea9cd3040c8c068

<p>Initializes all systems in order, returning early if a system's initialization process errors out. Turns on the Orange LED while initialization is running. </p>

<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00196">196</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>
<p class="definition">Definition at line <a class="el" href="systems_8cpp_source.html#l00214">214</a> of file <a class="el" href="systems_8cpp_source.html">systems.cpp</a>.</p>

</div>
</div>
Expand Down
Loading

0 comments on commit 4b7e3a6

Please sign in to comment.