Had to withdraw 3Vector3D, since they store values internally as float (idiotic design). Hence qreal will be dropped. Started with Unit tests.

This commit is contained in:
Klaus Basan
2013-04-20 17:46:46 +02:00
parent 7b0468d300
commit f4affe55ef
28 changed files with 446 additions and 183 deletions

View File

@@ -14,40 +14,40 @@ int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
BlackMisc::CApplicationContext myApplicationContext;
QElapsedTimer timer;
qint64 duration;
QElapsedTimer timer;
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;
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;
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;
return a.exec();
}