123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577 |
- <!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.9.1"/>
- <meta name="viewport" content="width=device-width, initial-scale=1"/>
- <title>openPilotLog: OPL::Calc 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="projectlogo"><img alt="Logo" src="icon_main.png"/></td>
- <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.9.1 -->
- <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','.html');
- /* @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_o_p_l_1_1_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="#nested-classes">Classes</a> |
- <a href="#func-members">Functions</a> </div>
- <div class="headertitle">
- <div class="title">OPL::Calc Namespace Reference</div> </div>
- </div><!--header-->
- <div class="contents">
- <p>The ACalc 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_o_p_l_1_1_calc.html#details">More...</a></p>
- <table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
- Classes</h2></td></tr>
- <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="struct_o_p_l_1_1_calc_1_1_night_time_values.html">NightTimeValues</a></td></tr>
- <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">The <a class="el" href="struct_o_p_l_1_1_calc_1_1_night_time_values.html" title="The NightTimeValues struct encapsulates values relating to night time that are needed by the NewFligh...">NightTimeValues</a> struct encapsulates values relating to night time that are needed by the <a class="el" href="class_new_flight_dialog.html" title="The NewFlightDialog is used to add or edit entries from the flights table in the database.">NewFlightDialog</a>. <a href="struct_o_p_l_1_1_calc_1_1_night_time_values.html#details">More...</a><br /></td></tr>
- <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
- </table><table class="memberdecls">
- <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
- Functions</h2></td></tr>
- <tr class="memitem:ae4b929bd19437f7e9e5da48e484c3d78"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#ae4b929bd19437f7e9e5da48e484c3d78">radToDeg</a> (double rad)</td></tr>
- <tr class="memdesc:ae4b929bd19437f7e9e5da48e484c3d78"><td class="mdescLeft"> </td><td class="mdescRight">radToDeg Converts radians to degrees <a href="namespace_o_p_l_1_1_calc.html#ae4b929bd19437f7e9e5da48e484c3d78">More...</a><br /></td></tr>
- <tr class="separator:ae4b929bd19437f7e9e5da48e484c3d78"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a19aa0f77d99530368d804fb5aac7095c"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a19aa0f77d99530368d804fb5aac7095c">degToRad</a> (double deg)</td></tr>
- <tr class="memdesc:a19aa0f77d99530368d804fb5aac7095c"><td class="mdescLeft"> </td><td class="mdescRight">degToRad Converts degrees to radians <a href="namespace_o_p_l_1_1_calc.html#a19aa0f77d99530368d804fb5aac7095c">More...</a><br /></td></tr>
- <tr class="separator:a19aa0f77d99530368d804fb5aac7095c"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a54af04cfc491c441e8f000c8a9c85a5d"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a54af04cfc491c441e8f000c8a9c85a5d">radToNauticalMiles</a> (double rad)</td></tr>
- <tr class="memdesc:a54af04cfc491c441e8f000c8a9c85a5d"><td class="mdescLeft"> </td><td class="mdescRight">radToNauticalMiles Convert Radians to nautical miles <a href="namespace_o_p_l_1_1_calc.html#a54af04cfc491c441e8f000c8a9c85a5d">More...</a><br /></td></tr>
- <tr class="separator:a54af04cfc491c441e8f000c8a9c85a5d"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:af98171551ab57f5a1857f84fa31cd64e"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#af98171551ab57f5a1857f84fa31cd64e">greatCircleDistance</a> (double lat1, double lon1, double lat2, double lon2)</td></tr>
- <tr class="memdesc:af98171551ab57f5a1857f84fa31cd64e"><td class="mdescLeft"> </td><td class="mdescRight">greatCircleDistance Calculates Great Circle distance between two coordinates, return in Radians. <a href="namespace_o_p_l_1_1_calc.html#af98171551ab57f5a1857f84fa31cd64e">More...</a><br /></td></tr>
- <tr class="separator:af98171551ab57f5a1857f84fa31cd64e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0d6ee1592d78a15f8a37fb5ba16b2840"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a0d6ee1592d78a15f8a37fb5ba16b2840">greatCircleDistanceBetweenAirports</a> (const QString &dept, const QString &dest)</td></tr>
- <tr class="memdesc:a0d6ee1592d78a15f8a37fb5ba16b2840"><td class="mdescLeft"> </td><td class="mdescRight">Opl::Calc::greatCircleDistanceBetweenAirports Calculates Great Circle distance between two coordinates, return in nautical miles. <a href="namespace_o_p_l_1_1_calc.html#a0d6ee1592d78a15f8a37fb5ba16b2840">More...</a><br /></td></tr>
- <tr class="separator:a0d6ee1592d78a15f8a37fb5ba16b2840"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a800630d9c6833c9707bdf3f8dfbdd63e"><td class="memItemLeft" align="right" valign="top">QVector< QVector< double > > </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a800630d9c6833c9707bdf3f8dfbdd63e">intermediatePointsOnGreatCircle</a> (double lat1, double lon1, double lat2, double lon2, int tblk)</td></tr>
- <tr class="memdesc:a800630d9c6833c9707bdf3f8dfbdd63e"><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_o_p_l_1_1_calc.html#a800630d9c6833c9707bdf3f8dfbdd63e">More...</a><br /></td></tr>
- <tr class="separator:a800630d9c6833c9707bdf3f8dfbdd63e"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:aad346a109dd40d2ce9363577386ec4e2"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#aad346a109dd40d2ce9363577386ec4e2">solarElevation</a> (QDateTime utc_time_point, double lat, double lon)</td></tr>
- <tr class="memdesc:aad346a109dd40d2ce9363577386ec4e2"><td class="mdescLeft"> </td><td class="mdescRight">Calculates solar elevation angle for a given point in time and latitude/longitude coordinates. <a href="namespace_o_p_l_1_1_calc.html#aad346a109dd40d2ce9363577386ec4e2">More...</a><br /></td></tr>
- <tr class="separator:aad346a109dd40d2ce9363577386ec4e2"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a12ab4061d7d8849b12bec02ada5cdcd7"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a12ab4061d7d8849b12bec02ada5cdcd7">calculateNightTime</a> (const QString &dept, const QString &dest, QDateTime departureTime, int tblk, int nightAngle)</td></tr>
- <tr class="memdesc:a12ab4061d7d8849b12bec02ada5cdcd7"><td class="mdescLeft"> </td><td class="mdescRight">Calculates which portion of a flight was conducted in night conditions. <a href="namespace_o_p_l_1_1_calc.html#a12ab4061d7d8849b12bec02ada5cdcd7">More...</a><br /></td></tr>
- <tr class="separator:a12ab4061d7d8849b12bec02ada5cdcd7"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:ad8796e08642fb3e3021bd96630070523"><td class="memItemLeft" align="right" valign="top"><a id="ad8796e08642fb3e3021bd96630070523"></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:ad8796e08642fb3e3021bd96630070523"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a268b46842ac1389c26b1631da6bb18b0"><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a268b46842ac1389c26b1631da6bb18b0">formatTimeInput</a> (QString user_input)</td></tr>
- <tr class="memdesc:a268b46842ac1389c26b1631da6bb18b0"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_o_p_l_1_1_calc.html#a268b46842ac1389c26b1631da6bb18b0" title="OPL::Calc::formatTimeInput verifies user input and formats to hh:mm if the output is not a valid time...">OPL::Calc::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_o_p_l_1_1_calc.html#a268b46842ac1389c26b1631da6bb18b0">More...</a><br /></td></tr>
- <tr class="separator:a268b46842ac1389c26b1631da6bb18b0"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a0b69f903cde75ff19eff54d880bb8c33"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a0b69f903cde75ff19eff54d880bb8c33">updateAutoTimes</a> (int acft_id)</td></tr>
- <tr class="memdesc:a0b69f903cde75ff19eff54d880bb8c33"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_o_p_l_1_1_calc.html#a0b69f903cde75ff19eff54d880bb8c33" title="OPL::Calc::updateAutoTimes When the details of an aircraft are changed, this function recalculates de...">OPL::Calc::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_o_p_l_1_1_calc.html#a0b69f903cde75ff19eff54d880bb8c33">More...</a><br /></td></tr>
- <tr class="separator:a0b69f903cde75ff19eff54d880bb8c33"><td class="memSeparator" colspan="2"> </td></tr>
- <tr class="memitem:a1e7c96710acec446476bb110d24f8a43"><td class="memItemLeft" align="right" valign="top"><a id="a1e7c96710acec446476bb110d24f8a43"></a>
- void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespace_o_p_l_1_1_calc.html#a1e7c96710acec446476bb110d24f8a43">updateNightTimes</a> ()</td></tr>
- <tr class="memdesc:a1e7c96710acec446476bb110d24f8a43"><td class="mdescLeft"> </td><td class="mdescRight"><a class="el" href="namespace_o_p_l_1_1_calc.html#a1e7c96710acec446476bb110d24f8a43" title="OPL::Calc::updateNightTimes updates the night times in the database, used when changing night angle s...">OPL::Calc::updateNightTimes</a> updates the night times in the database, used when changing night angle setting for example. <br /></td></tr>
- <tr class="separator:a1e7c96710acec446476bb110d24f8a43"><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 ACalc 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="a12ab4061d7d8849b12bec02ada5cdcd7"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a12ab4061d7d8849b12bec02ada5cdcd7">◆ </a></span>calculateNightTime()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">int OPL::Calc::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="a19aa0f77d99530368d804fb5aac7095c"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a19aa0f77d99530368d804fb5aac7095c">◆ </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 OPL::Calc::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="a268b46842ac1389c26b1631da6bb18b0"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a268b46842ac1389c26b1631da6bb18b0">◆ </a></span>formatTimeInput()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QT_DEPRECATED QString OPL::Calc::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_o_p_l_1_1_calc.html#a268b46842ac1389c26b1631da6bb18b0" title="OPL::Calc::formatTimeInput verifies user input and formats to hh:mm if the output is not a valid time...">OPL::Calc::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="af98171551ab57f5a1857f84fa31cd64e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#af98171551ab57f5a1857f84fa31cd64e">◆ </a></span>greatCircleDistance()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double OPL::Calc::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="a0d6ee1592d78a15f8a37fb5ba16b2840"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a0d6ee1592d78a15f8a37fb5ba16b2840">◆ </a></span>greatCircleDistanceBetweenAirports()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double OPL::Calc::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>Opl::Calc::greatCircleDistanceBetweenAirports 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="a800630d9c6833c9707bdf3f8dfbdd63e"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a800630d9c6833c9707bdf3f8dfbdd63e">◆ </a></span>intermediatePointsOnGreatCircle()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">QVector< QVector< double > > OPL::Calc::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="ae4b929bd19437f7e9e5da48e484c3d78"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#ae4b929bd19437f7e9e5da48e484c3d78">◆ </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 OPL::Calc::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="a54af04cfc491c441e8f000c8a9c85a5d"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a54af04cfc491c441e8f000c8a9c85a5d">◆ </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 OPL::Calc::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="aad346a109dd40d2ce9363577386ec4e2"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#aad346a109dd40d2ce9363577386ec4e2">◆ </a></span>solarElevation()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">double OPL::Calc::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="a0b69f903cde75ff19eff54d880bb8c33"></a>
- <h2 class="memtitle"><span class="permalink"><a href="#a0b69f903cde75ff19eff54d880bb8c33">◆ </a></span>updateAutoTimes()</h2>
- <div class="memitem">
- <div class="memproto">
- <table class="memname">
- <tr>
- <td class="memname">void OPL::Calc::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_o_p_l_1_1_calc.html#a0b69f903cde75ff19eff54d880bb8c33" title="OPL::Calc::updateAutoTimes When the details of an aircraft are changed, this function recalculates de...">OPL::Calc::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_o_p_l.html">OPL</a></li><li class="navelem"><a class="el" href="namespace_o_p_l_1_1_calc.html">Calc</a></li>
- <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
- </ul>
- </div>
- </body>
- </html>
|