mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
Replace deprecated endl with Qt::endl
This commit is contained in:
committed by
Mat Sutcliffe
parent
1e633a5704
commit
9fa3221abc
@@ -45,40 +45,40 @@ namespace BlackSample
|
||||
CLatitude deltaLat = geo.latitude() - lat;
|
||||
CLongitude deltaLng = geo.longitude() - lng;
|
||||
|
||||
out << latStr << " " << lngStr << endl;
|
||||
out << latStr << " " << lngStr << Qt::endl;
|
||||
out <<
|
||||
lat.value(CAngleUnit::deg()) << " " << lat.value(CAngleUnit::sexagesimalDeg()) << " " <<
|
||||
lng.value(CAngleUnit::deg()) << " " << lng.value(CAngleUnit::sexagesimalDeg()) << endl;
|
||||
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()) << endl;
|
||||
geo.longitude().value(CAngleUnit::deg()) << " " << geo.longitude().value(CAngleUnit::sexagesimalDeg()) << Qt::endl;
|
||||
|
||||
out << deltaLat.valueRoundedWithUnit(digits) << " " << deltaLng.valueRoundedWithUnit(digits) << endl;
|
||||
out << deltaLat.valueRoundedWithUnit(digits) << " " << deltaLng.valueRoundedWithUnit(digits) << Qt::endl;
|
||||
|
||||
// equal test
|
||||
out << "Equal? " <<
|
||||
BlackMisc::boolToYesNo(lat == geo.latitude()) << " " <<
|
||||
BlackMisc::boolToYesNo(lng == geo.longitude()) << endl;
|
||||
BlackMisc::boolToYesNo(lng == geo.longitude()) << Qt::endl;
|
||||
|
||||
// check if conversions to xyz have messed something up
|
||||
QVector3D geoVector = geo.normalVector();
|
||||
CCoordinateGeodetic geo2(geoVector);
|
||||
deltaLat = geo2.latitude() - lat;
|
||||
deltaLng = geo2.longitude() - lng;
|
||||
out << deltaLat.valueRoundedWithUnit(digits) << " " << deltaLng.valueRoundedWithUnit(digits) << endl;
|
||||
out << deltaLat.valueRoundedWithUnit(digits) << " " << deltaLng.valueRoundedWithUnit(digits) << Qt::endl;
|
||||
|
||||
// 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) << 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) << endl;
|
||||
out << bearing.valueRoundedWithUnit(CAngleUnit::deg(), 2) << " " << distance.valueRoundedWithUnit(CLengthUnit::m(), 2) << Qt::endl;
|
||||
|
||||
// bye
|
||||
out << "-----------------------------------------------" << endl;
|
||||
out << "-----------------------------------------------" << Qt::endl;
|
||||
return 0;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user