📄 utmconversions.cpp
字号:
//UTM Conversion.cpp- test program for lat/long to UTM and UTM to lat/long conversions#include <iostream.h>#include <iomanip.h>#include "LatLong-UTMconversion.h"void main(){// double Lat = 47.37816667;// double Long = 8.23250000;
// double Lat = 47+23/60.0+13.55560/3600;
// double Long = 8+49/60.0+13.55556/3600;
double Lat = 0;
double Long = -174; double UTMNorthing; double UTMEasting; double SwissNorthing; double SwissEasting; char UTMZone[4]; int RefEllipsoid = 23;//WGS-84. See list with file "LatLong- UTM conversion.cpp" for id numbers cout << "Starting position(Lat, Long): " << Lat << " " << Long <<endl; LLtoUTM(Lat, Long, UTMNorthing, UTMEasting, UTMZone,RefEllipsoid); cout << setiosflags(ios::showpoint | ios::fixed) << setprecision(5); cout << "Calculated UTM position(Northing, Easting, Zone): "; cout << UTMNorthing << " " << UTMEasting; cout << " " << UTMZone <<endl; UTMtoLL(RefEllipsoid, UTMNorthing, UTMEasting, UTMZone, Lat, Long); cout << "Calculated Lat, Long position(Lat, Long): " << Lat << " " << Long << endl <<endl; LLtoSwissGrid(Lat, Long, SwissNorthing, SwissEasting); cout << setiosflags(ios::showpoint | ios::fixed) << setprecision(5); cout << "Calculated Swiss Grid position(Northing, Easting): "; cout << SwissNorthing << " " << SwissEasting << endl;}/* N 47.38195
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -