Changeset 7787 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Feb 17, 2016, 10:27:48 AM (9 years ago)
Author:
stuerze
Message:

small bug fixed in deg2DMS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncutils.cpp

    r7656 r7787  
    738738void deg2DMS(double decDeg, int& deg, int& min, double& sec) {
    739739  int sgn = (decDeg < 0.0 ? -1 : 1);
    740   deg = sgn * static_cast<int>(decDeg);
    741   min =       static_cast<int>((decDeg - deg)*60);
    742   sec =       (decDeg - deg - min/60.0) * 3600.0;
     740  deg = static_cast<int>(decDeg);
     741  min =  sgn *  static_cast<int>((decDeg - deg)*60);
     742  sec =  (sgn* (decDeg - deg) - min/60.0) * 3600.0;
    743743}
    744744
Note: See TracChangeset for help on using the changeset viewer.