Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weather #271

Merged
merged 48 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e251505
Feat: Options for RealTraffic weather and its debugging
TwinFan Jul 7, 2024
5e9f43e
Feat/RT: Send de-auth message to end session
TwinFan Jul 7, 2024
08981db
Feat/RT/Weather: nearestmetar API request
TwinFan Jul 9, 2024
84c1b37
Feat/RT/Weather: Initial setting of weather
TwinFan Jul 14, 2024
59958c4
Feat/RT/Weather: Switch to 'v4' endpoint, fix cross-build errors
TwinFan Jul 14, 2024
27a2e17
Feat/RT/Weather: Correct interpolation of WDIRs; Control info in Status
TwinFan Jul 14, 2024
abdf54f
Feat/RT/Weather: Use RT QNH for LiveTraffic's QNH
TwinFan Jul 14, 2024
769e81c
Feat/RT/Weather: Set wave amplitude based on Beaufort scale
TwinFan Jul 14, 2024
44e979a
Feat/RT/Weather: a bit of runway condition
TwinFan Jul 16, 2024
f1f8a1d
Added 'parson' as Git submodule
TwinFan Jul 16, 2024
e3ed0c6
Fix/RT/Weather: runway_friction is an int
TwinFan Jul 16, 2024
942d2c5
Feat/RT/Weather: Config 3-way, with Auto=When XP is set to real weather
TwinFan Jul 16, 2024
bd9623f
Feat/RT/Weather: Initial parsing of METAR report
TwinFan Jul 20, 2024
1023587
Fix/Debug: Disable aircraft before plugin reload
TwinFan Jul 24, 2024
ce2e1a8
Feat/RT/Weather/METAR: CAVOK etc., clouds, weather phenomena, rwy fric
TwinFan Jul 24, 2024
cb39e04
Fix/Win/Build
TwinFan Jul 24, 2024
c5c9f39
Feat/RT/Weather: Pressure group (QNH, SLP)
TwinFan Jul 25, 2024
0164999
Feat/RT/Weather: Temperatur Group, fixes to pressure handling
TwinFan Jul 26, 2024
ade27c3
Feat/RT/Weather: Corrections to cloud coverage
TwinFan Jul 27, 2024
4a964c1
Feat/Weather: Take local QNH from METAR
TwinFan Jul 27, 2024
b2b8298
Feat/InfoWnd: Start button if LiveTraffic inactive
TwinFan Jul 27, 2024
38b6e8d
Fix/RT: Change wrong a/c code ASW20 to AS20
TwinFan Jul 27, 2024
5bf01b3
Feat/RT/Weather: Wind Group
TwinFan Jul 27, 2024
43cd78c
Feat/RT/Weath: Rwy State Group
TwinFan Jul 28, 2024
2626f06
Feat/Weather: Prepare for more generic weather, METAR-based
TwinFan Aug 24, 2024
dd20439
RT: Adapt to aircraft data in 'data' or 'data/buffer_#' objects
TwinFan Aug 24, 2024
df8443e
Feat/RT: Request buffered data on first request
TwinFan Aug 24, 2024
b473269
Fix: Find airport location
TwinFan Aug 24, 2024
4d8f2e5
Feat/RT/Weather: historic weather, stability fixes
TwinFan Aug 25, 2024
d2f8e0f
Feat/RT/Weather: Removed XP weather categories, added readme
TwinFan Aug 29, 2024
c1586c6
Feat/RT/ParkedAc: Populate parked aircraft from RealTraffic
TwinFan Aug 31, 2024
96c5911
Feat/RT/ParkedAC: honor "Keep Parked Aircraft", update after loc change
TwinFan Sep 1, 2024
65336bd
Fix/RT/ParkedAC: Remove duplicates per parking position
TwinFan Sep 1, 2024
df2a931
Feat/RT/Weather: Guess cloud type by altitude if unspecified
TwinFan Sep 1, 2024
8a3c224
Feat/RT: Restructured direct API calls
TwinFan Sep 1, 2024
7f0f77c
Feat/Weather: Avoid overlapping cloud layers
TwinFan Sep 1, 2024
d541537
Feat/Weather: Cleanup, replace constants
TwinFan Sep 7, 2024
b42343a
Feat/Weather: Option "METAR+XP" fully implemented
TwinFan Sep 7, 2024
bc191a4
Fixed endless loop bug on far-away synthetic aircraft
TwinFan Sep 8, 2024
9f460b8
Feat/OpenSky: Re-enable as default
TwinFan Sep 8, 2024
62a7b2a
Fix/RT: Show proper history Sim Time in AC Info Wnd
TwinFan Sep 8, 2024
fa8573d
Fix/Weather: Defaults to "RT Weather" only with RT license
TwinFan Sep 8, 2024
a51dc7d
Feat/Weather: Fetch nearest METAR, update to /api/data/metar
TwinFan Sep 9, 2024
80a42d6
Feat/Weather/RT: Prefer METAR in direction of flight
TwinFan Sep 10, 2024
ed649f1
Fix/Weather: Minor fixes to logging / credits
TwinFan Sep 11, 2024
a021dba
Fix/Weather: Minor fixes to logging / credits
TwinFan Sep 11, 2024
ac4698f
Merge branch 'RT_Weather' of github.com:TwinFan/LiveTraffic into RT_W…
TwinFan Sep 11, 2024
bb1269f
Feat/Weather: Define constant weather by METAR
TwinFan Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
[submodule "Lib/XPMP2"]
path = Lib/XPMP2
url = https://github.com/TwinFan/XPMP2
branch = master
branch = master
[submodule "Lib/parson"]
path = Lib/parson
url = https://github.com/kgabis/parson
[submodule "Lib/metaf"]
path = Lib/metaf
url = https://github.com/TwinFan/metaf
Binary file added AviationWeather/METAR.sjson/747604614.297283
Binary file not shown.
Binary file added AviationWeather/METAR.sjson/747604784.031099
Binary file not shown.
Binary file added AviationWeather/METAR.sjson/data
Binary file not shown.
Binary file added AviationWeather/METAR.sjson/metaData
Binary file not shown.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ else()
endif()

project(LiveTraffic
VERSION 3.6.0
VERSION 3.6.9
DESCRIPTION "LiveTraffic X-Plane plugin")
set(VERSION_BETA 1)

# Building a Beta version can be demanded via ENV variable 'version_beta' being set to 1
set(VERSION_BETA 0)
if(DEFINED ENV{version_beta})
if ($ENV{version_beta} GREATER 0)
set(VERSION_BETA 1)
Expand Down Expand Up @@ -141,6 +141,7 @@ include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Lib/ImGui")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Lib/ImGui/misc/cpp")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Lib/ImgWindow")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Lib/Font")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/Lib/metaf/include")

################################################################################
# Source groups
Expand Down Expand Up @@ -184,6 +185,7 @@ set(Header_Files
Lib/ImgWindow/SystemGL.h
Lib/Font/IconsFontAwesome5.h
Lib/Font/fa-solid-900.inc
Lib/metaf/include/metaf.hpp
Lib/XPMP2/inc/XPCAircraft.h
Lib/XPMP2/inc/XPMPMultiplayer.h
Lib/XPMP2/lib/fmod/logo/FMOD_Logo.h
Expand Down
169 changes: 0 additions & 169 deletions Data/RealTraffic/RTAPI_example.py

This file was deleted.

Binary file removed Data/RealTraffic/RTTFC_Template.xlsx
Binary file not shown.
Binary file removed Data/RealTraffic/RT_API.sjson/725578599.580375
Binary file not shown.
Binary file removed Data/RealTraffic/RT_API.sjson/725717638.083122
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/742250820.106701
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/742250820.107324
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/742607783.227589
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/744148065.431184
Binary file not shown.
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/746213911.74435
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/746214863.95976
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/746312457.328537
Binary file not shown.
Binary file added Data/RealTraffic/RT_API.sjson/746828180.600688
Binary file not shown.
Binary file modified Data/RealTraffic/RT_API.sjson/data
Binary file not shown.
Binary file modified Data/RealTraffic/RT_API.sjson/metaData
Binary file not shown.
Binary file modified Data/RealTraffic/RealTraffic API.pdf
Binary file not shown.
Binary file added Data/RealTraffic/Weather.xls
Binary file not shown.
6 changes: 4 additions & 2 deletions Include/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ constexpr double M_per_FT = 0.3048; // meter per 1 foot
constexpr int M_per_KM = 1000;
constexpr double KT_per_M_per_S = 1.94384; // 1m/s = 1.94384kt
constexpr double NM_per_KM = 1000.0 / double(M_per_NM);
constexpr double M_per_SM = 1609.344; ///< meters per statute mile
constexpr int SEC_per_M = 60; // 60 seconds per minute
constexpr int SEC_per_H = 3600; // 3600 seconds per hour
constexpr int H_per_D = 24; // 24 hours per day
Expand All @@ -67,7 +68,7 @@ constexpr double TEMP_LAPS_R = -0.0065f; ///< K/m

//MARK: Flight Data-related
constexpr unsigned MAX_TRANSP_ICAO = 0xFFFFFF; // max transponder ICAO code (24bit)
constexpr int MAX_NUM_AIRCRAFT = 200; ///< maximum number of aircraft allowed to be rendered
constexpr int MAX_NUM_AIRCRAFT = 300; ///< maximum number of aircraft allowed to be rendered
constexpr double FLIGHT_LOOP_INTVL = -5.0; // call ourselves every 5 frames
constexpr double AC_MAINT_INTVL = 2.0; // seconds (calling a/c maintenance periodically)
constexpr double TIME_REQU_POS = 0.5; // seconds before reaching current 'to' position we request calculation of next position
Expand Down Expand Up @@ -270,6 +271,7 @@ constexpr const char* REMOTE_SIGNATURE = "TwinFan.plugin.XPMP2.Remote";
#define HELP_SET_OUTPUT_CH "setup/installation/foreflight" // currently the same as ForeFlight, which is the only output channel
#define HELP_SET_CH_FOREFLIGHT "setup/installation/foreflight"
#define HELP_SET_ACLABELS "setup/configuration/settings-a-c-labels"
#define HELP_SET_WEATHER "setup/configuration/settings-weather"
#define HELP_SET_ADVANCED "setup/configuration/settings-advanced"
#define HELP_SET_CSL "setup/configuration/settings-csl"
#define HELP_SET_DEBUG "setup/configuration/settings-debug"
Expand Down Expand Up @@ -367,7 +369,7 @@ constexpr int SERR_LEN = 100; // size of buffer for IO error t
#define ERR_CFG_FILE_OPEN_OUT "Could not create config file '%s': %s"
#define ERR_CFG_FILE_WRITE "Could not write into config file '%s': %s"
#define ERR_CFG_FILE_OPEN_IN "Could not open '%s': %s"
#define ERR_CFG_FILE_VER "Config file '%s' first line: Unsupported format or version: %s"
#define ERR_CFG_FILE_VER "Config file '%s' first line: Unsupported format or version: '%s'"
#define ERR_CFG_FILE_VER_UNEXP "Config file '%s' first line: Unexpected version %s, expected %s...trying to continue"
#define ERR_CFG_FILE_IGNORE "Ignoring unkown entry '%s' from config file '%s'"
#define ERR_CFG_FILE_WORDS "Expected two words (key, value) in config file '%s', line '%s': ignored"
Expand Down
8 changes: 5 additions & 3 deletions Include/CoordCalc.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
//
/// Square, ie. a^2
template <class T>
inline T sqr (T a) { return a*a; }
inline T sqr (const T a) { return a*a; }

/// Pythagoras square, ie. a^2 + b^2
template <class T>
inline T pyth2 (T a, T b) { return sqr(a) + sqr(b); }
inline T pyth2 (const T a, const T b) { return sqr(a) + sqr(b); }

//
//MARK: Degree/Radian conversion
Expand Down Expand Up @@ -392,7 +392,9 @@ struct positionTy {

// normalizes to -90/+90 lat, -180/+180 lon, 360° heading, return *this
positionTy& normalize();
// is a good valid position?
// has a position and altitude?
bool hasPosAlt () const { return !std::isnan(lat()) && !std::isnan(lon()) && !std::isnan(alt_m()); }
// is a good valid normalized position incl timestamp?
bool isNormal (bool bAllowNanAltIfGnd = false) const;
// is fully valid? (isNormal + heading, pitch, roll)?
bool isFullyValid() const;
Expand Down
Loading