Skip to content

Commit

Permalink
ADAM requires a minimum of 2 observations
Browse files Browse the repository at this point in the history
  • Loading branch information
LuEdRaMo committed Aug 31, 2024
1 parent 7dd4e20 commit 5f7c690
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 6 additions & 3 deletions scripts/names.jl
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/orbitdetermination/orbitdetermination.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f7c690

Please sign in to comment.