- Timestamp:
- Oct 10, 2009, 9:19:20 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/BNS/bnseph.cpp ΒΆ
r1897 r1898 697 697 //////////////////////////////////////////////////////////////////////////// 698 698 int t_ephGlo::IOD() const { 699 //// return int(fmod(_GPSweeks,86400.0)) / 600; 700 701 //// unsigned int tb = int(fmod(_GPSweeks,86400.0)) * 1000; // msec of day 702 unsigned int tb = int(fmod(_GPSweeks,86400.0)); //sec of day 703 704 // 5 LSBs of iod are equal to 5 LSBs of tb, remaining bits are zero 705 // ---------------------------------------------------------------- 706 const int shift = sizeof(tb) * 8 - 5; 707 unsigned int iod = tb << shift; 708 return (iod >> shift); 709 } 699 700 bool old = true; 701 702 if (old) { // 5 LSBs of iod are equal to 5 LSBs of tb 703 unsigned int tb = int(fmod(_GPSweeks,86400.0)); //sec of day 704 const int shift = sizeof(tb) * 8 - 5; 705 unsigned int iod = tb << shift; 706 return (iod >> shift); 707 } 708 else { // 7 LSBs of iod are equal to 7 LSBs of tk 709 unsigned tk = int(_tki); 710 const int shift = sizeof(tk) * 8 - 7; 711 unsigned int iod = tk << shift; 712 return (iod >> shift); 713 } 714 }
Note:
See TracChangeset
for help on using the changeset viewer.