Manually merged samples geodetic2ecef and logging due to merge issues

This commit is contained in:
Klaus Basan
2013-04-24 13:12:57 +02:00
parent 472521f281
commit 54d031a479
5 changed files with 55 additions and 66 deletions

View File

@@ -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"
@@ -14,40 +12,42 @@ 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();
cout << std::endl;
cout << std::endl;
BlackCore::CVectorGeo endVec;
BlackCore::CEcef mediumvec;
BlackCore::CVectorGeo startVec(lat, lon, h);
startVec.print();
cout << std::endl;
cout << std::endl;
BlackCore::CVectorGeo endVec;
timer.start();
mediumvec = startVec.toCartesian();
duration = timer.nsecsElapsed();
mediumvec.print();
cout << std::endl;
cout << std::endl;
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
timer.restart();
endVec = mediumvec.toGeodetic();
duration = timer.nsecsElapsed();
endVec.print();
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
timer.start();
mediumvec = startVec.toCartesian();
duration = timer.nsecsElapsed();
mediumvec.print();
cout << std::endl;
cout << std::endl;
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
timer.restart();
endVec = mediumvec.toGeodetic();
duration = timer.nsecsElapsed();
endVec.print();
cout << "Needed " << duration << " nanoseconds for the calculation!" << std::endl << std::endl;
return a.exec();
}