sgp4/main.cpp

49 lines
1.0 KiB
C++
Raw Normal View History

2011-03-24 15:55:10 +00:00
#include "Julian.h"
2011-03-24 16:08:24 +00:00
#include "Tle.h"
#include "SGDP4.h"
2011-03-27 21:47:50 +00:00
#include "Globals.h"
#include "Observer.h"
#include "Coord.h"
2011-03-24 15:55:10 +00:00
2011-03-24 16:19:34 +00:00
#include <list>
2011-03-28 10:43:11 +00:00
#include <string>
2011-03-27 21:47:50 +00:00
#include <iomanip>
2011-03-24 15:55:10 +00:00
2011-03-27 23:29:11 +00:00
void RunTest();
2011-04-05 23:56:17 +00:00
void GeneratePassList(const CoordGeodetic& geo, const SGDP4& model, const Julian& date) {
Observer obs(geo);
Eci eci;
model.FindPosition(eci, date);
2011-04-05 23:56:17 +00:00
CoordTopographic topo = obs.GetLookAngle(eci);
2011-03-27 23:29:11 +00:00
2011-04-05 23:56:17 +00:00
Julian date_start;
Julian date_end;
2011-04-05 23:56:17 +00:00
date_end.AddDay(10.0);
2011-04-05 23:56:17 +00:00
for (Julian jd = date_start; jd <= date_end; jd.AddMin(1.0)) {
2011-03-29 20:15:18 +00:00
2011-03-27 23:29:11 +00:00
}
}
2011-04-05 23:56:17 +00:00
int main() {
2011-03-28 00:24:03 +00:00
2011-04-05 23:56:17 +00:00
Tle tle = Tle("UK-DMC 2 ",
"1 35683U 09041C 11089.11558659 .00000272 00000-0 54146-4 0 8712",
"2 35683 98.0762 348.1067 0001434 99.8921 260.2456 14.69414094 89293");
2011-03-28 00:24:03 +00:00
2011-04-05 23:56:17 +00:00
CoordGeodetic geo(Globals::Deg2Rad(51.360242), Globals::Deg2Rad(0.101473), 0.07);
2011-04-05 23:56:17 +00:00
SGDP4 sgp4_model;
sgp4_model.SetTle(tle);
Julian date;
2011-04-05 23:56:17 +00:00
GeneratePassList(geo, sgp4_model, date);
2011-04-05 23:56:17 +00:00
return 0;
2011-03-27 23:29:11 +00:00
}
2011-04-05 23:56:17 +00:00