From 13e1bf57f2cf6dfa9e24d5795eda1bab14f97cb6 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 22 Nov 2022 17:34:11 -0500 Subject: [PATCH 001/634] Further changes to use 'safer' string/snprintf functions. (With more to come, now that Apple has deprecated sprintf, resulting in many nuisance warnings.) --- elem_out.cpp | 136 ++++++++++++++++++++++++++++++--------------------- miscell.cpp | 6 +-- 2 files changed, 83 insertions(+), 59 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index 08211915..7a21fb9d 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -399,16 +399,17 @@ static void observation_summary_data( char *obuff, const OBSERVE FAR *obs, const int n_obs, const int options) { int i, n_included, first_idx, last_idx; + size_t obuff_size = 80; get_first_and_last_included_obs( obs, n_obs, &first_idx, &last_idx); for( i = n_included = 0; i < n_obs; i++) n_included += obs[i].is_included; if( options == -1) /* 'guide.txt' bare-bones format */ - sprintf( obuff, "%d of %d", n_included, n_obs); + snprintf_err( obuff, obuff_size, "%d of %d", n_included, n_obs); else if( (options & ELEM_OUT_ALTERNATIVE_FORMAT) && n_included != n_obs) - sprintf( obuff, get_find_orb_text( 15), n_included, n_obs); + snprintf_err( obuff, obuff_size, get_find_orb_text( 15), n_included, n_obs); else - sprintf( obuff, get_find_orb_text( 16), n_included); + snprintf_err( obuff, obuff_size, get_find_orb_text( 16), n_included); if( options != -1 && n_included) { const double rms = (options & ELEM_OUT_NORMALIZED_MEAN_RESID) ? @@ -417,7 +418,7 @@ static void observation_summary_data( char *obuff, const OBSERVE FAR *obs, char rms_buff[24]; const char *rms_format = "%.2f"; - strcat( obuff, " "); + strlcat_err( obuff, " ", obuff_size); obuff += strlen( obuff); make_date_range_text( obuff, obs[first_idx].jd, obs[last_idx].jd); obuff += strlen( obuff); @@ -428,7 +429,7 @@ static void observation_summary_data( char *obuff, const OBSERVE FAR *obs, strlcat_err( rms_buff, " sigmas", sizeof( rms_buff)); else text_search_and_replace( rms_buff, ".", "\"."); - sprintf( obuff, get_find_orb_text( 17), rms_buff); + snprintf_err( obuff, obuff_size, get_find_orb_text( 17), rms_buff); } /* "; mean residual %s." */ } @@ -525,59 +526,77 @@ static int elements_in_mpcorb_format( char *buff, const char *packed_desig, /* For the nonce, we'll just say "one opposition". */ double arc_length; char packed_desig2[40]; + const size_t mpcorb_line_len = 203; + int precision = 7; + double tval; packed_desig_minus_spaces( packed_desig2, packed_desig); - sprintf( buff, "%-8s%5.2f %4.2f ", packed_desig2, elem->abs_mag, + snprintf_err( buff, mpcorb_line_len, "%-8s%5.2f %4.2f ", packed_desig2, elem->abs_mag, asteroid_magnitude_slope_param); day = (int)( decimal_day_to_dmy( elem->epoch, &year, &month, CALENDAR_JULIAN_GREGORIAN) + .0001); - sprintf( buff + 20, "%c%02ld%X%c", + assert( 20 == strlen( buff)); + snprintf_append( buff, mpcorb_line_len, "%c%02ld%X%c", int_to_mutant_hex_char( year / 100), year % 100L, month, int_to_mutant_hex_char( day)); - sprintf( buff + 25, "%10.5f%11.5f%11.5f%11.5f%11.7f", + assert( 25 == strlen( buff)); + snprintf_append( buff, mpcorb_line_len, "%10.5f%11.5f%11.5f%11.5f%11.7f", centralize_ang( elem->mean_anomaly) * 180. / PI, centralize_ang( elem->arg_per) * 180. / PI, centralize_ang( elem->asc_node) * 180. / PI, centralize_ang( elem->incl) * 180. / PI, elem->ecc); - sprintf( buff + 79, "%12.8f%12.7f", + assert( 79 == strlen( buff)); + tval = elem->major_axis; + while( tval > 999.9999) + { + tval /= 10.; + precision--; + } + snprintf_append( buff, mpcorb_line_len, "%12.8f%12.*f", (180 / PI) / elem->t0, /* n */ - elem->major_axis); + precision, elem->major_axis); + if( 103 != strlen( buff)) + printf( "Weirdness '%s'\n", buff); + assert( 103 == strlen( buff)); for( i = 0; i < n_obs; i++) if( obs[i].is_included) n_included_obs++; day = (int)( decimal_day_to_dmy( current_jd( ), &year, &month, CALENDAR_JULIAN_GREGORIAN) + .0001); - sprintf( buff + 103, + snprintf_append( buff, mpcorb_line_len, " FO %02d%02d%02d %4d %2d ****-**** **** Find_Orb %04x", (int)( year % 100), month, (int)day, n_included_obs, n_oppositions, hex_flags); get_first_and_last_included_obs( obs, n_obs, &first_idx, &last_idx); arc_length = obs[last_idx].jd - obs[first_idx].jd; + assert( strlen( buff) == 165); if( arc_length < 99. / seconds_per_day) - sprintf( buff + 127, "%4.1f sec ", arc_length * seconds_per_day); + snprintf_err( buff + 127, 10, "%4.1f sec ", arc_length * seconds_per_day); else if( arc_length < 99. / minutes_per_day) - sprintf( buff + 127, "%4.1f min ", arc_length * minutes_per_day); + snprintf_err( buff + 127, 10, "%4.1f min ", arc_length * minutes_per_day); else if( arc_length < 2.) - sprintf( buff + 127, "%4.1f hrs ", arc_length * hours_per_day); + snprintf_err( buff + 127, 10, "%4.1f hrs ", arc_length * hours_per_day); else if( arc_length < 600.) - sprintf( buff + 127, "%4d days", (int)arc_length + 1); + snprintf_err( buff + 127, 10, "%4d days", (int)arc_length + 1); else - sprintf( buff + 127, "%4d-%4d", + snprintf_err( buff + 127, mpcorb_line_len, "%4d-%4d", (int)JD_TO_YEAR( obs[first_idx].jd), (int)JD_TO_YEAR( obs[last_idx].jd)); buff[136] = ' '; - sprintf( buff + 165, " %-30s", full_desig); + assert( 165 == strlen( buff)); + snprintf_append( buff, mpcorb_line_len, " %-28s", full_desig); day = (int)( decimal_day_to_dmy( obs[last_idx].jd, &year, &month, CALENDAR_JULIAN_GREGORIAN) + .0001); - sprintf( buff + 194, "%04ld%02d%02d", year, month, day); + assert( 194 == strlen( buff)); + snprintf_append( buff, mpcorb_line_len, "%04ld%02d%02d", year, month, day); if( rms_err < 9.9) - sprintf( buff + 137, "%4.2f", rms_err); + snprintf_err( buff + 137, 5, "%4.2f", rms_err); else if( rms_err < 99.9) - sprintf( buff + 137, "%4.1f", rms_err); + snprintf_err( buff + 137, 5, "%4.1f", rms_err); else if( rms_err < 9999.) - sprintf( buff + 137, "%4.0f", rms_err); + snprintf_err( buff + 137, 5, "%4.0f", rms_err); buff[141] = ' '; if( (perturbers & 0x1fe) == 0x1fe) { /* we have Mercury through Neptune, at least */ @@ -797,7 +816,7 @@ static char *object_name( char *buff, const int obj_index) else if( obj_index > 0 && obj_index < 11) /* nine planets & moon */ strcpy( buff, get_find_orb_text( 99107 + obj_index)); else - sprintf( buff, "Object_%d\n", obj_index); + snprintf_err( buff, 12, "Object_%d", obj_index); return( buff); } @@ -1132,11 +1151,13 @@ static int elements_in_guide_format( char *buff, const ELEMENTS *elem, int month; double day; long year; + const size_t guide_line_len = 166; day = decimal_day_to_dmy( elem->perih_time, &year, &month, CALENDAR_JULIAN_GREGORIAN); /* name day mon yr MA q e */ - sprintf( buff, "%-43s%8.5f%3d%5ld Find_Orb %14.7f%12.7f%11.6f%12.6f%12.6f", + snprintf_err( buff, guide_line_len, + "%-43s%8.5f%3d%5ld Find_Orb %14.7f%12.7f%11.6f%12.6f%12.6f", obj_name, day, month, year, elem->q, elem->ecc, centralize_ang( elem->incl) * 180. / PI, @@ -1144,16 +1165,16 @@ static int elements_in_guide_format( char *buff, const ELEMENTS *elem, centralize_ang( elem->asc_node) * 180. / PI); if( elem->q < .01) { - sprintf( buff + 71, "%12.10f", elem->q); + snprintf_err( buff + 71, 13, "%12.10f", elem->q); buff[71] = buff[83] = ' '; } - sprintf( buff + strlen( buff), " %9.1f%5.1f%5.1f %c", + snprintf_append( buff, guide_line_len, " %9.1f%5.1f%5.1f %c", elem->epoch, elem->abs_mag, elem->slope_param * (elem->is_asteroid ? 1. : 0.4), (elem->is_asteroid ? 'A' : ' ')); if( elem->central_obj) - sprintf( buff + strlen( buff), " Center: %d", elem->central_obj); - strcat( buff, " "); + snprintf_append( buff, guide_line_len, " Center: %d", elem->central_obj); + strlcat_err( buff, " ", guide_line_len); observation_summary_data( buff + strlen( buff), obs, n_obs, -1); return( 0); } @@ -1591,6 +1612,7 @@ void rotate_state_vector_to_current_frame( double *state_vect, { int elements_frame = atoi( get_environment_ptr( "ELEMENTS_FRAME")); const char *frame_str = NULL; + const size_t body_frame_note_len = 30; /* By default, we use J2000 equatorial elements for geocentric elements, J2000 ecliptic for everybody else. */ @@ -1613,7 +1635,7 @@ void rotate_state_vector_to_current_frame( double *state_vect, if( !year) year = JD_TO_YEAR( epoch_shown); if( body_frame_note) - sprintf( body_frame_note, "(%s)", elem_epoch); + snprintf_err( body_frame_note, body_frame_note_len, "(%s)", elem_epoch); setup_ecliptic_precession( precession_matrix, 2000., year); precess_vector( precession_matrix, state_vect, state_vect); precess_vector( precession_matrix, state_vect + 3, state_vect + 3); @@ -1633,7 +1655,7 @@ void rotate_state_vector_to_current_frame( double *state_vect, frame_str = "(body frame)"; } if( body_frame_note && frame_str) - strcpy( body_frame_note, frame_str); + strlcpy_err( body_frame_note, frame_str, body_frame_note_len); } /* Used to provide a link to Tony Dunn's Orbit Simulator when making @@ -1777,6 +1799,7 @@ int write_out_elements_to_file( const double *orbit, int showing_sigmas = available_sigmas; const unsigned orbit_summary_options = atoi( get_environment_ptr( "ORBIT_SUMMARY_OPTIONS")); extern int is_interstellar; /* orb_func.cpp */ + const size_t tbuff_size = 80 * 9; setvbuf( ofile, NULL, _IONBF, 0); if( default_comet_magnitude_type == 'N') @@ -1825,7 +1848,8 @@ int write_out_elements_to_file( const double *orbit, elem.epoch = epoch_shown; calc_classical_elements( &elem, rel_orbit, epoch_shown, 1); if( elem.ecc < .9) - sprintf( orbit_summary_text, "a=%.3f, ", elem.major_axis); + snprintf_err( orbit_summary_text, sizeof( orbit_summary_text), + "a=%.3f, ", elem.major_axis); else *orbit_summary_text = '\0'; if( elem.ecc >= .9 || (orbit_summary_options & ORBIT_SUMMARY_Q)) @@ -1887,7 +1911,7 @@ int write_out_elements_to_file( const double *orbit, helio_elem.central_obj = 0; helio_elem.gm = SOLAR_GM; calc_classical_elements( &helio_elem, orbit2, epoch_shown, 1); - tbuff = (char *)malloc( 80 * 9); + tbuff = (char *)malloc( tbuff_size); n_lines = elements_in_mpc_format( tbuff, &elem, object_name, is_cometary( constraints) && fabs( elem.ecc - 1.) < 1.e-6, output_format); @@ -1919,18 +1943,18 @@ int write_out_elements_to_file( const double *orbit, if( mass) { - sprintf( tt_ptr, "; %s=%.4g", constraints, *mass); + snprintf_err( tt_ptr, 80, "; %s=%.4g", constraints, *mass); consider_replacing( buff, constraints, "Sigma_mass:"); clobber_leading_zeroes_in_exponent( buff); } else - sprintf( tt_ptr, "; bad '%s'", constraints); + snprintf_err( tt_ptr, 80, "; bad '%s'", constraints); } else - sprintf( tt_ptr, "; Constraint: %s", constraints); + snprintf_err( tt_ptr, 80, "; Constraint: %s", constraints); } else if( n_monte_carlo_impactors && monte_carlo) - sprintf( tt_ptr, "; %.2f%% impact (%d/%d)", + snprintf_err( tt_ptr, 80, "; %.2f%% impact (%d/%d)", 100. * (double)n_monte_carlo_impactors / (double)monte_carlo_object_count, n_monte_carlo_impactors, monte_carlo_object_count); @@ -1955,7 +1979,7 @@ int write_out_elements_to_file( const double *orbit, put_double_in_buff( tbuff0, orbit[j + 6]); text_search_and_replace( tbuff0, " ", ""); strlcat_error( tbuff0, " "); - sprintf( sig_name, "Sigma_A%d:", j + 1); + snprintf_err( sig_name, sizeof( sig_name), "Sigma_A%d:", j + 1); if( showing_sigmas) if( !get_uncertainty( sig_name, sigma_buff + 4, false)) strlcat_error( tbuff0, sigma_buff); @@ -1978,11 +2002,11 @@ int write_out_elements_to_file( const double *orbit, { if( strlen( tt_ptr) > 50) { - strcat( tt_ptr, "\n"); + strlcat_err( tt_ptr, "\n", 80); tt_ptr += strlen( tt_ptr); } else - strcat( tt_ptr, " "); + strlcat_err( tt_ptr, " ", 80); } } } @@ -1996,11 +2020,11 @@ int write_out_elements_to_file( const double *orbit, if( force_model == FORCE_MODEL_SRP) { - sprintf( tt_ptr, "; AMR %.5g", + snprintf_err( tt_ptr, 80, "; AMR %.5g", orbit[6] * SOLAR_GM / SRP1AU); if( showing_sigmas) consider_replacing( tt_ptr, "AMR", "Sigma_AMR:"); - strcat( tt_ptr, " m^2/kg"); + strlcat_err( tt_ptr, " m^2/kg", 80); } if( !planet_orbiting) for( j = 0; j < N_MOIDS_TO_SHOW; j++) @@ -2032,7 +2056,8 @@ int write_out_elements_to_file( const double *orbit, "Ve", "Me", "Ma", "Sa", "Ur", "Ne", "Ce", "Pa", "Vt", "(29)", "(16)", "(15)" }; - sprintf( addendum, " %s: %.4f", moid_text[j], moid); + snprintf_err( addendum, sizeof( addendum), + " %s: %.4f", moid_text[j], moid); if( strlen( addendum) + strlen( buff) < 79) strlcat_error( buff, addendum); else @@ -2062,8 +2087,7 @@ int write_out_elements_to_file( const double *orbit, if( !(options & ELEM_OUT_ALTERNATIVE_FORMAT)) if( !memcmp( buff + 31, " G ", 3) && uncertainty_parameter < 90.) { /* replace slope w/uncertainty */ -// sprintf( buff + 32, "U%7.3f ", uncertainty_parameter); - sprintf( buff + 32, "U%5.1f ", uncertainty_parameter); + snprintf_err( buff + 32, 9, "U%5.1f ", uncertainty_parameter); buff[40] = ' '; } if( showing_sigmas) @@ -2371,7 +2395,7 @@ int write_out_elements_to_file( const double *orbit, /* "conventional" East/West 0-180 degree format: */ if( elem.central_obj == 3) { - sprintf( end_ptr, "%c%.5f", + snprintf_err( end_ptr, 11, "%c%.5f", (lon < 180. ? 'E' : 'W'), (lon < 180. ? lon : 360. - lon)); fprintf( ofile, "%s at %s\n", (is_an_impact ? "IMPACT" : "LAUNCH"), @@ -2379,7 +2403,7 @@ int write_out_elements_to_file( const double *orbit, } /* Then show in 0-360 format, for all other */ /* planets, and for output to file: */ - sprintf( end_ptr, "%9.5f", lon); + snprintf_err( end_ptr, 10, "%9.5f", lon); if( elem.central_obj != 3) fprintf( ofile, "%s at %s\n", (is_an_impact ? "IMPACT" : "LAUNCH"), impact_buff); @@ -2405,32 +2429,32 @@ int write_out_elements_to_file( const double *orbit, char time_buff[40]; bool nongrav_sigmas_found = false; - sprintf( tbuff, "# $Name=%s", object_name); + snprintf_err( tbuff, 80, "# $Name=%s", object_name); text_search_and_replace( tbuff + 4, " ", "%20"); /* Epoch has to be given in YYYYMMDD.DDDDD format: */ full_ctime( time_buff, helio_elem.perih_time, FULL_CTIME_YMD | FULL_CTIME_MONTHS_AS_DIGITS | FULL_CTIME_MICRODAYS | FULL_CTIME_LEADING_ZEROES); time_buff[4] = time_buff[7] = '\0'; - sprintf( tbuff + strlen( tbuff), " $Ty=%s $Tm=%s $Td=%s", + snprintf_append( tbuff, tbuff_size, " $Ty=%s $Tm=%s $Td=%s", time_buff, time_buff + 5, time_buff + 8); - sprintf( tbuff + strlen( tbuff), " $MA=%.5f", + snprintf_append( tbuff, tbuff_size, " $MA=%.5f", centralize_ang( helio_elem.mean_anomaly) * 180. / PI); fprintf( ofile, "%s\n", tbuff); - sprintf( tbuff, "# $ecc=%.7f $Eqnx=2000.", helio_elem.ecc); + snprintf_err( tbuff, 80, "# $ecc=%.7f $Eqnx=2000.", helio_elem.ecc); fprintf( ofile, "%s\n", tbuff); - sprintf( tbuff, "# $a=%.7f $Peri=%.5f $Node=%.5f", + snprintf_err( tbuff, 80, "# $a=%.7f $Peri=%.5f $Node=%.5f", helio_elem.major_axis, centralize_ang( helio_elem.arg_per) * 180. / PI, centralize_ang( helio_elem.asc_node) * 180. / PI); - sprintf( tbuff + strlen( tbuff), " $Incl=%.5f", + snprintf_append( tbuff, tbuff_size, " $Incl=%.5f", helio_elem.incl * 180. / PI); fprintf( ofile, "%s\n", tbuff); - sprintf( tbuff, "# $EpJD=%.3f $q=%.6f", helio_elem.epoch, helio_elem.q); - sprintf( tbuff + strlen( tbuff), " $T=%.6f $H=%.1f", + snprintf_err( tbuff, 80, "# $EpJD=%.3f $q=%.6f", helio_elem.epoch, helio_elem.q); + snprintf_append( tbuff, tbuff_size, " $T=%.6f $H=%.1f", helio_elem.perih_time, helio_elem.abs_mag); fprintf( ofile, "%s\n", tbuff); fprintf( ofile, "# Sigmas avail: %d\n", available_sigmas); @@ -2438,7 +2462,7 @@ int write_out_elements_to_file( const double *orbit, { char key[20], obuff[50]; - sprintf( key, "Sigma_A%d:", i); + snprintf_err( key, sizeof( key), "Sigma_A%d:", i); if( !get_uncertainty( key, obuff, false)) { fprintf( ofile, (nongrav_sigmas_found ? " %s %s" : "# %s %s"), @@ -2484,9 +2508,9 @@ int write_out_elements_to_file( const double *orbit, element_filename = "mpcorb.dat"; if( *impact_buff) n_monte_carlo_impactors++; - sprintf( name_buff, "%05d", n_clones_accepted); + snprintf_err( name_buff, sizeof( name_buff), "%05d", n_clones_accepted); packed_desig_minus_spaces( virtual_full_desig, obs->packed_id); - sprintf( virtual_full_desig + strlen( virtual_full_desig), " [%d]", + snprintf_append( virtual_full_desig, sizeof( virtual_full_desig), " [%d]", monte_carlo_object_count); if( elem.central_obj || elem.ecc > .999999) { diff --git a/miscell.cpp b/miscell.cpp index 98ed9de3..9e60436a 100644 --- a/miscell.cpp +++ b/miscell.cpp @@ -309,7 +309,7 @@ FILE *fopen_ext( const char *filename, const char *permits) { char buff[300]; - sprintf( buff, "Error opening %s: %s", + snprintf( buff, sizeof( buff), "Error opening %s: %s", filename, strerror( errno)); generic_message_box( buff, "o"); exit( -1); @@ -622,6 +622,6 @@ const char *write_bit_string( char *ibuff, const uint64_t bits) const char *find_orb_version_jd( double *jd) { if( jd) - *jd = 2459898.5; - return( "2022 Nov 15"); + *jd = 2459903.5; + return( "2022 Nov 20"); } From f521c96c9d1f7d0648c1f6b02f5427098806d908 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 22 Nov 2022 21:30:26 -0500 Subject: [PATCH 002/634] If no observations were included, the 'get_first_and_last_included_obs()' function could have the last observation precede the first. Easy enough to guard against that. Also, if we try to get a string from ?findorb.txt that isn't there, an error should occur and a helpful message provided (it was just segfaulting). --- elem_out.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index 7a21fb9d..ff28a353 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -194,12 +194,15 @@ char *fgets_trimmed( char *buff, size_t max_bytes, FILE *ifile) void get_first_and_last_included_obs( const OBSERVE *obs, const int n_obs, int *first, int *last) /* elem_out.c */ { + int i = 0; + + while( i < n_obs - 1 && !obs[i].is_included) + i++; + if( first) - for( *first = 0; *first < n_obs - 1 && !obs[*first].is_included; - (*first)++) - ; + *first = i; if( last) - for( *last = n_obs - 1; *last && !obs[*last].is_included; (*last)--) + for( *last = n_obs - 1; *last > i && !obs[*last].is_included; (*last)--) ; } @@ -385,7 +388,9 @@ const char *get_find_orb_text( const int index) for( i = 0; default_text[i]; i++) if( atoi( default_text[i]) == index) return( default_text[i] + 8); - assert( 1); /* i.e., should never get here */ + debug_printf( "Requested index %d in language %c not found\n", + index, findorb_language); + assert( 0); /* i.e., should never get here */ return( NULL); } From d6b1d045dada3a14fc235837d29b5926d55b9632 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 22 Nov 2022 21:34:19 -0500 Subject: [PATCH 003/634] As a fallback measure, if attempting to recover a stored solution fails, we go through fetch_previous_solutions again, this time ignoring the stored solution and doing a 'normal' IOD from scratch. --- elem_out.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/elem_out.cpp b/elem_out.cpp index ff28a353..ed0d2ac0 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -3206,6 +3206,17 @@ static int fetch_previous_solution( OBSERVE *obs, const int n_obs, double *orbit } } free( saved_obs); + } + /* if a stored solution failed (i.e., didn't get sigmas), */ + /* we try again, ignoring the stored solution. */ + if( got_vectors && available_sigmas == NO_SIGMAS_AVAILABLE && !ignore_prev_solns) + { + ignore_prev_solns = 1; + for( i = 0; i < n_obs; i++) + obs[i].is_included = !(obs[i].flags & OBS_DONT_USE); + got_vectors = fetch_previous_solution( obs, n_obs, orbit, orbit_epoch, + epoch_shown, perturbers); + ignore_prev_solns = 0; } return( got_vectors); } From 4e8a74dad191a5b0ed7d1a6e8357f3e5e248c292 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 22 Nov 2022 21:46:32 -0500 Subject: [PATCH 004/634] Six new obscodes and a more precise position for (J81) Guirguillano in Spain --- ObsCodes.htm | 8 +++++++- geo_rect.txt | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ObsCodes.htm b/ObsCodes.htm index 6a9df9af..9772c7f1 100644 --- a/ObsCodes.htm +++ b/ObsCodes.htm @@ -1758,7 +1758,7 @@ J78 358.8244 0.78887 +0.61253 Murcia J79 358.380660.795516+0.603908Observatorio Calarreona, Aguilas J80 359.1083 0.70862 +0.70323 Sainte Helene -J81 358.1350 0.7360 +0.6749 Guirguillano +J81 358.134890.735984+0.674878Guirguillano J82 357.3067 0.5935 +0.8021 Leyland J83 357.3883 0.59274 +0.80270 Olive Farm Observatory, Hoghton J84 358.9803 0.63144 +0.77285 South Observatory, Clanfield @@ -2004,6 +2004,10 @@ M33 34.763340.861632+0.506111OWL-Net, Mitzpe Ramon M34 17.273630.665591+0.743936AGO70, Astronomical Observatory, Modra M35 26.616690.688654+0.722734PS Observatory, Parjol +M36 13.796470.699732+0.712090Opicina, Trieste +M37 13.912430.696956+0.714892Astronomsko drustvo Nanos, Ajdovscina +M40 31.827080.867372+0.496143OSTS-NRIAG, Kottamia +M41 39.258270.930706+0.364567Jeddah M42 54.6708 0.90990 +0.41343 Emirates Observatory, Al Rahba M43 54.684780.912805+0.407034Al Sadeem Observatory, Abu Dhabi M44 54.920310.912502+0.407722Al-Khatim Observatory, Abu Dhabi @@ -2021,6 +2025,7 @@ N55 80.026230.846497+0.532089Beimian Tianwentai, Ali, Tibet N56 80.026750.846503+0.532073Jiama'erdeng Tianwentai, Ali, Tibet N82 85.954940.641844+0.764450Multa Observatory +N83 86.235040.749549+0.659927LW-1, Korla Station N86 87.178520.727070+0.684719Xingming Observatory-KATS, Nanshan N87 87.175030.727076+0.684720Nanshan Station, Xinjiang Observatory N88 87.173220.727098+0.684697Xingming Observatory #3, Nanshan @@ -2035,6 +2040,7 @@ O48 101.181540.903223+0.428442Purple Mountain Observatory, Yaoan (0.8-m) O49 101.181110.903206+0.428474Purple Mountain Observatory, Yaoan Station O50 101.439420.998617+0.052565Hin Hua Observatory, Klang +O68 105.330900.793121+0.607347LW-2, Zhongwei Station O72 106.334760.672017+0.738399OWL-Net, Songino O75 107.051800.672284+0.738151ISON-Hureltogoot Observatory O85 109.213000.826583+0.561181LiShan Observatory, Lintong diff --git a/geo_rect.txt b/geo_rect.txt index 55118043..7355e3af 100644 --- a/geo_rect.txt +++ b/geo_rect.txt @@ -243,7 +243,7 @@ 17.08892 48.20689 18.50908 48.70852 Slovakia 18.63849 48.21585 17.64866 47.81890 Slovakia 20.66723 49.01991 20.13318 49.25464 Slovakia - 13.98334 45.91241 14.64436 46.28308 Slovenia + 13.7 45.8 14.64436 46.37 Slovenia 25.67944 -29.45349 26.82695 -28.59323 South Africa 33.33702 -34.91447 16.00973 -29.54048 South Africa 29.48779 -27.76375 26.28938 -25.04480 South Africa @@ -529,3 +529,5 @@ 300.0 51.45 291.41156 48.11981 Canada/Quebec 28.4 48.85 22.39238 48.26825 Ukraine 83.1 40.25 75.5 36.82783 China + 48.91598 28.00444 38.53502 19.0 Saudi Arabia + 13.77782 45.59625 13.82731 45.70754 Italy From ed9a388c31759540a6e616e4e9c2f7bbf9c11d4c Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 22 Nov 2022 21:48:28 -0500 Subject: [PATCH 005/634] John Rogers kindly gave the 'green light' for publishing unredacted observations in public pseudo-MPECs for (670) Camarillo, (671) Stony Ridge, and (U52) Shasta Valley. --- environ.def | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/environ.def b/environ.def index 6e30337a..fd75fc1d 100644 --- a/environ.def +++ b/environ.def @@ -71,9 +71,9 @@ OBSERVATION_DATE_RANGE=1100,2300 In some cases, a specific program code is greenlit. 'J13:#', for example, means that NEOCP observations from (J13) with program code '#' will be shown unredacted. -GREENLIT=033 291 568 595 691 703 718 970 C95 G58 G96 H01 H41 H43 H45 I41 I52 -GREENLIT2=I81 I93 J69 J95 K80 T05* T08* V03 V06 V11 Y00 Z37 Z48 Z80 -GREENLIT3=851:0 H06:q I22:2 I89:; J13:# U69:| Q62:d +GREENLIT=033 291 568 595 670 671 691 703 718 970 C95 G58 G96 H01 H41 H43 +GREENLIT2=H45 I41 I52 I81 I93 J69 J95 K80 T05* T08* U52 V03 V06 V11 Y00 +GREENLIT3=Z37 Z48 Z80 851:0 H06:q I22:2 I89:; J13:# U69:| Q62:d We default to assuming that no object will have an observed arc greater than 200 years, and that if it _is_ longer than that, it's a mistake. From 663a8faccc7995cf2821bbf63cc1c63bc036e414 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 23 Nov 2022 12:59:16 -0500 Subject: [PATCH 006/634] 'eph2tle' fixed to avoid partial steps throwing off the end time of the resulting TLEs --- eph2tle.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eph2tle.cpp b/eph2tle.cpp index 4815e7f0..6f95cda9 100644 --- a/eph2tle.cpp +++ b/eph2tle.cpp @@ -696,7 +696,7 @@ int main( const int argc, const char **argv) if( fgets_trimmed( buff, sizeof( buff), ifile)) { bool writing_data = false; - double mjdt; + double mjdt, mjdt_end; char *tptr = strstr( buff, "(500) Geocentric: "); while( *buff == ';') /* skip leading comments, if any */ @@ -721,10 +721,11 @@ int main( const int argc, const char **argv) ref_frame = 0; } mjdt = tdt - 2400000.5; + mjdt_end = mjdt + step * (double)( total_lines - total_lines % output_freq); if( tptr && !*obj_name) strcpy( obj_name, tptr + 18); fprintf( ofile, "# Ephem range: %f %f %f\n", - mjdt, mjdt + step * (double)total_lines, step * (double)output_freq); + mjdt, mjdt_end, step * (double)output_freq); while( fgets_trimmed( buff, sizeof( buff), ifile)) { if( !memcmp( buff, "Created ", 8)) From 807332da2f601021a02f9774c1b6e7a7fd82c318 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 23 Nov 2022 13:00:00 -0500 Subject: [PATCH 007/634] 'findorb.cpp' updated to use safe(r) string functions --- findorb.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/findorb.cpp b/findorb.cpp index e5e17644..de9e380f 100644 --- a/findorb.cpp +++ b/findorb.cpp @@ -2271,7 +2271,7 @@ static void set_color_table( void); static void show_a_file( const char *filename, const int flags) { FILE *ifile = fopen_ext( filename, "tclrb"); - char buff[260], err_text[100]; + char buff[560], err_text[100]; int line_no = 0, keep_going = 1; int n_lines = 0, msg_num = 0; bool search_text_found = true; @@ -3050,7 +3050,7 @@ static int user_select_file( char *filename, const char *title, const int flags) /* dialog and Xdialog take the same options : */ full_endwin( ); - sprintf( strchr( cmd, '~'), "~ %d %d", + snprintf_err( strchr( cmd, '~'), 12, "~ %d %d", getmaxy( stdscr) - 15, getmaxx( stdscr) - 3); rval = try_a_file_dialog_program( filename, cmd + 1); restart_curses( ); @@ -3142,6 +3142,7 @@ static bool filename_fits_current_os( const char *filename) } static OBJECT_INFO *load_file( char *ifilename, int *n_ids, char *err_buff, + const size_t err_buff_size, const bool drop_single_obs, const bool already_got_obs) { OBJECT_INFO *ids; @@ -3253,8 +3254,9 @@ static OBJECT_INFO *load_file( char *ifilename, int *n_ids, char *err_buff, if( !*ifilename) { free( prev_files); - strcpy( err_buff, "'findorb' needs the name of an input file of MPC-formatted\n" - "astrometry as a command-line argument.\n"); + strlcpy_err( err_buff, + "'findorb' needs the name of an input file of MPC-formatted\n" + "astrometry as a command-line argument.\n", err_buff_size); return( NULL); } @@ -3284,7 +3286,7 @@ static OBJECT_INFO *load_file( char *ifilename, int *n_ids, char *err_buff, err_msg = "Couldn't locate the file '%s'\n"; else err_msg = "No objects found in file '%s'\n"; - sprintf( err_buff, err_msg, ifilename); + snprintf_err( err_buff, err_buff_size, err_msg, ifilename); if( ids) free( ids); ids = NULL; @@ -3899,7 +3901,7 @@ int main( int argc, const char **argv) OBJECT_INFO *new_ids; int n_new_ids; - new_ids = load_file( ifilename, &n_new_ids, tbuff, drop_single_obs, + new_ids = load_file( ifilename, &n_new_ids, tbuff, 200, drop_single_obs, (ids ? true : false)); if( !new_ids && !*tbuff && !ids) /* at startup, and hit Quit */ goto Shutdown_program; From 55482e80e7866ace52e3ba526962344c5e78707a Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 24 Nov 2022 08:13:47 -0500 Subject: [PATCH 008/634] MPCORB formatted output could be mangled if the first observation had an over-long provisional designation, such as Q7223K01D08Q (both permanent number and provisional ID set). --- elem_out.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/elem_out.cpp b/elem_out.cpp index ed0d2ac0..c48665d8 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -536,6 +536,9 @@ static int elements_in_mpcorb_format( char *buff, const char *packed_desig, double tval; packed_desig_minus_spaces( packed_desig2, packed_desig); + if( 12 == strlen( packed_desig2)) /* fix cases where number & */ + packed_desig2[5] = '\0'; /* provisional ID are both set; */ + packed_desig2[8] = '\0'; /* prevent overrun otherwise */ snprintf_err( buff, mpcorb_line_len, "%-8s%5.2f %4.2f ", packed_desig2, elem->abs_mag, asteroid_magnitude_slope_param); day = (int)( decimal_day_to_dmy( elem->epoch, &year, From 3b6473941d2f5cfb8d62972b6730e2a3d30be2a9 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 27 Nov 2022 17:15:31 -0500 Subject: [PATCH 009/634] Revised element output to handle some fairly unrealistic (super-far-out, super-hyperbolic) orbits --- elem_out.cpp | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index c48665d8..0349a9a6 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -594,7 +594,10 @@ static int elements_in_mpcorb_format( char *buff, const char *packed_desig, (int)JD_TO_YEAR( obs[last_idx].jd)); buff[136] = ' '; assert( 165 == strlen( buff)); - snprintf_append( buff, mpcorb_line_len, " %-28s", full_desig); + if( strlen( full_desig) > 28) + strlcat( buff, full_desig, 195); + else + snprintf_append( buff, mpcorb_line_len, " %-28s", full_desig); day = (int)( decimal_day_to_dmy( obs[last_idx].jd, &year, &month, CALENDAR_JULIAN_GREGORIAN) + .0001); assert( 194 == strlen( buff)); @@ -1156,26 +1159,34 @@ static int elements_in_guide_format( char *buff, const ELEMENTS *elem, const char *obj_name, const OBSERVE *obs, const unsigned n_obs) { - int month; - double day; + int month, q_prec = 10, e_prec = 8; + double day, tval; long year; - const size_t guide_line_len = 166; + const size_t guide_line_len = 170; day = decimal_day_to_dmy( elem->perih_time, &year, &month, CALENDAR_JULIAN_GREGORIAN); /* name day mon yr MA q e */ + tval = elem->q; + while( tval > 9.999) + { + tval /= 10; + q_prec--; + } + tval = elem->ecc; + while( tval > 9.999) + { + tval /= 10; + e_prec--; + assert( e_prec); + } snprintf_err( buff, guide_line_len, - "%-43s%8.5f%3d%5ld Find_Orb %14.7f%12.7f%11.6f%12.6f%12.6f", + "%-43s%8.5f%3d%5ld Find_Orb %12.*f %10.*f%11.6f %11.6f %11.6f", obj_name, day, month, year, - elem->q, elem->ecc, + q_prec, elem->q, e_prec, elem->ecc, centralize_ang( elem->incl) * 180. / PI, centralize_ang( elem->arg_per) * 180. / PI, centralize_ang( elem->asc_node) * 180. / PI); - if( elem->q < .01) - { - snprintf_err( buff + 71, 13, "%12.10f", elem->q); - buff[71] = buff[83] = ' '; - } snprintf_append( buff, guide_line_len, " %9.1f%5.1f%5.1f %c", elem->epoch, elem->abs_mag, elem->slope_param * (elem->is_asteroid ? 1. : 0.4), From daadf3c4c31305e3b16ef5b8e4acc5f5c788f58d Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 30 Nov 2022 13:35:54 -0500 Subject: [PATCH 010/634] MPCORB.DAT-formatted output broke for more than 9999 observations (and would also break for more than 99 oppositions) --- elem_out.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elem_out.cpp b/elem_out.cpp index 0349a9a6..6c60c665 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -574,7 +574,7 @@ static int elements_in_mpcorb_format( char *buff, const char *packed_desig, day = (int)( decimal_day_to_dmy( current_jd( ), &year, &month, CALENDAR_JULIAN_GREGORIAN) + .0001); snprintf_append( buff, mpcorb_line_len, - " FO %02d%02d%02d %4d %2d ****-**** **** Find_Orb %04x", + " FO %02d%02d%02d %5d %3d ****-**** **** Find_Orb %04x", (int)( year % 100), month, (int)day, n_included_obs, n_oppositions, hex_flags); get_first_and_last_included_obs( obs, n_obs, &first_idx, &last_idx); From cf1112b5236a3aaf3c3963ccf525fc5c84b69e63 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 30 Nov 2022 13:41:03 -0500 Subject: [PATCH 011/634] We now have a passable function for computing the number of oppositions in an arc. --- elem_out.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index 6c60c665..05f4795c 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -525,10 +525,6 @@ static int elements_in_mpcorb_format( char *buff, const char *packed_desig, /* signifying if the object is in any of various classes such */ /* as Aten, scattered-disk object, PHA, Jupiter Trojan, */ /* etc. None of those flags are set yet. */ - const int n_oppositions = 1; - /* The above needs some work. Problem is, what constitutes */ - /* an "opposition" for an NEO? (It's more clearcut for MBOs.) */ - /* For the nonce, we'll just say "one opposition". */ double arc_length; char packed_desig2[40]; const size_t mpcorb_line_len = 203; @@ -576,7 +572,7 @@ static int elements_in_mpcorb_format( char *buff, const char *packed_desig, snprintf_append( buff, mpcorb_line_len, " FO %02d%02d%02d %5d %3d ****-**** **** Find_Orb %04x", (int)( year % 100), month, (int)day, - n_included_obs, n_oppositions, hex_flags); + n_included_obs, _n_oppositions( obs, n_obs), hex_flags); get_first_and_last_included_obs( obs, n_obs, &first_idx, &last_idx); arc_length = obs[last_idx].jd - obs[first_idx].jd; assert( strlen( buff) == 165); From 7955b01eb12cf060e3d8def0d1ce832ae8adc613 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 1 Dec 2022 18:39:40 -0500 Subject: [PATCH 012/634] Documentation fix : Yarkovsky modelled as A2 only _is_ implemented. --- mpc_obs.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mpc_obs.h b/mpc_obs.h index 99b8c6f0..b4c87f3d 100644 --- a/mpc_obs.h +++ b/mpc_obs.h @@ -477,9 +477,8 @@ Yarkovsky with A2 (both inverse-square and both one added parameter). */ #define FORCE_MODEL_COMET_THREE_PARAM 0x03 #define FORCE_MODEL_COMET_FOUR_PARAM 0x04 -/* Not used yet : for some rocks, Yarkovsky can be modelled as an -A2 (along-orbit) inverse square force. This is currently handled by -selecting a two-parameter SRP model and constraining A1=0. */ +/* For some rocks, Yarkovsky can be modelled as an A2 (along-orbit) +inverse square force. */ #define FORCE_MODEL_YARKO_A2 0x111 From 79fad0538aa63e31ab011c6e9fbe555e4c81b688 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 1 Dec 2022 18:52:19 -0500 Subject: [PATCH 013/634] SI prefixes extended to include the newly-adopted quetta/quecto/ronna/ronto --- ephem0.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ephem0.cpp b/ephem0.cpp index 398ab1e5..5ac63b06 100644 --- a/ephem0.cpp +++ b/ephem0.cpp @@ -203,7 +203,7 @@ static void show_dist_in_au( char *buff, const double dist_in_au) *buff = ' '; /* remove leading zero for small amounts */ } -static const char *si_prefixes = "kMGTPEZYXWVUSRQONLJIHFDCBA"; +static const char *si_prefixes = "kMGTPEZYRQXWVUSONLJIHFDCBA"; static bool use_au_only = false; /* Given a non-negative value, this gives a four-character output @@ -3779,9 +3779,9 @@ static void put_residual_into_text( char *text, const double resid, else if( (resid_format & RESIDUAL_FORMAT_OVERPRECISE) && zval < .00999) { /* 'high-precision' residuals */ unsigned i; - const char *lower_si_prefixes = " munpfazy "; + const char *lower_si_prefixes = " munpfazyrq "; - for( i = 0; zval < 0.99 && i < 9; i++) + for( i = 0; zval < 0.99 && i < 11; i++) zval *= 1000.; snprintf_err( text, 6, (zval < 9.9 ? "%4.1f%c" : "%4.0f%c"), zval, lower_si_prefixes[i]); From eba1fdb8dd80191e74a627ec10660c91cd46ffb7 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 1 Dec 2022 18:55:09 -0500 Subject: [PATCH 014/634] 'orb_func' : least-squares fit code revised to avoid an endless-loop case. Lots of string handling/sprintf() code revised to use (marginally) safer variants. --- orb_func.cpp | 92 ++++++++++++++++++++++++++++++---------------------- 1 file changed, 53 insertions(+), 39 deletions(-) diff --git a/orb_func.cpp b/orb_func.cpp index 13017995..8608974f 100644 --- a/orb_func.cpp +++ b/orb_func.cpp @@ -468,7 +468,7 @@ int integrate_orbitl( long double *orbit, const long double t0, const long doubl if( runtime_message) move_add_nstr( 9, 10, runtime_message, -1); - sprintf( buff, "t = %.5f; %.5f to %.5f; step ", + snprintf_err( buff, sizeof( buff), "t = %.5f; %.5f to %.5f; step ", (double)JD_TO_YEAR( t), (double)JD_TO_YEAR( t0), (double)JD_TO_YEAR( t1)); if( fabsl( stepsize) > .1) snprintf_append( buff, sizeof( buff), "%.3f ", (double)stepsize); @@ -484,14 +484,14 @@ int integrate_orbitl( long double *orbit, const long double t0, const long doubl move_add_nstr( 10, 10, buff, -1); prev_n_steps = n_steps; real_time = time( NULL); - sprintf( buff, " %02d:%02d:%02d; %f; %d cached ", + snprintf_err( buff, sizeof( buff), " %02d:%02d:%02d; %f; %d cached ", (int)( (real_time / 3600) % 24L), (int)( (real_time / 60) % 60), (int)( real_time % 60), (double)( t - prev_t), n_posns_cached); prev_t = t; move_add_nstr( 11, 10, buff, -1); - sprintf( buff, "%d steps; %d rejected", n_steps, n_rejects); + snprintf_err( buff, sizeof( buff), "%d steps; %d rejected", n_steps, n_rejects); if( best_fit_planet_dist) { snprintf_append( buff, sizeof( buff), "; center %d, ", @@ -499,31 +499,31 @@ int integrate_orbitl( long double *orbit, const long double t0, const long doubl format_dist_in_buff( buff + strlen( buff), best_fit_planet_dist); } if( planet_ns) - sprintf( buff + strlen( buff), " tp:%ld.%09ld", + snprintf_append( buff, sizeof( buff), " tp:%ld.%09ld", (long)( planet_ns / (int64_t)1000000000), (long)( planet_ns % (int64_t)1000000000)); - strcat( buff, " "); + strlcat_err( buff, " ", sizeof( buff)); move_add_nstr( 12, 10, buff, -1); - sprintf( buff, "last err: %.3e/%.3e n changes: %d ", + snprintf_err( buff, sizeof( buff), "last err: %.3e/%.3e n changes: %d ", (double)last_err, (double)step_increase, n_changes); move_add_nstr( 13, 10, buff, -1); if( use_encke) { - sprintf( buff, "e = %.5f; q = ", ref_orbit.ecc); + snprintf_err( buff, sizeof( buff), "e = %.5f; q = ", ref_orbit.ecc); format_dist_in_buff( buff + strlen( buff), ref_orbit.q); - strcat( buff, " "); + strlcat_error( buff, " "); move_add_nstr( 18, 10, buff, -1); } - sprintf( buff, "Pos: %11.6f %11.6f %11.6f", + snprintf_err( buff, sizeof( buff), "Pos: %11.6f %11.6f %11.6f", dorbit[0], dorbit[1], dorbit[2]); move_add_nstr( 14, 10, buff, -1); - sprintf( buff, "Vel: %11.6f %11.6f %11.6f", + snprintf_err( buff, sizeof( buff), "Vel: %11.6f %11.6f %11.6f", dorbit[3], dorbit[4], dorbit[5]); move_add_nstr( 15, 10, buff, -1); #ifdef TEST_PLANET_CACHING_HASH_FUNCTION if( total_n_searches) { - sprintf( buff, "%ld searches; avg %.2f max %ld ", + snprintf_err( buff, sizeof( buff), "%ld searches; avg %.2f max %ld ", total_n_searches, (double)total_n_probes / (double)total_n_searches, max_probes_required); @@ -828,13 +828,13 @@ static int set_locs_extended( const double *orbit, const double epoch_jd, OBSERVE FAR *obs, const int n_obs, const double epoch2, double *orbit2) { - int i, pass, rval = 0; + int i, pass, rval = is_unreasonable_orbit( orbit); - if( is_unreasonable_orbit( orbit)) + if( rval) { if( debug_level) - debug_printf( "Unreasonable orbit provided to set_locs_extended: %s\n", - obs->packed_id); + debug_printf( "Unreasonable orbit (%d) provided to set_locs_extended: %s\n", + rval, obs->packed_id); return( -9); } @@ -1879,9 +1879,9 @@ int herget_method( OBSERVE FAR *obs, int n_obs, double r1, double r2, set_distance( &temp_obs2, r2); runtime_message = tstr; if( using_pseudo_vaisala) - sprintf( tstr, "Vaisala %f\n", obs->solar_r); + snprintf_err( tstr, sizeof( tstr), "Vaisala %f\n", obs->solar_r); else - strcpy( tstr, "H/xfer orbit (1)"); + strlcpy_error( tstr, "H/xfer orbit (1)"); /* Compute the trial orbit in the local orbit2 array. That */ /* way, if we find it's completely stupid, we've not */ /* done anything to the plain old 'orbit' vector, which */ @@ -1895,7 +1895,7 @@ int herget_method( OBSERVE FAR *obs, int n_obs, double r1, double r2, /* But now that we know it's a good result, let's copy: */ memcpy( orbit, orbit2, 6 * sizeof( double)); available_sigmas = NO_SIGMAS_AVAILABLE; - strcpy( tstr, using_pseudo_vaisala ? "Vaisala set_locs" : "H/set_locs (1)"); + strlcpy_error( tstr, using_pseudo_vaisala ? "Vaisala set_locs" : "H/set_locs (1)"); if( set_locs( orbit, temp_obs1.jd, obs, n_obs)) { runtime_message = NULL; @@ -2727,7 +2727,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, /* We save the input orbit; if there's an error, we can */ /* restore it: */ memcpy( original_orbit, orbit, n_orbit_params * sizeof( double)); - sprintf( tstr, "full improvement: %f ", JD_TO_YEAR( epoch)); + snprintf_err( tstr, sizeof( tstr), "full improvement: %f ", JD_TO_YEAR( epoch)); runtime_message = tstr; for( i = 0; i < n_obs; i++) if( obs->note2 != 'R') @@ -2769,7 +2769,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, epoch2 = find_epoch_shown( obs, n_obs); } - sprintf( tstr, "fi/setting locs: %f ", JD_TO_YEAR( epoch)); + snprintf_err( tstr, sizeof( tstr), "fi/setting locs: %f ", JD_TO_YEAR( epoch)); fail_on_hitting_planet = true; set_locs_rval = set_locs_extended( orbit, epoch, obs, n_obs, epoch2, orbit2); fail_on_hitting_planet = saved_fail_on_hitting_planet; @@ -2824,7 +2824,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, constraint[n_constraints++] = r_mult * (dotted_dist( obs + n_obs - 1) - atof( limited_orbit + 2)); - sprintf( tstr, "fi/locs set: %f ", JD_TO_YEAR( epoch)); + snprintf_err( tstr, sizeof( tstr), "fi/locs set: %f ", JD_TO_YEAR( epoch)); for( i = 0; i < n_obs; i++) get_residual_data( obs + i, xresids + i, yresids + i); @@ -2845,7 +2845,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, orig_obs = (OBSERVE *)calloc( n_obs, sizeof( OBSERVE)); memcpy( orig_obs, obs, n_obs * sizeof( OBSERVE)); - for( i = 0; i < n_params; i++) + for( i = 0; !err_code && i < n_params; i++) { const double min_change = 0.3, max_change = 3.0, optimal_change = 1.0; double low_delta = 0., high_delta = 0., low_change = 0., high_change = 0.; @@ -2853,7 +2853,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, const int max_iterations = 100; bool keep_iterating = true; - while( keep_iterating) + while( !err_code && keep_iterating) { double tweaked_orbit[MAX_N_PARAMS]; const double original_asteroid_mass = (asteroid_mass ? *asteroid_mass : 0.); @@ -2863,7 +2863,8 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, double worst_error_squared = 0, rescale; double *slope_ptr; double rel_orbit[MAX_N_PARAMS]; - bool trouble_happened = false; + int n_tweaks = 0; + const int max_n_tweaks = 30; /* for asteroid mass computations, on first pass, */ /* try to set a "reasonable" delta : */ @@ -2876,7 +2877,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, *asteroid_mass -= delta_val; else /* adjust position/velocity */ tweaked_orbit[i] -= delta_val; - sprintf( tstr, "Evaluating %d of %d : iter %d ", i + 1, + snprintf_err( tstr, sizeof( tstr), "Evaluating %d of %d : iter %d ", i + 1, n_params, n_iterations); if( debug_level > 4) debug_printf( "About to set locs #2: delta_val %f\n", delta_val); @@ -2906,10 +2907,20 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, { /* with a smaller tweak */ delta_val /= 2.; delta_vals[i] /= 2.; - trouble_happened = true; + n_tweaks++; + if( n_tweaks >= max_n_tweaks) + err_code = -1; } } - while( set_locs_rval); + while( set_locs_rval && !err_code); + if( err_code) + { + memcpy( obs, orig_obs, n_obs * sizeof( OBSERVE)); + free( orig_obs); + free( xresids); + memcpy( orbit, original_orbit, n_orbit_params * sizeof( double)); + return( -8); + } slope_ptr = slopes + i; for( j = 0; j < n_obs; j++, slope_ptr += 2 * n_params) get_residual_data( obs + j, slope_ptr, slope_ptr + n_params); @@ -3000,8 +3011,6 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, /* evades divide-by-zero/range errors below */ if( worst_error_in_sigmas > min_change && worst_error_in_sigmas < max_change) keep_iterating = false; - if( trouble_happened && worst_error_in_sigmas < max_change) - keep_iterating = false; if( worst_error_in_sigmas <= optimal_change) { low_delta = delta_vals[i]; @@ -3027,14 +3036,19 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, { debug_printf( "Ran over iteration limit! %s\n", obs->packed_id); debug_printf( "Worst err %f sigmas\n", worst_error_in_sigmas); - free( xresids); - memcpy( orbit, original_orbit, n_orbit_params * sizeof( double)); + err_code = -3; runtime_message = NULL; - return( -4); } } } + memcpy( obs, orig_obs, n_obs * sizeof( OBSERVE)); free( orig_obs); + if( err_code) + { + free( xresids); + memcpy( orbit, original_orbit, n_orbit_params * sizeof( double)); + return( -1); + } lsquare = lsquare_init( n_params); assert( lsquare); @@ -3148,7 +3162,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, else /* if( pass == 3) */ oval = eigenvectors[j + i * n_params]; if( pass == 1 || pass == 3) /* correlation or eigenvects */ - sprintf( tbuff, "%10.6f", oval); /* values are -1 to 1 */ + snprintf_err( tbuff, sizeof( tbuff), "%10.6f", oval); /* values are -1 to 1 */ else /* covar/WtW values can be */ put_double_in_buff( tbuff, oval); /* huge or tiny */ fprintf( ofile, "%s", tbuff); @@ -3176,7 +3190,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, for( k = 0; k < (unsigned)n_params; k++) oval += matrix_ptr[i * n_params + k] * matrix_ptr[j * n_params + k]; if( pass == 3) /* eigenvects are normalized; */ - sprintf( tbuff, "%10.6f", oval); /* values are -1 to 1 */ + snprintf_err( tbuff, sizeof( tbuff), "%10.6f", oval); /* values are -1 to 1 */ else /* covar/WtW values can be */ put_double_in_buff( tbuff, oval); /* huge or tiny */ fprintf( ofile, "%s", tbuff); @@ -3277,7 +3291,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, else { /* comet A1, A2, maybe A3 included */ assert( n_params >= 7); - sprintf( title_text, "Sigma_A%d", i - 5); + snprintf_err( title_text, sizeof( title_text), "Sigma_A%d", i - 5); } fprintf( ofile, "\n%s: %s", title_text, tbuff); } @@ -3329,7 +3343,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, /* the original version: */ if( err_code || is_unreasonable_orbit( orbit)) debug_printf( "Failed full step: %d: %s\n", err_code, obs->packed_id); - sprintf( tstr, "Final setting of orbit "); + snprintf_err( tstr, sizeof( tstr), "Final setting of orbit "); i = 6; /* possibly try six half-steps */ do { @@ -3341,7 +3355,7 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, { const double after_rms = compute_rms( obs, n_obs); - sprintf( tstr, "Half-stepping %d\n", 7 - i); + snprintf_err( tstr, sizeof( tstr), "Half-stepping %d\n", 7 - i); if( after_rms > before_rms * 1.5 && !limited_orbit) { for( j = 0; j < n_orbit_params; j++) @@ -3702,7 +3716,7 @@ static double attempt_improvements( double *orbit, OBSERVE *obs, const int n_obs { char msg_buff[80]; - sprintf( msg_buff, "%s step: radii %f, %f", + snprintf_err( msg_buff, sizeof( msg_buff), "%s step: radii %f, %f", (method ? "full" : "Herget"), obs[0].r, obs[n_obs - 1].r); move_add_nstr( 14, 10, msg_buff, -1); @@ -4125,7 +4139,7 @@ double initial_orbit( OBSERVE FAR *obs, int n_obs, double *orbit) #ifdef CONSOLE if( show_runtime_messages) { - sprintf( msg_buff, "Method %d, r=%.4f", i, pseudo_r); + snprintf_err( msg_buff, sizeof( msg_buff), "Method %d, r=%.4f", i, pseudo_r); move_add_nstr( 14, 10, msg_buff, -1); } #endif From 2fca2975763b6c387146afcb2959c4bbe237de29 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 1 Dec 2022 18:56:09 -0500 Subject: [PATCH 015/634] 'pl_cache.cpp' modified to use safer string handling/sprintf() functions. --- pl_cache.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pl_cache.cpp b/pl_cache.cpp index 9eae85ce..7f3ed36e 100644 --- a/pl_cache.cpp +++ b/pl_cache.cpp @@ -619,12 +619,13 @@ int format_jpl_ephemeris_info( char *buff) { int de_version; double jd_start, jd_end; + const size_t buff_size = 250; get_jpl_ephemeris_info( &de_version, &jd_start, &jd_end); if( !de_version && !jd_start && !jd_end) - strcpy( buff, get_find_orb_text( 2056)); + strlcpy_err( buff, get_find_orb_text( 2056), buff_size); else - sprintf( buff, + snprintf_err( buff, buff_size, "\nUsing %s; covers years %.1f to %.1f\n", jpl_get_ephem_name( jpl_eph), (jd_start - J2000) / 365.25 + 2000., From 2e9df169f7df66249e9b5f9409e3507239878c77 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 1 Dec 2022 20:29:49 -0500 Subject: [PATCH 016/634] 'mpc_obs.cpp' updated to use 'safer' string/sprintf() code --- mpc_obs.cpp | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/mpc_obs.cpp b/mpc_obs.cpp index 547faf02..94fb7288 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -2330,7 +2330,6 @@ static bool get_neocp_data( char *buff, char *desig, char *mpc_code) obuff[80] = '\0'; strcpy( obuff + 5, desig); memcpy( obuff + 15, buff, 10); /* year, month, day */ -// sprintf( obuff + 25, ".%05d", atoi( buff + 11) * 100000 / 24); if( mask == mask_if_hours) /* ephem step size is in hours */ minutes = atoi( buff + 11) * 60; else /* step size was in minutes */ @@ -4911,25 +4910,26 @@ result in a D or later half-month specification. And it couldn't be 2012, because it would then have a B or A half-month specification.) That's why the observation JD is passed in. */ -static void reference_to_text( char *obuff, const char *reference, - const double jd) +static void reference_to_text( char *obuff, const size_t obuff_size, + const char *reference, const double jd) { + assert( 5 == strlen( reference)); if( !strcmp( reference, " ")) /* no reference given */ *obuff = '\0'; else if( !strcmp( reference, "neocp")) strcpy( obuff, "NEOCP"); else if( *reference >= '0' && *reference <= '9') - sprintf( obuff, "MPC %s", reference); + snprintf_err( obuff, obuff_size, "MPC %s", reference); else if( *reference == '@') - sprintf( obuff, "MPC 10%s", reference + 1); + snprintf_err( obuff, obuff_size, "MPC 10%s", reference + 1); else if( *reference >= 'a' && *reference <= 'z') - sprintf( obuff, "MPS %d%s", *reference - 'a', reference + 1); + snprintf_err( obuff, obuff_size, "MPS %d%s", *reference - 'a', reference + 1); else if( *reference == 'E') { int obs_year, curr_year; char obs_letter, curr_letter; - sprintf( obuff, "MPEC ? ?-%c%d", reference[1], atoi( reference + 2)); + snprintf_err( obuff, obuff_size, "MPEC ? ?-%c%d", reference[1], atoi( reference + 2)); obuff[6] = obuff[7] = '?'; /* attempt to evade trigraph oddities */ obs_year = get_year_and_mpc_half_month_letter( jd, &obs_letter); curr_year = get_year_and_mpc_half_month_letter( current_jd( ), &curr_letter); @@ -4939,17 +4939,17 @@ static void reference_to_text( char *obuff, const char *reference, obs_year++; if( curr_year == obs_year) /* this reference can only mean one year: */ { - sprintf( obuff + 5, "%4d", curr_year); + snprintf_err( obuff + 5, obuff_size - 5, "%4d", curr_year); obuff[9] = '-'; } } else if( *reference == 'D' && isdigit( reference[1])) - sprintf( obuff, "DASO %d", atoi( reference + 1)); + snprintf_err( obuff, obuff_size, "DASO %d", atoi( reference + 1)); else if( *reference == '~' || *reference == '#') /* MPS or MPC number, */ { /* packed as four "mutant hex" (base 62) digits */ const unsigned number = get_mutant_hex_value( reference + 1, 4); - sprintf( obuff, "MP%c %u", ((*reference == '~') ? 'S' : 'C'), + snprintf_err( obuff, obuff_size, "MP%c %u", ((*reference == '~') ? 'S' : 'C'), number + ((*reference == '~') ? 260000 : 110000)); } else /* just copy it in, but add a space */ @@ -4959,7 +4959,7 @@ static void reference_to_text( char *obuff, const char *reference, *obuff++ = ' '; while( *reference == '0') reference++; - strcpy( obuff, reference); + strlcpy_err( obuff, reference, obuff_size); } } @@ -5010,21 +5010,22 @@ static void format_motion( char *obuff, const double motion) static const char degree_symbol = (char)0xf8; #endif const double fabs_motion = fabs( motion); + const size_t obuff_size = 12; if( fabs_motion < 99.) - sprintf( obuff, "%5.2f'/hr", motion); + snprintf_err( obuff, obuff_size, "%5.2f'/hr", motion); else if( fabs_motion < 999.) - sprintf( obuff, "%5.1f'/hr", motion); + snprintf_err( obuff, obuff_size, "%5.1f'/hr", motion); else if( fabs_motion < 99999.) - sprintf( obuff, "%5.0f'/hr", motion); + snprintf_err( obuff, obuff_size, "%5.0f'/hr", motion); else if( fabs_motion < 99999. * 60.) - sprintf( obuff, "%5.0f%c/hr", motion / 60., degree_symbol); + snprintf_err( obuff, obuff_size, "%5.0f%c/hr", motion / 60., degree_symbol); else if( fabs_motion < 99999. * 3600.) - sprintf( obuff, "%5.0f%c/min", motion / 3600., degree_symbol); + snprintf_err( obuff, obuff_size, "%5.0f%c/min", motion / 3600., degree_symbol); else if( fabs_motion < 99999. * 216000.) - sprintf( obuff, "%5.0f%c/sec", motion / 216000., degree_symbol); + snprintf_err( obuff, obuff_size, "%5.0f%c/sec", motion / 216000., degree_symbol); else - strcpy( obuff, "!!!!!"); + strlcpy_err( obuff, "!!!!!", obuff_size); } static double relative_velocity( const double *loc1, const double *vel1, @@ -5133,7 +5134,7 @@ static void show_radar_info( char *buff, const OBSERVE *obs) RADAR_INFO rinfo; compute_radar_info( obs, &rinfo); - sprintf( buff, "RTDist (C) %.8fs = %.3f km; Dopp %.8f km/s = %.2f Hz", + snprintf_err( buff, 90, "RTDist (C) %.8fs = %.3f km; Dopp %.8f km/s = %.2f Hz", rinfo.rtt_comp, rinfo.rtt_comp * SPEED_OF_LIGHT, rinfo.doppler_comp * SPEED_OF_LIGHT / rinfo.freq_hz, rinfo.doppler_comp); @@ -5313,11 +5314,11 @@ static int generate_observation_text( const OBSERVE FAR *obs, const int idx, snprintf_append( buff, buffsize, " radial vel %.3f km/s cross ", m.radial_vel); if( fabs( m.cross_residual) < 9.9) - sprintf( tbuff, "%.2f", m.cross_residual); + snprintf_err( tbuff, sizeof( tbuff), "%.2f", m.cross_residual); else if( fabs( m.cross_residual) < 99.9) - sprintf( tbuff, "%4.1f", m.cross_residual); + snprintf_err( tbuff, sizeof( tbuff), "%4.1f", m.cross_residual); else if( fabs( m.cross_residual) < 9999.) - sprintf( tbuff, "%4d", (int)m.cross_residual); + snprintf_err( tbuff, sizeof( tbuff), "%4d", (int)m.cross_residual); else strlcpy_error( tbuff, "!!!!"); strlcat_err( buff, tbuff, buffsize); @@ -5391,7 +5392,7 @@ static int generate_observation_text( const OBSERVE FAR *obs, const int idx, snprintf_append( buff, buffsize, "%d ", tilt_angle); } end_ptr = buff + strlen( buff); - reference_to_text( end_ptr, optr->reference, optr->jd); + reference_to_text( end_ptr, 15, optr->reference, optr->jd); if( *end_ptr) strlcat_err( buff, " ", buffsize); if( !get_obs_alt_azzes( optr, &sun_alt_az, &object_alt_az)) From d3bfb3e2b8375bdaab82acf0ec6638734b48947c Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Mon, 5 Dec 2022 12:43:35 -0500 Subject: [PATCH 017/634] When packing designations from .rwo files, the 'standard' packing functions from mpc_fmt.cpp in the 'lunar' repository are now used. --- mpc_obs.cpp | 56 +++++++++++++++++++---------------------------------- 1 file changed, 20 insertions(+), 36 deletions(-) diff --git a/mpc_obs.cpp b/mpc_obs.cpp index 94fb7288..234eab0b 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -2362,47 +2362,31 @@ static bool get_neocp_data( char *buff, char *desig, char *mpc_code) static void inline reformat_rwo_designation_to_mpc( const char *buff, char *obuff) { - if( !isalpha( buff[6])) /* numbered object */ + size_t i = 1; + char obj_name[10], packed[13]; + + assert( ' ' == buff[0]); + while( isdigit( buff[i])) + i++; + assert( i < 10); + if( buff[i] == ' ') /* numbered object */ { - const long ast_number = atoi( buff); - const long leading_digit = ast_number / 10000L; - *obuff = int_to_mutant_hex_char( leading_digit); - if( !*obuff) /* mutant hex fails past asteroid 619999 */ - *obuff = '?'; /* ...just put _something_ there */ - sprintf( obuff + 1, "%04ld", ast_number % 10000L); - obuff[5] = ' '; + snprintf_err( obj_name, sizeof( obj_name), "(%ld)", atol( buff)); + create_mpc_packed_desig( packed, obj_name); + memcpy( obuff, packed, 6); } else /* provisional designation */ { - obuff[5] = (char)( 'K' + (buff[1] - '2') * 10 + buff[2] - '0'); - /* obuff[5] is century marker */ - obuff[6] = buff[3]; /* decade */ - obuff[7] = buff[4]; /* year */ - obuff[8] = buff[5]; /* first letter */ - obuff[11] = buff[6]; /* 2nd letter */ - /* A provisional designation is a four-digit year, */ - /* plus two letters, plus either no number, or a */ - /* one, two, or three-digit number. */ - if( buff[7] == ' ') /* No number: say, '2004RW' */ - obuff[9] = obuff[10] = '0'; - else if( buff[8] == ' ') /* One-digit #: say, '2004RW1' */ - { - obuff[9] = '0'; - obuff[10] = buff[7]; - } - else if( buff[9] == ' ') /* 2-digit #: say, '2004RW31' */ - { - obuff[9] = buff[7]; /* 1st (tens) digit */ - obuff[10] = buff[8]; /* 2nd (units) digit */ - } - else /* 3-digit #: say, '2004RW314' */ - { - const int tens = buff[7] * 10 + buff[8] - '0' * 11; - - obuff[9] = int_to_mutant_hex_char( tens); - obuff[10] = buff[9]; /* 3rd (units) digit */ - } + assert( 5 == i); + assert( isalpha( buff[5])); + assert( isalpha( buff[6])); + while( buff[i] != ' ') + i++; + memcpy( obj_name, buff + 1, i - 1); + obj_name[i - 1] = '\0'; + create_mpc_packed_desig( packed, obj_name); + memcpy( obuff, packed, 12); } } From e2544456a3367870e5f21bb10411df4b1ae528c8 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Mon, 5 Dec 2022 14:51:57 -0500 Subject: [PATCH 018/634] Three new obscodes, two renamed --- ObsCodes.htm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ObsCodes.htm b/ObsCodes.htm index 9772c7f1..ef8a615f 100644 --- a/ObsCodes.htm +++ b/ObsCodes.htm @@ -2025,7 +2025,7 @@ N55 80.026230.846497+0.532089Beimian Tianwentai, Ali, Tibet N56 80.026750.846503+0.532073Jiama'erdeng Tianwentai, Ali, Tibet N82 85.954940.641844+0.764450Multa Observatory -N83 86.235040.749549+0.659927LW-1, Korla Station +N83 86.235040.749549+0.659927LW-1, NAOC-Korla N86 87.178520.727070+0.684719Xingming Observatory-KATS, Nanshan N87 87.175030.727076+0.684720Nanshan Station, Xinjiang Observatory N88 87.173220.727098+0.684697Xingming Observatory #3, Nanshan @@ -2040,12 +2040,13 @@ O48 101.181540.903223+0.428442Purple Mountain Observatory, Yaoan (0.8-m) O49 101.181110.903206+0.428474Purple Mountain Observatory, Yaoan Station O50 101.439420.998617+0.052565Hin Hua Observatory, Klang -O68 105.330900.793121+0.607347LW-2, Zhongwei Station +O68 105.330900.793121+0.607347LW-2, NAOC-Zhongwei O72 106.334760.672017+0.738399OWL-Net, Songino O75 107.051800.672284+0.738151ISON-Hureltogoot Observatory O85 109.213000.826583+0.561181LiShan Observatory, Lintong P07 114.089870.928304-0.370597Space Surveillance Telescope, HEH Station P18 116.610830.757010+0.651328Birch Forest Observatory, LaBaGouMen +P22 117.575880.762782+0.644702LW-3, NAOC-Xinglong P25 118.312740.910976+0.411089Kinmen Educational Remote Observatory, Jincheng P30 119.597080.862775+0.504181Jiangnantianchi Observatory, Anji P31 119.597360.862772+0.504189Starlight Observatory, Tianhuangping @@ -2064,6 +2065,7 @@ P87 132.094190.830358+0.555374Hirao Observatory, Yamaguchi P93 133.544330.823371+0.565729Space Tracking and Communications Center, JAXA Q02 135.493440.825315+0.562809Sakai Observatory, Osaka +Q10 137.329440.821623+0.568142Toyokawa Observatory Q11 137.520690.820236+0.570158Shinshiro Q12 137.825360.805147+0.591292Nagano Observatory Q19 139.4390 0.81430 +0.57852 Machida @@ -2295,6 +2297,7 @@ Y28 321.3126 0.98840 -0.15179 OASI, Nova Itacuruba Y40 324.038890.989706-0.143217Discovery Observatory, Caruaru Y90 354.5553 0.73015 +0.68115 Observatorio ESTELIA, Ladines +Y91 354.833500.802497+0.594854Ras Algethi, Ronda Z00 353.265860.798528+0.599968BOOTES-1, Mazagon Z01 352.133210.856462+0.515344OWL-Net, Oukaimeden Z02 352.133310.856450+0.515339HAO observatory, Oukaimeden From 6bc619cdb422c2d4d7c80763e6d46677729f6f42 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Mon, 5 Dec 2022 14:53:48 -0500 Subject: [PATCH 019/634] Further switches to 'safer' string handling/snprintf() code --- b32_eph.cpp | 7 ++++--- cssfield.cpp | 4 ++-- fo.cpp | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/b32_eph.cpp b/b32_eph.cpp index 44fb0504..2e1ce955 100644 --- a/b32_eph.cpp +++ b/b32_eph.cpp @@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA #include #include #include +#include "stringex.h" #include "watdefs.h" #include "lunar.h" #include "afuncs.h" @@ -190,8 +191,8 @@ int create_b32_ephemeris( const char *filename, const double epoch, resolution = max_ordinate / 2.e+9; ofile = fopen( filename, "wb"); - memset( tbuff, 0, 128); - sprintf( tbuff, hdr_fmt, 128, jpl_id, + memset( tbuff, 0, sizeof( tbuff)); + snprintf_err( tbuff, sizeof( tbuff), hdr_fmt, jpl_id, jd_start, ephem_step, n_steps, best_interpolation_order( output_array, 2 * n_steps, &max_err), resolution, 32, 0); @@ -206,7 +207,7 @@ int create_b32_ephemeris( const char *filename, const double epoch, free( output_array); add_ephemeris_details( ofile, jd_start, curr_jd); fclose( ofile); - sprintf( tbuff, "max err: %.3g\nEnd: ", max_err); + snprintf_err( tbuff, sizeof( tbuff), "max err: %.3g\nEnd: ", max_err); full_ctime( tbuff + strlen( tbuff), curr_jd, CALENDAR_JULIAN_GREGORIAN); generic_message_box( tbuff, "o"); return( 0); diff --git a/cssfield.cpp b/cssfield.cpp index 229e433a..b9b6532d 100644 --- a/cssfield.cpp +++ b/cssfield.cpp @@ -428,7 +428,7 @@ int main( const int argc, const char **argv) { FILE *ifile; - sprintf( buff, "css%d.csv", file_number); + snprintf( buff, sizeof( buff), "css%d.csv", file_number); ifile = fopen( buff, "rb"); if( ifile) { @@ -437,7 +437,7 @@ int main( const int argc, const char **argv) int n_invalid_fields = 0; FILE *ofile; - sprintf( buff, "css_%d.csv", file_number); + snprintf( buff, sizeof( buff), "css_%d.csv", file_number); ofile = fopen( buff, "wb"); printf( "%s opened; reading fields\n", buff); diff --git a/fo.cpp b/fo.cpp index 3270308c..65f616d2 100644 --- a/fo.cpp +++ b/fo.cpp @@ -119,7 +119,7 @@ int inquire( const char *prompt, char *buff, const int max_len, static void object_comment_text( char *buff, const OBJECT_INFO *id) { - sprintf( buff, "%d observations; ", id->n_obs); + snprintf( buff, 25, "%d observations; ", id->n_obs); make_date_range_text( buff + strlen( buff), id->jd_start, id->jd_end); } From 8c306fa5e4050287896edbbb890c39f88d9d0de5 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Mon, 5 Dec 2022 14:57:43 -0500 Subject: [PATCH 020/634] Updated version, added two observer links, and fixed an irritating spelling error. --- environ.def | 2 +- miscell.cpp | 4 ++-- observer.txt | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/environ.def b/environ.def index fd75fc1d..ac61e9e9 100644 --- a/environ.def +++ b/environ.def @@ -173,7 +173,7 @@ BC405_ASTEROIDS=300 ftp://ssd.jpl.nasa.gov/pub/xfr/gm_Horizons.pck. ASTEROID_PERT_LIST= - By default, geoocentric elements are referred to the J2000 _equator_. + By default, geocentric elements are referred to the J2000 _equator_. Everything else (heliocentric and other non-earth-centric) is referred to the J2000 _ecliptic_. Set the following to be 1 to force all elements to be J2000 ecliptic (including geocentric ones), or 2 to diff --git a/miscell.cpp b/miscell.cpp index 9e60436a..7b7c92cf 100644 --- a/miscell.cpp +++ b/miscell.cpp @@ -622,6 +622,6 @@ const char *write_bit_string( char *ibuff, const uint64_t bits) const char *find_orb_version_jd( double *jd) { if( jd) - *jd = 2459903.5; - return( "2022 Nov 20"); + *jd = 2459918.5; + return( "2022 Dec 05"); } diff --git a/observer.txt b/observer.txt index 23b3bf07..eb0a9f66 100644 --- a/observer.txt +++ b/observer.txt @@ -89,6 +89,7 @@ Lazzaro Lazzaro La Canada La Cañada Leonard Leonard + Linder Linder Lipunov Lipunov Lovejoy Lovejoy Lowe Lowe @@ -131,6 +132,7 @@ Pravec Pravec Primak Primak Rankin Rankin + Reddy Reddy Rinner Rinner Ritchey-Chretien Ritchey-Chrétien W. H. Ryan W. H. Ryan From cb2b47899536e08f3de3a9580336513388f5fbd2 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 6 Dec 2022 20:10:30 -0500 Subject: [PATCH 021/634] Don't warn about 'insufficient precision' for the deleted observations, 99+% of which do have reduced precision and it doesn't matter, because we won't use them anyway --- mpc_obs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mpc_obs.cpp b/mpc_obs.cpp index 234eab0b..ddedeb0b 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -3846,15 +3846,15 @@ OBSERVE FAR *load_observations( FILE *ifile, const char *packed_desig, // insufficient_precision |= INSUFFICIENT_PRECISION_MAG; if( time_sigma * 1.1 > rval[i].time_sigma || !use_sigmas) rval[i].time_sigma = time_sigma; - else + else if( rval[i].note2 != 'X') insufficient_precision |= INSUFFICIENT_PRECISION_TIME; if( posn_sigma_1 * 1.1 > rval[i].posn_sigma_1 || !use_sigmas) rval[i].posn_sigma_1 = posn_sigma_1; - else + else if( rval[i].note2 != 'X') insufficient_precision |= INSUFFICIENT_PRECISION_POSN1; if( posn_sigma_2 * 1.1 > rval[i].posn_sigma_2 || !use_sigmas) rval[i].posn_sigma_2 = posn_sigma_2; - else + else if( rval[i].note2 != 'X') insufficient_precision |= INSUFFICIENT_PRECISION_POSN2; if( insufficient_precision && !insufficient_precision_warning_shown && use_sigmas) From e7d37403edf1915f66701cc972175dc3bbe8cd31 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 6 Dec 2022 20:12:09 -0500 Subject: [PATCH 022/634] Got some crashes in (very) rare cases where two observations had identical time stamps but different RA/decs. Find_Orb would quite reasonably complain that trying to get from A to B in zero time wasn't possible. --- orb_func.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/orb_func.cpp b/orb_func.cpp index 8608974f..cf51e61a 100644 --- a/orb_func.cpp +++ b/orb_func.cpp @@ -1856,7 +1856,7 @@ int herget_method( OBSERVE FAR *obs, int n_obs, double r1, double r2, i = n_obs - 1; while( i > 0 && obs[i].jd > end_jd) i--; - if( !i) + if( obs[i].jd == obs[0].jd) return( -1); temp_obs2 = obs[i]; uncertainty_parameter = 99.; From 09e2e6ab6f9357037ae944c8001adcf9a213c650 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 7 Dec 2022 10:12:33 -0500 Subject: [PATCH 023/634] Object names longer than 43 characters (which happen for some artsats) would overflow a buffer when creating Guide-formatted elements. --- elem_out.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index 05f4795c..de070b9e 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -1176,13 +1176,16 @@ static int elements_in_guide_format( char *buff, const ELEMENTS *elem, e_prec--; assert( e_prec); } - snprintf_err( buff, guide_line_len, - "%-43s%8.5f%3d%5ld Find_Orb %12.*f %10.*f%11.6f %11.6f %11.6f", - obj_name, day, month, year, + strlcpy( buff, obj_name, 43); + memset( buff + strlen( buff), ' ', 43); + snprintf_err( buff + 43, guide_line_len, + "%8.5f%3d%5ld Find_Orb %12.*f %10.*f%11.6f %11.6f %11.6f", + day, month, year, q_prec, elem->q, e_prec, elem->ecc, centralize_ang( elem->incl) * 180. / PI, centralize_ang( elem->arg_per) * 180. / PI, centralize_ang( elem->asc_node) * 180. / PI); + assert( strlen( buff) == 130); snprintf_append( buff, guide_line_len, " %9.1f%5.1f%5.1f %c", elem->epoch, elem->abs_mag, elem->slope_param * (elem->is_asteroid ? 1. : 0.4), From bf131dbcb255bd94bcf0080eb2c79a391593a4e8 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 7 Dec 2022 10:33:14 -0500 Subject: [PATCH 024/634] Provided a mechanism to set the outlier rejection limit. Still defaults to three sigmas, but those so inclined now have a way to change it. --- elem_out.cpp | 6 ++++++ environ.def | 6 ++++++ orb_fun2.cpp | 5 +++-- orb_func.cpp | 13 +++++++------ 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index de070b9e..4a1db7c2 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -3870,6 +3870,8 @@ int get_defaults( ephem_option_t *ephemeris_output_options, int *element_format, extern double maximum_observation_span; extern int use_config_directory; extern double *sr_orbits; + extern double automatic_outlier_rejection_limit; + extern double default_automatic_outlier_rejection_limit; extern unsigned max_n_sr_orbits; int use_sigmas_int; unsigned long obsolete_ephem_output_options; @@ -3878,6 +3880,7 @@ int get_defaults( ephem_option_t *ephemeris_output_options, int *element_format, const char *eop_filename = get_environment_ptr( "EOP_FILE"); const char *albedo = get_environment_ptr( "OPTICAL_ALBEDO"); const char *obs_range = get_environment_ptr( "OBSERVATION_DATE_RANGE"); + const char *outlier_limit = get_environment_ptr( "OUTLIER_REJECTION_LIMIT"); #if !defined( _WIN32) && !defined( __WATCOMC__) findorb_already_running = (check_for_other_processes( 1) != 0); @@ -3967,6 +3970,9 @@ int get_defaults( ephem_option_t *ephemeris_output_options, int *element_format, minimum_observation_jd = YEAR_TO_JD( minimum_observation_jd); maximum_observation_jd = YEAR_TO_JD( maximum_observation_jd); } + if( *outlier_limit) + default_automatic_outlier_rejection_limit = atof( outlier_limit); + automatic_outlier_rejection_limit = default_automatic_outlier_rejection_limit; return( 0); } diff --git a/environ.def b/environ.def index ac61e9e9..6f05820b 100644 --- a/environ.def +++ b/environ.def @@ -484,3 +484,9 @@ SIGMAS_FILE= GROUP_ATL=M22 T05 T08 W68 GROUP_LC2=E10 F65 GROUP_LC1=V37 W85 K91 Q63 Z31 097 + + By default, astrometric outliers by three sigmas will be rejected. That's + set by the following variable. Set it to 9999999 to cause all observations + to be included no matter how bad they are. (Not something I recommend, but + you can do it.) +OUTLIER_REJECTION_LIMIT=3 diff --git a/orb_fun2.cpp b/orb_fun2.cpp index cfce9622..2fec0d3b 100644 --- a/orb_fun2.cpp +++ b/orb_fun2.cpp @@ -861,7 +861,8 @@ int write_excluded_observations_file( const OBSERVE *obs, int n_obs) return( n_excluded); } -double automatic_outlier_rejection_limit = 3.; +double automatic_outlier_rejection_limit; +double default_automatic_outlier_rejection_limit = 3.; int apply_excluded_observations_file( OBSERVE *obs, const int n_obs) { @@ -869,7 +870,7 @@ int apply_excluded_observations_file( OBSERVE *obs, const int n_obs) FILE *ifile; int n_excluded = 0, i; - automatic_outlier_rejection_limit = 3.; + automatic_outlier_rejection_limit = default_automatic_outlier_rejection_limit; ifile = fopen_ext( excluded_filename, "crb"); if( ifile) { diff --git a/orb_func.cpp b/orb_func.cpp index cf51e61a..cd75bce4 100644 --- a/orb_func.cpp +++ b/orb_func.cpp @@ -4452,11 +4452,11 @@ static int auto_reject_obs( OBSERVE *obs, int n_obs, return( rval); } -/* We try rejecting outliers that are more than three sigmas from -nominal. 99.9% of the time, that works Just Fine, possibly rejecting -one or more outliers. It may fail if most of the observations are -outside three sigmas. We keep trying with progressively larger -limits. +/* We try rejecting outliers that are more than (by default) three +sigmas from nominal. 99.9% of the time, that works Just Fine, +possibly rejecting one or more outliers. It may fail if most of +the observations are outside three sigmas. We keep trying with +progressively larger limits. This can help when a few observations are so horrendously off that they drag all other observations in the other direction to compensate. @@ -4467,7 +4467,8 @@ may look reasonable... but will then be subjected to a second, or static int auto_reject_obs_within_arc( OBSERVE *obs, int n_obs) { int rval; - double reject_limit = 3.; /* reject anything outside three sigmas */ + extern double automatic_outlier_rejection_limit; + double reject_limit = automatic_outlier_rejection_limit; do { From 27b195095e40d339f38e1ce0a2448b7e360cfadc Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Wed, 7 Dec 2022 10:34:24 -0500 Subject: [PATCH 025/634] If interactive Find_Orb has 256 or more colors to work with, it doesn't rely on the (sometimes missing) ability to change the palette; it just finds the closest color within the existing palette. --- findorb.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/findorb.cpp b/findorb.cpp index de9e380f..2ddf99b5 100644 --- a/findorb.cpp +++ b/findorb.cpp @@ -2341,7 +2341,6 @@ static void show_a_file( const char *filename, const int flags) int top_line; int color_start = 18; /* see 'command.txt' */ short color_pair_idx = (short)color_start; - short color_idx = (short)color_start * 2; const bool color_visibility = n_lines_to_show + color_start < COLORS; @@ -2371,7 +2370,7 @@ static void show_a_file( const char *filename, const int flags) const int curr_line = top_line + i; int color_col[20], rgb[20], n_colored = 0, j; - if( i > 3 && flags && color_visibility) + if( i >= 3 && flags && color_visibility) { char *tptr = buff; @@ -2395,14 +2394,11 @@ static void show_a_file( const char *filename, const int flags) const int text_color = find_rgb( blue + red + green > 48 ? 0 : 0xffffff); - if( can_change_color( )) - { - init_color( color_idx, red * 999 / 31, green * 999 / 31, blue * 999 / 31); - init_pair( color_pair_idx, text_color, color_idx); - color_idx++; - } - else - init_pair( color_pair_idx, text_color, find_rgb( rgb[j])); +#ifdef __PDCURSESMOD__ + init_extended_pair( color_pair_idx, text_color, find_rgb( rgb[j])); +#else + init_pair( color_pair_idx, text_color, find_rgb( rgb[j])); +#endif mvchgat( i, color_col[j], 2, A_NORMAL, color_pair_idx, NULL); color_pair_idx++; } @@ -2833,10 +2829,14 @@ static int find_rgb( const int irgb) rgb0[0] = (int)( irgb >> 16); rgb0[1] = (int)( (irgb >> 8) & 0xff); rgb0[2] = (int)( irgb & 0xff); +#ifdef __PDCURSESMOD__ + if( COLORS == 256 + (1 << 24)) + return( 256 + rgb0[0] + (rgb0[1] << 8) + (rgb0[2] << 16)); +#endif if( COLORS <= 8 || force_eight_color_mode) return( (rgb0[0] > 127 ? 1 : 0) | (rgb0[1] > 127 ? 2 : 0) | (rgb0[2] > 127 ? 4 : 0)); - if( !can_change_color( ) && COLORS >= 256) + if( COLORS >= 256) { const int r_idx = (rgb0[0] + 10) / 50; const int g_idx = (rgb0[1] + 10) / 50; @@ -2894,7 +2894,11 @@ static void set_color_table( void) unsigned fore_rgb, back_rgb; if( 3 == sscanf( buff + 1, "%d %x %x", &idx, &fore_rgb, &back_rgb)) +#ifdef __PDCURSESMOD__ + init_extended_pair( idx, find_rgb( fore_rgb), find_rgb( back_rgb)); +#else init_pair( idx, find_rgb( fore_rgb), find_rgb( back_rgb)); +#endif } fclose( ifile); } From 11fed41fcbbfcad89b84ef85d2a97d0363e0e5bc Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 9 Dec 2022 12:36:57 -0500 Subject: [PATCH 026/634] Modified handling for spacecraft velocity add-ons --- mpc_obs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mpc_obs.cpp b/mpc_obs.cpp index ddedeb0b..487e8a12 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -3978,9 +3978,9 @@ OBSERVE FAR *load_observations( FILE *ifile, const char *packed_desig, ; /* deliberately empty loop */ else if( !memcmp( buff, "#Offset center ", 15)) spacecraft_offset_reference = atoi( buff + 15); - else if( !memcmp( buff, "#Spacecraft vel ", 16)) + else if( !memcmp( buff, "#vel (km/s) ", 12)) { - int n_scanned = sscanf( buff + 16, "%lf %lf %lf", spacecraft_vel, + int n_scanned = sscanf( buff + 30, "%lf %lf %lf", spacecraft_vel, spacecraft_vel + 1, spacecraft_vel + 2); assert( 3 == n_scanned); From 989bd715e4ff7635581bb7cd9e18c2af7f089498 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 15 Dec 2022 13:41:57 -0500 Subject: [PATCH 027/634] Debug builds should be compiled with -Og, not -O0 --- makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefile b/makefile index 2b2a952b..ac7a5a42 100644 --- a/makefile +++ b/makefile @@ -130,7 +130,7 @@ all: $(FO_EXE) $(FIND_ORB_EXE) fo_serve.cgi eph2tle$(EXE) CXXFLAGS+=-c -Wall -pedantic -Wextra -Werror $(ADDED_CXXFLAGS) -I $(INSTALL_DIR)/include ifdef DEBUG - CXXFLAGS += -g -O0 + CXXFLAGS += -g -Og else CXXFLAGS += -O3 endif From d8831aa7fcf8eb920945bcc8327909a237f17d5e Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Thu, 15 Dec 2022 14:07:43 -0500 Subject: [PATCH 028/634] Added a warning for invalid temporary designations. --- efindorb.txt | 3 +++ mpc_obs.cpp | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/efindorb.txt b/efindorb.txt index 0dd0c707..f6c5635f 100644 --- a/efindorb.txt +++ b/efindorb.txt @@ -391,3 +391,6 @@ 2072 https://www.projectpluto.com/errors.htm#precision 2072 for further discussion. Be warned that there may be other errors. 2072 Find_Orb will only warn you about the first one it finds. + +2074 Temporary designations must include only alphanumeric characters. +2074 The designation '%s' would be rejected by MPC. diff --git a/mpc_obs.cpp b/mpc_obs.cpp index 487e8a12..f559a24e 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -1815,6 +1815,29 @@ static int parse_observation( OBSERVE FAR *obs, const char *buff) obs->ref_center = saved_obs.ref_center; obs->packed_id[12] = '\0'; obj_desig_type = get_object_name( NULL, obs->packed_id); + if( obj_desig_type == OBJ_DESIG_OTHER) + { + size_t i = 7; + + while( i < 12 && isalnum( buff[i])) + i++; + while( i < 12 && buff[i] == ' ') + i++; + if( i != 12) + { + static bool warning_not_yet_shown = true; + + if( warning_not_yet_shown) + { + char tbuff[300]; + + warning_not_yet_shown = false; + snprintf_err( tbuff, sizeof( tbuff), get_find_orb_text( 2074), + obs->packed_id); + generic_message_box( tbuff, "o"); + } + } + } if( obj_desig_type == OBJ_DESIG_COMET_PROVISIONAL || obj_desig_type == OBJ_DESIG_COMET_NUMBERED) object_type = OBJECT_TYPE_COMET; From 25c7309fc94f08e7173f02e7435713cb35800ae7 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:29:54 -0500 Subject: [PATCH 029/634] Minor rearrangement of code when reading in observations. This speeds up loading of _really_ large files, such as the ITF or the unnumbered observation file. --- mpc_obs.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/mpc_obs.cpp b/mpc_obs.cpp index f559a24e..99634d84 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -260,7 +260,7 @@ Otherwise, zero will be returned. */ #define OBS_FORMAT_WRONG_DESIG_PLACEMENT 2 #define OBS_FORMAT_INCORRECT 4 -static int fix_up_mpc_observation( char *buff) +static int fix_up_mpc_observation( char *buff, double *jd) { size_t len = strlen( buff); int rval = 0; @@ -291,8 +291,15 @@ static int fix_up_mpc_observation( char *buff) else check_packed_desig_alignment( buff); buff[12] = tchar; - if( len == 80 && observation_jd( buff)) /* doesn't need fixing */ - return( rval); + if( len == 80) + { + double temp_jd = observation_jd( buff); + + if( jd) + *jd = temp_jd; + if( temp_jd) /* doesn't need fixing */ + return( rval); + } if( len < 90) /* avoid buffer overruns */ { @@ -3643,7 +3650,7 @@ OBSERVE FAR *load_observations( FILE *ifile, const char *packed_desig, debug_printf( "Got .rwo data\n"); } if( fixing_trailing_and_leading_spaces) - fixes_made = fix_up_mpc_observation( buff); + fixes_made = fix_up_mpc_observation( buff, NULL); original_packed_desig[12] = '\0'; memcpy( original_packed_desig, buff, 12); xref_designation( buff); @@ -4344,7 +4351,7 @@ OBJECT_INFO *find_objects_in_file( const char *filename, { size_t iline_len = strlen( buff); bool is_neocp = false; - double jd; + double jd = 0.; if( debug_level > 8) debug_printf( "Input line len %d\n", (int)strlen( buff)); @@ -4361,10 +4368,11 @@ OBJECT_INFO *find_objects_in_file( const char *filename, if( iline_len > MINIMUM_RWO_LENGTH) rwo_to_mpc( buff, NULL, NULL, NULL, NULL, NULL); if( fixing_trailing_and_leading_spaces) - fix_up_mpc_observation( buff); + fix_up_mpc_observation( buff, &jd); if( debug_level > 8) debug_printf( "After fixup: %d\n", (int)strlen( buff)); - jd = observation_jd( buff); + if( !jd) + jd = observation_jd( buff); if( jd && *new_xdesig) /* previous line was "COM = (xdesig)"; */ { /* add a new cross-designation to the table */ memcpy( new_xdesig, buff, 12); From 7d936351f74f1add938e731d11ed6d54073d1f40 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:33:25 -0500 Subject: [PATCH 030/634] Added one obscode and a couple of observer links --- ObsCodes.htm | 3 ++- observer.txt | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ObsCodes.htm b/ObsCodes.htm index ef8a615f..89b9d181 100644 --- a/ObsCodes.htm +++ b/ObsCodes.htm @@ -2227,6 +2227,7 @@ W54 282.289440.785431+0.616890Mark Slade Remote Observatory, Wilderness W55 282.583890.773703+0.631447Natelli Observatory, Frederick W56 282.525830.773143+0.632153Pineapple Observatory, Frederick +W57 289.260940.873480-0.486002ESA TBT La Silla Observatory W58 283.149640.777667+0.626574ALPHA Observatory, South Laurel W59 284.107580.757005+0.651302The Dark Side Observatory, Weatherly W60 286.366260.995574+0.097155AstroExplor Observatory, Tinjaca @@ -2356,7 +2357,7 @@ Z55 354.9150 0.79391 +0.60604 Uraniborg Observatory, Ecija Z56 350.2119 0.61577 +0.78529 Knocknaboola Z57 355.425890.803207+0.593753Observatorio Zuben, Alhaurin de la Torre -Z58 355.630680.762093+0.645483ESA Cebreros TBT Observatory, Cebreros +Z58 355.630680.762093+0.645483ESA TBT Cebreros Observatory Z59 357.715400.599292+0.797871Chelford Observatory Z60 357.8506 0.73205 +0.67900 Observatorio Zaldibia Z61 359.064000.748594+0.660857Montecanal Observatory, Zaragoza diff --git a/observer.txt b/observer.txt index eb0a9f66..0c63a977 100644 --- a/observer.txt +++ b/observer.txt @@ -120,6 +120,7 @@ Ory Ory P\'al Pál Pallar\'es Pallarés + Parrott Parrott Pelle Pelle Pettarin Pettarin Piani Piani @@ -135,6 +136,7 @@ Reddy Reddy Rinner Rinner Ritchey-Chretien Ritchey-Chrétien + J. E. Rogers J. E. Rogers W. H. Ryan W. H. Ryan Sarneczky Sárneczky S\'arneczky Sárneczky From b71f2646b0b693fc1ee6051b4596d55ec26dc72f Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:37:26 -0500 Subject: [PATCH 031/634] Spacewatch pointings converter modified to use 'safer' snprintf() --- sw_xvt.c | 2 +- sw_xvt2.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sw_xvt.c b/sw_xvt.c index e038ca69..7224b886 100644 --- a/sw_xvt.c +++ b/sw_xvt.c @@ -113,7 +113,7 @@ static void add_half_exposure( char *obuff, const char *itime, const double seconds = get_base_sixty( itime) * 3600. + exposure_time / 2.; const int millisec = (int)( seconds * 1000. + .5); - sprintf( obuff, "%02d:%02d:%02d.%03d", + snprintf( obuff, 16, "%02d:%02d:%02d.%03d", millisec / 3600000, (millisec / 60000) % 60, /* HH MM */ (millisec / 1000) % 60, millisec % 1000); /* SS.sss */ } diff --git a/sw_xvt2.c b/sw_xvt2.c index c8045d69..8a3bc7e7 100644 --- a/sw_xvt2.c +++ b/sw_xvt2.c @@ -112,7 +112,7 @@ static void add_half_exposure( char *obuff, const char *itime, const double seconds = get_base_sixty( itime) * 3600. + exposure_time / 2.; const int millisec = (int)( seconds * 1000. + .5); - sprintf( obuff, "%02d:%02d:%02d.%03d", + snprintf( obuff, 16, "%02d:%02d:%02d.%03d", millisec / 3600000, (millisec / 60000) % 60, /* HH MM */ (millisec / 1000) % 60, millisec % 1000); /* SS.sss */ } From 957d4dfde282ffec9aee6a91200954840596ad98 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:38:32 -0500 Subject: [PATCH 032/634] Added links to Web site for (M44). Fixed a mangled link. --- obslinks.htm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/obslinks.htm b/obslinks.htm index c51dc868..f04470f3 100644 --- a/obslinks.htm +++ b/obslinks.htm @@ -524,9 +524,11 @@ K88 GINOP-KHK, Piszkéstető
K93 Sutherland-LCOGT C
- L01 Višnjan Observatory, Tičan + L01 Višnjan Observatory, Tičan
L16 Stardreams Observatory, Vǎlenii de Munte
L51 MARGO, Nauchnij
+ + M44 Al-Khatim Observatory, Abu Dhabi
Q64 Siding Spring-LCOGT B
Q68 Blue Mountains Observatory, Leura
From b1e579f16031d380238704cac84995fef032bbc1 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:39:58 -0500 Subject: [PATCH 033/634] Modified some obscodes previously added for (J69) Clanfield based on additional data from the group's Web site. Added a new scope near Biosphere 2. --- rovers.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/rovers.txt b/rovers.txt index 0001c3a4..1ba54fc5 100644 --- a/rovers.txt +++ b/rovers.txt @@ -741,12 +741,17 @@ G34 ! 13.701403 +50.860289 490.67 Oberfrauendorf is 155 metres above sea level; the geoid height is about 46 metres. (J69) is one of five domes visible on G__gle Earth as part of the Hampshire Astronomical Group site. The altitudes appear to be identical. + Further identification is given at https://hantsastro.org.uk/tour/index.php + (comments come from that page). J69 ! -1.0196556 +50.9390167 201 North Observatory, Clanfield -Ha1 ! -1.019663 +50.939114 201 HAG about 10m north of (J69) -Ha2 ! -1.019629 +50.938673 201 HAG about 40m south of (J69) -Ha3 ! -1.019306 +50.938298 201 HAG smaller dome ~85m SSE of (J69) -Ha3 ! -1.019140 +50.938284 201 HAG larger dome ~85m SSE of (J69) +Cdi ! -1.019663 +50.939114 201 12" Dome, Clanfield + "This dome is privately owned... 12-inch f5.5 Newtonian... for imaging" +J84 ! -1.019629 +50.938673 201 South Observatory, Clanfield +C7i ! -1.019306 +50.938298 201 7" Dome, Clanfield + "...the favourite amongst members for astronomical imaging" +C5i ! -1.019140 +50.938284 201 5" Dome, Clanfield + "The oldest of our telescopes are housed in this dome" Some telescopes at (711) McDonald Observatory in Texas, sorted using the site map at http://www.as.utexas.edu/mcdonald/observers/mcd_site_map.pdf @@ -1471,3 +1476,5 @@ Opt ! 0.0000 0.00000 +0.00000 @3 Optimal topocentric location LC1 ! 0.0000 0.00000 +0.00000 @3 Las Cumbres Observatory (1m) LC2 ! 0.0000 0.00000 +0.00000 @3 Las Cumbres Observatory (2m) ATL ! 0.0000 0.00000 +0.00000 @3 ATLAS (all scopes) + +RA2 !-110.847070 +32.581105 1190. RAPTORS-2 From ee76e43644248a5ce60d724a395d7f402be3b1a2 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:43:13 -0500 Subject: [PATCH 034/634] Hitting 'C' will (usually) get you a calendar in the object selection and ephemeris pages. Failure occurs if there happens to be an object starting with 'C'; selecting that takes priority over calendar display. --- findorb.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/findorb.cpp b/findorb.cpp index 2ddf99b5..58560b2a 100644 --- a/findorb.cpp +++ b/findorb.cpp @@ -816,6 +816,15 @@ static char *_set_radio_button( char *text, const int option_num) return( line_ptr); } +static void show_calendar( void) +{ + FILE *ifile = fopen_ext( "calend.txt", "clrb"); + + if( ifile) + fclose( ifile); + show_a_file( (ifile ? "calend.txt" : "calendar.txt"), SHOW_FILE_IS_CALENDAR); +} + /* Here's a simplified example of the use of the 'ephemeris_in_a_file' function... nothing fancy, but it shows how it's used. */ @@ -1108,7 +1117,7 @@ static void create_ephemeris( const double *orbit, const double epoch_jd, case 'b': case 'B': ephemeris_output_options ^= OPTION_PHASE_ANGLE_BISECTOR; break; - case 'c': case 'C': + case 'c': { strlcpy_error( buff, get_find_orb_text( 2064)); _set_radio_button( buff, ephem_type); @@ -1125,6 +1134,9 @@ static void create_ephemeris( const double *orbit, const double epoch_jd, } } break; + case 'C': + show_calendar( ); + break; case 'd': case 'D': if( vect_frame > -1) { @@ -3210,7 +3222,8 @@ static OBJECT_INFO *load_file( char *ifilename, int *n_ids, char *err_buff, } strlcat_err( buff, (already_got_obs ? "\nQ Cancel" : "\nQ Quit"), buffsize); - c = inquire( buff, NULL, 30, COLOR_DEFAULT_INQUIRY); + while( 'C' == (c = inquire( buff, NULL, 30, COLOR_DEFAULT_INQUIRY))) + show_calendar( ); free( buff); if( c >= ' ' && c < 127) { @@ -3228,7 +3241,7 @@ static OBJECT_INFO *load_file( char *ifilename, int *n_ids, char *err_buff, case 'F': case 'f': case KEY_F( 1): user_select_file( ifilename, "Open astrometry file", 0); break; - case 'C': case 'c': case KEY_F( 2): + case 'c': case KEY_F( 2): strcpy( ifilename, "c"); break; case 'N': case 'n': case KEY_F( 3): @@ -6147,13 +6160,7 @@ int main( int argc, const char **argv) } break; case 'c': case 'C': - { - FILE *ifile = fopen_ext( "calend.txt", "clrb"); - - if( ifile) - fclose( ifile); - show_a_file( (ifile ? "calend.txt" : "calendar.txt"), SHOW_FILE_IS_CALENDAR); - } + show_calendar( ); break; case KEY_F( 15): /* shift-f3 */ show_splash_screen( ); /* just to test */ From fec9179965b84ed40e89340c23f1ad634cdac637 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Fri, 16 Dec 2022 21:48:59 -0500 Subject: [PATCH 035/634] 'monte0.cpp' modified to use safer snprintf() functions --- monte0.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/monte0.cpp b/monte0.cpp index 23d5717a..978351c9 100644 --- a/monte0.cpp +++ b/monte0.cpp @@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA #include "watdefs.h" #include "comets.h" #include "mpc_obs.h" +#include "stringex.h" #include "afuncs.h" #include "monte0.h" @@ -304,7 +305,7 @@ char *put_double_in_buff( char *buff, const double ival) if( !precision) precision = 3; assert( precision > 0 && precision < 20); - snprintf( format, sizeof( format), "%%%d.%dg", precision + 7, precision); + snprintf_err( format, sizeof( format), "%%%d.%dg", precision + 7, precision); } for( i = precision; i; i--) low_end *= 10.; @@ -313,7 +314,7 @@ char *put_double_in_buff( char *buff, const double ival) { char *tptr; - sprintf( buff, format, ival); + snprintf_err( buff, 20, format, ival); while( (tptr = strchr( buff, 'e')) != NULL && tptr[2] == '0') { /* remove a leading zero from exponent */ @@ -322,7 +323,7 @@ char *put_double_in_buff( char *buff, const double ival) } } else - sprintf( buff, "%*ld", precision + 7, (long)ival); + snprintf_err( buff, 20, "%*ld", precision + 7, (long)ival); while( *buff == ' ') buff++; return( buff); @@ -403,11 +404,11 @@ double dump_monte_data_to_file( FILE *ofile, const double *sigmas, { char zbuff[40]; - sprintf( zbuff, "%.8f", sigmas[i]); + snprintf_err( zbuff, sizeof( zbuff), "%.8f", sigmas[i]); remove_insignificant_digits( zbuff); if( strlen( zbuff) == 10) /* very low value */ put_double_in_buff( zbuff, sigmas[i]); - sprintf( tbuff, "%10s", zbuff); + snprintf_err( tbuff, sizeof( tbuff), "%10s", zbuff); } else put_double_in_buff( tbuff, sigmas[i]); From 7ad98a950e50c1e49825a803afe15c3442d2ee32 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 18 Dec 2022 17:30:33 -0500 Subject: [PATCH 036/634] On cleanup with ten parameters (comet A1/A2/A3/DT model), we accessed a NULL pointer and segfaulted. Basically just should have checked for cleanup at the top, instead of waiting until a few instructions had been run. --- orb_func.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/orb_func.cpp b/orb_func.cpp index cd75bce4..1fb5408d 100644 --- a/orb_func.cpp +++ b/orb_func.cpp @@ -2693,6 +2693,16 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, const bool saved_fail_on_hitting_planet = fail_on_hitting_planet; + if( !obs) + { + if( eigenvects) + { + free( eigenvects); + eigenvects = NULL; + } + *delta_vals = 0.; + return( 0); + } perturbers_automatically_found = always_included_perturbers; if( asteroid_mass) /* If computing an asteroid mass, */ { /* be very sure that asteroids are */ @@ -2707,16 +2717,6 @@ int full_improvement( OBSERVE FAR *obs, int n_obs, double *orbit, if( n_orbit_params == 10 && !orbit[6] && !orbit[7] && !orbit[8]) n_params--; /* don't try to solve for DT if we */ } /* don't have approx A1, A2, A3 yet */ - if( !obs) - { - if( eigenvects) - { - free( eigenvects); - eigenvects = NULL; - } - *delta_vals = 0.; - return( 0); - } if( get_idx1_and_idx2( n_obs, obs, &i, &j) < 3) return( -1); if( is_unreasonable_orbit( orbit)) From a1a094fd6592f80ab41a092c08fddffecc9a0145 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 20 Dec 2022 16:38:34 -0500 Subject: [PATCH 037/634] Added (M39) AUTH Observatory in Thessaloniki, Greece --- ObsCodes.htm | 1 + geo_rect.txt | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ObsCodes.htm b/ObsCodes.htm index 89b9d181..ef710711 100644 --- a/ObsCodes.htm +++ b/ObsCodes.htm @@ -2006,6 +2006,7 @@ M35 26.616690.688654+0.722734PS Observatory, Parjol M36 13.796470.699732+0.712090Opicina, Trieste M37 13.912430.696956+0.714892Astronomsko drustvo Nanos, Ajdovscina +M39 22.958880.760013+0.647750AUTH Observatory, Thessaloniki M40 31.827080.867372+0.496143OSTS-NRIAG, Kottamia M41 39.258270.930706+0.364567Jeddah M42 54.6708 0.90990 +0.41343 Emirates Observatory, Al Rahba diff --git a/geo_rect.txt b/geo_rect.txt index 7355e3af..88b52037 100644 --- a/geo_rect.txt +++ b/geo_rect.txt @@ -531,3 +531,5 @@ 83.1 40.25 75.5 36.82783 China 48.91598 28.00444 38.53502 19.0 Saudi Arabia 13.77782 45.59625 13.82731 45.70754 Italy + 25.20360 39.99416 21.48397 40.83096 Greece + 22.93616 40.77475 25.97215 41.18959 Greece From 115f46ff758976531002af9f4a7bc35f0d3b4bad Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 20 Dec 2022 16:39:50 -0500 Subject: [PATCH 038/634] 'put_double_in_buff' failed with NaN values --- monte0.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monte0.cpp b/monte0.cpp index 978351c9..6ff213ba 100644 --- a/monte0.cpp +++ b/monte0.cpp @@ -299,6 +299,11 @@ char *put_double_in_buff( char *buff, const double ival) int i; double low_end = .999999; + if( isnan( ival)) + { + strcpy( buff, "NaN"); + return( buff); + } if( !precision) { precision = atoi( get_environment_ptr( "FULL_SIGMAS")); From fa9e1859aa53e7ccc0b4bd9f5fb21c1f677121a6 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Tue, 20 Dec 2022 16:42:23 -0500 Subject: [PATCH 039/634] Revised display of non-gravs with sigmas so that, for example, -6.093e-11 +/- 6.72e-12 would be shown in the more common and readable form (-60.93 +/- 6.72)e-12. --- elem_out.cpp | 59 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 44 insertions(+), 15 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index 4a1db7c2..ec80b02a 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -1577,6 +1577,36 @@ static bool _include_comment( const char *keyval) return( !strstr( get_environment_ptr( "COMMENT_SHUTOFF"), keyval)); } + +static void format_value_with_sigma( char *obuff, const double value, const char *sigma_text) +{ + const char *eptr = strchr( sigma_text, 'e'); + + if( !eptr) + { + put_double_in_buff( obuff, value); + strlcat_err( obuff, " +/- ", 80); + strlcat_err( obuff, sigma_text, 80); + } + else + { + const char *decimal_ptr = strchr( sigma_text, '.'); + const int exponent = atoi( eptr + 1); + int places = 0; + char format[20], output_value[30]; + + if( decimal_ptr) + places = (int)( eptr - decimal_ptr) - 1; + assert( places >= 0 && places < 10); + strlcpy_error( format, "(%.?f +/- %s)e%s"); + format[3] = '0' + places; + memcpy( output_value, sigma_text, eptr - sigma_text); + output_value[eptr - sigma_text] = '\0'; + snprintf_err( obuff, 80, format, value * pow( 0.1, (double)exponent), + output_value, eptr + 1); + } +} + /* From an e-mail from Alan Harris: "...the formula for encounter velocity (in FORTRAN), for a circular planet @@ -1985,7 +2015,6 @@ int write_out_elements_to_file( const double *orbit, if( (n_orbit_params >= 8 && n_orbit_params <= 10) || force_model == FORCE_MODEL_YARKO_A2) { - char tbuff0[80], sig_name[20]; int j = 0; if( !strcmp( constraints, "A=0") || !strcmp( constraints, "A1=0")) @@ -1994,38 +2023,38 @@ int write_out_elements_to_file( const double *orbit, tt_ptr += strlen( tt_ptr); for( ; j < n_orbit_params - 6; j++) { + char addenda[50]; + char tbuff0[80], sig_name[20]; + put_double_in_buff( tbuff0, orbit[j + 6]); text_search_and_replace( tbuff0, " ", ""); strlcat_error( tbuff0, " "); snprintf_err( sig_name, sizeof( sig_name), "Sigma_A%d:", j + 1); if( showing_sigmas) if( !get_uncertainty( sig_name, sigma_buff + 4, false)) - strlcat_error( tbuff0, sigma_buff); -/* snprintf_append( tt_ptr, 180, "A%d: %s", j + 1, tbuff0); */ + format_value_with_sigma( tbuff0, orbit[j + 6], sigma_buff + 4); if( j == 3) - snprintf_append( buff, sizeof( buff), "DT: %s", tbuff0); + snprintf_err( addenda, sizeof( addenda), "DT: %s", tbuff0); else { const int n_to_use = (force_model == FORCE_MODEL_YARKO_A2 ? 2 : j + 1); - snprintf_append( buff, sizeof( buff), "A%d: %s", n_to_use, tbuff0); + snprintf_err( addenda, sizeof( addenda), "A%d: %s", n_to_use, tbuff0); if( j == n_orbit_params - 7 || j == 2) { - strcat( tt_ptr, " AU/day^2"); + strlcat_error( addenda, " AU/day^2"); if( is_inverse_square_force_model( )) - strcat( tt_ptr, " [1/r^2]"); + strlcat_error( addenda, " [1/r^2]"); } } - if( j < n_orbit_params - 7) + if( strlen( addenda) + strlen( tt_ptr) > 75) { - if( strlen( tt_ptr) > 50) - { - strlcat_err( tt_ptr, "\n", 80); - tt_ptr += strlen( tt_ptr); - } - else - strlcat_err( tt_ptr, " ", 80); + strlcat_err( tt_ptr, "\n", 79); + tt_ptr += strlen( tt_ptr); } + else if( *tt_ptr) + strlcat_err( tt_ptr, " ", 79); + strlcat_err( tt_ptr, addenda, 79); } } assert( strlen( buff) < sizeof( buff) - 1); From 38d8369ddbc83125a109eb3e4aa6cce4d6742cf7 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 25 Dec 2022 18:24:21 -0500 Subject: [PATCH 040/634] A minimal suborbital orbit (basically, a thrown ball) will have TLEs with about 45 revolutions/day. For anything above that, don't write out a TLE. --- elem2tle.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elem2tle.cpp b/elem2tle.cpp index 8a181646..222cbf59 100644 --- a/elem2tle.cpp +++ b/elem2tle.cpp @@ -100,9 +100,13 @@ int write_tle_from_vector( char *buff, const double *state_vect, { tle_t tle; int rval = 0; + double revs_per_day; memset( &tle, 0, sizeof( tle_t)); rval = vector_to_tle( &tle, state_vect, epoch); + revs_per_day = tle.xno * minutes_per_day / (2. * PI); + if( revs_per_day > 50.) /* meaningless suborbital TLE */ + rval = -1; if( !rval) { if( norad_desig) From 5db84e06b8235ebd7187b8b93ebf27116a49d33a Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 25 Dec 2022 18:25:38 -0500 Subject: [PATCH 041/634] See preceding commit : if write_tle_from_vector() returns an error code, we shouldn't write a TLE to the elements.txt file. --- elem_out.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index ec80b02a..81bfd432 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -2254,11 +2254,11 @@ int write_out_elements_to_file( const double *orbit, observation_summary_data( tbuff, obs, n_obs, options); fprintf( ofile, "%s\n", tbuff); if( elem.central_obj == 3 && elem.ecc < .99 && _include_comment( "TLE")) - { - write_tle_from_vector( tbuff, rel_orbit, elem.epoch, NULL, NULL); - tbuff[69] = tbuff[140] = '\0'; - fprintf( ofile, "# %s\n# %s\n", tbuff, tbuff + 71); - } + if( !write_tle_from_vector( tbuff, rel_orbit, elem.epoch, NULL, NULL)) + { + tbuff[69] = tbuff[140] = '\0'; + fprintf( ofile, "# %s\n# %s\n", tbuff, tbuff + 71); + } if( !(options & ELEM_OUT_NO_COMMENT_DATA)) { double orb[6]; From a11ed73881555ea4261ee6011e9a0d2146d2474e Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 25 Dec 2022 18:34:26 -0500 Subject: [PATCH 042/634] Three new obscodes --- ObsCodes.htm | 3 +++ geo_rect.txt | 1 + 2 files changed, 4 insertions(+) diff --git a/ObsCodes.htm b/ObsCodes.htm index ef710711..64a0220f 100644 --- a/ObsCodes.htm +++ b/ObsCodes.htm @@ -2041,6 +2041,7 @@ O48 101.181540.903223+0.428442Purple Mountain Observatory, Yaoan (0.8-m) O49 101.181110.903206+0.428474Purple Mountain Observatory, Yaoan Station O50 101.439420.998617+0.052565Hin Hua Observatory, Klang +O51 101.278690.975556+0.218996Akin Observatory, Rayong O68 105.330900.793121+0.607347LW-2, NAOC-Zhongwei O72 106.334760.672017+0.738399OWL-Net, Songino O75 107.051800.672284+0.738151ISON-Hureltogoot Observatory @@ -2061,6 +2062,7 @@ P65 127.375680.805889+0.590124OWL-Net, Daedeok P66 127.446750.824763+0.563603Deokheung Optical Astronomy Observatory P67 127.7415 0.79040 +0.61057 Kangwon National University Observatory +P71 128.761080.815026+0.577520Miryang Arirang Astronomical Observatory P72 128.975950.808423+0.586939OWL-Net, Mt. Bohyun P73 129.0820 0.81744 +0.57412 BSH Byulsem Observatory, Busan P87 132.094190.830358+0.555374Hirao Observatory, Yamaguchi @@ -2218,6 +2220,7 @@ W32 277.237500.834222+0.549619Crawfordville Observatory W33 277.834510.819315+0.571499Transit Dreams Observatory, Campobello W34 277.8453 0.81784 +0.57360 Squirrel Valley Observatory, Columbus +W35 278.039100.856610+0.514230Buffalo Creek Observatory, Nahunta W38 278.585310.807479+0.588163Dark Sky Observatory, Boone W42 279.465690.885511+0.463056Mind's Eye Observatory, Vero Beach W46 280.411920.818614+0.572448Foxfire Village diff --git a/geo_rect.txt b/geo_rect.txt index 88b52037..5bf9ea1b 100644 --- a/geo_rect.txt +++ b/geo_rect.txt @@ -533,3 +533,4 @@ 13.77782 45.59625 13.82731 45.70754 Italy 25.20360 39.99416 21.48397 40.83096 Greece 22.93616 40.77475 25.97215 41.18959 Greece + 99.7 17.4 102.3 11.0 Thailand From f3e9e43e2d9bdb9cd876b72e4be24e91e1f46a43 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Sun, 25 Dec 2022 18:35:02 -0500 Subject: [PATCH 043/634] Neglected to greenlight (V00) Kitt Peak-Bok (a CSS scope) --- environ.def | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environ.def b/environ.def index 6f05820b..bf4767e0 100644 --- a/environ.def +++ b/environ.def @@ -72,7 +72,7 @@ OBSERVATION_DATE_RANGE=1100,2300 example, means that NEOCP observations from (J13) with program code '#' will be shown unredacted. GREENLIT=033 291 568 595 670 671 691 703 718 970 C95 G58 G96 H01 H41 H43 -GREENLIT2=H45 I41 I52 I81 I93 J69 J95 K80 T05* T08* U52 V03 V06 V11 Y00 +GREENLIT2=H45 I41 I52 I81 I93 J69 J95 K80 T05* T08* U52 V00 V03 V06 V11 Y00 GREENLIT3=Z37 Z48 Z80 851:0 H06:q I22:2 I89:; J13:# U69:| Q62:d We default to assuming that no object will have an observed arc greater From 136a61aec5ce5de318cf3a3bec8bbb7b74d1bae6 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Mon, 26 Dec 2022 13:09:04 -0500 Subject: [PATCH 044/634] The '-r' (observation date range command line argument) switch was broken. You'd set the desired range, only to see it superseded by whatever was set in 'environ.dat'. --- elem_out.cpp | 13 ++++++++----- mpc_obs.cpp | 11 +++++------ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/elem_out.cpp b/elem_out.cpp index 81bfd432..43502f8d 100644 --- a/elem_out.cpp +++ b/elem_out.cpp @@ -3908,7 +3908,8 @@ int get_defaults( ephem_option_t *ephemeris_output_options, int *element_format, const char *ephem_bitstring = get_environment_ptr( "EPHEM_OPTIONS"); const char *eop_filename = get_environment_ptr( "EOP_FILE"); const char *albedo = get_environment_ptr( "OPTICAL_ALBEDO"); - const char *obs_range = get_environment_ptr( "OBSERVATION_DATE_RANGE"); + extern double minimum_observation_jd; + extern double maximum_observation_jd; const char *outlier_limit = get_environment_ptr( "OUTLIER_REJECTION_LIMIT"); #if !defined( _WIN32) && !defined( __WATCOMC__) @@ -3987,12 +3988,14 @@ int get_defaults( ephem_option_t *ephemeris_output_options, int *element_format, sscanf( get_environment_ptr( "PERTURBERS"), "%x", &always_included_perturbers); if( *albedo) optical_albedo = atof( albedo); - if( *obs_range) + if( !maximum_observation_jd) /* hasn't already been set elsewhere */ { - extern double minimum_observation_jd; /* default 1100 Jan 1 */ - extern double maximum_observation_jd; /* default 2300 Jan 1 */ + const char *obs_range = get_environment_ptr( "OBSERVATION_DATE_RANGE"); + int n_found; - const int n_found = sscanf( obs_range, "%lf,%lf", + if( !*obs_range) + obs_range = "1100,2300"; + n_found = sscanf( obs_range, "%lf,%lf", &minimum_observation_jd, &maximum_observation_jd); /* see environ.def */ assert( n_found == 2); diff --git a/mpc_obs.cpp b/mpc_obs.cpp index 99634d84..a852ec56 100644 --- a/mpc_obs.cpp +++ b/mpc_obs.cpp @@ -185,13 +185,12 @@ static void remove_html_tags( char *buff) } /* By default, Find_Orb will ignore observations before 1100 AD or after -2300 AD. I've never seen data _nearly_ as far back as that, and while -people do test extrapolated observations, I don't think anybody goes out -past 2200 AD. If they do, both 'fo' and interactive Find_Orb provide -command line switches to reset the following values. */ +2300 AD. This range can be reset at runtime (see the '-r' option in +findorb.cpp) or as a configuration parameter (see OBSERVATION_DATE_RANGE +in environ.dat). */ -double minimum_observation_jd = 2122832.5; /* 1100 Jan 1 */ -double maximum_observation_jd = 2561117.5; /* 2300 Jan 1 */ +double minimum_observation_jd = 0.; +double maximum_observation_jd = 0; static bool is_in_range( const double jd) { From d063124a734ca029745069e283a27766f3e2a2c2 Mon Sep 17 00:00:00 2001 From: Bill-Gray Date: Mon, 26 Dec 2022 13:10:49 -0500 Subject: [PATCH 045/634] Updated observatory links, and added a link for an observer --- ObsCodesF.html | 284 ++++++++++++++++++++++++++++++++++++++----------- observer.txt | 1 + 2 files changed, 221 insertions(+), 64 deletions(-) diff --git a/ObsCodesF.html b/ObsCodesF.html index 9c5c1baf..2e11ddb9 100644 --- a/ObsCodesF.html +++ b/ObsCodesF.html @@ -16,7 +16,7 @@ astrometric observations and orbits of minor planets (asteroids) and comets."> @@ -53,8 +53,8 @@

The International Astronomical Union Minor Planet C @@ -87,16 +87,17 @@

The International Astronomical Union Minor Planet C
  • MPECs
  • NEO Confirmation
  • Possible Comet Confirmation
  • +
  • Report Cometary Activity
  • Orbital Elements +
  • Publications Overview
  • -
  • Publications Archive
  • +
  • Publications Archive
  • NEO Services
  • + +
  • Observations + +
  • +
  • Other Observer Services
  • + +
  • Identifications + +
  • +
  • Orbits/Observations Database
  • Light Curve Database
  • @@ -130,8 +150,11 @@

    The International Astronomical Union Minor Planet C +
  • Artificial Satellites
  • +
  • Submit Action Code
  • +
  • Other
  • + +
  • Lists and Plots --> -
  • Observatory Codes
  • +
  • Observatory Codes
  • Animations
  • - +
  • MPC Status
  • 2014-18 NEO Obs Statistics
  • Summary of Latest Data
  • +
  • Deprecated Webpages
  • DATA @@ -168,7 +192,7 @@

    The International Astronomical Union Minor Planet C
  • IAWN
  • BETA
  • -
  • STATUS
  • +
  • STATUS
  • SBN ANNEX
  • @@ -263,10 +287,10 @@

    List Of Observatory Codes

    050 18.0582 0.51118 +0.85660 Stockholm (before 1931) 051 18.4766 0.83055 -0.55508 Royal Observatory, Cape of Good Hope 052 18.3083 0.51224 +0.85597 Stockholm-Saltsjöbaden -053 18.9642 0.67688 +0.73373 Konkoly Observatory, Budapest (since 1934) +053 18.9642 0.67688 +0.73373 Konkoly Observatory, Budapest (since 1933) 054 11.6654 0.56595 +0.82169 Brorfelde 055 19.9596 0.64321 +0.76316 Cracow -056 20.2450 0.65501 +0.75346 Skalnaté Pleso +056 20.23418 0.655001 +0.753470 Skalnaté Pleso 057 20.5133 0.71074 +0.70116 Belgrade 058 20.4950 0.57897 +0.81262 Kaliningrad 059 20.2201 0.65500 +0.75364 Lomnický Štít @@ -309,12 +333,12 @@

    List Of Observatory Codes

    096 9.4283 0.69967 +0.71215 Merate 097 34.7625 0.86165 +0.50608 Wise Observatory, Mitzpeh Ramon 098 11.56900 0.697916 +0.714090 Asiago Observatory, Cima Ekar -099 25.53 0.483 +0.873 Lahti -100 24.13 0.462 +0.884 Ähtäri +099 25.53529 0.484073 +0.872114 Lahti +100 24.14145 0.461165 +0.884370 Ähtäri 101 36.2322 0.64403 +0.76246 Kharkov 102 36.75953 0.564841 +0.822468 Zvenigorod 103 14.52774 0.695365 +0.716346 Ljubljana -104 10.8042 0.71985 +0.69202 San Marcello Pistoiese +104 10.80375 0.719842 +0.692040 San Marcello Pistoiese 105 37.5706 0.56403 +0.82302 Moscow 106 14.0711 0.69662 +0.71519 Črni Vrh 107 11.0030 0.70998 +0.70186 Cavezzo @@ -325,7 +349,7 @@

    List Of Observatory Codes

    112 10.9039 0.70232 +0.70950 Pleiade Observatory, Verona 113 13.0166 0.63502 +0.77001 Volkssternwarte Drebach, Schoenbrunn 114 41.4277 0.72489 +0.68702 Engelhardt Observatory, Zelenchukskaya Station -115 41.4416 0.72492 +0.68699 Zelenchukskaya +115 41.44067 0.725004 +0.686912 Zelenchukskaya 116 11.5958 0.66893 +0.74094 Giesing 117 11.5385 0.66897 +0.74092 Sendling 118 17.2740 0.66558 +0.74394 Astronomical and Geophysical Observatory, Modra @@ -336,7 +360,7 @@

    List Of Observatory Codes

    123 44.2917 0.76352 +0.64398 Byurakan 124 2.2550 0.72534 +0.68612 Castres 125 44.78950 0.747594 +0.662026 Tbilisi -126 9.7903 0.71893 +0.69283 Monte Viseggi +126 9.7903 0.71893 +0.69283 Monte Viseggi 127 6.9797 0.63385 +0.77088 Bornheim 128 46.00661 0.623279 +0.779393 Saratov 129 45.92 0.777 +0.628 Ordubad @@ -370,7 +394,7 @@

    List Of Observatory Codes

    157 12.8117 0.74166 +0.66864 Frasso Sabino 158 7.6033 0.69871 +0.71333 Promiod 159 10.5153 0.72065 +0.69115 Monte Agliale -160 10.84144 0.722651 +0.688913 Castelmartini +160 10.84144 0.722651 +0.688913 Castelmartini 161 8.1605 0.70725 +0.70467 Cerrina Tololo Observatory 162 15.7805 0.75988 +0.64808 Potenza 163 6.1492 0.65017 +0.75731 Roeser Observatory, Luxembourg @@ -456,7 +480,7 @@

    List Of Observatory Codes

    243 9.4130 0.59572 +0.80050 Umbrella Observatory, Fredenbeck 244 0.00000 0.000000 0.000000 Geocentric Occultation Observation 245 Spitzer Space Telescope -246 14.2881 0.65922 +0.74965 Kleť Observatory-KLENOT +246 14.28476 0.659216 +0.749664 Kleť Observatory-KLENOT 247 Roving Observer 248 0.00000 0.000000 0.000000 Hipparcos 249 SOHO @@ -477,6 +501,9 @@

    List Of Observatory Codes

    267 204.53044 0.941705 +0.337234 New Horizons KBO Search-CFHT 268 289.30803 0.875516 -0.482342 New Horizons KBO Search-Magellan/Clay 269 289.30914 0.875510 -0.482349 New Horizons KBO Search-Magellan/Baade +270 Unistellar Network, Roving Observer +274 James Webb Space Telescope +275 Non-geocentric Occultation Observation 276 20.38279 0.608295 +0.791076 Pło{ń}sk 277 356.8175 0.56158 +0.82467 Royal Observatory, Blackford Hill, Edinburgh 278 116.4494 0.76818 +0.63809 Peking, Transit of Venus site @@ -489,7 +516,7 @@

    List Of Observatory Codes

    285 2.3708 0.66135 +0.74759 Flammarion Observatory, Juvisy 286 102.7883 0.90694 +0.42057 Yunnan Observatory 290 250.10799 0.842743 +0.537438 Mt. Graham-VATT -291 248.4009 0.84947 +0.52647 LPL/Spacewatch II +291 248.40024 0.849471 +0.526470 LPL/Spacewatch II 292 285.1058 0.76630 +0.64033 Burlington, New Jersey 293 285.5899 0.76936 +0.63668 Burlington remote site 294 285.8467 0.76031 +0.64739 Astrophysical Obs., College of Staten Island @@ -662,7 +689,7 @@

    List Of Observatory Codes

    478 3.0896 0.72548 +0.68597 Lamalou-les-Bains 479 6.0505 0.73020 +0.68096 Sollies-Pont 480 0.7733 0.61466 +0.78616 Cockfield -481 7.93 0.596 +0.800 Moorwarfen +481 7.93067 0.595365 +0.800771 Moorwarfen 482 357.1854 0.55560 +0.82866 St. Andrews 483 173.8036 0.74734 -0.66254 Carter Observatory, Black Birch Station 484 174.7594 0.75191 -0.65706 Happy Valley, Wellington @@ -749,15 +776,15 @@

    List Of Observatory Codes

    565 10.1344 0.70437 +0.70746 Bassano Bresciano 566 203.7424 0.93623 +0.35156 Haleakala-NEAT/GEODSS 567 12.7117 0.69783 +0.71387 Chions -568 204.5278 0.94171 +0.33725 Mauna Kea +568 204.5278 0.94171 +0.33725 Maunakea 569 24.9587 0.49891 +0.86375 Helsinki 570 25.2990 0.5794 +0.8123 Vilnius (since 1939) 571 10.63 0.704 +0.708 Cavriana 572 6.89 0.631 +0.772 Cologne 573 9.6612 0.6145 +0.7862 Eldagsen -574 10.27 0.704 +0.708 Gottolengo +574 10.2667 0.70463 +0.70721 Gottolengo 575 6.808 0.68219 +0.72894 La Chaux de Fonds -576 0.38 0.631 +0.774 Burwash +576 0.3760 0.63067 +0.77346 Burwash 577 7.50 0.678 +0.734 Metzerlen Observatory 578 27.99 0.898 -0.439 Linden Observatory 579 8.85 0.711 +0.701 Novi Ligure @@ -878,7 +905,7 @@

    List Of Observatory Codes

    694 248.9943 0.84700 +0.53009 Tumamoc Hill, Tucson 695 248.40533 0.849504 +0.526425 Kitt Peak 696 249.1154 0.85205 +0.52249 Whipple Observatory, Mt. Hopkins -697 248.3842 0.84956 +0.52629 Kitt Peak, McGraw-Hill +697 248.38381 0.849546 +0.526308 Kitt Peak, McGraw-Hill 698 249.26736 0.845316 +0.533212 Mt. Bigelow 699 248.46331 0.819380 +0.571930 Lowell Observatory-LONEOS 700 250.3817 0.80656 +0.58960 Chinle @@ -937,7 +964,7 @@

    List Of Observatory Codes

    753 270.59069 0.731622 +0.679491 Washburn Observatory, Madison 754 271.4432 0.73762 +0.67303 Yerkes Observatory, Williams Bay 755 274.6478 0.73353 +0.67743 Optec Observatory -756 272.3257 0.74361 +0.66641 Dearborn Observatory, Evanston +756 272.32567 0.743605 +0.666407 Dearborn Observatory, Evanston (bef. July~1939) 757 280.0050 0.8096 +0.5851 High Point 758 279.2379 0.88044 +0.47257 BCC Observatory, Cocoa 759 273.1947 0.80946 +0.58530 Nashville @@ -949,7 +976,7 @@

    List Of Observatory Codes

    765 275.5775 0.77669 +0.62784 Cincinnati 766 275.5167 0.73600 +0.67477 Michigan State University Obs., East Lansing 767 276.2697 0.74102 +0.66930 Ann Arbor -768 272.32500 0.743590 +0.666435 Dearborn Observatory +768 272.32488 0.743585 +0.666430 Dearborn Observatory, Evanston (aft. Oct.~1939) 769 276.9892 0.76716 +0.63936 McMillin Observatory, Columbus 770 274.0786 0.77573 +0.62900 Crescent Moon Observatory, Columbus 771 277.57 0.922 +0.389 Boyeros Observatory, Havana @@ -1032,7 +1059,7 @@

    List Of Observatory Codes

    848 237.0219 0.72412 +0.68741 Tenagra Observatory, Cottage Grove 849 265.1694 0.77927 +0.62467 Everstar Observatory, Olathe 850 274.0802 0.81810 +0.57333 Cordell-Lorenz Observatory, Sewanee -851 296.4189 0.71284 +0.69900 Burke-Gaffney Observatory, Halifax +851 296.41962 0.712830 +0.698986 Burke-Gaffney Observatory, Halifax 852 269.4050 0.7805 +0.6231 River Moss Observatory, St. Peters 853 249.1517 0.84365 +0.53544 Biosphere 2 Observatory 854 249.17995 0.846183 +0.531351 Sabino Canyon Observatory, Tucson @@ -1051,7 +1078,7 @@

    List Of Observatory Codes

    867 134.1222 0.81671 +0.57522 Saji Observatory 868 135.1359 0.83066 +0.55492 Hidaka Observatory 869 133.4298 0.83480 +0.54870 Tosa -870 313.17 0.934 -0.359 Campiñas +870 313.17411 0.921798 -0.386786 Campiñas 871 134.3925 0.82256 +0.56678 Akou 872 134.2411 0.82904 +0.55734 Tokushima 873 133.7717 0.82410 +0.56455 Kurashiki Observatory @@ -1157,7 +1184,7 @@

    List Of Observatory Codes

    973 359.6671 0.62271 +0.77983 Harrow 974 8.9220 0.71542 +0.69637 Genoa 975 359.6333 0.77292 +0.63239 Observatorio Astronomico de Valencia -976 358.48 0.612 +0.788 Leamington Spa +976 358.4669 0.61258 +0.78778 Leamington Spa 977 351.5483 0.58660 +0.80717 Markree 978 357.24541 0.588685 +0.805673 Conder Brow 979 358.6697 0.62896 +0.77485 South Wonston @@ -1258,7 +1285,7 @@

    List Of Observatory Codes

    A74 8.76240 0.641951 +0.764216 Bergen-Enkheim Observatory A75 2.1861 0.75124 +0.65783 Fort Pius Observatory, Barcelona A76 20.8356 0.66948 +0.74037 Andromeda Observatory, Miskolc -A77 5.6475 0.72058 +0.69119 Observatoire Chante-Perdrix, Dauban +A77 5.64693 0.720583 +0.691196 Observatoire Chante-Perdrix, Dauban A78 11.71509 0.730944 +0.680264 Stia A79 23.84340 0.743686 +0.666622 Zvezdno Obshtestvo Observatory, Plana A80 14.1222 0.61408 +0.78662 Lindenberg Observatory @@ -1439,6 +1466,7 @@

    List Of Observatory Codes

    C55 Kepler C56 LISA-Pathfinder C57 TESS +C59 Yangwang-1 C60 7.06926 0.634261 +0.770545 Argelander Institute for Astronomy Obs., Bonn C61 2.58202 0.658892 +0.749723 Chelles C62 11.3467 0.68967 +0.72175 Eurac Observatory, Bolzano @@ -1494,10 +1522,11 @@

    List Of Observatory Codes

    D12 11.33806 0.690580 +0.720900 Filzi School Observatory, Laives D13 11.56369 0.738665 +0.671859 Cat's Eye Observatory D14 113.3231 0.92000 +0.39061 Nanchuan Observatory, Guangzhou +D15 11.31781 0.630848 +0.773359 Sternwarte F.Schiller-Gymnasium, Weimar D16 113.96422 0.925155 +0.378330 Po Leung Kuk Observatory, Tuen Mun D17 114.2200 0.9245 +0.3799 Hong Kong D18 114.3580 0.86219 +0.50490 Mt. Guizi Observatory -D19 114.32300 0.924955 +0.378843 Hong Kong Space Museum, Tsimshatsui +D19 114.32300 0.924955 +0.378843 Hong Kong Space Museum Sai Kung iObservatory D20 115.71311 0.854733 -0.517343 Zadko Observatory, Wallingup Plain D21 115.8150 0.8492 -0.5263 Shenton Park D22 115.81667 0.849044 -0.526558 UWA Observatory, Crawley @@ -1549,7 +1578,7 @@

    List Of Observatory Codes

    E07 148.99889 0.820544 -0.569830 Murrumbateman E08 149.33431 0.855971 -0.515472 Wobblesock Observatory, Coonabarabran E09 149.0814 0.85551 -0.51630 Oakley Southern Sky Observatory, Coonabarabran -E10 149.07028 0.855623 -0.516200 Siding Spring-Faulkes Telescope South +E10 149.07085 0.855632 -0.516198 Siding Spring-Faulkes Telescope South E11 149.6627 0.84469 -0.53362 Frog Rock Observatory, Mudgee E12 149.0642 0.85563 -0.51621 Siding Spring Survey E13 149.0969 0.81622 -0.57597 Wanniassa @@ -1567,7 +1596,7 @@

    List Of Observatory Codes

    E25 153.1170 0.88713 -0.45997 Rochedale (APTA) E26 153.3971 0.88414 -0.46566 RAS Observatory, Biggera Waters E27 153.2667 0.8871 -0.4600 Thornlands -E28 150.6411 0.83319 -0.55121 Kuriwa Observatory, Hawkesbury Heights +E28 150.64105 0.833196 -0.551210 Kuriwa Observatory, Hawkesbury Heights E81 173.2617 0.75267 -0.65622 Nelson E83 173.95703 0.749648 -0.659621 Wither Observatory, Witherlea E85 174.89400 0.800696 -0.597064 Farm Cove @@ -1578,10 +1607,16 @@

    List Of Observatory Codes

    F52 203.74409 0.936239 +0.351545 Pan-STARRS 2, Haleakala F59 201.94100 0.932037 +0.361160 Ironwood Remote Observatory, Hawaii F60 201.95283 0.929942 +0.366558 Ironwood Observatory, Hawaii -F65 203.7424 0.93624 +0.35154 Haleakala-Faulkes Telescope North +F65 203.74250 0.936239 +0.351538 Haleakala-Faulkes Telescope North F84 210.3842 0.95330 -0.30100 Hibiscus Observatory, Punaauia F85 210.3842 0.95330 -0.30100 Tiki Observatory, Punaauia F86 210.38381 0.953304 -0.301004 Moana Observatory, Punaauia +G00 15.12600 0.665508 +0.744080 AZM Martinsberg, Oed +G01 8.16528 0.600977 +0.796597 Universitaetssternwarte Oldenburg +G02 18.76539 0.653307 +0.754650 KYSUCE Observatory, Kysucke Nove Mesto +G03 18.26061 0.678620 +0.732104 Capricornus Observatory, Csokako +G04 7.14133 0.627502 +0.776082 Schuelerlabor Astronomie St. 7, Wuppertal +G05 354.53363 0.787181 +0.614802 Piconcillo, Sierra Morena G06 4.67150 0.619980 +0.781996 Dordrecht, Sterrenburg G07 3.06386 0.719394 +0.692378 Millau Observatory G08 1.99694 0.748752 +0.660794 Observatorio Les Pedritxes, Matadepera @@ -1590,9 +1625,11 @@

    List Of Observatory Codes

    G11 7.18379 0.630712 +0.773465 Breitenweg Observatory, Herkenrath G12 8.3306 0.62140 +0.78090 Sternwarte EG, Lippstadt G13 9.77169 0.451874 +0.889103 Astronomihagen, Fannrem +G14 7.00520 0.725247 +0.686239 Novaloop Observatory, Mougins +G15 9.1183 0.71116 +0.70080 Magroforte Observatory, Alessandria G16 13.34869 0.787948 +0.613701 OmegaLab Observatory, Palermo G17 11.20261 0.723508 +0.688023 BAS Observatory, Scandicci -G18 11.26383 0.712881 +0.698948 ALMO Observatory, Padulle +G18 11.28056 0.712881 +0.698947 ALMO Observatory, Padulle G19 12.7460 0.63252 +0.77202 Immanuel Kant Observatory,Limbach G20 6.05989 0.727743 +0.683615 Brignoles Observatory G21 13.73789 0.796024 +0.603377 Osservatorio Castrofilippo @@ -1656,7 +1693,7 @@

    List Of Observatory Codes

    G79 243.6165 0.82718 +0.56030 Goat Mountain Astronomical Research Station G80 240.5873 0.79904 +0.59962 Sierra Remote Observatories, Auberry G81 242.91300 0.834904 +0.548639 Temecula -G82 248.40025 0.849488 +0.526449 SARA Observatory, Kitt Peak +G82 248.40057 0.849482 +0.526455 SARA Observatory, Kitt Peak G83 250.11039 0.842740 +0.537440 Mt. Graham-LBT G84 249.21084 0.845112 +0.533610 Mount Lemmon SkyCenter G85 247.56518 0.799502 +0.599067 Vermillion Cliffs Observatory, Kanab @@ -1796,7 +1833,7 @@

    List Of Observatory Codes

    I19 295.40711 0.854834 -0.517422 Observatorio El Gato Gris, Tanti I20 295.68161 0.838551 -0.543122 Observatorio Astronomico Salvador, Río Cuarto I21 295.8281 0.85465 -0.51760 El Condor Observatory, Córdoba -I22 296.1740 0.71212 +0.69973 Abbey Ridge Observatory, Stillwater Lake +I22 296.17399 0.712120 +0.699724 Abbey Ridge Observatory, Stillwater Lake I23 292.26649 0.714173 +0.697623 Frosty Cold Observatory, Mash Harbor I24 282.2306 0.78534 +0.61702 Lake of the Woods Observatory, Locust Grove I25 295.44381 0.850887 -0.523945 ECCCO Observatory, Bosque Alegre @@ -1887,7 +1924,7 @@

    List Of Observatory Codes

    J10 359.59839 0.784437 +0.618151 Alicante J11 351.31769 0.746984 +0.662617 Matosinhos J12 356.51061 0.758248 +0.649949 Caraquiz -J13 342.1208 0.87763 +0.47851 La Palma-Liverpool Telescope +J13 342.1208 0.87763 +0.47851 La Palma-Liverpool Telescope J14 345.99281 0.880303 +0.472891 La Corte J15 352.83061 0.755420 +0.653125 Muxagata J16 354.20356 0.584292 +0.808826 An Carraig Observatory, Loughinisland @@ -1912,7 +1949,7 @@

    List Of Observatory Codes

    J35 356.02911 0.792167 +0.608432 Tucci Observatory, Martos J36 356.94519 0.765179 +0.641659 Observatorio DiezALaOnce, Illana J37 353.06469 0.796893 +0.602104 Huelva -J38 353.60890 0.726876 +0.684507 Observatorio La Vara, Valdés +J38 353.60924 0.726887 +0.684518 Observatorio La Vara, Valdés J39 344.5636 0.88429 +0.46547 Ingenio J40 355.55847 0.802546 +0.594601 Málaga J41 353.8189 0.59779 +0.79897 Raheny @@ -1931,7 +1968,7 @@

    List Of Observatory Codes

    J54 343.4906 0.88149 +0.47142 Bradford Robotic Telescope J55 344.3144 0.88549 +0.46313 Los Altos de Arguineguin Observatory J56 344.4536 0.88416 +0.46624 Observatorio La Avejerilla -J57 358.89089 0.767817 +0.638833 Centro Astronómico Alto Turia, Valencia +J57 358.89089 0.767817 +0.638833 Centro Astronómico Alto Turia, Valencia J58 356.6644 0.62304 +0.77959 Brynllefrith Observatory, Llantwit Fardre J59 356.20256 0.726956 +0.684386 Observatorio Linceo, Santander J60 354.3406 0.74773 +0.66201 Tocororo Observatory, Arquillinos @@ -1955,7 +1992,7 @@

    List Of Observatory Codes

    J78 358.8244 0.78887 +0.61253 Murcia J79 358.38066 0.795516 +0.603908 Observatorio Calarreona, Aguilas J80 359.1083 0.70862 +0.70323 Sainte Helene -J81 358.1350 0.7360 +0.6749 Guirguillano +J81 358.13489 0.735984 +0.674878 Guirguillano J82 357.3067 0.5935 +0.8021 Leyland J83 357.3883 0.59274 +0.80270 Olive Farm Observatory, Hoghton J84 358.9803 0.63144 +0.77285 South Observatory, Clanfield @@ -1974,6 +2011,7 @@

    List Of Observatory Codes

    J97 359.5333 0.7754 +0.6293 Alginet J98 359.5344 0.77275 +0.63259 Observatorio Manises J99 359.57808 0.772589 +0.632790 Burjassot +K00 8.94836 0.642630 +0.763639 Hanau K01 0.62091 0.618636 +0.783060 Astrognosis Observatory, Bradwell K02 0.66761 0.622858 +0.779718 Eastwood Observatory, Leigh on Sea K03 0.74411 0.744133 +0.665979 Observatori AAS Montsec @@ -2072,7 +2110,7 @@

    List Of Observatory Codes

    K96 16.75119 0.774870 +0.630302 Savelli Observatory K97 7.18026 0.664361 +0.745050 Freconrupt K98 17.07217 0.608205 +0.791142 6ROADS Observatory 1, Wojnowko -K99 22.45350 0.663064 +0.746102 ISON-Uzhgorod Observatory +K99 22.45350 0.663064 +0.746102 Derenivka Observatory L00 12.5375 0.74535 +0.66446 East Rome Observatory, Rome L01 13.74930 0.704742 +0.707169 Višnjan Observatory, Tican L02 20.81658 0.771051 +0.634781 NOAK Observatory, Stavraki @@ -2121,7 +2159,7 @@

    List Of Observatory Codes

    L45 15.06243 0.793975 +0.605979 ObsCT, Catania L46 356.11939 0.762017 +0.645574 Observatorio Majadahonda L47 12.50711 0.725542 +0.685961 Osservatorio Astronomico, Piobbico -L48 23.56873 0.674816 +0.735566 Baia Mare +L48 23.56873 0.674816 +0.735566 CNVL Observatory, Baia Mare L49 13.00730 0.671444 +0.738747 VEGA-Sternwarte, Dorfleiten L50 34.0114 0.71157 +0.70039 GenShtab Observatory, Nauchnij L51 34.0164 0.71169 +0.70028 MARGO, Nauchnij @@ -2160,14 +2198,51 @@

    List Of Observatory Codes

    L84 41.27989 0.695443 +0.716182 Kairos Observatory, Letnik L85 15.86325 0.766873 +0.639830 BiAnto Observatory, Lauria L86 9.2631 0.71140 +0.70062 Giordano Bruno Observatory, Brallo -L87 16.36189 0.919631 -0.392204 Moonbase South Observatory, Hakos +L87 16.36189 0.919631 -0.392204 Moonbase South Observatory, Hakos L88 16.5422 0.77721 +0.62746 Stazione Astronomica Le Pleiadi, Pantane +L89 11.14439 0.722146 +0.689445 PAO, Prato +L90 15.97949 0.784120 +0.618560 ABObservatory, Rosarno +L91 13.8078 0.74776 +0.66189 Antares MTM Observatory, S. Donato +L92 16.00211 0.781423 +0.621967 San Costantino L93 1.77221 0.752844 +0.65601 Garraf Observatory, Sant Pere de Ribes L94 354.14561 0.728187 +0.683146 Observatorio MOMA, Oviedo L95 358.95159 0.793164 +0.607000 Observatorio Astronomico de Cartagena L96 44.2745 0.76340 +0.64416 ISON-Byurakan Observatory L97 357.99161 0.624666 +0.778298 Castle Fields Observatory, Calne L98 357.43425 0.789394 +0.612232 La Sagra Observatory, Puebla de Don Fadrique +L99 30.60281 0.635913 +0.769201 Novoselki +M02 0.86386 0.754439 +0.654271 Astropriorat Observatory +M03 2.25822 0.750568 +0.658591 Badalona Boreal +M04 1.4256 0.74764 +0.66207 Pujalt Observatory, Barcelona +M09 5.60094 0.630164 +0.773882 Observatory Gromme - Oudsbergen +M10 6.85411 0.724305 +0.687343 CPF Observatory, St Vallier de Thiey +M11 5.64718 0.720589 +0.691192 Novaastro Observatory, Banon +M15 9.1506 0.70039 +0.71142 Virgo Oservatory, Seveso +M16 9.77319 0.719401 +0.692358 Osservatorio Il Coreggiolo +M17 9.80922 0.719163 +0.692525 SN1572 Tycho Observatory, La Spezia +M18 11.83939 0.639618 +0.766239 Koeditz +M19 13.88327 0.709976 +0.701881 Osservatorio Explorer, Pula +M20 13.01169 0.690044 +0.721515 Polse di Cougnes Observatory, Zuglio +M21 16.36144 0.919630 -0.392206 Schiaparelli Southern Observatory, Hakos +M22 20.81059 0.845564 -0.532612 ATLAS South Africa, Sutherland +M23 16.60350 0.679955 +0.730852 ELTE Gothard Observatory, Szombathely +M24 16.20050 0.787195 +0.614649 Ardore Marina +M25 23.8283 0.47849 +0.87517 Einarin Observatory, Tampere +M26 11.13494 0.723236 +0.688304 Zen Observatory, Scandicci +M27 10.7175 0.72743 +0.68399 Elijah Observatory, Lajatico +M28 20.81064 0.845568 -0.532607 Lesedi Telescope-SAAO Observatory, Sutherland +M29 12.24864 0.718724 +0.692984 O.M.Ni.A. Observatory, Cesena +M30 25.62000 0.700380 +0.711516 Zeta Aquarii Observatory, Brasov +M31 26.21281 0.490130 +0.868745 Ursa Havaintokeskus, Artjarvi +M32 22.70919 0.665464 +0.743964 Sunny Transcarpathian, Mukachevo +M33 34.76334 0.861632 +0.506111 OWL-Net, Mitzpe Ramon +M34 17.27363 0.665591 +0.743936 AGO70, Astronomical Observatory, Modra +M35 26.61669 0.688654 +0.722734 PS Observatory, Parjol +M36 13.79647 0.699732 +0.712090 Opicina, Trieste +M37 13.91243 0.696956 +0.714892 Astronomsko drustvo Nanos, Ajdovscina +M39 22.95888 0.760013 +0.647750 AUTH Observatory, Thessaloniki +M40 31.82708 0.867372 +0.496143 OSTS-NRIAG, Kottamia +M41 39.25827 0.930706 +0.364567 Jeddah M42 54.6708 0.90990 +0.41343 Emirates Observatory, Al Rahba M43 54.68478 0.912805 +0.407034 Al Sadeem Observatory, Abu Dhabi M44 54.92031 0.912502 +0.407722 Al-Khatim Observatory, Abu Dhabi @@ -2179,38 +2254,57 @@

    List Of Observatory Codes

    N31 74.44422 0.853321 +0.519690 Eden Astronomical Observatory, Lahore N42 76.97181 0.732126 +0.679511 Tien-Shan Astronomical Observatory N43 77.1167 0.16712 -0.98328 Plateau Observatory for Dome A, Kunlun Station +N44 77.13931 0.785023 +0.617693 Shache Station, Langan Village N50 78.96383 0.842176 +0.538692 Himalayan Chandra Telescope, IAO, Hanle N51 78.96461 0.842178 +0.538687 GROWTH India Telescope, IAO, Hanle -N55 80.02623 0.846497 +0.532089 Corona Borealis Observatory, Ngari -N56 80.02675 0.846503 +0.532073 Zijinshan-Beimian Survey, Ali +N55 80.02623 0.846497 +0.532089 Beimian Tianwentai, Ali, Tibet +N56 80.02675 0.846503 +0.532073 Jiama'erdeng Tianwentai, Ali, Tibet +N82 85.95494 0.641844 +0.764450 Multa Observatory +N83 86.23504 0.749549 +0.659927 LW-1, NAOC-Korla +N86 87.17852 0.727070 +0.684719 Xingming Observatory-KATS, Nanshan N87 87.17503 0.727076 +0.684720 Nanshan Station, Xinjiang Observatory -N88 87.17322 0.727098 +0.684697 Xingming Observatory #3, Nanshan -N89 87.17906 0.727107 +0.684682 Xingming Observatory #2, Nanshan +N88 87.17322 0.727098 +0.684697 Xingming Observatory {#}3, Nanshan +N89 87.17906 0.727107 +0.684682 Xingming Observatory {#}2, Nanshan O02 90.52614 0.866434 +0.498958 Galaxy Tibet YBJ Observatory,Yangbajing +O17 93.88669 0.783127 +0.620730 Purple Mountain Observatory, Lenghu-1 O37 98.48553 0.948521 +0.316891 TRT-NEO, Chiangmai O43 99.78111 0.994005 +0.109127 Observatori Negara, Langkawi O44 100.0310 0.89435 +0.44698 Lijiang Station, Yunnan Observatories O45 100.03261 0.894444 +0.446808 Yunnan-HK Observatory, Gaomeigu +O47 101.13415 0.902535 +0.429998 Yunling Observatory, Yunnan +O48 101.18154 0.903223 +0.428442 Purple Mountain Observatory, Yaoan (0.8-m) O49 101.18111 0.903206 +0.428474 Purple Mountain Observatory, Yaoan Station O50 101.43942 0.998617 +0.052565 Hin Hua Observatory, Klang +O51 101.27869 0.975556 +0.218996 Akin Observatory, Rayong +O68 105.33090 0.793121 +0.607347 LW-2, NAOC-Zhongwei +O72 106.33476 0.672017 +0.738399 OWL-Net, Songino O75 107.05180 0.672284 +0.738151 ISON-Hureltogoot Observatory O85 109.21300 0.826583 +0.561181 LiShan Observatory, Lintong +P07 114.08987 0.928304 -0.370597 Space Surveillance Telescope, HEH Station P18 116.61083 0.757010 +0.651328 Birch Forest Observatory, LaBaGouMen +P22 117.57588 0.762782 +0.644702 LW-3, NAOC-Xinglong P25 118.31274 0.910976 +0.411089 Kinmen Educational Remote Observatory, Jincheng P30 119.59708 0.862775 +0.504181 Jiangnantianchi Observatory, Anji P31 119.59736 0.862772 +0.504189 Starlight Observatory, Tianhuangping P34 120.32031 0.855040 +0.516826 Lvye Observatory, Suzhou P35 120.55699 0.913398 +0.405722 Cuteip Remote Observatory, Changhua P36 120.62669 0.855207 +0.516553 ULTRA Observatory,Suzhou +P37 120.63972 0.912980 +0.406672 HuiWen High School Observatory, Taichung City P40 121.53958 0.905916 +0.422185 Chinese Culture University, Taipei +P48 123.32403 0.258064 -0.963413 ASTEP, Concordia Station P64 127.00489 0.796371 +0.602805 GSHS Observatory, Suwon +P65 127.37568 0.805889 +0.590124 OWL-Net, Daedeok P66 127.44675 0.824763 +0.563603 Deokheung Optical Astronomy Observatory P67 127.7415 0.79040 +0.61057 Kangwon National University Observatory +P71 128.76108 0.815026 +0.577520 Miryang Arirang Astronomical Observatory +P72 128.97595 0.808423 +0.586939 OWL-Net, Mt. Bohyun P73 129.0820 0.81744 +0.57412 BSH Byulsem Observatory, Busan P87 132.09419 0.830358 +0.555374 Hirao Observatory, Yamaguchi P93 133.54433 0.823371 +0.565729 Space Tracking and Communications Center, JAXA Q02 135.49344 0.825315 +0.562809 Sakai Observatory, Osaka +Q10 137.32944 0.821623 +0.568142 Toyokawa Observatory Q11 137.52069 0.820236 +0.570158 Shinshiro +Q12 137.82536 0.805147 +0.591292 Nagano Observatory Q19 139.4390 0.81430 +0.57852 Machida Q21 139.85335 0.804747 +0.591654 Southern Utsunomiya Q23 140.3864 0.79654 +0.60264 Sukagawa @@ -2218,6 +2312,7 @@

    List Of Observatory Codes

    Q33 142.48278 0.715989 +0.695814 Nayoro Observatory, Hokkaido University Q38 143.5506 0.81654 -0.57538 Swan Hill Q54 147.28772 0.739290 -0.671278 Harlingten Telescope, Greenhill Observatory +Q55 149.06142 0.855643 -0.516191 SkyMapper, Siding Spring Q56 148.97642 0.821480 -0.568478 Heaven's Mirror Observatory, Yass Q57 149.06173 0.855649 -0.516175 Korea Microlensing Telescope Network-SSO Q58 149.07085 0.855632 -0.516199 Siding Spring-LCO Clamshell {#}1 @@ -2236,17 +2331,26 @@

    List Of Observatory Codes

    Q78 152.94789 0.886807 -0.460619 Woogaroo Observatory, Forest Lake Q79 152.8481 0.88871 -0.45696 Samford Valley Observatory Q80 153.2160 0.88762 -0.45904 Birkdale +Q81 153.09622 0.893194 -0.448181 Caloundra West R57 170.47278 0.720489 -0.691309 Aorangi Iti Observatory, Lake Tekapo R58 170.49039 0.697579 -0.714138 Beverly-Begg Observatory, Dunedin +R65 172.34981 0.726556 -0.684830 R. F. Joyce Observatory, Christchurch +R66 172.58761 0.726587 -0.684777 Mooray Observatory, Christchurch T03 203.74247 0.936240 +0.351538 Haleakala-LCO Clamshell {#}3 T04 203.74249 0.936241 +0.351538 Haleakala-LCO OGG B {#}2 T05 203.74299 0.936235 +0.351547 ATLAS-HKO, Haleakala T07 204.42387 0.943290 +0.332467 ATLAS-MLO Auxiliary Camera, Mauna Loa T08 204.42395 0.943290 +0.332467 ATLAS-MLO, Mauna Loa -T09 204.52398 0.941706 +0.337237 Mauna Kea-UH/Tholen NEO Follow-Up (Subaru) -T10 204.52241 0.941706 +0.337212 Submillimeter Array, Mauna Kea (SMA) -T12 204.53057 0.941729 +0.337199 Mauna Kea-UH/Tholen NEO Follow-Up (2.24-m) -T14 204.53113 0.941714 +0.337236 Mauna Kea-UH/Tholen NEO Follow-Up (CFHT) +T09 204.52398 0.941706 +0.337237 Subaru Telescope, Maunakea +T10 204.52241 0.941706 +0.337212 Submillimeter Array, Maunakea (SMA) +T11 204.53036 0.941731 +0.337198 United Kingdom Infrared Telescope, Maunakea +T12 204.53057 0.941729 +0.337199 University of Hawaii 88-inch telescope, Maunakea +T13 204.52771 0.941691 +0.337263 NASA Infrared Telescope Facility, Maunakea +T14 204.53113 0.941714 +0.337236 Canada-France-Hawaii Telescope, Maunakea +T15 204.53094 0.941727 +0.337214 Gemini North Observatory, Maunakea +T16 204.52570 0.941703 +0.337250 W. M. Keck Observatory, Keck 1, Maunakea +T17 204.52580 0.941700 +0.337256 W. M. Keck Observatory, Keck 2, Maunakea +U52 237.45111 0.749240 +0.660270 Shasta Valley Observatory, Grenada U53 237.1603 0.70274 +0.70909 Murray Hill Observatory, Beaverton U54 237.31286 0.782952 +0.620081 Hume Observatory, Santa Rosa U55 237.41456 0.653977 +0.753984 Golden Ears Observatory, Maple Ridge @@ -2262,7 +2366,9 @@

    List Of Observatory Codes

    U71 241.3633 0.82520 +0.56305 AHS Observatory, Castaic U72 241.46000 0.828150 +0.558687 Tarzana U73 241.6172 0.83164 +0.55346 Redondo Beach -U76 242.1279 0.82855 +0.55810 Glendora +U74 240.58720 0.799040 +0.599619 JPL SynTrack Robotic Telescope 2, Auberry +U75 242.18366 0.833735 +0.550383 Newport Beach +U76 242.1279 0.82855 +0.55810 Maury Lewin Observatory, Glendora U77 242.9181 0.84002 +0.54076 Rani Observatory, San Diego U78 242.8449 0.82758 +0.55989 Cedar Glen Observatory U79 242.79187 0.838837 +0.542598 Cosmos Research Center, Encinitas @@ -2271,6 +2377,8 @@

    List Of Observatory Codes

    U82 243.61519 0.827368 +0.560036 CS3-Palmer Divide Station, Landers U83 243.57311 0.841238 +0.53938 Mount Laguna Observatory U96 246.68600 0.579007 +0.812698 Athabasca University Geophysical Observatory +U97 248.33292 0.818306 +0.573452 JPL SynTrack Robotic Telescope 3, Flagstaff +U98 249.74300 0.849529 +0.526090 NAC Observatory, Benson V00 248.39981 0.849456 +0.526492 Kitt Peak-Bok V01 248.23911 0.762243 +0.645493 Mountainville Observatory, Alpine V02 248.05794 0.835743 +0.547377 Command Module, Tempe @@ -2286,26 +2394,39 @@

    List Of Observatory Codes

    V12 249.39819 0.852110 +0.522050 Elgin V13 248.78278 0.762335 +0.645641 Little Moose Observatory, Timber Lakes V14 248.78336 0.762292 +0.645691 Moose Springs Observatory, Timber Lakes +V15 249.21069 0.845110 +0.533602 OWL-Net, Mt. Lemmon V16 251.10288 0.849510 +0.526194 Dark Sky New Mexico, Animas +V17 248.98319 0.845476 +0.532429 Leo Observatory, Tucson +V18 249.6181 0.85776 +0.51308 MASTER-OAGH Observatory, Sonora V19 251.79086 0.841371 +0.539217 Whiskey Creek Observatory V20 251.77822 0.827004 +0.560943 Killer Rocks Observatory, Pie Town +V21 251.10231 0.849511 +0.526188 Cewanee Observatory at DSNM +V22 251.81550 0.827009 +0.560941 Insight Remote Observatory, Pie Town V23 252.76406 0.828722 +0.558332 FOAH Observatory, Magdalena V26 253.39020 0.911283 +0.410639 UAS-ISON Observatory, Cosala +V27 253.71819 0.811354 +0.583180 North Mesa Observatory, Los Alamos V28 254.34647 0.817018 +0.575271 Deep Sky West Observatory, Rowe V29 254.26660 0.840062 +0.541466 Tzec Maun Cloudcroft Facility V30 254.47105 0.840710 +0.540313 Heaven on Earth Observatory, Mayhill V31 254.4750 0.84061 +0.54046 Hazardous Observatory, Mayhill V32 254.47131 0.840709 +0.540308 Canvas View New Mexico Skies, Mayhill +V33 254.72039 0.806382 +0.590114 Finlaystone Observatory, Angel Fire V34 255.36992 0.778401 +0.626222 Black Forest V35 255.91881 0.861839 +0.506046 Deep Sky Observatory Collaborative, Pier 5 V36 255.61742 0.843042 +0.536333 The Ranch Observatory, Lakewood V37 255.98483 0.861053 +0.507428 McDonald Observatory-LCO ELP V38 255.98493 0.861051 +0.507431 McDonald Observatory-LCO ELP Aqawan A {#}1 V39 255.98452 0.861051 +0.507430 McDonald Observatory-LCO ELP B +V40 255.91873 0.861839 +0.506046 Divine Creation Observatory, Fort Davis +V41 256.72578 0.719992 +0.691890 Rapid City +V58 260.73497 0.868735 +0.493762 Medina Dome, Medina V59 261.0734 0.86642 +0.49781 Millwood Observatory, Comfort V60 261.09473 0.862140 +0.505126 Putman Mountain Observatory V61 261.05710 0.858216 +0.511725 Shed of Science South, Pontotoc +V62 261.05661 0.858216 +0.511726 Live Oak Observatory, Pontotoc +V63 261.05728 0.858219 +0.511721 Tara Observatory, Cherokee V70 263.33572 0.870056 +0.491332 Starry Night Observatory, Columbus +V72 263.89011 0.752696 +0.656235 JDP Observatory, Omaha V74 264.15689 0.869320 +0.492598 Katy Observatory, Katy V78 265.10780 0.700141 +0.711688 Spirit Marsh Observatory. Sauk Centre V81 265.7604 0.80902 +0.58590 Fayetteville @@ -2316,29 +2437,48 @@

    List Of Observatory Codes

    V94 268.66169 0.759876 +0.647933 Cherokeeridge Observatory, Fort Madison W04 271.00944 0.761606 +0.645927 Mark Evans Observatory, Bloomington W08 271.88331 0.747086 +0.662545 Jimginny Observatory, Naperville +W09 272.14753 0.752886 +0.655985 Willowed Plains Observatory, Manteno W11 272.6247 0.75272 +0.65618 Northwest Indiana Robotic Telescope, Lowell W14 273.24511 0.821914 +0.567774 Harvest +W15 273.19083 0.810875 +0.583314 Wayne Observatory, Franklin W16 273.76869 0.822976 +0.566292 Pleasant Groves Observatory +W18 274.24962 0.767039 +0.639505 Red Fox Observatory, Pendleton W19 274.37283 0.740783 +0.669559 Kalamazoo W22 275.00447 0.844595 +0.533635 WestRock Observatory, Columbus +W23 275.38019 0.772786 +0.632594 Hevonen Farm Observatory, Oxford +W24 275.23817 0.722574 +0.689025 Shamrock Banks Observatory, Clare W25 275.63506 0.776417 +0.628165 RMS Observatory, Cincinnati W28 276.3883 0.83011 +0.55581 Ex Nihilo Observatory, Winder +W29 276.9939 0.76659 +0.64004 Adena Brook Observatory, Columbus W30 276.77117 0.838735 +0.542749 Georgia College Observatory, Milledgeville W31 277.23736 0.834226 +0.549613 Deerlick Observatory, Crawfordville W32 277.23750 0.834222 +0.549619 Crawfordville Observatory W33 277.83451 0.819315 +0.571499 Transit Dreams Observatory, Campobello W34 277.8453 0.81784 +0.57360 Squirrel Valley Observatory, Columbus +W35 278.03910 0.856610 +0.514230 Buffalo Creek Observatory, Nahunta W38 278.58531 0.807479 +0.588163 Dark Sky Observatory, Boone +W42 279.46569 0.885511 +0.463056 Mind's Eye Observatory, Vero Beach W46 280.41192 0.818614 +0.572448 Foxfire Village +W48 280.88700 0.811693 +0.582156 BKH Observatory, Chapel Hill W49 281.06757 0.778794 +0.625380 CBA-MM Observatory, Mountain Meadows W50 281.25404 0.813127 +0.580167 Apex +W53 282.31524 0.771140 +0.634559 Hagerstown W54 282.28944 0.785431 +0.616890 Mark Slade Remote Observatory, Wilderness W55 282.58389 0.773703 +0.631447 Natelli Observatory, Frederick +W56 282.52583 0.773143 +0.632153 Pineapple Observatory, Frederick +W57 289.26094 0.873480 -0.486002 ESA TBT La Silla Observatory +W58 283.14964 0.777667 +0.626574 ALPHA Observatory, South Laurel +W59 284.10758 0.757005 +0.651302 The Dark Side Observatory, Weatherly +W60 286.36626 0.995574 +0.097155 AstroExplor Observatory, Tinjaca W61 283.74492 0.713380 +0.698447 Leeside Observatory, Elgin +W62 284.13761 0.758729 +0.649276 Comet Hunter Observatory2, New Ringgold W63 284.30958 0.996767 +0.082976 Observatorio Astronomico UTP, Pereira +W64 285.27004 0.768364 +0.637863 Red Lion Observatory, Southampton Twsp W65 284.79169 0.697761 +0.713966 Observatoire GOZ, Montpellier W66 285.05381 0.756278 +0.652109 SVH Observatory, Blairstown W67 285.10211 0.759453 +0.648444 Paul Robinson Observatory, Voorhees State Park +W68 289.23502 0.862845 -0.504269 ATLAS Chile, Rio Hurtado +W69 285.98500 0.759912 +0.647855 OLPH Observatory, Brooklyn W70 285.91386 0.698475 +0.713264 Loose Goose Observatory, Saint-Jérome W71 285.99297 0.717404 +0.694456 Rand II Observatory, Lake Placid W72 286.8211 0.75302 +0.65580 Trumbull Observatory, Trumbull @@ -2371,29 +2511,42 @@

    List Of Observatory Codes

    W99 291.82015 0.921638 -0.387716 SON, San Pedro de Atacama Station X00 292.60125 0.910349 -0.413802 Observatorio Astronomico Tolar X01 289.23502 0.862846 -0.504270 Observatory Hurtado, El Sauce -X02 289.23517 0.862833 -0.504255 Telescope Live, El Sauce +X02 289.23517 0.862833 -0.504255 Telescope Live, El Sauce X03 289.20361 0.862286 -0.505209 Observatoire SADR, Poroto +X04 291.56747 0.664264 +0.745000 MCD Observatory, Saint-Anaclet +X05 289.25058 0.864981 -0.500958 Simonyi Survey Telescope, Rubin Observatory X12 295.71200 0.803430 -0.593455 Observatorio Los Cabezones X13 295.4498 0.85269 -0.52103 Observatorio Remoto Bosque Alegre X14 295.83222 0.854475 -0.517879 Observatorio Orbis Tertius, Córdoba X31 299.47934 0.850485 -0.524263 Galileo Galilei Observatory, Oro Verde +X33 299.99039 0.998647 -0.051941 OARU, Manaus X38 301.13711 0.825648 -0.562299 Observatorio Pueyrredon, La Lonja X39 301.1378 0.82615 -0.56158 Observatorio Antares, Pilar +X40 301.61689 0.822572 -0.566762 Cielos de Banfield, Banfield X50 303.82419 0.821025 -0.568999 Observatorio Astronomico de Montevideo X57 305.40626 0.903659 -0.426885 Polo Astronômico CMF,Foz do Iguaçu X70 308.43322 0.931623 -0.362375 Observatorio OATU, Tupi Paulista X74 309.1506 0.92987 -0.36684 Observatório Campo dos Amarais X87 312.0889 0.96218 -0.27210 Dogsheaven Observatory, Brasilia X88 312.49131 0.918012 -0.395458 Observatorio Adhara, Sorocaba -X89 312.21786 0.962245 -0.271267 Rocca Observatory, Brasilia +X89 312.21786 0.962401 -0.271311 Rocca Observatory, Brasilia X90 312.13208 0.963322 -0.268189 Carina Observatory, Brasilia +X93 313.6047 0.92363 -0.38244 Munhoz Observatory Y00 315.21504 0.935906 -0.351562 SONEAR Observatory, Oliveira Y16 318.68794 0.929268 -0.368170 ROCG, Campos dos Goytacazes Y28 321.3126 0.98840 -0.15179 OASI, Nova Itacuruba Y40 324.03889 0.989706 -0.143217 Discovery Observatory, Caruaru +Y90 354.5553 0.73015 +0.68115 Observatorio ESTELIA, Ladines +Y91 354.83350 0.802497 +0.594854 Ras Algethi, Ronda +Z00 353.26586 0.798528 +0.599968 BOOTES-1, Mazagon +Z01 352.13321 0.856462 +0.515344 OWL-Net, Oukaïmeden +Z02 352.13331 0.856450 +0.515339 HAO observatory, Oukaïmeden +Z03 355.73346 0.761330 +0.646426 Rio Cofio, Robledo de Chavela +Z04 352.98203 0.833809 +0.550302 MAO, Ain Laqsab +Z05 355.36389 0.802644 +0.594495 Observatorio Horus, Cartama Z06 357.67324 0.787439 +0.614746 Marina Sky, Nerpio Z07 356.36050 0.798537 +0.600132 Ad Astra Sangos Observatory, Alhendin -Z08 357.59139 0.794477 +0.605566 Telescope Live, Oria +Z08 357.59139 0.794477 +0.605566 Telescope Live, Oria Z09 356.8786 0.62844 +0.77527 Old Orchard Observatory, Fiddington Z10 353.37235 0.786766 +0.615329 PGC, Fregenal de la Sierra Z11 358.96669 0.601635 +0.796115 Appledorne Observatory, Farnsfield @@ -2409,11 +2562,14 @@

    List Of Observatory Codes

    Z21 343.48830 0.881468 +0.471452 Tenerife-LCO Aqawan A {#}1 Z22 343.4894 0.88148 +0.47143 MASTER-IAC Observatory, Tenerife Z23 342.11492 0.877679 +0.478433 Nordic Optical Telescope, La Palma +Z24 343.48848 0.881475 +0.471460 Tenerife Observatory-LCO B, Tenerife Z25 343.49031 0.881476 +0.471450 Artemis Observatory, Teide Z26 343.38969 0.883010 +0.467899 Observatorio Astronomico Arcangel, Las Zocas Z27 343.6998 0.87976 +0.47393 Observatorio Coralito, La Laguna +Z28 357.67331 0.787438 +0.614748 Northern Skygems Observatory, Nerpio Z29 354.11944 0.751634 +0.657576 Observatorio Astronomico Sobradillo Z30 355.52500 0.586571 +0.807215 Glyn Marsh Observatory, Douglas +Z31 343.48835 0.881476 +0.471458 Tenerife Observatory-LCO A, Tenerife Z32 358.98372 0.766879 +0.640130 Observatorio Astrofisico de Javalambre Z33 357.67331 0.787438 +0.614748 6ROADS Observatory 2, Nerpio Z34 359.11233 0.612800 +0.787622 NNHS Drummonds Observatory @@ -2425,7 +2581,7 @@

    List Of Observatory Codes

    Z40 355.5127 0.80240 +0.59482 El Manzanillo Observatory, Puerto de la Torre Z41 356.6264 0.76087 +0.64689 Irydeo Observatory, Camarma de Esteruelas Z42 357.66579 0.631495 +0.772801 Rushay Farm Observatory, Sturminster Newton -Z43 357.4622 0.66474 +0.74460 Landehen +Z43 357.46216 0.664742 +0.744597 Landehen Z44 351.67248 0.728723 +0.682549 Observatorio Terminus, A Coruña Z45 355.14264 0.804657 +0.591779 Cosmos Observatory, Marbella Z46 356.80700 0.623612 +0.779131 Cardiff @@ -2440,7 +2596,7 @@

    List Of Observatory Codes

    Z55 354.9150 0.79391 +0.60604 Uraniborg Observatory, \'{E}cija Z56 350.2119 0.61577 +0.78529 Knocknaboola Z57 355.42589 0.803207 +0.593753 Observatorio Zuben, Alhaurín de la Torre -Z58 355.63068 0.762093 +0.645483 ESA Cebreros TBT Observatory, Cebreros +Z58 355.63068 0.762093 +0.645483 ESA TBT Cebreros Observatory Z59 357.71540 0.599292 +0.797871 Chelford Observatory Z60 357.8506 0.73205 +0.67900 Observatorio Zaldibia Z61 359.06400 0.748594 +0.660857 Montecanal Observatory, Zaragoza @@ -2495,24 +2651,24 @@

    List Of Observatory Codes

    - +

    -

    The Minor Planet Center is hosted by the Center for Astrophysics | Harvard & Smithsonian.
    The Minor Planet Center is funded by NASA.
    +
    The Minor Planet Center is hosted by the Center for Astrophysics | Harvard & Smithsonian.
    The Minor Planet Center is funded by NASA.