diff --git a/client.pro b/client.pro index b955e9839..abc530549 100644 --- a/client.pro +++ b/client.pro @@ -25,7 +25,6 @@ contains(BLACK_CONFIG, BlackSim) { contains(BLACK_CONFIG, Samples) { SUBDIRS += samples/cli_client/sample_cli_client.pro - SUBDIRS += samples/interpolator/sample_interpolator.pro SUBDIRS += samples/plugin/sample_plugin.pro SUBDIRS += samples/pluginmgr/sample_pluginmgr.pro SUBDIRS += samples/blackmiscvectorgeo/sample_vector_geo.pro diff --git a/samples/interpolator/CMakeLists.txt b/samples/interpolator/CMakeLists.txt deleted file mode 100644 index d7983e57d..000000000 --- a/samples/interpolator/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -FILE(GLOB SRC *.cpp) - -ADD_EXECUTABLE(sample_interpolator ${SRC}) - -TARGET_LINK_LIBRARIES(sample_interpolator blackmisc blackcore ${QT_LIBRARIES}) -SET_TARGET_PROPERTIES(sample_interpolator PROPERTIES PROJECT_LABEL "Samples - Interpolator") \ No newline at end of file diff --git a/samples/interpolator/main.cpp b/samples/interpolator/main.cpp deleted file mode 100644 index d154097f6..000000000 --- a/samples/interpolator/main.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (C) 2013 VATSIM Community / contributors - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -#include "blackmisc/coordinatetransformation.h" -#include "blackmisc/pqangle.h" -#include "blackcore/interpolator.h" -#include "blackmisc/context.h" -#include -#include -#include - -using namespace std; -using namespace BlackCore; -using namespace BlackMisc::Geo; -using namespace BlackMisc::Math; -using namespace BlackMisc::PhysicalQuantities; -using namespace BlackMisc::Aviation; - -int main(int argc, char *argv[]) -{ - QCoreApplication a(argc, argv); - - BlackMisc::CApplicationContext ctx; - BlackMisc::IContext::setInstance(ctx); - - QElapsedTimer timer; - -// CCoordinateGeodetic myGeo(48.123, 11.75, 400); -// CVector3D vecNed(1, 0, 0); -// CVector3D vecEcef; - - CInterpolator interpolator; - interpolator.initialize(); - - CCoordinateGeodetic vecGeo(48.340733, 11.750565, 100); - CCoordinateGeodetic vecGeo2(48.344727, 11.805153, 100); - - cout << "Start position: " << vecGeo << endl; - cout << "End position: " << vecGeo2 << endl; - - timer.start(); - - // CVectorGeo pos, double groundVelocity, double heading, double pitch, double bank - CAngle zeroAngle(0, CAngleUnit::deg()); - CSpeed speed(20, CSpeedUnit::kts()); - CCoordinateNed ned; - - ned = interpolator.pushUpdate(vecGeo, speed, CHeading(80, CHeading::True, CAngleUnit::deg()), zeroAngle, zeroAngle); - cout << "Interpolator NED 1: " << ned << endl; - ned = interpolator.pushUpdate(vecGeo2, speed, CHeading(250, CHeading::True, CAngleUnit::deg()), zeroAngle, zeroAngle); - cout << "Interpolator NED 2: " << ned << endl; - - double duration = timer.nsecsElapsed(); - TPlaneState teststate; - timer.restart(); - interpolator.stateNow(&teststate); - - CCoordinateEcef pos = teststate.position; - CVector3D vel = teststate.velocity; - ned = teststate.velNED; - - duration = timer.nsecsElapsed(); - - CCoordinateTransformation::toGeodetic(pos); - timer.restart(); - - CCoordinateGeodetic resultGeo = CCoordinateTransformation::toGeodetic(pos); - duration = timer.nsecsElapsed(); - - cout << "End position: " << resultGeo << endl; - cout << "End velocity: " << vel << endl; - cout << "End " << ned << endl; - cout << "Heading: "; - cout << teststate.orientation.heading.switchUnit(CAngleUnit::deg()) << endl; - cout << endl; - cout << duration << " nanoseconds" << endl; - - return a.exec(); -} diff --git a/samples/interpolator/sample_interpolator.pro b/samples/interpolator/sample_interpolator.pro deleted file mode 100644 index 9ae80d31f..000000000 --- a/samples/interpolator/sample_interpolator.pro +++ /dev/null @@ -1,28 +0,0 @@ -include (../../config.pri) -include (../../build.pri) - -QT += core dbus network - -TARGET = sample_interpolator -CONFIG += console -CONFIG -= app_bundle -CONFIG += blackmisc blackcore - -TEMPLATE = app - -CONFIG += console -CONFIG -= app_bundle - -DEPENDPATH += . ../../src -INCLUDEPATH += . ../../src - -SOURCES += *.cpp - -win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib \ - ../../lib/blackcore.lib -else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \ - ../../lib/libblackcore.a - -DESTDIR = ../../bin - -include (../../libraries.pri)