Basic Description
This is a MATLAB code that creates sumfiles and nominals, so that they can be used to create images for SPC. The MATLAB code is made up of two files. The first being a MATLAB function that calculates the pointing vectors to be placed in the sumfiles and nominals. The second file is a MATLAB script that generates the sumfiles and nominals.
What a Dirty Sumfile and Nominal Look Like
P340452704567
1993 Jul 31 12:00:00.000
1024 1024 5 16383 NPX, NLN, THRSH
0.1250000000D+03 0.5115000000D+03 0.5115000000D+03 MMFL, CTR
-7.0661108898e-02 -8.6621139639e-01 -3.7713683993e-01 SCOBJ
-4.5038310342e-01 -4.5038310342e-01 7.7091511875e-01 CX
-8.8177551817e-01 3.5986238285e-01 -3.0491146416e-01 CY
-1.4009638011e-01 -8.1710104979e-01 -5.5921273118e-01 CZ
6.1333754121e-01 7.8362455606e-01 -9.8740142254e-02 SZ
117.64700 0.00000 0.00000 0.00000 117.64700 0.00000 K-MATRIX
0.00000D+00 0.00000D+00 0.00000D+00 0.00000D+00 DISTORTION
0.1000000000D+01 0.1000000000D+01 0.1000000000D+01 SIGMA_VSO
0.1000000000D-02 0.1000000000D-02 0.1000000000D-02 SIGMA_PTG
LANDMARKS
LIMB FITS
END FILENPX, NLN, THRSH - Pic size, lower and upper dn thresholds. Code does not generate these, but are inputs.
Map/Sam/Polycam - 1024 1024 5 16383
MMFL, CTR - Focal length, px/ln center (boresight/optical axis). Code does no generate these, but are inputs.
Mapcam - 0.1250000000D+03 0.5115000000D+03 0.5115000000D+03
Samcam - 0.0240000000D+03 0.5115000000D+03 0.5115000000D+03
Polycam - 0.6110000000D+03 0.5115000000D+03 0.5115000000D+03
SCOBJ - s/c to object vector (Object Body Fixed and km)
CX - pixel unit vector (Object Body Fixed)
CY - line unit vector (Object Body Fixed)
CZ - boresight unit vector (Object Body Fixed)
SZ - Object center to sun unit vector (Object Body Fized)
K-MATRIX - ?
DISTORTION - ? recommended to keep zero
SIGMA_VSO - formal scobj uncertainty
SIGMA_PTG - formal pointing uncertainty
Code Inputs
The majority of the code inputs are placed within the first 20 lines of the Dirty_SUMFILES.m script. An example is shown below:
% Dirty_SUMFILES
% Made by Kristofer Drozd
% 09/10/15
clear all
clc
distance_sc_vec = [0.740740740751991 2];
size_d = size(distance_sc_vec);
BENNU2LMRK_mat = [ -0.3311398748D-01 0.2609513595D+00 -0.3709481280D-01]';
size_m = size(BENNU2LMRK_mat);
naming_vector = ['C'; 'b'];
for azimuth_sc = 0:20:340;
for zenith_sc = 45;
for azimuth_sun = 135;
for zenith_sun = 30;
for b = 1:size_d(2);
for n = 1:size_m(2); distance_sc_vec - is a vector that contains the distance(s) between the spacecraft and the landmark the camera is pointing at (km). Make sure it is a row vector.
BENNU2LMRK_mat - is a vector of object center to the landmark the camera is pointing at (Object Body Fixed) (km).
naming_mat - rows are for distance and columns for landmark pointing to.
azimuth_... - azimuth angle (NEZ frame)
zenith_... - zenith angle (NEZ frame)
b - don't change (not input)
n - don't change (not input)
If you wish to change the camera being used change the MMFL and CTR on line 39