mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
Manually merged samples geodetic2ecef and logging due to merge issues
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
FILE(GLOB SRC *.cpp)
|
||||
|
||||
ADD_EXECUTABLE(sample_Geodetic2Ecef ${SRC})
|
||||
ADD_EXECUTABLE(sample_geodetic2ecef ${SRC})
|
||||
|
||||
TARGET_LINK_LIBRARIES(sample_Geodetic2Ecef blackmisc blackcore ${QT_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(sample_Geodetic2Ecef PROPERTIES PROJECT_LABEL "Samples - Geodetic to Ecef")
|
||||
TARGET_LINK_LIBRARIES(sample_geodetic2ecef blackmisc blackcore ${QT_LIBRARIES})
|
||||
SET_TARGET_PROPERTIES(sample_geodetic2ecef PROPERTIES PROJECT_LABEL "Samples - Geodetic to Ecef")
|
||||
@@ -2,8 +2,6 @@
|
||||
#include <QElapsedTimer>
|
||||
#include "blackmisc/debug.h"
|
||||
#include <iostream>
|
||||
#include <conio.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "blackcore/ecef.h"
|
||||
#include "blackcore/vector_geo.h"
|
||||
@@ -15,39 +13,41 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication a(argc, argv);
|
||||
BlackMisc::CApplicationContext myApplicationContext;
|
||||
|
||||
BlackMisc::IContext::getInstance().setSingleton(new BlackMisc::CDebug());
|
||||
|
||||
QElapsedTimer timer;
|
||||
qint64 duration;
|
||||
qint64 duration;
|
||||
|
||||
double lat = 27.999999, lon = 86.999999, h = 8820.999999; // Mt Everest
|
||||
|
||||
BlackCore::CEcef mediumvec;
|
||||
BlackCore::CVectorGeo startVec(lat, lon, h);
|
||||
startVec.print();
|
||||
BlackCore::CEcef mediumvec;
|
||||
BlackCore::CVectorGeo startVec(lat, lon, h);
|
||||
startVec.print();
|
||||
|
||||
cout << std::endl;
|
||||
cout << std::endl;
|
||||
cout << std::endl;
|
||||
cout << std::endl;
|
||||
|
||||
BlackCore::CVectorGeo endVec;
|
||||
BlackCore::CVectorGeo endVec;
|
||||
|
||||
timer.start();
|
||||
mediumvec = startVec.toCartesian();
|
||||
timer.start();
|
||||
mediumvec = startVec.toCartesian();
|
||||
|
||||
duration = timer.nsecsElapsed();
|
||||
duration = timer.nsecsElapsed();
|
||||
|
||||
mediumvec.print();
|
||||
mediumvec.print();
|
||||
|
||||
cout << std::endl;
|
||||
cout << std::endl;
|
||||
cout << std::endl;
|
||||
cout << std::endl;
|
||||
|
||||
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
|
||||
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
|
||||
|
||||
timer.restart();
|
||||
endVec = mediumvec.toGeodetic();
|
||||
duration = timer.nsecsElapsed();
|
||||
timer.restart();
|
||||
endVec = mediumvec.toGeodetic();
|
||||
duration = timer.nsecsElapsed();
|
||||
|
||||
endVec.print();
|
||||
endVec.print();
|
||||
|
||||
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
|
||||
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@@ -11,23 +11,14 @@ DEPENDPATH += . ../../src
|
||||
|
||||
INCLUDEPATH += . ../../src
|
||||
|
||||
SOURCES += main.cpp\
|
||||
SOURCES += *.cpp
|
||||
|
||||
win32-msvc* {
|
||||
PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
../../lib/blackcore.lib
|
||||
LIBS += -L../../lib -lblackcore -lblackmisc
|
||||
|
||||
LIBS += ../../lib/blackmisc.lib \
|
||||
../../lib/blackcore.lib
|
||||
}
|
||||
|
||||
!win32-msvc* {
|
||||
PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a
|
||||
|
||||
LIBS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a
|
||||
}
|
||||
win32: PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
../../lib/blackcore.lib
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
../../lib/libblackcore.a
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include <QCoreApplication>
|
||||
#include "blackmisc/debug.h"
|
||||
#include "blackmisc/context.h"
|
||||
#include "blackcore/constants.h"
|
||||
#include <limits>
|
||||
#include <iostream>
|
||||
@@ -9,10 +10,12 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication a(argc, argv);
|
||||
BlackMisc::CApplicationContext myApplicationContext;
|
||||
|
||||
bInfo << "This is a Info log message";
|
||||
bWarning << "This is a bWarning log message";
|
||||
bError << "This is a bError log message";
|
||||
bDebug << "This is a bDebug log message";
|
||||
BlackMisc::IContext::getInstance().setSingleton(new BlackMisc::CDebug());
|
||||
|
||||
bAppInfo << "This is a Info log message";
|
||||
bAppWarning << "This is a bWarning log message";
|
||||
bAppError << "This is a bError log message";
|
||||
bAppDebug << "This is a bDebug log message";
|
||||
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@@ -8,22 +8,17 @@ CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
|
||||
DEPENDPATH += . ../../src
|
||||
|
||||
INCLUDEPATH += . ../../src
|
||||
|
||||
SOURCES += main.cpp\
|
||||
SOURCES += *.cpp
|
||||
|
||||
win32-msvc* {
|
||||
PRE_TARGETDEPS += ../../lib/blackmisc.lib \
|
||||
LIBS += -L../../lib -lblackmisc
|
||||
|
||||
LIBS += ../../lib/blackmisc.lib \
|
||||
}
|
||||
|
||||
!win32-msvc* {
|
||||
PRE_TARGETDEPS += ../../lib/libblackmisc.a \
|
||||
|
||||
LIBS += ../../lib/libblackmisc.a \
|
||||
|
||||
}
|
||||
win32: PRE_TARGETDEPS += ../../lib/blackmisc.lib
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user