Rearranged variables to remove g++ warnings

Fixed bug in date generation
feature/19
Daniel Warner 2011-03-30 22:32:44 +01:00
parent d497544ca2
commit 4f49c85bb9
5 changed files with 13 additions and 11 deletions

2
Eci.h
View File

@ -27,9 +27,9 @@ public:
}
private:
Julian date_;
Vector position_;
Vector velocity_;
Julian date_;
};
#endif

View File

@ -28,7 +28,7 @@ Julian::Julian() {
struct tm gmt;
gmtime_r(&tv.tv_sec, &gmt);
Initialize(gmt.tm_year + 1900,
gmt.tm_mon,
gmt.tm_mon + 1,
gmt.tm_mday,
gmt.tm_hour,
gmt.tm_min,

View File

@ -2,12 +2,14 @@ CC=g++
CFLAGS=-c -Wall -g
LDFLAGS=
SOURCES=Coord.cpp \
Eci.cpp \
Globals.cpp \
Julian.cpp \
main.cpp \
Observer.cpp \
SGDP4.cpp \
Tle.cpp \
Vector.cpp
Vector.cpp \
main.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=sat

View File

@ -5,11 +5,12 @@
/*
* in degrees!
*/
Observer::Observer(const double latitude, const double longitude, const double altitude)
: observers_eci_(Julian(), CoordGeodetic()) {
Observer::Observer(const double latitude, const double longitude, const double altitude) {
geo_.SetLatitude(Globals::Deg2Rad(latitude));
geo_.SetLongitude(Globals::Deg2Rad(longitude));
geo_.SetAltitude(altitude);
observers_eci_ = Eci(Julian(), geo_);
}
Observer::Observer(const CoordGeodetic &geo)

View File

@ -29,15 +29,14 @@ public:
private:
void UpdateObserversEci(const Julian &date);
/*
* the observers eci for a particular time
*/
Eci observers_eci_;
/*
* the observers position
*/
CoordGeodetic geo_;
/*
* the observers eci for a particular time
*/
Eci observers_eci_;
};
#endif