mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-19 03:45:30 +08:00
refs #396 subfolders and renamed callsign list to callsign set
* subfolder audio * subfolder geo * adjusted samples, tests ....
This commit is contained in:
committed by
Roland Winklmeier
parent
32f60722c8
commit
0ab755d510
54
src/blackmisc/geo/latitude.h
Normal file
54
src/blackmisc/geo/latitude.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/* Copyright (C) 2013
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_GEO_LATITUDE_H
|
||||
#define BLACKMISC_GEO_LATITUDE_H
|
||||
|
||||
#include <QtCore/qmath.h>
|
||||
#include "blackmisc/geo/earthangle.h"
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
namespace Geo
|
||||
{
|
||||
|
||||
//! Latitude
|
||||
class CLatitude : public CValueObject<CLatitude, CEarthAngle<CLatitude>>
|
||||
{
|
||||
protected:
|
||||
//! \copydoc CValueObject::convertToQString
|
||||
virtual QString convertToQString(bool i18n = false) const
|
||||
{
|
||||
QString s(CEarthAngle::convertToQString(i18n));
|
||||
if (!this->isZeroEpsilonConsidered())
|
||||
{
|
||||
s.append(this->isNegativeWithEpsilonConsidered() ? " S" : " N");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
public:
|
||||
//! Default constructor
|
||||
CLatitude() = default;
|
||||
|
||||
//! Constructor
|
||||
explicit CLatitude(const BlackMisc::PhysicalQuantities::CAngle &angle) : CValueObject(angle) {}
|
||||
|
||||
//! Init by double value
|
||||
CLatitude(double value, const BlackMisc::PhysicalQuantities::CAngleUnit &unit) : CValueObject(value, unit) {}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(BlackMisc::Geo::CLatitude)
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user