Skip to content

Commit

Permalink
Added ability to show six asteroid MOIDs (for (1) Ceres, (2) Pallas, …
Browse files Browse the repository at this point in the history
…(4) Vesta, (15) Eunomia, (16) Psyche, and (29) Amphitrite).
  • Loading branch information
Bill-Gray committed Mar 14, 2023
1 parent 6388558 commit 3ca8b11
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 7 additions & 4 deletions elem_out.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1818,11 +1818,11 @@ periapsis uncertainty. And we retain the "from x to y" line.
matches the number of digits in the quantity itself.
The program is theoretically capable of computing MOIDs relative to
N_MOIDS objects (currently 14: eight planets, six asteroids). However,
N_MOIDS_TO_SHOW = 8 at present (we only show planetary MOIDs.) */
N_MOIDS objects (currently 14: eight planets, six asteroids). We
default to 8 (planetary MOIDs only), but can add six asteroid MOIDS
by setting N_MOIDS=14 in 'environ.dat'. */

#define N_MOIDS 14
#define N_MOIDS_TO_SHOW 8

double comet_total_magnitude = 0.; /* a.k.a. "M1" */
double comet_nuclear_magnitude = 0.; /* a.k.a. "M2" */
Expand Down Expand Up @@ -2082,7 +2082,10 @@ int write_out_elements_to_file( const double *orbit,
{
int j;
const double SRP1AU = 2.3e-7;
int n_moids_to_show = atoi( get_environment_ptr( "N_MOIDS"));

if( !n_moids_to_show) /* by default, just show */
n_moids_to_show = 8; /* planetary MOIDs */
if( force_model == FORCE_MODEL_SRP)
{
snprintf_err( tt_ptr, 80, "; AMR %.5g",
Expand All @@ -2092,7 +2095,7 @@ int write_out_elements_to_file( const double *orbit,
strlcat_err( tt_ptr, " m^2/kg", 80);
}
if( !planet_orbiting)
for( j = 0; j < N_MOIDS_TO_SHOW; j++)
for( j = 0; j < n_moids_to_show; j++)
{
static const char moid_idx[N_MOIDS] = { 3, 5, 2, 1, 4, 6, 7, 8,
10, 11, 12, 13, 14, 15 };
Expand Down
6 changes: 6 additions & 0 deletions environ.def
Original file line number Diff line number Diff line change
Expand Up @@ -491,3 +491,9 @@ GROUP_LC1=V37 W85 K91 Q63 Z31 097
to be included no matter how bad they are. (Not something I recommend, but
you can do it.)
OUTLIER_REJECTION_LIMIT=3

By default, MOIDs will be shown for eight planets, if they are low enough
to be "interesting". Set N_MOIDS=14, and six asteroid MOIDs will also be
shown (again, only if they're low enough). Don't set it to a higher value.
At least at present, those added six are all we've got.
N_MOIDS=8

0 comments on commit 3ca8b11

Please sign in to comment.