Commit Graph

59 Commits

Author SHA1 Message Date
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Roland Rossgotterer
220b271b34 [GFS] Move GFS structs out of CWeatherDataGfs
In the same step, change doubles to floats since this is what GFS provides.
2019-02-22 20:36:26 +00:00
Roland Rossgotterer
5b10abd63d [GFS] Calculate cloud levels from pressure and temperature 2019-02-22 20:36:25 +00:00
Roland Rossgotterer
2503a55dae Switch to NOAA GFS 0.25 degree resolution
The 0.25 degree forecast is available every hour (compared to every 3 hours for the 0.5 resolution). Also its more detailed.
2019-02-22 20:36:22 +00:00
Roland Rossgotterer
231f4df1bf Remove surface temperature
The surface temperature had no real value since humidity and height above MSL was not available. Instead stick to the isobaric layer temperatures only.
2019-02-22 20:36:22 +00:00
Roland Rossgotterer
a5e841f31d Style 2019-02-22 20:36:20 +00:00
Roland Rossgotterer
9d1299741e [GFS] Use Pressure at MSL instead of surface
Pressure at surface level was the wrong value. All barometers and
altimeters use pressure reduced to mean sea level. Reading that value
from GFS instead returns much more reasonable values.

ref T537
2019-02-22 20:36:20 +00:00
Roland Rossgotterer
90bc693509 Handle a hypothetical relative humidity of 0.0 %
Summary:
The formular to calculate the dew point is not defined for relative
humidity of 0.0 %. It is every unlikely to ever happen in real world
weather, but is handled just in case by using the smallest possible
numerical double value.

Reviewers: #swift_pilot_client

Maniphest Tasks: T406

Differential Revision: https://dev.swift-project.org/D82
2019-02-22 20:35:16 +00:00
Mat Sutcliffe
f4a0df315d Ref T488 Fixed undefined behaviour in g2clib and libxplanemp. 2019-02-22 20:34:58 +00:00
Mat Sutcliffe
225ff81252 Ref T485 Adjust CLogMessage and CStatusMessage call sites to use the new API. 2019-02-22 20:34:55 +00:00
Roland Winklmeier
4bc1982d06 Handle undefined GRIB2 values
ref T324
2018-09-12 20:30:35 +02:00
Roland Winklmeier
4b888d87f5 Add methods to read weather grid from file 2018-09-12 17:40:19 +02:00
Roland Winklmeier
868cae446a Fix misplaced bracket 2018-08-09 01:25:37 +02:00
Klaus Basan
f7a0c69fc8 Ref T270, push front for sequence and unified "insert" -> "push_back"
Remark: "CSequence::insert" is a synonym "push_back". This makes it clearer that push_back is used.
2018-06-01 01:30:33 +02:00
Roland Winklmeier
0c7d2b23f4 Fix race condition between previous and next weather request
Once a weather request was finished, its worker gets destroyed automatically
but not immediately. This can cause it to still exist, when the next
request is being processed.
Therefore wait with sending the fetchingFinished() signal, until the
worker is fully destroyed.

ref T235
2018-02-04 09:00:08 +01:00
Roland Winklmeier
1b5a0a7f4d Rename private slots to private functions 2018-02-04 09:00:02 +01:00
Klaus Basan
f049900e1f Ref T223, use const values for standard pressure
* standardISASeaLevelPressure
* use static const values for standard pressure
* minor formatting
2018-01-15 23:00:34 +01:00
Roland Winklmeier
c553d24d0e Move GFS weather data url into global setup
Summary:
The GFS weather data url so far was hard coded. With this commit, it is
moved into the global setup (bootstrap file).
Also the url type was changed from QUrl to CUrl, which simplified the
generation of the url including its query by using CUrl::appendQuery().
Finally it fixes sampleweatherdata, which did not have a CApplication yet.

Reviewers: #swift_pilot_client, msutcliffe

Reviewed By: #swift_pilot_client, msutcliffe

Subscribers: jenkins

Tags: #swift_pilot_client

Maniphest Tasks: T151

Differential Revision: https://dev.swift-project.org/D57
2017-11-20 15:57:08 +01:00
Klaus Basan
099afba8a7 Found during T149, use QScopedPointer to destroy QNetworkReply 2017-09-24 19:54:17 +01:00
Klaus Basan
f3847bd33c Ref T121, check if Internet is accessible
* in case the internet provider is down, this is not detected
* extended test to detect if access is possible
* in case of downtime this indicated in status component
2017-09-24 19:51:44 +01:00
Klaus Basan
6ebbf58f79 Formatting 2017-05-05 23:07:34 +01:00
Mathew Sutcliffe
e3fe8ec39f refs #937 Resolved clazy warnings: miscellaneous. 2017-04-19 19:31:50 +01:00
Mathew Sutcliffe
fce1513dae refs #937 Resolved clazy warnings: unnecessary detaching of containers. 2017-04-19 19:31:38 +01:00
Roland Winklmeier
64a47da67f Use CApplication::isNetworkAccessible() wherever possible
Up to now we had a mixture of different methods to detect whether
network is connected, accessible or both. Even if they implied a
different meaning, they were all doing the same and internally
referred to almost the same code. Almost, since our implementation
of CNetworkUtils::hasConnectedInterface refers to code from Qt 4.4.
However, all of them returned a boolean status whether a network
interface is generally up or not. Instead of maintaining our own
version, use Qt functions.

refs #869
2017-02-24 15:22:11 +00:00
Roland Winklmeier
10f9c9c50a Fix typo 2017-02-24 15:22:10 +00:00
Roland Winklmeier
2616f94f2d Define precipitation rate default unit to mm/h
There was a misalignment in precipitation rate units across the code.
GFS values are in kg m-2 s-1 which is equal to mm/s, but the default
unit seems to be mm/h in many weather documents.
2017-02-24 00:09:22 +00:00
Klaus Basan
c2aeab0ab8 Unrelated formatting 2017-02-24 00:08:58 +00:00
Klaus Basan
1ced7f3c0b refs #857, check if network is accessible in readers
* new read state "skipped"
* renamed to "isNetworkConnectedAndAccessible"
* checking before reading, which would only fail if network is not accessible
2017-02-24 00:08:55 +00:00
Roland Winklmeier
2bd9120c1c Quit and wait for GFS parser thread to be finished before closing
refs #854
2017-02-24 00:08:51 +00:00
Roland Winklmeier
2cea07f174 Use CApplications QNetworkAccessManager to download GFS data 2017-01-10 23:47:37 +00:00
Mathew Sutcliffe
6f907c5ade refs #800 Fixed uninitialized variable. 2016-12-13 19:00:34 +01:00
Mathew Sutcliffe
ced70c4612 refs #800 Replaced some C-style casts. 2016-12-13 19:00:31 +01:00
Roland Winklmeier
91728fe414 Reduce the number of debug messages in CWeatherDataGfs 2016-06-17 10:46:31 +02:00
Roland Winklmeier
7ca5d63ce5 Retrieve precipitation rate from GFS data
refs #663
2016-06-17 10:46:31 +02:00
Roland Winklmeier
027b344d11 WeatherDataGfs: Calculate dew point
refs #663
2016-06-17 10:46:31 +02:00
Roland Winklmeier
3a1605b553 Differentiate None from Unknown in CCloudLayer
refs #663
2016-06-17 10:46:31 +02:00
Roland Winklmeier
ea1837d847 Replace several for loops with range-for loops 2016-04-10 16:20:04 +02:00
Roland Winklmeier
5801962a99 Extend GFS data and CGridPoint with surface pressure and temperature 2016-04-10 16:17:23 +02:00
Roland Winklmeier
9c869a16df Retrieve binary rain and snow information from GFS source
refs #612
2016-04-10 16:16:23 +02:00
Roland Winklmeier
82fc267b22 Fetch weather data by grid and range instead of geo location
refs #612
2016-04-10 16:14:00 +02:00
Roland Winklmeier
f72c8e878b Use CCoordinateGeodetic instead of CLatitude and CLongitude
refs #612
2016-04-10 16:13:39 +02:00
Roland Winklmeier
4e9c34b04a [g2clib] Fix unassigned variable 2016-03-31 13:47:07 +02:00
Roland Winklmeier
724cefe44f [g2clib] Fix MSVC2015 compiler warnings when building 64 bit 2016-03-31 13:47:06 +02:00
Roland Winklmeier
48fdfbea3e Cloud layers have a base and a top
refs #579
2016-03-02 23:04:29 +01:00
Roland Winklmeier
af3b8f7f0c Add dew point to CTemperatureLayer
refs #579
2016-03-02 23:03:33 +01:00
Roland Winklmeier
af28db9e97 Add CVisibilityLayer and CVisibilityLayerList
refs #579
2016-03-02 22:58:38 +01:00
Roland Winklmeier
7953d550ea Fix linux clang errors and warnings
refs #596
2016-02-15 18:35:34 +01:00
Roland Winklmeier
aabaf69bcd [g2clib] Fix redundant nullptr check when freeing memory 2016-01-28 01:36:30 +01:00
Roland Winklmeier
2fa0c669df [g2clib] Fix warning about conversion from double to float 2016-01-28 01:36:28 +01:00
Roland Winklmeier
c226b07c5b [g2clib] Fix potential null pointer dereference 2016-01-28 01:36:26 +01:00