From 06547242635547189028b92008f6237f7410c356 Mon Sep 17 00:00:00 2001 From: Stefan Kebekus Date: Thu, 11 Mar 2021 07:54:00 +0100 Subject: [PATCH] Done with Version 2.5 --- 3rdParty/enrouteText | 2 +- CMakeLists.txt | 2 +- src/Navigation_FLARMAdaptor.cpp | 26 ++++++++++++++++---------- src/Navigation_Traffic.cpp | 1 + src/qml/items/MFM.qml | 6 +++++- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/3rdParty/enrouteText b/3rdParty/enrouteText index b5055b278..52340c1a3 160000 --- a/3rdParty/enrouteText +++ b/3rdParty/enrouteText @@ -1 +1 @@ -Subproject commit b5055b278ab674cb28e0eeb8dc24a1767e287dce +Subproject commit 52340c1a34c484ff2c25b13195a3bc3304cda156 diff --git a/CMakeLists.txt b/CMakeLists.txt index d646eab87..133878963 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ option(BUILD_DOC "Build developer documentation" OFF) # Project data # -project(enroute VERSION 2.4.6) +project(enroute VERSION 2.5.0) set(APP_ID de.akaflieg_freiburg.enroute) math(EXPR PROJECT_VERSION_CODE 10000*${PROJECT_VERSION_MAJOR}+100*${PROJECT_VERSION_MINOR}+${PROJECT_VERSION_PATCH}) add_compile_definitions(PROJECT_VERSION="${PROJECT_VERSION}") diff --git a/src/Navigation_FLARMAdaptor.cpp b/src/Navigation_FLARMAdaptor.cpp index 31ab644ac..0752f4b87 100644 --- a/src/Navigation_FLARMAdaptor.cpp +++ b/src/Navigation_FLARMAdaptor.cpp @@ -133,6 +133,7 @@ Navigation::FLARMAdaptor::FLARMAdaptor(QObject *parent) : QObject(parent) { // Uncomment one of the lines below to start this class in simulation mode. QString simulatorFileName; +// simulatorFileName = "/home/kebekus/Software/standards/FLARM/helluva_lot_aircraft.txt"; // simulatorFileName = "/home/kebekus/Software/standards/FLARM/expiry-hard.txt"; // simulatorFileName = "/home/kebekus/Software/standards/FLARM/expiry-soft.txt"; // simulatorFileName = "/home/kebekus/Software/standards/FLARM/many_opponents.txt"; @@ -350,16 +351,6 @@ void Navigation::FLARMAdaptor::processFLARMMessage(QString msg) vDistInM = qQNaN(); } - // Ground speed it optimal. If ground speed is zero that means: - // target is on the ground. Ignore these targets! - auto groundSpeedInMPS = arguments[8].toDouble(&ok); - if (!ok) { - groundSpeedInMPS = qQNaN(); - } - if (groundSpeedInMPS == 0.0) { - return; - } - // Climb rate is optional auto climbRateInMPS = arguments[9].toDouble(&ok); if (!ok) { @@ -402,10 +393,25 @@ void Navigation::FLARMAdaptor::processFLARMMessage(QString msg) if (targetType == u"C") { type = Navigation::Traffic::Airship; } + if (targetType == u"D") { + type = Navigation::Traffic::Drone; + } if (targetType == u"F") { type = Navigation::Traffic::StaticObstacle; } + + // Ground speed it optimal. If ground speed is zero that means: + // target is on the ground. Ignore these targets, unless they are known static obstacles! + auto groundSpeedInMPS = arguments[8].toDouble(&ok); + if (!ok) { + groundSpeedInMPS = qQNaN(); + } + if ((groundSpeedInMPS == 0.0) && (type != Navigation::Traffic::StaticObstacle)) { + return; + } + + // Target ID is optional auto targetID = arguments[5]; diff --git a/src/Navigation_Traffic.cpp b/src/Navigation_Traffic.cpp index ce5488c6d..2cf34560d 100644 --- a/src/Navigation_Traffic.cpp +++ b/src/Navigation_Traffic.cpp @@ -222,6 +222,7 @@ void Navigation::Traffic::setDescription() break; default: results << tr("Traffic"); + break; } if (!_positionInfo.coordinate().isValid()) { diff --git a/src/qml/items/MFM.qml b/src/qml/items/MFM.qml index 27ef4aa31..4e30b4003 100644 --- a/src/qml/items/MFM.qml +++ b/src/qml/items/MFM.qml @@ -278,7 +278,11 @@ Item { MapItemView { // Traffic opponents model: flarmAdaptor.trafficObjects4QML - delegate: Component { Traffic { trafficInfo: model.modelData } } + delegate: Component { + Traffic { + trafficInfo: model.modelData + } + } } MapItemView {