Spacecraft Models Package 2.0
Spacecraft Models for DSim
|
Star camera model that outputs centroids of planets and stars. More...
#include <star_camera.h>
Inherits dsim_model.
Public Member Functions | |
star_camera (dsim_model_setup *setup) | |
Constructor. | |
void | initialize_data () |
Initialize outlets and output variables. | |
void | initialization_complete () |
Finish initialization. More... | |
void | post_calculate () |
Computation done after numerical integration. More... | |
void | update_unit_vectors () |
Update unit vectors. | |
Protected Attributes | |
Outputs | |
dsim_variable | centroid_dsim |
[6xn] Matrix of centroid and ID data, "centroid". More... | |
dsim_variable | frame_dsim |
Frame taken from the camera, "frame". | |
dsim_variable | frame_buffer_dsim |
Frame in buffer form. | |
dsim_variable | new_frame_dsim |
Boolean (int) indicating that a new frame is available, "new_frame". | |
dsim_variable | sensorPosition_dsim |
Sensor position calculated in the body frame [3x1] matrix. | |
dsim_variable | sensorBoresight_dsim |
Sensor ECI boresight [3x1] unit vector. | |
dsim_variable | sensorConeAngle_dsim |
Sensor cone half angle (rad) | |
dsim_variable | current_dsim |
Measured current. | |
Parameters | |
dsim_variable | focalLength_dsim |
Focal length (mm) | |
dsim_variable | mBodyTostar_camera_dsim |
[3x3] transformation matrix from the body frame to the star camera | |
dsim_variable | kAberration_dsim |
Aberration corrections as [1x2] matrix. | |
dsim_variable | pixel_size_dsim |
[1x2] matrix with [x y] size of pixels (microns) | |
dsim_variable | number_of_pixels_dsim |
[1x2] matrix with number of pixels as [rows cols] | |
dsim_variable | camera_gain_dsim |
Camera gain. | |
dsim_variable | time_step_dsim |
Camera update time step. | |
dsim_variable | power_on_dsim |
Power when on. | |
dsim_variable | voltage_bus_dsim |
Bus voltage. | |
dsim_variable | chordwidth_blinding_dsim |
Chordwidth to blind the sensor. | |
dsim_variable | saturation_dsim |
Saturation to blind the sensor. | |
Parent variables | |
dsim_variable | parent_position_dsim |
Parent position. | |
dsim_variable | parent_quaternion_dsim |
Parent quaternion. | |
Commands | |
dsim_variable | generate_frame_dsim |
Integer flag 1/0 whether or not to generate the frame pixelmap. | |
Outlets | |
These outlets are for connecting to the SPICE gravity model, gravity_spice. | |
dsim_variable | observer_dsim |
Reference center. | |
dsim_variable | positionBody_dsim |
Planet positions. | |
dsim_variable | planetIndex_dsim |
SPICE planet index. | |
dsim_variable | radiusBody_dsim |
Planet radius. | |
Star camera model that outputs centroids of planets and stars.
This is a pinhole camera model. Specify the number of pixels and their size, which along with the focal length is used to compute the field of view. Finds the centroids of stars, spacecraft, and planets in the camera FOV. Models eclipses of stars by other objects. Has effects of aberration on centroid location. Hooks up to the SPICE gravity model, all spacecraft in simulation (targets?). This model requires three data files: star catalog, landmark catalog (for planets), and target catalog for points on a spacecraft. Defaults are provided or these can be changed in the simulation setup. The unit vector of the boresight is along +z. If pointed at a calibration target the model will send out calibration data.
void star_camera::initialization_complete | ( | ) |
Finish initialization.
Initialize the pinhole camera model, #PinholeCamera.
References camera_gain_dsim, focalLength_dsim, frame_dsim, generate_frame_dsim, number_of_pixels_dsim, parent_position_dsim, parent_quaternion_dsim, pixel_size_dsim, sensorConeAngle_dsim, and time_step_dsim.
void star_camera::post_calculate | ( | ) |
Computation done after numerical integration.
Update the camera and get the star and planet centroids.
Simulate a star frame with imager_psf() if requested.
References centroid_dsim, chordwidth_blinding_dsim, current_dsim, frame_dsim, generate_frame_dsim, mBodyTostar_camera_dsim, new_frame_dsim, parent_position_dsim, parent_quaternion_dsim, power_on_dsim, saturation_dsim, sensorBoresight_dsim, and voltage_bus_dsim.
|
protected |
[6xn] Matrix of centroid and ID data, "centroid".
Centroids contains all data describing the data from the star camera. Each column is a star or a planet. For a star the rows are:
For a planet the rows are:
1: Number of planet (SPICE ID)
2: x Pixel
3: y Pixel
4: Pixel output
5: Identifier enum{ starType, planetType, landmarkType, calibrationType }
6: Planet chord;