Files
qt6-migration-pipeline/external/GeographicLib/share/doc/GeographicLib-dev/example-Conformal3.cpp
T
torstenandCopilot 342ffd3e5c Update submodule to latest BUILD_RTI fixes
- HandlerMinelayerData: BUILD_RTI Guards für RTI-Abhängigkeiten
- svcTabCommon: Export-Header-Fix via Fallback-Target
- TrainingAreaBase: Stub-Header für BUILD_RTI=OFF
- ddsfts: Include-Pfad und Dependency-Fixes
- BUILD_RTI=OFF Compilation vollständig unterstützt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Entire-Checkpoint: 01M0JNZA586SACX1PRZ2DJAE5S
2026-08-21 19:30:20 +02:00

32 lines
959 B
C++

// Example of using the Triaxial::Conformal3 class.
#include <iostream>
#include <iomanip>
#include <exception>
#include <GeographicLib/Triaxial/Conformal3.hpp>
using namespace std;
using namespace GeographicLib;
int main() {
try {
Triaxial::Conformal3 proj(Triaxial::Ellipsoid3::Earth());
cout << fixed << setprecision(1)
<< "Ellipsoid parameters: a = " << proj.t().a()
<< ", b = " << proj.t().b() << ", c = " << proj.t().c() << "\n"
<< setprecision(3)
<< "Quadrants: x = " << proj.x0() << ", y = " << proj.y0() << "\n";
cout << "Coordinates angle (deg) x (m) y (m):\n";
cout << setprecision(2);
for (int i = -180; i <= 180; i += 15) {
double omg = i + 90, bet = i,
x = proj.x(Angle(omg)), y = proj.y(Angle(bet));
cout << i << " " << x << " " << y << "\n";
}
}
catch (const exception& e) {
cerr << "Caught exception: " << e.what() << "\n";
return 1;
}
}