123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=9"/>
- <meta name="generator" content="Doxygen 1.8.20"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>openPilotLog: ACalc Namespace Reference</title>
- <link href="tabs.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="jquery.js"></script>
- <script type="text/javascript" src="dynsections.js"></script>
- <link href="navtree.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="resize.js"></script>
- <script type="text/javascript" src="navtreedata.js"></script>
- <script type="text/javascript" src="navtree.js"></script>
- <link href="search/search.css" rel="stylesheet" type="text/css"/>
- <script type="text/javascript" src="search/searchdata.js"></script>
- <script type="text/javascript" src="search/search.js"></script>
- <link href="doxygen.css" rel="stylesheet" type="text/css" />
- <link href="custom_dark_theme.css" rel="stylesheet" type="text/css"/>
- </head>
- <body>
- <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
- <div id="titlearea">
- <table cellspacing="0" cellpadding="0">
- <tbody>
- <tr style="height: 56px;">
- <td id="projectalign" style="padding-left: 0.5em;">
- <div id="projectname">openPilotLog
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <!-- end header part -->
- <!-- Generated by Doxygen 1.8.20 -->
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- var searchBox = new SearchBox("searchBox", "search",false,'Search');
- /* @license-end */
- </script>
- <script type="text/javascript" src="menudata.js"></script>
- <script type="text/javascript" src="menu.js"></script>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(function() {
- initMenu('',true,false,'search.php','Search');
- $(document).ready(function() { init_search(); });
- });
- /* @license-end */</script>
- <div id="main-nav"></div>
- </div><!-- top -->
- <div id="side-nav" class="ui-resizable side-nav-resizable">
- <div id="nav-tree">
- <div id="nav-tree-contents">
- <div id="nav-sync" class="sync"></div>
- </div>
- </div>
- <div id="splitbar" style="-moz-user-select:none;"
- class="ui-resizable-handle">
- </div>
- </div>
- <script type="text/javascript">
- /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
- $(document).ready(function(){initNavTree('namespace_a_calc.html',''); initResizable(); });
- /* @license-end */
- </script>
- <div id="doc-content">
- <!-- window showing the filter options -->
- <div id="MSearchSelectWindow"
- onmouseover="return searchBox.OnSearchSelectShow()"
- onmouseout="return searchBox.OnSearchSelectHide()"
- onkeydown="return searchBox.OnSearchSelectKey(event)">
- </div>
- <!-- iframe showing the search results (closed by default) -->
- <div id="MSearchResultsWindow">
- <iframe src="javascript:void(0)" frameborder="0"
- name="MSearchResults" id="MSearchResults">
- </iframe>
- </div>
- <div class="header">
- <div class="summary">
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">ACalc Namespace Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>The <a class="el" href="namespace_a_calc.html" title="The ACalc namespace provides various functions for calculations that are performed outside of the dat...">ACalc</a> namespace provides various functions for calculations that are performed outside of the database. This includes tasks like converting different units and formats, or functions calculating block time or night time.
- <a href="namespace_a_calc.html#details">More...</a></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:a861ed796cc18a964b119b38fcd61f348"><td class="memItemLeft" align="right" valign="top">QTime </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348">blocktime</a> (QTime tofb, QTime tonb)</td></tr>
- <tr class="memdesc:a861ed796cc18a964b119b38fcd61f348"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348" title="ACalc::blocktime Calculates Block Time for a given departure and arrival time.">ACalc::blocktime</a> Calculates Block Time for a given departure and arrival time. <a href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348">More...</a><br /></td></tr>
- <tr class="separator:a861ed796cc18a964b119b38fcd61f348"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5998cba97220eee788b6e20515f19ba6"><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a5998cba97220eee788b6e20515f19ba6">minutesToString</a> (QString block_minutes)</td></tr>
- <tr class="memdesc:a5998cba97220eee788b6e20515f19ba6"><td class="mdescLeft"> </td><td class="mdescRight">ACalc::minutes_to_string Converts database time to String Time. <a href="namespace_a_calc.html#a5998cba97220eee788b6e20515f19ba6">More...</a><br /></td></tr>
- <tr class="separator:a5998cba97220eee788b6e20515f19ba6"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a5f4cf5309b1d0873df398be5d241b582"><td class="memItemLeft" align="right" valign="top"><a id="a5f4cf5309b1d0873df398be5d241b582"></a>
- QString </td><td class="memItemRight" valign="bottom"><b>minutesToString</b> (int block_minutes)</td></tr>
- <tr class="separator:a5f4cf5309b1d0873df398be5d241b582"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ab9a4beeaf2f02314adef0dc6c0dc2ccd"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#ab9a4beeaf2f02314adef0dc6c0dc2ccd">QTimeToMinutes</a> (QTime time)</td></tr>
- <tr class="memdesc:ab9a4beeaf2f02314adef0dc6c0dc2ccd"><td class="mdescLeft"> </td><td class="mdescRight">ACalc::time_to_minutes converts QTime to int minutes. <a href="namespace_a_calc.html#ab9a4beeaf2f02314adef0dc6c0dc2ccd">More...</a><br /></td></tr>
- <tr class="separator:ab9a4beeaf2f02314adef0dc6c0dc2ccd"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0354672c538f003b4f7624ad38b6a42b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a0354672c538f003b4f7624ad38b6a42b">stringToMinutes</a> (QString timestring)</td></tr>
- <tr class="memdesc:a0354672c538f003b4f7624ad38b6a42b"><td class="mdescLeft"> </td><td class="mdescRight">ACalc::string_to_minutes Converts String Time to String Number of Minutes. <a href="namespace_a_calc.html#a0354672c538f003b4f7624ad38b6a42b">More...</a><br /></td></tr>
- <tr class="separator:a0354672c538f003b4f7624ad38b6a42b"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2a540662e22840e4b58e8e760611b4f2"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a2a540662e22840e4b58e8e760611b4f2">radToDeg</a> (double rad)</td></tr>
- <tr class="memdesc:a2a540662e22840e4b58e8e760611b4f2"><td class="mdescLeft"> </td><td class="mdescRight">radToDeg Converts radians to degrees <a href="namespace_a_calc.html#a2a540662e22840e4b58e8e760611b4f2">More...</a><br /></td></tr>
- <tr class="separator:a2a540662e22840e4b58e8e760611b4f2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acafe6c0bede38e737937e2062fd93c71"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#acafe6c0bede38e737937e2062fd93c71">degToRad</a> (double deg)</td></tr>
- <tr class="memdesc:acafe6c0bede38e737937e2062fd93c71"><td class="mdescLeft"> </td><td class="mdescRight">degToRad Converts degrees to radians <a href="namespace_a_calc.html#acafe6c0bede38e737937e2062fd93c71">More...</a><br /></td></tr>
- <tr class="separator:acafe6c0bede38e737937e2062fd93c71"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a37c52e8b522b233087b8c4d94f30fca5"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a37c52e8b522b233087b8c4d94f30fca5">radToNauticalMiles</a> (double rad)</td></tr>
- <tr class="memdesc:a37c52e8b522b233087b8c4d94f30fca5"><td class="mdescLeft"> </td><td class="mdescRight">radToNauticalMiles Convert Radians to nautical miles <a href="namespace_a_calc.html#a37c52e8b522b233087b8c4d94f30fca5">More...</a><br /></td></tr>
- <tr class="separator:a37c52e8b522b233087b8c4d94f30fca5"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a72c6fca35602a24ff8435f86abdc78d7"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a72c6fca35602a24ff8435f86abdc78d7">greatCircleDistance</a> (double lat1, double lon1, double lat2, double lon2)</td></tr>
- <tr class="memdesc:a72c6fca35602a24ff8435f86abdc78d7"><td class="mdescLeft"> </td><td class="mdescRight">greatCircleDistance Calculates Great Circle distance between two coordinates, return in Radians. <a href="namespace_a_calc.html#a72c6fca35602a24ff8435f86abdc78d7">More...</a><br /></td></tr>
- <tr class="separator:a72c6fca35602a24ff8435f86abdc78d7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a2d15bbb67e99d502e2fd730c47854a9f"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a2d15bbb67e99d502e2fd730c47854a9f">greatCircleDistanceBetweenAirports</a> (const QString &dept, const QString &dest)</td></tr>
- <tr class="memdesc:a2d15bbb67e99d502e2fd730c47854a9f"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_a_calc.html#a2d15bbb67e99d502e2fd730c47854a9f" title="ACalc::greatCircleDistanceBetweenAirports Calculates Great Circle distance between two coordinates,...">ACalc::greatCircleDistanceBetweenAirports</a> Calculates Great Circle distance between two coordinates, return in nautical miles. <a href="namespace_a_calc.html#a2d15bbb67e99d502e2fd730c47854a9f">More...</a><br /></td></tr>
- <tr class="separator:a2d15bbb67e99d502e2fd730c47854a9f"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a4a071a5788f00c98834127f9c5721383"><td class="memItemLeft" align="right" valign="top">QVector< QVector< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a4a071a5788f00c98834127f9c5721383">intermediatePointsOnGreatCircle</a> (double lat1, double lon1, double lat2, double lon2, int tblk)</td></tr>
- <tr class="memdesc:a4a071a5788f00c98834127f9c5721383"><td class="mdescLeft"> </td><td class="mdescRight">Calculates a list of points (lat,lon) along the Great Circle between two points. The points are spaced equally, one minute of block time apart. <a href="namespace_a_calc.html#a4a071a5788f00c98834127f9c5721383">More...</a><br /></td></tr>
- <tr class="separator:a4a071a5788f00c98834127f9c5721383"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:acfa830e821e2f9e20bebffda67d393b1"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#acfa830e821e2f9e20bebffda67d393b1">solarElevation</a> (QDateTime utc_time_point, double lat, double lon)</td></tr>
- <tr class="memdesc:acfa830e821e2f9e20bebffda67d393b1"><td class="mdescLeft"> </td><td class="mdescRight">Calculates solar elevation angle for a given point in time and latitude/longitude coordinates. <a href="namespace_a_calc.html#acfa830e821e2f9e20bebffda67d393b1">More...</a><br /></td></tr>
- <tr class="separator:acfa830e821e2f9e20bebffda67d393b1"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a55ede99d0f9f6e8a2f3a467859c0f192"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a55ede99d0f9f6e8a2f3a467859c0f192">calculateNightTime</a> (const QString &dept, const QString &dest, QDateTime departureTime, int tblk, int nightAngle)</td></tr>
- <tr class="memdesc:a55ede99d0f9f6e8a2f3a467859c0f192"><td class="mdescLeft"> </td><td class="mdescRight">Calculates which portion of a flight was conducted in night conditions. <a href="namespace_a_calc.html#a55ede99d0f9f6e8a2f3a467859c0f192">More...</a><br /></td></tr>
- <tr class="separator:a55ede99d0f9f6e8a2f3a467859c0f192"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a6f006acefa051b041112b74f04c5eaac"><td class="memItemLeft" align="right" valign="top"><a id="a6f006acefa051b041112b74f04c5eaac"></a>
- bool </td><td class="memItemRight" valign="bottom"><b>isNight</b> (const QString &icao, QDateTime event_time, int night_angle)</td></tr>
- <tr class="separator:a6f006acefa051b041112b74f04c5eaac"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a362d1ab22d757e4c14d9cf143afec234"><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a362d1ab22d757e4c14d9cf143afec234">formatTimeInput</a> (QString user_input)</td></tr>
- <tr class="memdesc:a362d1ab22d757e4c14d9cf143afec234"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_a_calc.html#a362d1ab22d757e4c14d9cf143afec234" title="ACalc::formatTimeInput verifies user input and formats to hh:mm if the output is not a valid time,...">ACalc::formatTimeInput</a> verifies user input and formats to hh:mm if the output is not a valid time, an empty string is returned. Accepts input as hh:mm, h:mm, hhmm or hmm. <a href="namespace_a_calc.html#a362d1ab22d757e4c14d9cf143afec234">More...</a><br /></td></tr>
- <tr class="separator:a362d1ab22d757e4c14d9cf143afec234"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a3f12e1f72eeb5cc1cfe9b7b6df47391c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#a3f12e1f72eeb5cc1cfe9b7b6df47391c">updateAutoTimes</a> (int acft_id)</td></tr>
- <tr class="memdesc:a3f12e1f72eeb5cc1cfe9b7b6df47391c"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_a_calc.html#a3f12e1f72eeb5cc1cfe9b7b6df47391c" title="ACalc::updateAutoTimes When the details of an aircraft are changed, this function recalculates deduct...">ACalc::updateAutoTimes</a> When the details of an aircraft are changed, this function recalculates deductable times for this aircraft and updates the database accordingly. <a href="namespace_a_calc.html#a3f12e1f72eeb5cc1cfe9b7b6df47391c">More...</a><br /></td></tr>
- <tr class="separator:a3f12e1f72eeb5cc1cfe9b7b6df47391c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1d5f8277a22daa820afb5e30ca15427a"><td class="memItemLeft" align="right" valign="top"><a id="a1d5f8277a22daa820afb5e30ca15427a"></a>
- void </td><td class="memItemRight" valign="bottom"><b>autoTimes</b> (<a class="el" href="class_flight.html">Flight</a>, <a class="el" href="class_aircraft.html">Aircraft</a>)</td></tr>
- <tr class="separator:a1d5f8277a22daa820afb5e30ca15427a"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:adb7a8a84011affb4173bb59be4449b9d"><td class="memItemLeft" align="right" valign="top"><a id="adb7a8a84011affb4173bb59be4449b9d"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_a_calc.html#adb7a8a84011affb4173bb59be4449b9d">updateNightTimes</a> ()</td></tr>
- <tr class="memdesc:adb7a8a84011affb4173bb59be4449b9d"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_a_calc.html#adb7a8a84011affb4173bb59be4449b9d" title="ACalc::updateNightTimes updates the night times in the database, used when changing night angle setti...">ACalc::updateNightTimes</a> updates the night times in the database, used when changing night angle setting for example. <br /></td></tr>
- <tr class="separator:adb7a8a84011affb4173bb59be4449b9d"><td class="memSeparator" colspan="2"> </td></tr>
- </table>
- <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
- <div class="textblock"><p>The <a class="el" href="namespace_a_calc.html" title="The ACalc namespace provides various functions for calculations that are performed outside of the dat...">ACalc</a> namespace provides various functions for calculations that are performed outside of the database. This includes tasks like converting different units and formats, or functions calculating block time or night time. </p>
- </div><h2 class="groupheader">Function Documentation</h2>
- <a id="a861ed796cc18a964b119b38fcd61f348"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a861ed796cc18a964b119b38fcd61f348">◆ </a></span>blocktime()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QTime ACalc::blocktime </td>
- <td>(</td>
- <td class="paramtype">QTime </td>
- <td class="paramname"><em>tofb</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">QTime </td>
- <td class="paramname"><em>tonb</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="namespace_a_calc.html#a861ed796cc18a964b119b38fcd61f348" title="ACalc::blocktime Calculates Block Time for a given departure and arrival time.">ACalc::blocktime</a> Calculates Block Time for a given departure and arrival time. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">tofb</td><td>QTime Time Off Blocks </td></tr>
- <tr><td class="paramname">tonb</td><td>QTime Time On Blocks </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Block Time in minutes </dd></dl>
- </div>
- </div>
- <a id="a55ede99d0f9f6e8a2f3a467859c0f192"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a55ede99d0f9f6e8a2f3a467859c0f192">◆ </a></span>calculateNightTime()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int ACalc::calculateNightTime </td>
- <td>(</td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>dept</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>dest</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">QDateTime </td>
- <td class="paramname"><em>departureTime</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>tblk</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>nightAngle</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Calculates which portion of a flight was conducted in night conditions. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dept</td><td>- ICAO 4-letter code of Departure Airport </td></tr>
- <tr><td class="paramname">dest</td><td>- ICAO 4-letter Code of Destination Airport </td></tr>
- <tr><td class="paramname">departureTime</td><td>- QDateTime of Departure (UTC) </td></tr>
- <tr><td class="paramname">tblk</td><td>- Total block time in minutes </td></tr>
- <tr><td class="paramname">nightAngle</td><td>- the solar elevation angle where night conditons exist. Default -6 (end of civil evening twilight) </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Total number of minutes under night flying conditions </dd></dl>
- </div>
- </div>
- <a id="acafe6c0bede38e737937e2062fd93c71"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#acafe6c0bede38e737937e2062fd93c71">◆ </a></span>degToRad()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double ACalc::degToRad </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>deg</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>degToRad Converts degrees to radians </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">deg</td><td></td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>radians </dd></dl>
- </div>
- </div>
- <a id="a362d1ab22d757e4c14d9cf143afec234"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a362d1ab22d757e4c14d9cf143afec234">◆ </a></span>formatTimeInput()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QString ACalc::formatTimeInput </td>
- <td>(</td>
- <td class="paramtype">QString </td>
- <td class="paramname"><em>user_input</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="namespace_a_calc.html#a362d1ab22d757e4c14d9cf143afec234" title="ACalc::formatTimeInput verifies user input and formats to hh:mm if the output is not a valid time,...">ACalc::formatTimeInput</a> verifies user input and formats to hh:mm if the output is not a valid time, an empty string is returned. Accepts input as hh:mm, h:mm, hhmm or hmm. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">userinput</td><td>from a QLineEdit </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>formatted QString "hh:mm" or Empty String </dd></dl>
- </div>
- </div>
- <a id="a72c6fca35602a24ff8435f86abdc78d7"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a72c6fca35602a24ff8435f86abdc78d7">◆ </a></span>greatCircleDistance()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double ACalc::greatCircleDistance </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lat1</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lon1</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lat2</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lon2</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>greatCircleDistance Calculates Great Circle distance between two coordinates, return in Radians. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">lat1</td><td>Location Latitude in degrees -90:90 ;S(-) N(+) </td></tr>
- <tr><td class="paramname">lon1</td><td>Location Longitude in degrees -180:180 W(-) E(+) </td></tr>
- <tr><td class="paramname">lat2</td><td>Location Latitude in degrees -90:90 ;S(-) N(+) </td></tr>
- <tr><td class="paramname">lon2</td><td>Location Longitude in degrees -180:180 W(-) E(+) </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd></dd></dl>
- <p>The purpose of the following functions is to provide functionality enabling the Calculation of night flying time. EASA defines night as follows:</p>
- <p>‘Night’ means the period between the end of evening civil twilight and the beginning of morning civil twilight or such other period between sunset and sunrise as may be prescribed by the appropriate authority, as defined by the Member State.</p>
- <p>This is the proccess of Calculating night time in this program:</p>
- <p>1) A flight from A to B follows the Great Circle Track along these two points at an average cruising height of 11km. (~FL 360)</p>
- <p>2) Any time the Elevation of the Sun at the current position is less than -6 degrees, night conditions are present. 3) The Calculation is performed for every minute of flight time.</p>
- <p>In general, input and output for most functions is decimal degrees, like coordinates are stowed in the airports table. Calculations are normally done using Radians. </p>
- </div>
- </div>
- <a id="a2d15bbb67e99d502e2fd730c47854a9f"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a2d15bbb67e99d502e2fd730c47854a9f">◆ </a></span>greatCircleDistanceBetweenAirports()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double ACalc::greatCircleDistanceBetweenAirports </td>
- <td>(</td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>dept</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">const QString & </td>
- <td class="paramname"><em>dest</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="namespace_a_calc.html#a2d15bbb67e99d502e2fd730c47854a9f" title="ACalc::greatCircleDistanceBetweenAirports Calculates Great Circle distance between two coordinates,...">ACalc::greatCircleDistanceBetweenAirports</a> Calculates Great Circle distance between two coordinates, return in nautical miles. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">dept</td><td>ICAO 4-letter Airport Identifier </td></tr>
- <tr><td class="paramname">dest</td><td>ICAO 4-letter Airport Identifier </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>Nautical Miles From Departure to Destination </dd></dl>
- </div>
- </div>
- <a id="a4a071a5788f00c98834127f9c5721383"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a4a071a5788f00c98834127f9c5721383">◆ </a></span>intermediatePointsOnGreatCircle()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QVector< QVector< double > > ACalc::intermediatePointsOnGreatCircle </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lat1</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lon1</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lat2</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lon2</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>tblk</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Calculates a list of points (lat,lon) along the Great Circle between two points. The points are spaced equally, one minute of block time apart. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">lat1</td><td>Location Latitude in degrees -90:90 ;S(-) N(+) </td></tr>
- <tr><td class="paramname">lon1</td><td>Location Longitude in degrees -180:180 W(-) E(+) </td></tr>
- <tr><td class="paramname">lat2</td><td>Location Latitude in degrees -90:90 ;S(-) N(+) </td></tr>
- <tr><td class="paramname">lon2</td><td>Location Longitude in degrees -180:180 W(-) E(+) </td></tr>
- <tr><td class="paramname">tblk</td><td>Total Blocktime in minutes </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>coordinates {lat,lon} along the Great Circle Track </dd></dl>
- </div>
- </div>
- <a id="a5998cba97220eee788b6e20515f19ba6"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a5998cba97220eee788b6e20515f19ba6">◆ </a></span>minutesToString()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">QString ACalc::minutesToString </td>
- <td>(</td>
- <td class="paramtype">QString </td>
- <td class="paramname"><em>block_minutes</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>ACalc::minutes_to_string Converts database time to String Time. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">blockminutes</td><td>from database </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>String hh:mm </dd></dl>
- </div>
- </div>
- <a id="ab9a4beeaf2f02314adef0dc6c0dc2ccd"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ab9a4beeaf2f02314adef0dc6c0dc2ccd">◆ </a></span>QTimeToMinutes()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int ACalc::QTimeToMinutes </td>
- <td>(</td>
- <td class="paramtype">QTime </td>
- <td class="paramname"><em>time</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>ACalc::time_to_minutes converts QTime to int minutes. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">time</td><td>QTime </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>int time as number of minutes </dd></dl>
- </div>
- </div>
- <a id="a2a540662e22840e4b58e8e760611b4f2"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a2a540662e22840e4b58e8e760611b4f2">◆ </a></span>radToDeg()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double ACalc::radToDeg </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>rad</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>radToDeg Converts radians to degrees </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">rad</td><td></td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>degrees </dd></dl>
- </div>
- </div>
- <a id="a37c52e8b522b233087b8c4d94f30fca5"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a37c52e8b522b233087b8c4d94f30fca5">◆ </a></span>radToNauticalMiles()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">double ACalc::radToNauticalMiles </td>
- <td>(</td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>rad</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>radToNauticalMiles Convert Radians to nautical miles </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">rad</td><td></td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>nautical miles </dd></dl>
- </div>
- </div>
- <a id="acfa830e821e2f9e20bebffda67d393b1"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#acfa830e821e2f9e20bebffda67d393b1">◆ </a></span>solarElevation()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double ACalc::solarElevation </td>
- <td>(</td>
- <td class="paramtype">QDateTime </td>
- <td class="paramname"><em>utc_time_point</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lat</em>, </td>
- </tr>
- <tr>
- <td class="paramkey"></td>
- <td></td>
- <td class="paramtype">double </td>
- <td class="paramname"><em>lon</em> </td>
- </tr>
- <tr>
- <td></td>
- <td>)</td>
- <td></td><td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>Calculates solar elevation angle for a given point in time and latitude/longitude coordinates. </p>
- <p>It is based on the formulas found here: <a href="http://stjarnhimlen.se/comp/tutorial.html#5">http://stjarnhimlen.se/comp/tutorial.html#5</a></p>
- <p>Credit also goes to Darin C. Koblick for his matlab implementation of various of these formulas and to Kevin Godden for porting it to C++.</p>
- <p>Darin C. Koblock: <a href="https://www.mathworks.com/matlabcentral/profile/authors/1284781">https://www.mathworks.com/matlabcentral/profile/authors/1284781</a> Kevin Godden: <a href="https://www.ridgesolutions.ie/index.php/about-us/">https://www.ridgesolutions.ie/index.php/about-us/</a></p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">utc_time_point</td><td>- QDateTime (UTC) for which the elevation is Calculated </td></tr>
- <tr><td class="paramname">lat</td><td>- Location Latitude in degrees -90:90 ;S(-) N(+) </td></tr>
- <tr><td class="paramname">lon</td><td>- Location Longitude in degrees -180:180 W(-) E(+) </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>elevation - double of solar elevation in degrees. </dd></dl>
- </div>
- </div>
- <a id="a0354672c538f003b4f7624ad38b6a42b"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a0354672c538f003b4f7624ad38b6a42b">◆ </a></span>stringToMinutes()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="mlabels">
- <tr>
- <td class="mlabels-left">
- <table class="memname">
- <tr>
- <td class="memname">int ACalc::stringToMinutes </td>
- <td>(</td>
- <td class="paramtype">QString </td>
- <td class="paramname"><em>timestring</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </td>
- <td class="mlabels-right">
- <span class="mlabels"><span class="mlabel">inline</span></span> </td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p>ACalc::string_to_minutes Converts String Time to String Number of Minutes. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">timestring</td><td>"hh:mm" </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd>String number of minutes </dd></dl>
- </div>
- </div>
- <a id="a3f12e1f72eeb5cc1cfe9b7b6df47391c"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a3f12e1f72eeb5cc1cfe9b7b6df47391c">◆ </a></span>updateAutoTimes()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void ACalc::updateAutoTimes </td>
- <td>(</td>
- <td class="paramtype">int </td>
- <td class="paramname"><em>acft_id</em></td><td>)</td>
- <td></td>
- </tr>
- </table>
- </div><div class="memdoc">
- <p><a class="el" href="namespace_a_calc.html#a3f12e1f72eeb5cc1cfe9b7b6df47391c" title="ACalc::updateAutoTimes When the details of an aircraft are changed, this function recalculates deduct...">ACalc::updateAutoTimes</a> When the details of an aircraft are changed, this function recalculates deductable times for this aircraft and updates the database accordingly. </p>
- <dl class="params"><dt>Parameters</dt><dd>
- <table class="params">
- <tr><td class="paramname">acft</td><td>An aircraft object. </td></tr>
- </table>
- </dd>
- </dl>
- <dl class="section return"><dt>Returns</dt><dd></dd></dl>
- </div>
- </div>
- </div><!-- contents -->
- </div><!-- doc-content -->
- <!-- start footer part -->
- <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
- <ul>
- <li class="navelem"><a class="el" href="namespace_a_calc.html">ACalc</a></li>
- <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>
- </ul>
- </div>
- </body>
- </html>
|