diff --git a/libsgp4/CoordGeodetic.h b/libsgp4/CoordGeodetic.h index af7a15d..8ab7d8c 100644 --- a/libsgp4/CoordGeodetic.h +++ b/libsgp4/CoordGeodetic.h @@ -102,9 +102,9 @@ public: { std::stringstream ss; ss << std::right << std::fixed << std::setprecision(3); - ss << "Lat: " << std::setw(7) << Util::RadiansToDegrees(latitude); - ss << ", Lon: " << std::setw(7) << Util::RadiansToDegrees(longitude); - ss << ", Alt: " << std::setw(9) << altitude; + ss << "Lat: " << std::setw(8) << Util::RadiansToDegrees(latitude); + ss << ", Lon: " << std::setw(8) << Util::RadiansToDegrees(longitude); + ss << ", Alt: " << std::setw(10) << altitude; return ss.str(); } diff --git a/sattrack/sattrack.cc b/sattrack/sattrack.cc index 9404dfb..461f899 100644 --- a/sattrack/sattrack.cc +++ b/sattrack/sattrack.cc @@ -34,14 +34,11 @@ int main() for (int i = 0; i < 10; ++i) { - /* - * current time - */ - DateTime now = DateTime::Now(true); + DateTime dt = tle.Epoch().AddMinutes(i * 10); /* * calculate satellite position */ - Eci eci = sgp4.FindPosition(now); + Eci eci = sgp4.FindPosition(dt); /* * get look angle for observer to satellite */ @@ -51,7 +48,7 @@ int main() */ CoordGeodetic geo = eci.ToGeodetic(); - std::cout << now << " " << topo << " " << geo << std::endl; + std::cout << dt << " " << topo << " " << geo << std::endl; }; return 0;