Changeset 5230 in ntrip
- Timestamp:
- Jun 16, 2013, 4:35:38 PM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncutils.cpp
r5070 r5230 439 439 azSat = atan2(neu[1], neu[0]); 440 440 } 441 442 // Degrees -> degrees, minutes, seconds 443 //////////////////////////////////////////////////////////////////////////// 444 void deg2DMS(double decDeg, int& deg, int& min, double& sec) { 445 int sgn = (decDeg < 0.0 ? -1 : 1); 446 deg = sgn * static_cast<int>(decDeg); 447 min = static_cast<int>((decDeg - deg)*60); 448 sec = (decDeg - deg - min/60.0) * 3600.0; 449 } -
trunk/BNC/src/bncutils.h
r4338 r5230 80 80 double& rho, double& eleSat, double& azSat); 81 81 82 void deg2DMS(double decDeg, int& deg, int& min, double& sec); 83 82 84 #endif -
trunk/BNC/src/map/bncmapwin.cpp
r5229 r5230 115 115 _currLat = lat; 116 116 _currLon = lon; 117 118 int latDeg, latMin; 119 double latSec; 120 deg2DMS(lat, latDeg, latMin, latSec); 121 122 int lonDeg, lonMin; 123 double lonSec; 124 deg2DMS(lon, lonDeg, lonMin, lonSec); 125 126 QString lblStr=QString("Latitude: %1 %2 %3 Longitude: %4 %5 %6") 127 .arg(latDeg).arg(latMin).arg(latSec,0,'f',2) 128 .arg(lonDeg).arg(lonMin).arg(lonSec,0,'f',2); 129 _statusLabel->setText(lblStr); 130 117 131 QString location = QString("%1, %2").arg(_currLat,0,'f',8).arg(_currLon,0,'f',8); 118 _statusLabel->setText(location);119 132 _webView->page()->mainFrame()->evaluateJavaScript(QString("gotoLocation( %1 )").arg(location)); 120 133 }
Note:
See TracChangeset
for help on using the changeset viewer.