2
0

acalc_8h_source.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.20"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>openPilotLog: src/functions/acalc.h Source File</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="navtree.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="resize.js"></script>
  14. <script type="text/javascript" src="navtreedata.js"></script>
  15. <script type="text/javascript" src="navtree.js"></script>
  16. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  17. <script type="text/javascript" src="search/searchdata.js"></script>
  18. <script type="text/javascript" src="search/search.js"></script>
  19. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  20. <link href="custom_dark_theme.css" rel="stylesheet" type="text/css"/>
  21. </head>
  22. <body>
  23. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  24. <div id="titlearea">
  25. <table cellspacing="0" cellpadding="0">
  26. <tbody>
  27. <tr style="height: 56px;">
  28. <td id="projectalign" style="padding-left: 0.5em;">
  29. <div id="projectname">openPilotLog
  30. </div>
  31. </td>
  32. </tr>
  33. </tbody>
  34. </table>
  35. </div>
  36. <!-- end header part -->
  37. <!-- Generated by Doxygen 1.8.20 -->
  38. <script type="text/javascript">
  39. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  40. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  41. /* @license-end */
  42. </script>
  43. <script type="text/javascript" src="menudata.js"></script>
  44. <script type="text/javascript" src="menu.js"></script>
  45. <script type="text/javascript">
  46. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  47. $(function() {
  48. initMenu('',true,false,'search.php','Search');
  49. $(document).ready(function() { init_search(); });
  50. });
  51. /* @license-end */</script>
  52. <div id="main-nav"></div>
  53. </div><!-- top -->
  54. <div id="side-nav" class="ui-resizable side-nav-resizable">
  55. <div id="nav-tree">
  56. <div id="nav-tree-contents">
  57. <div id="nav-sync" class="sync"></div>
  58. </div>
  59. </div>
  60. <div id="splitbar" style="-moz-user-select:none;"
  61. class="ui-resizable-handle">
  62. </div>
  63. </div>
  64. <script type="text/javascript">
  65. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  66. $(document).ready(function(){initNavTree('acalc_8h_source.html',''); initResizable(); });
  67. /* @license-end */
  68. </script>
  69. <div id="doc-content">
  70. <!-- window showing the filter options -->
  71. <div id="MSearchSelectWindow"
  72. onmouseover="return searchBox.OnSearchSelectShow()"
  73. onmouseout="return searchBox.OnSearchSelectHide()"
  74. onkeydown="return searchBox.OnSearchSelectKey(event)">
  75. </div>
  76. <!-- iframe showing the search results (closed by default) -->
  77. <div id="MSearchResultsWindow">
  78. <iframe src="javascript:void(0)" frameborder="0"
  79. name="MSearchResults" id="MSearchResults">
  80. </iframe>
  81. </div>
  82. <div class="header">
  83. <div class="headertitle">
  84. <div class="title">acalc.h</div> </div>
  85. </div><!--header-->
  86. <div class="contents">
  87. <div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="preprocessor">#ifndef ACALC_H</span></div>
  88. <div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="preprocessor">#define ACALC_H</span></div>
  89. <div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160; </div>
  90. <div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="preprocessor">#include &quot;src/database/db.h&quot;</span></div>
  91. <div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="preprocessor">#include &quot;src/classes/aircraft.h&quot;</span></div>
  92. <div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="preprocessor">#include &quot;src/classes/flight.h&quot;</span></div>
  93. <div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="preprocessor">#include &quot;src/classes/asettings.h&quot;</span></div>
  94. <div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="preprocessor">#include &lt;QDateTime&gt;</span></div>
  95. <div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div>
  96. <div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="preprocessor">#include &lt;QDebug&gt;</span></div>
  97. <div class="line"><a name="l00017"></a><span class="lineno"><a class="line" href="namespace_a_calc.html"> 17</a></span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_a_calc.html">ACalc</a> {</div>
  98. <div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160; </div>
  99. <div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348"> 25</a></span>&#160;<span class="keyword">inline</span> QTime <a class="code" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348">blocktime</a>(QTime tofb, QTime tonb)</div>
  100. <div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;{</div>
  101. <div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160; QTime blocktime_out(0, 0); <span class="comment">// initialise return value at midnight</span></div>
  102. <div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160; </div>
  103. <div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160; <span class="keywordflow">if</span> (tonb &gt; tofb) { <span class="comment">// landing same day</span></div>
  104. <div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160; <span class="keywordtype">int</span> blockseconds = tofb.secsTo(tonb);</div>
  105. <div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160; blocktime_out = blocktime_out.addSecs(blockseconds);</div>
  106. <div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160; } <span class="keywordflow">else</span> { <span class="comment">// landing next day</span></div>
  107. <div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160; QTime midnight(0, 0);</div>
  108. <div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160; <span class="keywordtype">int</span> blockseconds = tofb.secsTo(midnight);</div>
  109. <div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160; blocktime_out = blocktime_out.addSecs(blockseconds);</div>
  110. <div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160; blockseconds = midnight.secsTo(tonb);</div>
  111. <div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; blocktime_out = blocktime_out.addSecs(blockseconds);</div>
  112. <div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; }</div>
  113. <div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; <span class="keywordflow">return</span> blocktime_out;</div>
  114. <div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160;}</div>
  115. <div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#a5998cba97220eee788b6e20515f19ba6"> 46</a></span>&#160;<span class="keyword">inline</span> QString <a class="code" href="namespace_a_calc.html#a5998cba97220eee788b6e20515f19ba6">minutesToString</a>(QString block_minutes)</div>
  116. <div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160;{</div>
  117. <div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <span class="keywordtype">int</span> minutes = block_minutes.toInt();</div>
  118. <div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160; QString hour = QString::number(minutes / 60);</div>
  119. <div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keywordflow">if</span> (hour.size() &lt; 2) {</div>
  120. <div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; hour.prepend(<span class="stringliteral">&quot;0&quot;</span>);</div>
  121. <div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; }</div>
  122. <div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; QString minute = QString::number(minutes % 60);</div>
  123. <div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keywordflow">if</span> (minute.size() &lt; 2) {</div>
  124. <div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; minute.prepend(<span class="stringliteral">&quot;0&quot;</span>);</div>
  125. <div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; }</div>
  126. <div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; QString block_time = hour + <span class="stringliteral">&quot;:&quot;</span> + minute;</div>
  127. <div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <span class="keywordflow">return</span> block_time;</div>
  128. <div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;};</div>
  129. <div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; </div>
  130. <div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;<span class="keyword">inline</span> QString <a class="code" href="namespace_a_calc.html#a5998cba97220eee788b6e20515f19ba6">minutesToString</a>(<span class="keywordtype">int</span> block_minutes)</div>
  131. <div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;{</div>
  132. <div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; QString hour = QString::number(block_minutes / 60);</div>
  133. <div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keywordflow">if</span> (hour.size() &lt; 2) {</div>
  134. <div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; hour.prepend(<span class="stringliteral">&quot;0&quot;</span>);</div>
  135. <div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; }</div>
  136. <div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; QString minute = QString::number(block_minutes % 60);</div>
  137. <div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <span class="keywordflow">if</span> (minute.size() &lt; 2) {</div>
  138. <div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; minute.prepend(<span class="stringliteral">&quot;0&quot;</span>);</div>
  139. <div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; }</div>
  140. <div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; QString <a class="code" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348">blocktime</a> = hour + <span class="stringliteral">&quot;:&quot;</span> + minute;</div>
  141. <div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348">blocktime</a>;</div>
  142. <div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;};</div>
  143. <div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; </div>
  144. <div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#ab9a4beeaf2f02314adef0dc6c0dc2ccd"> 80</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="namespace_a_calc.html#ab9a4beeaf2f02314adef0dc6c0dc2ccd">QTimeToMinutes</a>(QTime time)</div>
  145. <div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;{</div>
  146. <div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; QString timestring = time.toString(<span class="stringliteral">&quot;hh:mm&quot;</span>);</div>
  147. <div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="keywordtype">int</span> minutes = (timestring.left(2).toInt()) * 60;</div>
  148. <div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; minutes += timestring.right(2).toInt();</div>
  149. <div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <span class="keywordflow">return</span> minutes;</div>
  150. <div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;}</div>
  151. <div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; </div>
  152. <div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#a0354672c538f003b4f7624ad38b6a42b"> 93</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">int</span> <a class="code" href="namespace_a_calc.html#a0354672c538f003b4f7624ad38b6a42b">stringToMinutes</a>(QString timestring)</div>
  153. <div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;{</div>
  154. <div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <span class="keywordtype">int</span> minutes = (timestring.left(2).toInt()) * 60;</div>
  155. <div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; minutes += timestring.right(2).toInt();</div>
  156. <div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; timestring = QString::number(minutes);</div>
  157. <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <span class="keywordflow">return</span> minutes;</div>
  158. <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;}</div>
  159. <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; </div>
  160. <div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#a2a540662e22840e4b58e8e760611b4f2"> 106</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespace_a_calc.html#a2a540662e22840e4b58e8e760611b4f2">radToDeg</a>(<span class="keywordtype">double</span> rad)</div>
  161. <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160;{</div>
  162. <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; <span class="keywordtype">double</span> deg = rad * (180 / M_PI);</div>
  163. <div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keywordflow">return</span> deg;</div>
  164. <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160;}</div>
  165. <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160; </div>
  166. <div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#acafe6c0bede38e737937e2062fd93c71"> 117</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespace_a_calc.html#acafe6c0bede38e737937e2062fd93c71">degToRad</a>(<span class="keywordtype">double</span> deg)</div>
  167. <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;{</div>
  168. <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; <span class="keywordtype">double</span> rad = deg * (M_PI / 180);</div>
  169. <div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="keywordflow">return</span> rad;</div>
  170. <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160;}</div>
  171. <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; </div>
  172. <div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="namespace_a_calc.html#a37c52e8b522b233087b8c4d94f30fca5"> 128</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">double</span> <a class="code" href="namespace_a_calc.html#a37c52e8b522b233087b8c4d94f30fca5">radToNauticalMiles</a>(<span class="keywordtype">double</span> rad)</div>
  173. <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;{</div>
  174. <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; <span class="keywordtype">double</span> nm = rad * 3440.06479482;</div>
  175. <div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; <span class="keywordflow">return</span> nm;</div>
  176. <div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;}</div>
  177. <div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; </div>
  178. <div class="line"><a name="l00142"></a><span class="lineno"> 142</span>&#160;<span class="keywordtype">double</span> <a class="code" href="namespace_a_calc.html#a72c6fca35602a24ff8435f86abdc78d7">greatCircleDistance</a>(<span class="keywordtype">double</span> lat1, <span class="keywordtype">double</span> lon1, <span class="keywordtype">double</span> lat2, <span class="keywordtype">double</span> lon2);</div>
  179. <div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; </div>
  180. <div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160;<span class="keywordtype">double</span> <a class="code" href="namespace_a_calc.html#a2d15bbb67e99d502e2fd730c47854a9f">greatCircleDistanceBetweenAirports</a>(<span class="keyword">const</span> QString &amp;dept, <span class="keyword">const</span> QString &amp;dest);</div>
  181. <div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; </div>
  182. <div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160;QVector&lt;QVector&lt;double&gt;&gt; <a class="code" href="namespace_a_calc.html#a4a071a5788f00c98834127f9c5721383">intermediatePointsOnGreatCircle</a>(<span class="keywordtype">double</span> lat1,</div>
  183. <div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160; <span class="keywordtype">double</span> lon1,</div>
  184. <div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keywordtype">double</span> lat2,</div>
  185. <div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; <span class="keywordtype">double</span> lon2,</div>
  186. <div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; <span class="keywordtype">int</span> tblk);</div>
  187. <div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;<span class="keywordtype">double</span> <a class="code" href="namespace_a_calc.html#acfa830e821e2f9e20bebffda67d393b1">solarElevation</a>(QDateTime utc_time_point, <span class="keywordtype">double</span> lat, <span class="keywordtype">double</span> lon);</div>
  188. <div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160; </div>
  189. <div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160;<span class="keywordtype">int</span> <a class="code" href="namespace_a_calc.html#a55ede99d0f9f6e8a2f3a467859c0f192">calculateNightTime</a>(<span class="keyword">const</span> QString &amp;dept, <span class="keyword">const</span> QString &amp;dest, QDateTime departureTime, <span class="keywordtype">int</span> tblk, <span class="keywordtype">int</span> nightAngle);</div>
  190. <div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160; </div>
  191. <div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160;<span class="keywordtype">bool</span> isNight(<span class="keyword">const</span> QString &amp;icao, QDateTime event_time, <span class="keywordtype">int</span> night_angle);</div>
  192. <div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; </div>
  193. <div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160;QString <a class="code" href="namespace_a_calc.html#a362d1ab22d757e4c14d9cf143afec234">formatTimeInput</a>(QString user_input);</div>
  194. <div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160; </div>
  195. <div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespace_a_calc.html#a3f12e1f72eeb5cc1cfe9b7b6df47391c">updateAutoTimes</a>(<span class="keywordtype">int</span> acft_id);</div>
  196. <div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; </div>
  197. <div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;<span class="keywordtype">void</span> autoTimes(<a class="code" href="class_flight.html">Flight</a>, <a class="code" href="class_aircraft.html">Aircraft</a>);</div>
  198. <div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; </div>
  199. <div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160;<span class="keywordtype">void</span> <a class="code" href="namespace_a_calc.html#adb7a8a84011affb4173bb59be4449b9d">updateNightTimes</a>();</div>
  200. <div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160;} <span class="comment">// namespace ACalc</span></div>
  201. <div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160; </div>
  202. <div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160;<span class="preprocessor">#endif // ACALC_H</span></div>
  203. </div><!-- fragment --></div><!-- contents -->
  204. </div><!-- doc-content -->
  205. <div class="ttc" id="aclass_flight_html"><div class="ttname"><a href="class_flight.html">Flight</a></div><div class="ttdef"><b>Definition:</b> flight.h:28</div></div>
  206. <div class="ttc" id="anamespace_a_calc_html_a861ed796cc18a964b119b38fcd61f348"><div class="ttname"><a href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348">ACalc::blocktime</a></div><div class="ttdeci">QTime blocktime(QTime tofb, QTime tonb)</div><div class="ttdoc">ACalc::blocktime Calculates Block Time for a given departure and arrival time.</div><div class="ttdef"><b>Definition:</b> acalc.h:25</div></div>
  207. <div class="ttc" id="anamespace_a_calc_html_a4a071a5788f00c98834127f9c5721383"><div class="ttname"><a href="namespace_a_calc.html#a4a071a5788f00c98834127f9c5721383">ACalc::intermediatePointsOnGreatCircle</a></div><div class="ttdeci">QVector&lt; QVector&lt; double &gt; &gt; intermediatePointsOnGreatCircle(double lat1, double lon1, double lat2, double lon2, int tblk)</div><div class="ttdoc">Calculates a list of points (lat,lon) along the Great Circle between two points. The points are space...</div><div class="ttdef"><b>Definition:</b> acalc.cpp:114</div></div>
  208. <div class="ttc" id="anamespace_a_calc_html_a3f12e1f72eeb5cc1cfe9b7b6df47391c"><div class="ttname"><a href="namespace_a_calc.html#a3f12e1f72eeb5cc1cfe9b7b6df47391c">ACalc::updateAutoTimes</a></div><div class="ttdeci">void updateAutoTimes(int acft_id)</div><div class="ttdoc">ACalc::updateAutoTimes When the details of an aircraft are changed, this function recalculates deduct...</div><div class="ttdef"><b>Definition:</b> acalc.cpp:262</div></div>
  209. <div class="ttc" id="anamespace_a_calc_html_ab9a4beeaf2f02314adef0dc6c0dc2ccd"><div class="ttname"><a href="namespace_a_calc.html#ab9a4beeaf2f02314adef0dc6c0dc2ccd">ACalc::QTimeToMinutes</a></div><div class="ttdeci">int QTimeToMinutes(QTime time)</div><div class="ttdoc">ACalc::time_to_minutes converts QTime to int minutes.</div><div class="ttdef"><b>Definition:</b> acalc.h:80</div></div>
  210. <div class="ttc" id="anamespace_a_calc_html_a37c52e8b522b233087b8c4d94f30fca5"><div class="ttname"><a href="namespace_a_calc.html#a37c52e8b522b233087b8c4d94f30fca5">ACalc::radToNauticalMiles</a></div><div class="ttdeci">double radToNauticalMiles(double rad)</div><div class="ttdoc">radToNauticalMiles Convert Radians to nautical miles</div><div class="ttdef"><b>Definition:</b> acalc.h:128</div></div>
  211. <div class="ttc" id="anamespace_a_calc_html_a0354672c538f003b4f7624ad38b6a42b"><div class="ttname"><a href="namespace_a_calc.html#a0354672c538f003b4f7624ad38b6a42b">ACalc::stringToMinutes</a></div><div class="ttdeci">int stringToMinutes(QString timestring)</div><div class="ttdoc">ACalc::string_to_minutes Converts String Time to String Number of Minutes.</div><div class="ttdef"><b>Definition:</b> acalc.h:93</div></div>
  212. <div class="ttc" id="aclass_aircraft_html"><div class="ttname"><a href="class_aircraft.html">Aircraft</a></div><div class="ttdoc">The aircraft class.</div><div class="ttdef"><b>Definition:</b> aircraft.h:28</div></div>
  213. <div class="ttc" id="anamespace_a_calc_html"><div class="ttname"><a href="namespace_a_calc.html">ACalc</a></div><div class="ttdoc">The ACalc namespace provides various functions for calculations that are performed outside of the dat...</div><div class="ttdef"><b>Definition:</b> acalc.h:17</div></div>
  214. <div class="ttc" id="anamespace_a_calc_html_a5998cba97220eee788b6e20515f19ba6"><div class="ttname"><a href="namespace_a_calc.html#a5998cba97220eee788b6e20515f19ba6">ACalc::minutesToString</a></div><div class="ttdeci">QString minutesToString(QString block_minutes)</div><div class="ttdoc">ACalc::minutes_to_string Converts database time to String Time.</div><div class="ttdef"><b>Definition:</b> acalc.h:46</div></div>
  215. <div class="ttc" id="anamespace_a_calc_html_acafe6c0bede38e737937e2062fd93c71"><div class="ttname"><a href="namespace_a_calc.html#acafe6c0bede38e737937e2062fd93c71">ACalc::degToRad</a></div><div class="ttdeci">double degToRad(double deg)</div><div class="ttdoc">degToRad Converts degrees to radians</div><div class="ttdef"><b>Definition:</b> acalc.h:117</div></div>
  216. <div class="ttc" id="anamespace_a_calc_html_a2a540662e22840e4b58e8e760611b4f2"><div class="ttname"><a href="namespace_a_calc.html#a2a540662e22840e4b58e8e760611b4f2">ACalc::radToDeg</a></div><div class="ttdeci">double radToDeg(double rad)</div><div class="ttdoc">radToDeg Converts radians to degrees</div><div class="ttdef"><b>Definition:</b> acalc.h:106</div></div>
  217. <div class="ttc" id="anamespace_a_calc_html_a2d15bbb67e99d502e2fd730c47854a9f"><div class="ttname"><a href="namespace_a_calc.html#a2d15bbb67e99d502e2fd730c47854a9f">ACalc::greatCircleDistanceBetweenAirports</a></div><div class="ttdeci">double greatCircleDistanceBetweenAirports(const QString &amp;dept, const QString &amp;dest)</div><div class="ttdoc">ACalc::greatCircleDistanceBetweenAirports Calculates Great Circle distance between two coordinates,...</div><div class="ttdef"><b>Definition:</b> acalc.cpp:87</div></div>
  218. <div class="ttc" id="anamespace_a_calc_html_acfa830e821e2f9e20bebffda67d393b1"><div class="ttname"><a href="namespace_a_calc.html#acfa830e821e2f9e20bebffda67d393b1">ACalc::solarElevation</a></div><div class="ttdeci">double solarElevation(QDateTime utc_time_point, double lat, double lon)</div><div class="ttdoc">Calculates solar elevation angle for a given point in time and latitude/longitude coordinates.</div><div class="ttdef"><b>Definition:</b> acalc.cpp:145</div></div>
  219. <div class="ttc" id="anamespace_a_calc_html_a72c6fca35602a24ff8435f86abdc78d7"><div class="ttname"><a href="namespace_a_calc.html#a72c6fca35602a24ff8435f86abdc78d7">ACalc::greatCircleDistance</a></div><div class="ttdeci">double greatCircleDistance(double lat1, double lon1, double lat2, double lon2)</div><div class="ttdoc">greatCircleDistance Calculates Great Circle distance between two coordinates, return in Radians.</div><div class="ttdef"><b>Definition:</b> acalc.cpp:68</div></div>
  220. <div class="ttc" id="anamespace_a_calc_html_a362d1ab22d757e4c14d9cf143afec234"><div class="ttname"><a href="namespace_a_calc.html#a362d1ab22d757e4c14d9cf143afec234">ACalc::formatTimeInput</a></div><div class="ttdeci">QString formatTimeInput(QString user_input)</div><div class="ttdoc">ACalc::formatTimeInput verifies user input and formats to hh:mm if the output is not a valid time,...</div><div class="ttdef"><b>Definition:</b> acalc.cpp:15</div></div>
  221. <div class="ttc" id="anamespace_a_calc_html_adb7a8a84011affb4173bb59be4449b9d"><div class="ttname"><a href="namespace_a_calc.html#adb7a8a84011affb4173bb59be4449b9d">ACalc::updateNightTimes</a></div><div class="ttdeci">void updateNightTimes()</div><div class="ttdoc">ACalc::updateNightTimes updates the night times in the database, used when changing night angle setti...</div><div class="ttdef"><b>Definition:</b> acalc.cpp:308</div></div>
  222. <div class="ttc" id="anamespace_a_calc_html_a55ede99d0f9f6e8a2f3a467859c0f192"><div class="ttname"><a href="namespace_a_calc.html#a55ede99d0f9f6e8a2f3a467859c0f192">ACalc::calculateNightTime</a></div><div class="ttdeci">int calculateNightTime(const QString &amp;dept, const QString &amp;dest, QDateTime departureTime, int tblk, int nightAngle)</div><div class="ttdoc">Calculates which portion of a flight was conducted in night conditions.</div><div class="ttdef"><b>Definition:</b> acalc.cpp:205</div></div>
  223. <!-- start footer part -->
  224. <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  225. <ul>
  226. <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_e823141bb13a34caac0c96ccd0d33fcf.html">functions</a></li><li class="navelem"><b>acalc.h</b></li>
  227. <li class="footer">Generated by <a href="http://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.8.20 </li>
  228. </ul>
  229. </div>
  230. </body>
  231. </html>