#include <string>
#include <vector>
-SG_USING_STD(cout);
-SG_USING_STD(endl);
-SG_USING_STD(string);
-SG_USING_STD(vector);
+using std::cout;
+using std::endl;
+using std::string;
+using std::vector;
// encapsulate a gps integer time (fixme, assumes all times in a track
public:
- int seconds;
+ double seconds;
- inline GPSTime( const int hh, const int mm, const int ss ) {
+ inline GPSTime( const int hh, const int mm, const double ss ) {
seconds = hh*3600 + mm*60 + ss;
}
- inline GPSTime( const int gpstime ) {
- int tmp = gpstime;
- int hh = tmp / 10000;
+ inline GPSTime( const double gpstime ) {
+ double tmp = gpstime;
+ int hh = (int)(tmp / 10000);
tmp -= hh * 10000;
- int mm = tmp / 100;
+ int mm = (int)(tmp / 100);
tmp -= mm * 100;
- int ss = tmp;
+ double ss = tmp;
seconds = hh*3600 + mm*60 + ss;
// cout << gpstime << " = " << seconds << endl;
}
inline ~GPSTime() {}
- inline int get_time() const { return seconds; }
- inline int diff_sec( const GPSTime t ) const {
+ inline double get_time() const { return seconds; }
+ inline double diff_sec( const GPSTime t ) const {
return seconds - t.seconds;
}
};
course_true(0.0)
{ }
- inline int get_time() const { return gps_time.get_time(); }
+ inline double get_time() const { return gps_time.get_time(); }
};