From 6b024b0c06844fb01dbbea26a484aa91c178798e Mon Sep 17 00:00:00 2001 From: Daniel Warner Date: Fri, 27 May 2011 01:54:41 +0100 Subject: [PATCH] Allow Tle to be passed into constructor of SGP4 --- SGP4.cpp | 5 +++++ SGP4.h | 1 + SatTrack.cpp | 3 +-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/SGP4.cpp b/SGP4.cpp index 3f66b90..aaadee9 100644 --- a/SGP4.cpp +++ b/SGP4.cpp @@ -12,6 +12,11 @@ SGP4::SGP4(void) { Reset(); } +SGP4::SGP4(const Tle& tle) { + + SetTle(tle); +} + SGP4::~SGP4(void) { } diff --git a/SGP4.h b/SGP4.h index c49bcbd..3bdada0 100644 --- a/SGP4.h +++ b/SGP4.h @@ -7,6 +7,7 @@ class SGP4 { public: SGP4(void); + SGP4(const Tle& tle); virtual ~SGP4(void); void SetTle(const Tle& tle); diff --git a/SatTrack.cpp b/SatTrack.cpp index 342fa76..c3be345 100644 --- a/SatTrack.cpp +++ b/SatTrack.cpp @@ -9,8 +9,7 @@ int main() { Tle tle = Tle("ISS (ZARYA) ", "1 25544U 98067A 11146.36888985 .00025753 00000-0 16912-3 0 4201", "2 25544 51.6504 272.6534 0003891 329.5510 71.2188 15.75539412717473"); - SGP4 sgp4; - sgp4.SetTle(tle); + SGP4 sgp4(tle); Eci eci; while(1) {