Make the sattrack do something useful.

feature/19
Daniel Warner 2018-08-31 15:02:30 +01:00 committed by Daniel Warner
parent 52dcd7f0f5
commit 9df2c90ae9
2 changed files with 6 additions and 9 deletions

View File

@ -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();
}

View File

@ -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;