gSatWrapper.hpp   gSatWrapper.hpp 
skipping to change at line 39 skipping to change at line 39
#ifndef _GSATWRAPPER_HPP_ #ifndef _GSATWRAPPER_HPP_
#define _GSATWRAPPER_HPP_ 1 #define _GSATWRAPPER_HPP_ 1
#include <QString> #include <QString>
#include "VecMath.hpp" #include "VecMath.hpp"
#include "gsatellite/gSatTEME.hpp" #include "gsatellite/gSatTEME.hpp"
#include "gsatellite/gTime.hpp" #include "gsatellite/gTime.hpp"
//constants for predict visibility
#define RADAR_SUN 1
#define VISIBLE 2
#define RADAR_NIGHT 3
#define NOT_VISIBLE 4
//! Wrapper allowing compatibility between gsat and Stellarium/Qt. //! Wrapper allowing compatibility between gsat and Stellarium/Qt.
//! @ingroup satellites //! @ingroup satellites
class gSatWrapper class gSatWrapper
{ {
public: public:
enum Visibility
{
//constants for visibility prediction
UNKNOWN=0,
RADAR_SUN=1,
VISIBLE=2,
RADAR_NIGHT=3,
NOT_VISIBLE=4
};
gSatWrapper(QString designation, QString tle1,QString tle2); gSatWrapper(QString designation, QString tle1,QString tle2);
~gSatWrapper(); ~gSatWrapper();
// Operation updateEpoch // Operation setEpoch
//! @brief This operation update Epoch timestamp for gSatTEME object //! @brief This operation update Epoch timestamp for gSatTEME object
//! from Stellarium Julian Date. //! from Stellarium Julian Date.
void updateEpoch();
void setEpoch(double ai_julianDaysEpoch); void setEpoch(double ai_julianDaysEpoch);
// Operation getTEMEPos // Operation getTEMEPos
//! @brief This operation isolate gSatTEME getPos operation. //! @brief This operation isolate gSatTEME getPos operation.
//! @return Vec3d with TEME position. Units measured in Km. //! @return Vec3d with TEME position. Units measured in Km.
Vec3d getTEMEPos(); Vec3d getTEMEPos() const;
// Operation getSunECIPos // Operation getSunECIPos
//! @brief Get Sun positions in ECI system. //! @brief Get Sun positions in ECI system.
//! @return Vec3d with ECI position. //! @return Vec3d with ECI position.
Vec3d getSunECIPos(); static Vec3d getSunECIPos();
// Operation getTEMEVel // Operation getTEMEVel
//! @brief This operation isolate gSatTEME getVel operation. //! @brief This operation isolate gSatTEME getVel operation.
//! @return Vec3d with TEME speed. Units measured in Km/s. //! @return Vec3d with TEME speed. Units measured in Km/s.
Vec3d getTEMEVel(); Vec3d getTEMEVel() const;
// Operation: getSubPoint // Operation: getSubPoint
//! @brief This operation isolate getSubPoint method of gSatTEME obj ect. //! @brief This operation isolate getSubPoint method of gSatTEME obj ect.
//! @return Vec3d Geographical coordinates\n //! @return Vec3d Geographical coordinates\n
//! Latitude: Coord[0] measured in degrees\n //! Latitude: Coord[0] measured in degrees\n
//! Longitude: Coord[1] measured in degrees\n //! Longitude: Coord[1] measured in degrees\n
//! Altitude: Coord[2] measured in Km.\n //! Altitude: Coord[2] measured in Km.\n
Vec3d getSubPoint(); Vec3d getSubPoint() const;
// Operation getAltAz // Operation getAltAz
//! @brief This operation compute the coordinates in StelCore::Frame AltAz //! @brief This operation compute the coordinates in StelCore::Frame AltAz
//! @return Vect3d Vector with coordinates (meassured in km) //! @return Vect3d Vector with coordinates (meassured in km)
//! @par References //! @par References
//! Orbital Coordinate Systems, Part II //! Orbital Coordinate Systems, Part II
//! Dr. T.S. Kelso //! Dr. T.S. Kelso
//! http://www.celestrak.com/columns/v02n02/ //! http://www.celestrak.com/columns/v02n02/
Vec3d getAltAz(); Vec3d getAltAz() const;
// Operation getSlantRange // Operation getSlantRange
//! @brief This operation compute the slant range (distance between the //! @brief This operation compute the slant range (distance between the
//! satellite and the observer) and its variation/seg //! satellite and the observer) and its variation/seg
//! @param &ao_slantRange Reference to a output variable where the method store the slant range measured in Km //! @param &ao_slantRange Reference to a output variable where the method store the slant range measured in Km
//! @param &ao_slantRangeRate Reference to a output variable where the method store the slant range variation in Km/s //! @param &ao_slantRangeRate Reference to a output variable where the method store the slant range variation in Km/s
//! @return void //! @return void
void getSlantRange(double &ao_slantRange, double &ao_slantRangeRate ); //meassured in km and km/s void getSlantRange(double &ao_slantRange, double &ao_slantRangeRate ) const; //measured in km and km/s
// Operation getVisibilityPredict // Operation getVisibilityPredict
//! @brief This operation predicts the satellite visibility contidi ons. //! @brief This operation predicts the satellite visibility contidi ons.
//! This prediction can return 4 different states //! This prediction can return 4 different states
//! RADAR_SUN when satellite an observer are in the sunlit //! RADAR_SUN when satellite and observer are in the sunlight
//! VISIBLE when satellite is in sunlit and observer is in the //! VISIBLE when satellite is in sunlight and observer is in the
dark. Satellite could be visible in the sky. dark. Satellite could be visible in the sky.
//! RADAR_NIGHT when satellite is eclipsed by the earth shadow. //! RADAR_NIGHT when satellite is eclipsed by the earth shadow.
//! NOT_VISIBLE The satellite is under the observer horizon //! NOT_VISIBLE The satellite is under the observer horizon
//! @return //! @return
//! 1 if RADAR_SUN //! 1 if RADAR_SUN
//! 2 if VISIBLE //! 2 if VISIBLE
//! 3 if RADAR_NIGHt //! 3 if RADAR_NIGHT
//! 3 if NOT_VISIBLE //! 3 if NOT_VISIBLE
//! @par References //! @par References
//! Fundamentals of Astrodynamis and Applications (Third Edition) pg 898 //! Fundamentals of Astrodynamis and Applications (Third Edition) pg 898
//! David A. Vallado //! David A. Vallado
int getVisibilityPredict(); Visibility getVisibilityPredict();
double getPhaseAngle(); double getPhaseAngle() const;
gTime getEpoch() { return epoch; } gTime getEpoch() const { return epoch; }
//private: //private:
// Operation calcObserverECIPosition // Operation calcObserverECIPosition
//! @brief This operation compute the observer ECI coordinates in G //! @brief This operation computes the observer ECI coordinates in G
eocentric eocentric
//! Ecuatorial Coordinate System (IJK) for the ai_epoch time. //! Equatorial Coordinate System (IJK) for the ai_epoch time.
//! This position can be asumed as observer position in TEME framew ork without an appreciable error. //! This position can be asumed as observer position in TEME framew ork without an appreciable error.
//! ECI axis (IJK) are parallel to StelCore::EquinoxEQ Framework bu t centered in the earth centre //! ECI axis (IJK) are parallel to StelCore::EquinoxEQ Framework bu t centered in the earth centre
//! instead the observer position. //! instead the observer position.
//! @par References //! @par References
//! Orbital Coordinate Systems, Part II //! Orbital Coordinate Systems, Part II
//! Dr. T.S. Kelso //! Dr. T.S. Kelso
//! http://www.celestrak.com/columns/v02n02/ //! http://www.celestrak.com/columns/v02n02/
//! @param[out] ao_position Observer ECI position vector measured i n Km //! @param[out] ao_position Observer ECI position vector measured i n Km
//! @param[out] ao_vel Observer ECI velocity vector measured in Km/ s //! @param[out] ao_vel Observer ECI velocity vector measured in Km/ s
void calcObserverECIPosition(Vec3d& ao_position, Vec3d& ao_vel); static void calcObserverECIPosition(Vec3d& ao_position, Vec3d& ao_ve l) ;
private: private:
//! do the actual work to compute a cached value.
static void updateSunECIPos();
gSatTEME *pSatellite; gSatTEME *pSatellite;
gTime epoch; static gTime epoch;
// GZ We can avoid many computations (solar and observer positions f
or every satellite) by computing them only once for all objects.
static gTime lastSunECIepoch; // store last time of computation to a
void all-1 computations.
static Vec3d sunECIPos; // enough to have these once.
static Vec3d observerECIPos;
static Vec3d observerECIVel;
static gTime lastCalcObserverECIPosition;
}; };
#endif #endif
 End of changes. 18 change blocks. 
27 lines changed or deleted 40 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/