mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
refs #396, move subproject BlackSim into BlackMisc::Simulation
* removed unused samples / tests * fixed found Doxygen issues * removed blacksimfreefunctions, now in BlackMisc::Simulation::registerMetadata() * samples_vetcor_geo to samples_geo
This commit is contained in:
committed by
Roland Winklmeier
parent
a6ca57265e
commit
32f60722c8
20
samples/blackmiscgeo/main.cpp
Normal file
20
samples/blackmiscgeo/main.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
/* 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 "samplesgeo.h"
|
||||
#include <QCoreApplication>
|
||||
|
||||
/*!
|
||||
* \brief Main entry
|
||||
* \param argc
|
||||
* \param argv
|
||||
* \return
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
BlackMiscTest::CSamplesGeo::samples();
|
||||
return a.exec();
|
||||
}
|
||||
24
samples/blackmiscgeo/sample_geo.pro
Normal file
24
samples/blackmiscgeo/sample_geo.pro
Normal file
@@ -0,0 +1,24 @@
|
||||
include (../../config.pri)
|
||||
include (../../build.pri)
|
||||
|
||||
QT += core dbus network
|
||||
|
||||
TARGET = sample_vector_geo
|
||||
CONFIG += console
|
||||
CONFIG -= app_bundle
|
||||
CONFIG += blackmisc blackcore
|
||||
|
||||
TEMPLATE = app
|
||||
|
||||
DEPENDPATH += . ../../src
|
||||
INCLUDEPATH += . ../../src
|
||||
|
||||
win32:!win32-g++*: PRE_TARGETDEPS += ../../lib/blackmisc.lib
|
||||
else: PRE_TARGETDEPS += ../../lib/libblackmisc.a
|
||||
|
||||
DESTDIR = ../../bin
|
||||
|
||||
SOURCES += *.cpp
|
||||
HEADERS += *.h
|
||||
|
||||
include (../../libraries.pri)
|
||||
42
samples/blackmiscgeo/samplesgeo.cpp
Normal file
42
samples/blackmiscgeo/samplesgeo.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
/* 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 "samplesgeo.h"
|
||||
#include "blackmisc/geolatitude.h"
|
||||
#include "blackmisc/geolongitude.h"
|
||||
|
||||
using namespace BlackMisc::Geo;
|
||||
using namespace BlackMisc::PhysicalQuantities;
|
||||
|
||||
namespace BlackMiscTest
|
||||
{
|
||||
|
||||
/*
|
||||
* Samples
|
||||
*/
|
||||
int CSamplesGeo::samples()
|
||||
{
|
||||
CLatitude lat1(20.0, CAngleUnit::deg());
|
||||
CLatitude lat2 = lat1;
|
||||
CLatitude lat3 = lat1 - lat2;
|
||||
|
||||
qDebug() << lat1 << lat2 << lat3;
|
||||
qDebug() << (lat1 + lat2) << (lat1 - lat2);
|
||||
|
||||
lat3 += lat1;
|
||||
CLongitude lon1(33.0, CAngleUnit::deg());
|
||||
qDebug() << lon1 << lat3;
|
||||
|
||||
// lat3 += lon1; // must not work
|
||||
// lat3 = lon1; //must not work
|
||||
// CGeoLongitude lonx(lat2); // must notwork
|
||||
|
||||
// bye
|
||||
qDebug() << "-----------------------------------------------";
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
||||
} // namespace
|
||||
32
samples/blackmiscgeo/samplesgeo.h
Normal file
32
samples/blackmiscgeo/samplesgeo.h
Normal file
@@ -0,0 +1,32 @@
|
||||
/* 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/. */
|
||||
|
||||
#ifndef BLACKMISCTEST_SAMPLESGEO_H
|
||||
#define BLACKMISCTEST_SAMPLESGEO_H
|
||||
|
||||
namespace BlackMiscTest
|
||||
{
|
||||
|
||||
/*!
|
||||
* \brief Samples for vector / matrix
|
||||
*/
|
||||
class CSamplesGeo
|
||||
{
|
||||
public:
|
||||
/*!
|
||||
* \brief Run the samples
|
||||
*/
|
||||
static int samples();
|
||||
|
||||
private:
|
||||
/*!
|
||||
* \brief Avoid init
|
||||
*/
|
||||
CSamplesGeo();
|
||||
};
|
||||
} // namespace
|
||||
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user