Spacecraft Control Framework 1.0
Spacecraft Control Library
Public Member Functions | List of all members
beam_contour Class Reference

Model beam contours. More...

#include <sc_beam_contour.h>

Public Member Functions

 beam_contour ()
 Constructor. More...
 
 beam_contour (double lat0, double lon0, double alt0, double beamWidth)
 Constructor for Coefficients. More...
 
 beam_contour (double lat0, double lon0, double alt0, double beamWidth, double azim, double elev)
 Creates a beam contour object and computes the lat/lon contour. More...
 
void update (double lat0, double lon0, double alt0, double beamWidth, double azim, double elev)
 Update - recompute the contour with all new inputs. More...
 
void update ()
 Update - recompute the contour with current data. More...
 
void rotateAxis (const ml_matrix &u, double roll, double pitch)
 Rotate a body axis through roll, pitch. Zero angles result in +z body pointing down. More...
 
void rotateAxis (double lat0, double lon0, double alt0, double beamWidth, const ml_matrix &u, double roll, double pitch)
 Rotate a body axis through roll, pitch. Zero angles result in +z body pointing down. More...
 
void point (double azim, double elev)
 point - recompute the contour with a new beam direction More...
 
void move (double lat0, double lon0, double alt0)
 Rotate - recompute the contour with a new beam direction. More...
 
void verify_inputs ()
 Verify inputs.
 
ml_matrix get_lat ()
 Get the latitude points of the beam contour.
 
ml_matrix get_lon ()
 Get the longitude points of the beam contour.
 
ml_matrix get_r ()
 Get the Earth-fixed position points of the beam contour.
 
ml_matrix * get_lat_ptr ()
 Get pointer to the latitude points of the beam contour.
 
ml_matrix * get_lon_ptr ()
 Get pointer to the longitude points of the beam contour.
 
ml_matrix * get_r_ptr ()
 Get the Earth-fixed position points of the beam contour.
 
bool exist ()
 Return flag to say whether the contour exists or not.
 
bool horizon ()
 Return flag to say whether the contour has a horizon segment or not.
 

Detailed Description

Model beam contours.

Constructor & Destructor Documentation

◆ beam_contour() [1/3]

beam_contour::beam_contour ( )

Constructor.

Default constructor.

References RADIUS_EARTH.

◆ beam_contour() [2/3]

beam_contour::beam_contour ( double  _lat0,
double  _lon0,
double  _alt0,
double  _beamWidth 
)

Constructor for Coefficients.

Creates a beam contour object and computes the lat/lon contour.

Parameters
lat0North Latitude of beam vertex [rad]
lon0East Longitude of beam vertex [rad]
alt0Altitude of beam vertex [km] above sea-level
beamWidthAngular width of beam [rad]

References RADIUS_EARTH, and update().

◆ beam_contour() [3/3]

beam_contour::beam_contour ( double  _lat0,
double  _lon0,
double  _alt0,
double  _beamWidth,
double  _azim,
double  _elev 
)

Creates a beam contour object and computes the lat/lon contour.

Parameters
lat0North Latitude of beam vertex [rad]
lon0East Longitude of beam vertex [rad]
alt0Altitude of beam vertex [km] above sea-level
beamWidthAngular width of beam [rad]
azimAzimuth of beam axis, measured from north clockwise [rad]
elevElevation of beam axis, measured from nadir vector [rad]

References RADIUS_EARTH, and update().

Member Function Documentation

◆ update() [1/2]

void beam_contour::update ( double  _lat0,
double  _lon0,
double  _alt0,
double  _beamWidth,
double  _azim,
double  _elev 
)

Update - recompute the contour with all new inputs.

Update the beam contour object - compute new lat/lon contour with all new inputs.

Parameters
lat0North Latitude of beam vertex [rad]
lon0East Longitude of beam vertex [rad]
alt0Altitude of beam vertex [km] above sea-level
beamWidthAngular width of beam [rad]
azimAzimuth of beam axis, measured from north clockwise [rad]
elevElevation of beam axis, measured from nadir vector [rad]

References update().

◆ update() [2/2]

void beam_contour::update ( )

Update - recompute the contour with current data.

Update the beam contour with current object data.

References TWO_PI, and verify_inputs().

Referenced by beam_contour(), move(), point(), rotateAxis(), and update().

◆ rotateAxis() [1/2]

void beam_contour::rotateAxis ( const ml_matrix &  u,
double  roll,
double  pitch 
)

Rotate a body axis through roll, pitch. Zero angles result in +z body pointing down.

Rotate a body axis through roll, pitch.

For zero-inclination orbits, roll=pitch=0 results in body xyz aligned with ESD frame:
body +x aligned with velocity (East), body +y aligned with anti-orbit normal (South)
body +z aligned with nadir (Down)

Parameters
uUnit vector of beam axis in body frame
rollRoll angle about body x-axis (north/south motion) [rad]
pitchPitch angle about body y-axis (east/west motion) [rad]

References esd_to_azim(), esd_to_elev(), and update().

Referenced by rotateAxis().

◆ rotateAxis() [2/2]

void beam_contour::rotateAxis ( double  _lat0,
double  _lon0,
double  _alt0,
double  _beamWidth,
const ml_matrix &  u,
double  roll,
double  pitch 
)

Rotate a body axis through roll, pitch. Zero angles result in +z body pointing down.

Rotate a body axis through roll, pitch.

For zero-inclination orbits, roll=pitch=0 results in body xyz aligned with ESD frame:
body +x aligned with velocity (East), body +y aligned with anti-orbit normal (South)
body +z aligned with nadir (Down)

Parameters
lat0North Latitude of beam vertex [rad]
lon0East Longitude of beam vertex [rad]
alt0Altitude of beam vertex [km] above sea-level
beamWidthAngular width of beam [rad]
uUnit vector of beam axis in body frame
rollRoll angle about body x-axis (north/south motion) [rad]
pitchPitch angle about body y-axis (east/west motion) [rad]

References rotateAxis().

◆ point()

void beam_contour::point ( double  _azim,
double  _elev 
)

point - recompute the contour with a new beam direction

Update the beam contour object - compute new lat/lon contour by pointing attitude (azim, elev)

Parameters
azimAzimuth of beam axis, measured from north clockwise [rad]
elevElevation of beam axis, measured from nadir vector [rad]

References update().

◆ move()

void beam_contour::move ( double  _lat0,
double  _lon0,
double  _alt0 
)

Rotate - recompute the contour with a new beam direction.

Update the beam contour object - compute new lat/lon contour by moving position (lat0,lon0,alt0)

Parameters
lat0North Latitude of beam vertex [rad]
lon0East Longitude of beam vertex [rad]
alt0Altitude of beam vertex [km] above sea-level

References update().