Skip to content

Commit

Permalink
Merge pull request #272 from TwinFan/Next
Browse files Browse the repository at this point in the history
v4.0.0
  • Loading branch information
TwinFan authored Sep 14, 2024
2 parents 696b9e6 + 16a059e commit 3821530
Show file tree
Hide file tree
Showing 60 changed files with 3,054 additions and 3,316 deletions.
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 4.0.0
DESCRIPTION "LiveTraffic X-Plane plugin")
set(VERSION_BETA 0)

# 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

0 comments on commit 3821530

Please sign in to comment.