mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-08-04 16:22:52 +08:00
refactor: clang format line length
This commit is contained in:
@@ -33,7 +33,8 @@ namespace swift::sample
|
||||
const QString latStr("N 48° 7′ 6.3588"); // 48.118433
|
||||
const QString lngStr("E 16° 33′ 39.924");
|
||||
out.setRealNumberPrecision(digits);
|
||||
CCoordinateGeodetic geo = CCoordinateGeodetic::fromWgs84(latStr, lngStr, CAltitude(100, CAltitude::MeanSeaLevel, CLengthUnit::m()));
|
||||
CCoordinateGeodetic geo =
|
||||
CCoordinateGeodetic::fromWgs84(latStr, lngStr, CAltitude(100, CAltitude::MeanSeaLevel, CLengthUnit::m()));
|
||||
CLatitude lat = CLatitude::fromWgs84(latStr);
|
||||
CLongitude lng = CLongitude::fromWgs84(lngStr);
|
||||
|
||||
@@ -42,13 +43,17 @@ namespace swift::sample
|
||||
CLongitude deltaLng = geo.longitude() - lng;
|
||||
|
||||
out << latStr << " " << lngStr << Qt::endl;
|
||||
out << lat.value(CAngleUnit::deg()) << " " << lat.value(CAngleUnit::sexagesimalDeg()) << " " << lng.value(CAngleUnit::deg()) << " " << lng.value(CAngleUnit::sexagesimalDeg()) << Qt::endl;
|
||||
out << geo.latitude().value(CAngleUnit::deg()) << " " << geo.latitude().value(CAngleUnit::sexagesimalDeg()) << " " << geo.longitude().value(CAngleUnit::deg()) << " " << geo.longitude().value(CAngleUnit::sexagesimalDeg()) << Qt::endl;
|
||||
out << lat.value(CAngleUnit::deg()) << " " << lat.value(CAngleUnit::sexagesimalDeg()) << " "
|
||||
<< lng.value(CAngleUnit::deg()) << " " << lng.value(CAngleUnit::sexagesimalDeg()) << Qt::endl;
|
||||
out << geo.latitude().value(CAngleUnit::deg()) << " " << geo.latitude().value(CAngleUnit::sexagesimalDeg())
|
||||
<< " " << geo.longitude().value(CAngleUnit::deg()) << " "
|
||||
<< geo.longitude().value(CAngleUnit::sexagesimalDeg()) << Qt::endl;
|
||||
|
||||
out << deltaLat.valueRoundedWithUnit(digits) << " " << deltaLng.valueRoundedWithUnit(digits) << Qt::endl;
|
||||
|
||||
// equal test
|
||||
out << "Equal? " << swift::misc::boolToYesNo(lat == geo.latitude()) << " " << swift::misc::boolToYesNo(lng == geo.longitude()) << Qt::endl;
|
||||
out << "Equal? " << swift::misc::boolToYesNo(lat == geo.latitude()) << " "
|
||||
<< swift::misc::boolToYesNo(lng == geo.longitude()) << Qt::endl;
|
||||
|
||||
// check if conversions to xyz have messed something up
|
||||
QVector3D geoVector = geo.normalVector();
|
||||
@@ -60,12 +65,14 @@ namespace swift::sample
|
||||
// Heading/bearing of same values
|
||||
CAngle bearing = geo.calculateBearing(geo);
|
||||
CLength distance = geo.calculateGreatCircleDistance(geo);
|
||||
out << bearing.valueRoundedWithUnit(CAngleUnit::deg(), 2) << " " << distance.valueRoundedWithUnit(CLengthUnit::m(), 2) << Qt::endl;
|
||||
out << bearing.valueRoundedWithUnit(CAngleUnit::deg(), 2) << " "
|
||||
<< distance.valueRoundedWithUnit(CLengthUnit::m(), 2) << Qt::endl;
|
||||
|
||||
const CCoordinateGeodetic nullCoordinate;
|
||||
bearing = geo.calculateBearing(nullCoordinate);
|
||||
distance = geo.calculateGreatCircleDistance(nullCoordinate);
|
||||
out << bearing.valueRoundedWithUnit(CAngleUnit::deg(), 2) << " " << distance.valueRoundedWithUnit(CLengthUnit::m(), 2) << Qt::endl;
|
||||
out << bearing.valueRoundedWithUnit(CAngleUnit::deg(), 2) << " "
|
||||
<< distance.valueRoundedWithUnit(CLengthUnit::m(), 2) << Qt::endl;
|
||||
|
||||
// bye
|
||||
out << "-----------------------------------------------" << Qt::endl;
|
||||
|
||||
Reference in New Issue
Block a user