Create A Dynamic Sensor Body Mask for Analysis

Information

 
Notes/Code
The attached zip folder contains Matlab code and an example scenario which simulate the effects of a dynamic sensor body AzElMask to handle changes in geometry of obscuring objects. This is useful when the obscuring objects are moving relative to the sensor or if the obscuring object has moving components such as antenna or solar panels.

This is done by computing sensor AzElMasks at discrete times over a time span and saved in the ../Scenario/DynamicMaskFiles folder. After computing these sensor AzElMasks, these masks are used to calculate access to a list of objects. Access will be computed until the next AzElMask is available, then the mask will be updated and the process is repeated.
User-added image

There is a main script is called Dynamic SensorBodyMaskAnalysis.m and there are three supporting functions. Only the Inputs section of the main script needs to be adjusted.
User-added image

Besides selecting the mask times, sensors, obscuring objects and objects for access computation, there are a few additional options. The first is to reuse existing mask files, so the script can be run to compute access to new objects without having to spend the time to regenerate the mask files. There is an option to write the access times accounting for obscuration to a file and to add these times to to Analysis Workbench as interval lists. If these interval lists are added to Analysis Workbench they will also be added to the Timeline view and there is another option to add in these accesses as bold object lines to represent non-obscured access. In order to actually see the AzElMasks being changed over time and not just the resulting time intervals, the script can be run with the option to disable access calculations and the script will simply go through the scenario and switch out the AzElMasks when a new mask is available. Lastly there is an option to adjust the resolution of the AzElMasks.

User-added image
 
%% Inputs
% Author: Austin Claybrook, Mo Syed, Jordan K.
% Last Modified: 10/24/19 by Austin Claybrook

% Description: Simulates a Dynamic Sensor Body AzElMask to Handle Moving Obscurations.
% Computes sensor body AzElMasks at the specified times. After the masks have
% been created, they can be reused for subsequent access calculations.
% Access is calculated to each of the specified objects from each specified
% sensor. Access is computed until the time of the next available mask and
% then the mask is updated and the process is repeated. In this way access 
% accounting for multiple masks can be consider. The switching of the
% AzElMasks is handled entirely by the script, but the resulting interval
% lists representing non-obscured access can be loaded back into STK.

% Set Start,Stop and Step times in EpSec
startTime = 1000; % sec
stopTime = 2200; % sec
maskTimeStep = 30; % This is how often a new mask gets calculated
maskTimes = startTime:maskTimeStep:stopTime;
maskTimes = [0:100:900,1000:30:2200,2300:100:3000]; % Can pass in more complex time steps to increase or decrease the sampling

% Sensors to Create Body Masks For
sensorPaths = FilterObjectsByType('Sensor'); % Grab all sensors
sensorPaths = {'/Satellite/ISS/Sensor/BackOfISS'};

% Obscuring Objects
obscurePaths = FilterObjectsByType('Satellite'); % Grab all satellites
% objPaths = {'Satellite/Dragon'};

% Objects to get Access To
objPaths = FilterObjectsByType('Place'); % Grab all places
% objPaths = {'Place/Venice','Place/Paris','Place/London'};

% Additional parameters
reuseExistingMaskFiles = true; % Reuse existing mask files with the same name. If false new mask files will always be created.
writeToFile = true; % Create interval file lists of the access times
createIntervals = true; % Create time components of the access times, stored on the sensor in Analysis Workbench
addAccessAsObjectLines = true; % Adds object lines using the non-obscured access intervals
disableAccessComputationsAndAnimateScenario = false; % Disables access computations. Useful to visualize the dynamic AzElMasks 
winRes = 512; % Resolution of bmsk files

%% Code
% ...