|
QTime | blocktime (QTime tofb, QTime tonb) |
| ACalc::blocktime Calculates Block Time for a given departure and arrival time. More...
|
|
QString | minutesToString (QString block_minutes) |
| ACalc::minutes_to_string Converts database time to String Time. More...
|
|
QString | minutesToString (int block_minutes) |
|
int | QTimeToMinutes (QTime time) |
| ACalc::time_to_minutes converts QTime to int minutes. More...
|
|
int | stringToMinutes (QString timestring) |
| ACalc::string_to_minutes Converts String Time to String Number of Minutes. More...
|
|
double | radToDeg (double rad) |
| radToDeg Converts radians to degrees More...
|
|
double | degToRad (double deg) |
| degToRad Converts degrees to radians More...
|
|
double | radToNauticalMiles (double rad) |
| radToNauticalMiles Convert Radians to nautical miles More...
|
|
double | greatCircleDistance (double lat1, double lon1, double lat2, double lon2) |
| greatCircleDistance Calculates Great Circle distance between two coordinates, return in Radians. More...
|
|
double | greatCircleDistanceBetweenAirports (const QString &dept, const QString &dest) |
| ACalc::greatCircleDistanceBetweenAirports Calculates Great Circle distance between two coordinates, return in nautical miles. More...
|
|
QVector< QVector< double > > | intermediatePointsOnGreatCircle (double lat1, double lon1, double lat2, double lon2, int tblk) |
| 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. More...
|
|
double | solarElevation (QDateTime utc_time_point, double lat, double lon) |
| Calculates solar elevation angle for a given point in time and latitude/longitude coordinates. More...
|
|
int | calculateNightTime (const QString &dept, const QString &dest, QDateTime departureTime, int tblk, int nightAngle) |
| Calculates which portion of a flight was conducted in night conditions. More...
|
|
bool | isNight (const QString &icao, QDateTime event_time, int night_angle) |
|
QString | formatTimeInput (QString user_input) |
| ACalc::formatTimeInput 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. More...
|
|
void | updateAutoTimes (int acft_id) |
| ACalc::updateAutoTimes When the details of an aircraft are changed, this function recalculates deductable times for this aircraft and updates the database accordingly. More...
|
|
void | autoTimes (Flight, Aircraft) |
|
void | updateNightTimes () |
| ACalc::updateNightTimes updates the night times in the database, used when changing night angle setting for example.
|
|
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.
double ACalc::greatCircleDistance |
( |
double |
lat1, |
|
|
double |
lon1, |
|
|
double |
lat2, |
|
|
double |
lon2 |
|
) |
| |
greatCircleDistance Calculates Great Circle distance between two coordinates, return in Radians.
- Parameters
-
lat1 | Location Latitude in degrees -90:90 ;S(-) N(+) |
lon1 | Location Longitude in degrees -180:180 W(-) E(+) |
lat2 | Location Latitude in degrees -90:90 ;S(-) N(+) |
lon2 | Location Longitude in degrees -180:180 W(-) E(+) |
- Returns
The purpose of the following functions is to provide functionality enabling the Calculation of night flying time. EASA defines night as follows:
‘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.
This is the proccess of Calculating night time in this program:
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)
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.
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.