From 5f7c690dda40efe1542ce24e6208ca62eb1de37b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Eduardo=20Ram=C3=ADrez=20Montoya?= Date: Sat, 31 Aug 2024 16:40:53 -0600 Subject: [PATCH] ADAM requires a minimum of 2 observations --- scripts/names.jl | 9 ++++++--- src/orbitdetermination/orbitdetermination.jl | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/names.jl b/scripts/names.jl index 6f152ffd..34b36206 100644 --- a/scripts/names.jl +++ b/scripts/names.jl @@ -1,5 +1,5 @@ using ArgParse, Downloads, Random, HORIZONS, NEOs -using NEOs: numberofdays +using NEOs: numberofdays, issatellite # Potentially Hazardous Asteroids MPC list const PHAS_URL = "https://cgi.minorplanetcenter.net/cgi-bin/textversion.cgi?f=lists/PHAs.html" @@ -82,8 +82,11 @@ function main() neo = String(pop!(provdesig)) radec = fetch_radec_mpc("designation" => neo) jplorbit = sbdb("des" => neo)["orbit"] - if (numberofdays(radec) <= 15.0) && (jplorbit["n_obs_used"] == length(radec)) && - isnothing(jplorbit["n_del_obs_used"]) && isnothing(jplorbit["n_dop_obs_used"]) + if numberofdays(radec) <= 15.0 && + !any(map(r -> issatellite(r.observatory), radec)) && + jplorbit["n_obs_used"] == length(radec) && + isnothing(jplorbit["n_del_obs_used"]) && + isnothing(jplorbit["n_dop_obs_used"]) names[i] = neo break end diff --git a/src/orbitdetermination/orbitdetermination.jl b/src/orbitdetermination/orbitdetermination.jl index b4b29745..0061db27 100644 --- a/src/orbitdetermination/orbitdetermination.jl +++ b/src/orbitdetermination/orbitdetermination.jl @@ -389,6 +389,8 @@ function iod(radec::Vector{RadecMPC{T}}, params::NEOParameters{T}; end # Iterate tracklets for i in eachindex(tracklets) + # ADAM requires a minimum of 2 observations + tracklets[i].nobs < 2 && continue # Admissible region A = AdmissibleRegion(tracklets[i], params) # List of naive initial conditions