Spacecraft Models Package 2.0
Spacecraft Models for DSim
Public Member Functions | Protected Attributes | List of all members
camera Class Reference

Uses OpenGL to create synthetic camera images. More...

#include <camera.h>

Inherits dsim_model.

Public Member Functions

 camera (dsim_model_setup *setup)
 Constructor.
 
virtual ~camera ()
 Destructor.
 
void initialize_data ()
 Initialize outlets, parameters, inputs and outputs. More...
 
void initialization_complete ()
 Finish initialization.
 
void initialize_timestep ()
 Computation done prior to numerical integration.
 

Protected Attributes

ml_matrix star_unit_vector
 Star unit vector.
 
Model Parameters
dsim_variable bodyTocamera_dsim
 Transformation matrix from body to camera.
 
dsim_variable positioncamera_dsim
 Position of the camera in the parent craft's coordinate frame.
 
dsim_variable cameraNumberOfPixels_dsim
 Number of pixels in x and y directions (1x2 matrix) in the sensor.
 
dsim_variable cameraFocalLength_dsim
 Lens focal length.
 
dsim_variable cameraPixelSize_dsim
 x and y size in mm of each pixel (1x2 matrix)
 
Outlets
dsim_variable observer_dsim
 
dsim_variable positionBody_dsim
 Planet positions.
 
dsim_variable velocityBody_dsim
 Planet velocities.
 
dsim_variable planetIndex_dsim
 SPICE planet index.
 
dsim_variable radiusBody_dsim
 Planet radius.
 
dsim_variable acceleration_dsim
 Gravitational acceleration.
 
dsim_variable angularRateVector_dsim
 Angular rate vector.
 
dsim_variable rotationMatrixPlanet_dsim
 Body rotation matrix.
 
Outputs
dsim_variable cameraFrame_dsim
 
Inputs
dsim_variable parent_position_dsim
 
dsim_variable parent_quaternion_dsim
 Parent craft quaternion.
 

Detailed Description

Uses OpenGL to create synthetic camera images.

Models a visual sensor attached to a spacecraft. The sensor has its own position expressed within the coordinate system of the parent craft as well as its own orientation expressed as a transformation matrix from the spacecraft body to the camera's orientation. This model creates a synthetic image and outputs a PGM (gray scale) camera frame.

This model generates a lot of data and can slow down a simulation considerably.

Member Function Documentation

◆ initialize_data()

void camera::initialize_data ( )

Member Data Documentation

◆ observer_dsim

dsim_variable camera::observer_dsim
protected

Reference center

◆ cameraFrame_dsim

dsim_variable camera::cameraFrame_dsim
protected

Camera frame - PGM formatted image data

◆ parent_position_dsim

dsim_variable camera::parent_position_dsim
protected

Parent craft position


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