Skip to content

Commit

Permalink
add CA/impact nearmiss check; update cmake policy
Browse files Browse the repository at this point in the history
  • Loading branch information
rahil-makadia committed Nov 12, 2024
1 parent 33fde56 commit 96cfcc3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# minimum required CMake version
cmake_minimum_required(VERSION 3.18.0)
cmake_policy(SET CMP0148 OLD)

# if on a Mac, use any GNU compiler from Homebrew
if(APPLE)
Expand Down
7 changes: 7 additions & 0 deletions src/approach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ void check_ca_or_impact(PropSimulation *propSim, const real &tOld,
ca.get_ca_parameters(propSim, ca.t);
propSim->caParams.push_back(ca);
if (ca.impact){
real rCA;
impact_r_calc(propSim, i, j, ca.t, rCA);
// near miss check
if (rCA > 0){
ca.impact = false;
break;
}
ImpactParameters impact;
const real maxImpactCaTDiff = 600.0/86400.0; // 10 minutes
real tImpStart;
Expand Down

0 comments on commit 96cfcc3

Please sign in to comment.