Skip to content

Commit

Permalink
Done with Version 2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kebekus committed Mar 11, 2021
1 parent 7bd4be4 commit 0654724
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
26 changes: 16 additions & 10 deletions src/Navigation_FLARMAdaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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];

Expand Down
1 change: 1 addition & 0 deletions src/Navigation_Traffic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ void Navigation::Traffic::setDescription()
break;
default:
results << tr("Traffic");
break;
}

if (!_positionInfo.coordinate().isValid()) {
Expand Down
6 changes: 5 additions & 1 deletion src/qml/items/MFM.qml
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ Item {

MapItemView { // Traffic opponents
model: flarmAdaptor.trafficObjects4QML
delegate: Component { Traffic { trafficInfo: model.modelData } }
delegate: Component {
Traffic {
trafficInfo: model.modelData
}
}
}

MapItemView {
Expand Down

0 comments on commit 0654724

Please sign in to comment.