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

#include <sc_pinhole_camera.h>

Public Member Functions

 PinholeCamera (void)
 Constructor.
 
void Initialize (double f, double wX, double wY, double gain)
 Initialize the camera physical parameters. More...
 
void InitializeNoise (double sigmaXY, double sigmaI, double sigmaFS, int fSAtEnd)
 Initialize the camera noise model. More...
 
ml_matrix Update (ml_matrix u, ml_matrix intensity, ml_matrix bUToCamera)
 Update the camera measurement from unit vectors. More...
 
ml_matrix GetPixelOutput (void)
 Get the pixel intensity output, (1,m). More...
 
ml_matrix GetStars (void)
 Get the star matrix output, (1,m). More...
 
ml_matrix UpdateFromPosition (ml_matrix rT, ml_matrix r, ml_matrix intensity, ml_matrix q_eci_to_body, ml_matrix q_body_to_camera)
 Update the camera measurement from unit vectors. More...
 

Detailed Description

Pinhole camera model. Explicitly models star camera measurements with position and intensity noise parameters

as well as false stars.

Member Function Documentation

◆ Initialize()

void PinholeCamera::Initialize ( double  f,
double  wX,
double  wY,
double  gain 
)

Initialize the camera physical parameters.

The units of f, wX, and wY should be consistent, i.e. mm or pixels.

Parameters
fScaled focal length
wXWidth of sensing element in X
wYWidth of sensing element in Y
gainCamera gain

◆ InitializeNoise()

void PinholeCamera::InitializeNoise ( double  sigmaXY,
double  sigmaI,
double  sigmaFS,
int  fSAtEnd 
)

Initialize the camera noise model.

Parameters
sigmaXYPosition noise 1 sigma
sigmaIIntensity noise 1 sigma
sigmaFSFalse star noise 1 sigmas
fSAtEndFlag, 1 if false stars are at the end of the measurements

◆ Update()

ml_matrix PinholeCamera::Update ( ml_matrix  u,
ml_matrix  intensity,
ml_matrix  bUToCamera 
)

Update the camera measurement from unit vectors.

Keeps only those vectors within the imaging chip limits. Applies the camera gain to get the measured intensity. Noise is not yet modeled. See also u_to_pix.

Parameters
uStar unit vectors (3,n)
intensityStar intensity (1,n)
bUToCameraRotation to imager frame (3,3)
Returns
Pixels, (2,m). Each column is an xy pair corresponding to a star id. The centroids are referenced to the center of the imager, i.e. from the camera boresight.

References u_to_pix().

Referenced by UpdateFromPosition().

◆ GetPixelOutput()

ml_matrix PinholeCamera::GetPixelOutput ( void  )

Get the pixel intensity output, (1,m).

Returns
Intensity (1,m)

◆ GetStars()

ml_matrix PinholeCamera::GetStars ( void  )

Get the star matrix output, (1,m).

This is the index of the stars seen from the unit vectors passed to Update().

Returns
Star IDs (1,m)

◆ UpdateFromPosition()

ml_matrix PinholeCamera::UpdateFromPosition ( ml_matrix  rT,
ml_matrix  r,
ml_matrix  intensity,
ml_matrix  q_eci_to_body,
ml_matrix  q_body_to_camera 
)

Update the camera measurement from unit vectors.

Keeps only those vectors within the imaging chip limits. Applies the camera gain to get the measured intensity. Noise is not yet modeled. See also u_to_pix.

Parameters
rPosition of camera in ECI
rTPosition of target in ECI
intensityTarget illumination
q_eci_to_bodyQuaternion from eci to body
q_body_to_cameraQuaternion from body to camera
Returns
Pixels. Each column is an xy pair corresponding to a star id

References Update().