OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | List of all members
ossimplugins::GeographicEphemeris Class Reference

This class represent an ephemeris in Geographic coordinates system. More...

#include <GeographicEphemeris.h>

Inheritance diagram for ossimplugins::GeographicEphemeris:
ossimplugins::Ephemeris

Public Member Functions

 GeographicEphemeris ()
 Constructor. More...
 
virtual ~GeographicEphemeris ()
 Destructor. More...
 
 GeographicEphemeris (JSDDateTime date, double pos[3], double speed[3])
 Constructor with initialisations. More...
 
 GeographicEphemeris (const GeographicEphemeris &rhs)
 Copy constructor. More...
 
 GeographicEphemeris (GalileanEphemeris &rhs)
 
GeographicEphemerisoperator= (const GeographicEphemeris &rhs)
 Affectation operator. More...
 
void ToGalilean (GalileanEphemeris *vGal)
 This fonction converts the current ephemeris in the Galilean coordinates system. More...
 
 operator GalileanEphemeris ()
 
virtual EphemerisClone ()
 This function creates a copy of the current class. More...
 
- Public Member Functions inherited from ossimplugins::Ephemeris
 Ephemeris ()
 Constructor. More...
 
virtual ~Ephemeris ()
 Destructor. More...
 
 Ephemeris (JSDDateTime date, double pos[3], double speed[3])
 Constructor with initialisations. More...
 
 Ephemeris (const Ephemeris &rhs)
 Copy constructor. More...
 
Ephemerisoperator= (const Ephemeris &rhs)
 Affectation operator. More...
 
JSDDateTime get_date () const
 
double * get_position ()
 
const double * get_position () const
 
double * get_speed ()
 
const double * get_speed () const
 
void set_date (JSDDateTime date)
 
void set_position (double position[3])
 
void set_speed (double speed[3])
 
bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save object state to a keyword list. More...
 
bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of the object from a keyword list. More...
 

Additional Inherited Members

- Protected Attributes inherited from ossimplugins::Ephemeris
JSDDateTime _date
 
double _position [3]
 
double _speed [3]
 

Detailed Description

This class represent an ephemeris in Geographic coordinates system.

Definition at line 27 of file GeographicEphemeris.h.

Constructor & Destructor Documentation

◆ GeographicEphemeris() [1/4]

ossimplugins::GeographicEphemeris::GeographicEphemeris ( )

Constructor.

Definition at line 23 of file GeographicEphemeris.cpp.

23  : Ephemeris()
24 {
25 }
Ephemeris()
Constructor.
Definition: Ephemeris.cpp:29

◆ ~GeographicEphemeris()

ossimplugins::GeographicEphemeris::~GeographicEphemeris ( )
virtual

Destructor.

Definition at line 27 of file GeographicEphemeris.cpp.

28 {
29 }

◆ GeographicEphemeris() [2/4]

ossimplugins::GeographicEphemeris::GeographicEphemeris ( JSDDateTime  date,
double  pos[3],
double  speed[3] 
)

Constructor with initialisations.

Definition at line 31 of file GeographicEphemeris.cpp.

31  : Ephemeris(date, pos, speed)
32 {
33 }
Ephemeris()
Constructor.
Definition: Ephemeris.cpp:29

◆ GeographicEphemeris() [3/4]

ossimplugins::GeographicEphemeris::GeographicEphemeris ( const GeographicEphemeris rhs)

Copy constructor.

Definition at line 35 of file GeographicEphemeris.cpp.

35  : Ephemeris(rhs)
36 {
37 }
Ephemeris()
Constructor.
Definition: Ephemeris.cpp:29

◆ GeographicEphemeris() [4/4]

ossimplugins::GeographicEphemeris::GeographicEphemeris ( GalileanEphemeris rhs)

Definition at line 81 of file GeographicEphemeris.cpp.

References ossimplugins::GalileanEphemeris::ToGeographic().

82 {
83  rhs.ToGeographic(this);
84 }

Member Function Documentation

◆ Clone()

virtual Ephemeris* ossimplugins::GeographicEphemeris::Clone ( )
inlinevirtual

This function creates a copy of the current class.

Reimplemented from ossimplugins::Ephemeris.

Definition at line 64 of file GeographicEphemeris.h.

65  {
66  return new GeographicEphemeris(*this);
67  };

◆ operator GalileanEphemeris()

ossimplugins::GeographicEphemeris::operator GalileanEphemeris ( )

Definition at line 74 of file GeographicEphemeris.cpp.

75 {
76  GalileanEphemeris rhs;
77  ToGalilean(&rhs);
78  return rhs;
79 }
void ToGalilean(GalileanEphemeris *vGal)
This fonction converts the current ephemeris in the Galilean coordinates system.

◆ operator=()

GeographicEphemeris & ossimplugins::GeographicEphemeris::operator= ( const GeographicEphemeris rhs)

Affectation operator.

Definition at line 39 of file GeographicEphemeris.cpp.

References ossimplugins::Ephemeris::Ephemeris().

40 {
41  ((Ephemeris)*this) = ((Ephemeris)rhs);
42  return *this;
43 }
Ephemeris()
Constructor.
Definition: Ephemeris.cpp:29

◆ ToGalilean()

void ossimplugins::GeographicEphemeris::ToGalilean ( GalileanEphemeris vGal)

This fonction converts the current ephemeris in the Galilean coordinates system.

Definition at line 46 of file GeographicEphemeris.cpp.

References ossimplugins::Ephemeris::_date, ossimplugins::Ephemeris::_position, ossimplugins::Ephemeris::_speed, ossimplugins::GMSTDateTime::AN1950, ossimplugins::JSDDateTime::AsGMSTDateTime(), ossimplugins::GMSTDateTime::get_tms(), ossimplugins::Ephemeris::set_date(), ossimplugins::GMSTDateTime::set_origine(), ossimplugins::Ephemeris::set_position(), and ossimplugins::Ephemeris::set_speed().

Referenced by ossimplugins::GalileanEphemeris::GalileanEphemeris().

47 {
48  const double OMEGATERRE = 6.28318530717958647693 / 86164.09054 ;
49  GMSTDateTime h;
50  h.set_origine(GMSTDateTime::AN1950);
51 
52  double s,c;
53  _date.AsGMSTDateTime(&h) ;
54 
55  c = cos (h.get_tms()) ;
56  s = sin (h.get_tms()) ;
57  vGal->set_date(_date);
58 
59  double pos[3];
60  double speed[3];
61 
62  pos[0] = _position[0] * c - _position[1] * s ;
63  pos[1] = _position[0] * s + _position[1] * c ;
64  pos[2] = _position[2] ;
65 
66  speed[0] = _speed[0] * c - _speed[1] * s - OMEGATERRE * (_position[0] * s + _position[1] * c) ;
67  speed[1] = _speed[0] * s + _speed[1] * c + OMEGATERRE * (_position[0] * c - _position[1] * s) ;
68  speed[2] = _speed[2] ;
69 
70  vGal->set_position(pos);
71  vGal->set_speed(speed);
72 }
int AsGMSTDateTime(GMSTDateTime *GMST)
This function converts the current JSDDateTime into GMST Date.

The documentation for this class was generated from the following files: