SatAndLight  2.2.2-hubble
Simulation toolkit for space telescopes
Satellite Class Reference

Satellite control. More...

#include <Satellite.h>

Public Member Functions

bool AddTelescope (Telescope *aTelescope, const ULong64_t aTimePeriodicty)
 Adds a Telescope in the satellite. More...
 
double GetAlphaFromFlightSequence (const double aTime)
 Returns the satellite \(\alpha\) angle at a given time following the flight sequence. More...
 
double GetBetaFromFlightSequence (const double aTime)
 Returns the satellite \(\beta\) angle at a given time according the flight sequence. More...
 
double GetGammaFromFlightSequence (const double aTime)
 Returns the satellite \(\gamma\) angle at a given time according the flight sequence. More...
 
string GetName (void)
 Returns the satellite name. More...
 
UInt_t GetTimeResolution (void)
 Returns the satellite time resolution [ms]. More...
 
void RunSequence (const ULong64_t aTimeStart, const UInt_t aTimeDuration)
 Runs a simulation sequence. More...
 
bool SetFileDuration (const UInt_t aFileDuration)
 Sets the satellite file duration [ms]. More...
 
void SetFlightSequence (TGraph *aAlpha, TGraph *aBeta, TGraph *aGamma)
 Sets the satellite flight sequence. More...
 
void SetName (const string aName)
 Sets the satellite name. More...
 
void SetOutputDirectory (const string aOutputDirectory)
 Sets the satellite output directory. More...
 
void SetTimeResolution (const UInt_t aTimeResolution)
 Sets the satellite time resolution [ms]. More...
 
Constructors and destructors
 Satellite (const UInt_t aTimeResolution)
 Satellite class constuctor. More...
 
virtual ~Satellite (void)
 Satellite class destructor. More...
 

Private Attributes

TGraph * sat_alpha_seq
 Satellite flight sequence \(\alpha\). More...
 
TGraph * sat_beta_seq
 Satellite flight sequence \(\beta\). More...
 
UInt_t sat_dt
 Satelitte dt [ms]. More...
 
UInt_t sat_filedt
 Satelitte file duration [ms]. More...
 
TGraph * sat_gamma_seq
 Satellite flight sequence \(\gamma\). More...
 
string sat_name
 Satellite name. More...
 
string sat_outdir
 Satellite output directory. More...
 
vector< Telescope * > sat_tel
 Vector of telescopes. More...
 
vector< ULong64_t > sat_tel_T
 Vector of telescope periodicity. More...
 

Detailed Description

Satellite control.

This class is designed to generate a satellite observation sequence.

Configuring a satellite

Angular position

The Satellite object must be given a flight sequence with SetFlightSequence(). The flight sequence programs the angular position as a function of time. The three Euler angles, \((\alpha,\beta,\gamma)\), are used to define the satellite angular position in the Earth reference frame, using celestial coordinates \((x',y',z')\). The \(z'\) axis is the rotation axis of the Earth, the \(x'y'\) plane is the equatorial plane, and the \(x'\) axis points to the vernal equinox.

The satellite reference frame is given by a three-dimensional rotation with respect to Earth-based coordinates. Internally, the satellite orientation is controlled using the Euler angles \((\alpha, \beta, \gamma)\). The satellite reference frame is \((x,y,z)\). The x-axis is used as the main-axis for on-board instruments.

In the following figure, the geometrical definitions are represented. The Earth celestial coordinate system \((x',y',z')\) is represented in black. The satellite reference frame \((x,y,z)\) is represented in blue.

Satellite (blue) and Earth celestial (black) reference frame. The rotation to change the system of coordinates is given by the Euler angles and is represented in green.

Timing

The Satellite object must be given a time resolution with SetTimeResolution() which defines the internal clock. The choice of this parameter is crucial as it drives the satellite telescopes in the sequence. When adding a telescope to a satellite, a time periodicity to take pictures should be given. The satellite time resolution must be chosen such that it is the greatest comon divisor of all telescope time periodicities. For example, if you have two telescopes which are programmed to take pictures every 100 ms and 60 ms respectively, you should use a satellite time resolution of 20 ms. See AddTelescope().

In addition another time scale should be defined to tell when the sequence should be saved in files periodically. Again, the satellite time resolution should be a sub-multiple of this periodicity.

Telescopes

A satellite must be equipped with telescopes. Telescope objects must be created and configured first. They are then mounted on the satellite with AddTelescope(). The telescope and the satellite share the same system of corrdinates: the telescope \(x\)-axis is aligned with the satellite \(x\)-axis.

Output files

When running an observation sequence (see below), the data is saved in output ROOT files. The duration for these files must be set with SetFileDuration().

See also
The SatAndLight file structure for satellite objects.

Run an observation sequence

Once the satellite is configured, run an observation sequence with RunSequence(). This function manages the satellite angular position as a function of time and automatically controls on-board telescopes in a synchronized way.

The observation sequence is saved in a sequence of root files.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ Satellite()

Satellite::Satellite ( const UInt_t  aTimeResolution)

Satellite class constuctor.

The Satellite object is initialized:

  • It is given a default name "SAT" (see also SetName()).
  • The satellite time resolution is set by the user (see also SetTimeResolution()).
  • The satellite file duration is set to 100 times the satellite time resolution (see also SetFileDuration()).
  • The output directory is set to the current directory (see also SetOutputDirectory()).
  • The flight sequence is a single angular position such that the satellite axes \((x,y,z)\) are aligned with the Earth axes \((x',y',z')\) (see also SetFlightSequence()).
Warning
The satellite name must be unique if more than one satellite are used in the same time. If needed, use SetName() to update the name.
Parameters
[in]aTimeResolutionSatellite time resolution [ms].

◆ ~Satellite()

Satellite::~Satellite ( void  )
virtual

Satellite class destructor.

Member Function Documentation

◆ AddTelescope()

bool Satellite::AddTelescope ( Telescope aTelescope,
const ULong64_t  aTimePeriodicty 
)

Adds a Telescope in the satellite.

The input telescope should be entirely configured before calling this function. Do not change the telescope configuration after it is added to the satellite. A time periodicity should be specified. It tells the satellite when to take a picture. This periodicity should be a multiple of the satellite time resolution previously set with SetTimeResolution().

Parameters
[in]aTelescopePointer to a Telescope object.
[in]aTimePeriodictyTime periodicity [ms].
Returns
true if the telescope is properly added to the satellite, false otherwise.

◆ GetAlphaFromFlightSequence()

double Satellite::GetAlphaFromFlightSequence ( const double  aTime)

Returns the satellite \(\alpha\) angle at a given time following the flight sequence.

The Euler angle \(\alpha\) is evaluated following the flight sequence set with SetFlightSequence():

  • 1 single point → unique and static value.
  • the angle value is linearly interpolated.
  • if the requested time is out-of-range, the last known value is used.
    Parameters
    [in]aTimeSatellite time [ms].

◆ GetBetaFromFlightSequence()

double Satellite::GetBetaFromFlightSequence ( const double  aTime)

Returns the satellite \(\beta\) angle at a given time according the flight sequence.

The Euler angle \(\beta\) is evaluated according the flight sequence set with SetFlightSequence():

  • 1 single point → unique and static value.
  • the angle value is linearly interpolated.
  • if the requested time is out-of-range, the last known value is used.
    Parameters
    [in]aTimeSatellite time [ms].

◆ GetGammaFromFlightSequence()

double Satellite::GetGammaFromFlightSequence ( const double  aTime)

Returns the satellite \(\gamma\) angle at a given time according the flight sequence.

The Euler angle \(\gamma\) is evaluated according the flight sequence set with SetFlightSequence():

  • 1 single point → unique and static value.
  • the angle value is linearly interpolated.
  • if the requested time is out-of-range, the last known value is used.
    Parameters
    [in]aTimeSatellite time [ms].

◆ GetName()

string Satellite::GetName ( void  )
inline

Returns the satellite name.

◆ GetTimeResolution()

UInt_t Satellite::GetTimeResolution ( void  )
inline

Returns the satellite time resolution [ms].

◆ RunSequence()

void Satellite::RunSequence ( const ULong64_t  aTimeStart,
const UInt_t  aTimeDuration 
)

Runs a simulation sequence.

The satellite clock is ticking starting at aTimeStart and for a duration aTimeDuration. Each tick is separated by the satellite time resolution set with SetTimeResolution(). When the satellite time matches a telescope periodicity, a picture is taken with Telescope::TakePicture(). During the exposure time, the satellite position is assumed to be static and equal to the scheduled position in the middle of the exposure time.

Parameters
[in]aTimeStartSequence starting time [ms].
[in]aTimeDurationSequence duration [ms].

◆ SetFileDuration()

bool Satellite::SetFileDuration ( const UInt_t  aFileDuration)

Sets the satellite file duration [ms].

The file duration parameter tells the satellite when to save the sequence in a file. This parameter should be a multiple of the satellite time resolution previously set with SetTimeResolution().

Parameters
[in]aFileDurationSatellite file duration [ms].

◆ SetFlightSequence()

void Satellite::SetFlightSequence ( TGraph *  aAlpha,
TGraph *  aBeta,
TGraph *  aGamma 
)

Sets the satellite flight sequence.

The satellite Euler angles can be provided using TGraph objects. Each point of the graph gives the angle [rad] as a function of time [ms]. The number of points in the graph does not matter as linear interpolation is used to match the satellite time resolution. If the graph is a single point, it is interpreted as a time-independent value.

Parameters
[in]aAlphaPointer to a TGraph describing \(\alpha\) as a function of time.
[in]aBetaPointer to a TGraph describing \(\beta\) as a function of time.
[in]aGammaPointer to a TGraph describing \(\gamma\) as a function of time.
Precondition
All TGraph pointers are valid pointers to TGraph objects.
Warning
The points in the TGraph MUST be sorted in time!
Note
The input TGraph objects can be deleted after calling this function.

◆ SetName()

void Satellite::SetName ( const string  aName)

Sets the satellite name.

The satellite name must be unique if more than one satellite are used in the same time.

Parameters
[in]aNameSatellite name.

◆ SetOutputDirectory()

void Satellite::SetOutputDirectory ( const string  aOutputDirectory)
inline

Sets the satellite output directory.

Output files will be saved in that directory.

Parameters
[in]aOutputDirectoryPath to output directory.
Precondition
The output directory must exist.

◆ SetTimeResolution()

void Satellite::SetTimeResolution ( const UInt_t  aTimeResolution)
inline

Sets the satellite time resolution [ms].

Parameters
[in]aTimeResolutionSatellite time resolution [ms].

Member Data Documentation

◆ sat_alpha_seq

TGraph* Satellite::sat_alpha_seq
private

Satellite flight sequence \(\alpha\).

◆ sat_beta_seq

TGraph* Satellite::sat_beta_seq
private

Satellite flight sequence \(\beta\).

◆ sat_dt

UInt_t Satellite::sat_dt
private

Satelitte dt [ms].

◆ sat_filedt

UInt_t Satellite::sat_filedt
private

Satelitte file duration [ms].

◆ sat_gamma_seq

TGraph* Satellite::sat_gamma_seq
private

Satellite flight sequence \(\gamma\).

◆ sat_name

string Satellite::sat_name
private

Satellite name.

◆ sat_outdir

string Satellite::sat_outdir
private

Satellite output directory.

◆ sat_tel

vector<Telescope*> Satellite::sat_tel
private

Vector of telescopes.

◆ sat_tel_T

vector<ULong64_t> Satellite::sat_tel_T
private

Vector of telescope periodicity.


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