From 841d070282e05ee342d5890f018215405ec63dec Mon Sep 17 00:00:00 2001 From: JRL Date: Thu, 19 Dec 2024 17:57:18 -0600 Subject: [PATCH] added some analysis functions for looking at results, like number of targets observedwq --- programs/general/propagatorv4.cpp | 114 ++++++++++++++++++++++++------ 1 file changed, 94 insertions(+), 20 deletions(-) diff --git a/programs/general/propagatorv4.cpp b/programs/general/propagatorv4.cpp index 8591b886..49c11de4 100644 --- a/programs/general/propagatorv4.cpp +++ b/programs/general/propagatorv4.cpp @@ -40,7 +40,7 @@ DeviceDisk deviceDisk; vector> results; -// output sat positions for visualization +// output sat positions for visualization (ECI) void create_sat_eci_position_files() { for (size_t sat_num=0; sat_numtargets -void inspect_sim_targets(Physics::Simulator* sim) { +size_t number_of_targets_observed( + vector>& results, + vector& sat_nums, + vector& target_nums, + size_t start_timestep=0, + size_t stop_timestep=runcount-1 +) +{ + vector target_observed(target_nums.size(), false); - for(const auto& pair : sim->targets) { - cout<<"Target name = "< sat_nums; + sat_nums.push_back(0); + sat_nums.push_back(1); + //sat_nums.push_back(2); + //sat_nums.push_back(3); + sat_nums.push_back(4); + + vector target_nums; + for(size_t target_num = 0; target_num < 35; ++target_num) { + target_nums.push_back(target_num); + } + + extract_results("somefilename", results, sat_nums, target_nums); + cout<<"number of targets observed = "<