File size: 6,119 Bytes
5ab75a9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
function [Catastrophic,NumOfPieces,massVec] = CollisionConsequenceOCMDBReader(OCMBDEntry,PrimaryMass,BSigNorm,NumOfSamples)
% CollisionConsequenceOCMDBReader - Calculates which spherical screening 
%                                   volumes are penetrated by a conjuncting 
%                                   secondary
% Syntax: [Catastrophic,NumOfPieces,massVec] = ...
%   CollisionConsequenceOCMDBReader(OCMBDEntry,PrimaryMass,...
%                                   BSigNorm,NumOfSamples)
%
% =========================================================================
%
% Copyright (c) 2025 United States Government as represented by the
% Administrator of the National Aeronautics and Space Administration.
% All Rights Reserved.
%
% =========================================================================
%
% Description: Calculates the expected number of resultant debris pieces 
% for an input close approach event for a number of trials enounters. Also 
% outputs the number of these trials with a potentially catastrophic 
% collision as defined in Hejduk et. al. "Consideration of Collision 
% "Consequence" in Satellite Conjunction Assessment and Risk Analysis" 
% 2017.  This is done using an OCMDB Matlab object.
%
% =========================================================================
%
% Input:
%
%   OCMDBEntry      - Single Row of an OCDB object to process
%
%   PrimaryMass     - Mass of Primary Object (kg)
%                     (Optional, default = 2000)
%
%   BSigNorm        - Normalized Ballistic Coefficient Sigma of 
%                     Secondary Object 
%                     (Optional, Default = 0.2 (20%, conservative))
%
%   NumOfSamples    - Number of samples to generate 
%                     (Optional, default = 10000)
%
% =========================================================================
%
% Output:
%
%   Catastrophic    - logical array indicating whether the            [Nx1]
%                     sampled collision is catastrophic
%
%   NumOfPieces     - array of the number of pieces expected to       [Nx1]
%                     be generated from a collision for each sample
%
%   massVec         - array of the secondary object mass              [Nx1]
%                     estimates for each individual sample
%
% =========================================================================
%
% References:
%
%   Hejduk et. al. "Consideration of Collision "Consequence" in Satellite 
%   Conjunction Assessment and Risk Analysis" 2017
%
% =========================================================================
%
% Dependencies:
%
%   RCSDistribution.m
%   EstimateMassFromRCS.m
%   CollisionConsequenceNumPieces.m
%
% =========================================================================
%
% Subfunctions:
%
%   None
%
% =========================================================================
%
% Initial version: Feb 2018;  Latest update: Nov 2020
%
% ----------------- BEGIN CODE -----------------
    persistent pathsAdded
    if isempty(pathsAdded)
        % Paths for collision consequence mode
        s = what(fullfile(p,'../Utils/AugmentedMath')); addpath(s.path);
        s = what(fullfile(p,'../ProbabilityOfCollision')); addpath(s.path);
        pathsAdded = true;
    end
    %% Set up Defaults
    % Default number of samples
    if nargin < 4
        NumOfSamples = [];
    end
    % Default sigma(B)/B value
    if nargin < 3 || isempty(BSigNorm)
        BSigNorm = 0.2; 
    end
    % Default primary object mass at collision time
    if nargin < 2 || isempty(PrimaryMass)
        PrimaryMass = 2000;
    end
    
    % Set Cd Values
    DefaultCd       = 2.7; % Default Drag Coefficient Used for Estimating Masses of Primary and Secondary Objects
    DefaultCdSigma  = 0.10; % Relative Cd uncertainty for use in Mass Estimation Process
    Cd          = DefaultCd;
    CdVar       = (DefaultCd*DefaultCdSigma)^2; % Get Cd Variance from Relative Uncertainty Specified above
    
    % Set B value for input
    B = OCMBDEntry(1,116);
    
    % Set negative B values to zero
    B = max(0,B);
    
    % Set BVar to be the estimated variance of B = BSig^2
    BVar = (BSigNorm*B)^2;
    
    % Get relative velocity magnitude
    % VRel = norm(OCMBDEntry(1,24:26));
    VRel = OCMBDEntry(1,20);    
    
    % Set RCS Value
    RCS = OCMBDEntry(1,114);

    % Estimate the 99% confidence upper-limit secondary mass 
    [massVec,~] = EstimateObjectMassQuantiles(RCS,B,BVar,Cd,CdVar,0.99,NumOfSamples);
    
    % Estimate the catastrophic nature and the number of pieces for the
    % primary-secondary collision, using the upper-limit secondary mass
    [Catastrophic,NumOfPieces] = CollisionConsequenceNumPieces(PrimaryMass,VRel,massVec);
    
% ----------------- END OF CODE ------------------
%
% Please record any changes to the software in the change history 
% shown below:
%
% ----------------- CHANGE HISTORY ------------------
% Developer      |    Date    |     Description
% ---------------------------------------------------
% T. Lechtenberg | 02-05-2018 | Initial Development
% D. Hall        | 02-14-2019 | Set negative OCMBD B values to zero, and
%                               made BVar hold variance by squaring BSig
% D. Hall        | 11-04-2020 | Worked with T. Lechtenberg to interface
%                               properly with latest versions of functions
%                               EstimateObjectMassQuantiles.m and
%                               CollisionConsequenceNumPieces.m. Changed
%                               the default NumOfSamples to be set within 
%                               function EstimateObjectMassQuantiles.m.
% =========================================================================
%
% Copyright (c) 2025 United States Government as represented by the
% Administrator of the National Aeronautics and Space Administration.
% All Rights Reserved.
%
% =========================================================================