parent
d497544ca2
commit
4f49c85bb9
2
Eci.h
2
Eci.h
|
@ -27,9 +27,9 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Julian date_;
|
||||
Vector position_;
|
||||
Vector velocity_;
|
||||
Julian date_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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,
|
||||
|
|
6
Makefile
6
Makefile
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue