Skip to content

Commit

Permalink
'astcheck' can now handle ADES data. (Which turned out to be almost t…
Browse files Browse the repository at this point in the history
…rivial; I shoulda done it long ago.)
  • Loading branch information
Bill-Gray committed Dec 3, 2023
1 parent c0ac71f commit 059399e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions astcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ int main( const int argc, const char **argv)
double jd, ra, dec;
FILE *ifile;
const char *sof_filename = "mpcorb.sof";
char buff[90];
char buff[400];
char **ilines = NULL;
int show_lov = 0;
int i, n_ilines = 0, n, max_results = 100;
Expand All @@ -614,6 +614,7 @@ int main( const int argc, const char **argv)
bool is_list_file = false;
bool show_header = true;
const char *mpcorb_extracts = "";
void *ades_context = init_ades2mpc( );

if( argc < 2)
{
Expand Down Expand Up @@ -723,7 +724,7 @@ int main( const int argc, const char **argv)
/* Read astrometry lines and allocate memory for them : */
ilines = (char **)malloc( (n_ilines + 1) * sizeof( char *));
n_ilines = 0;
while( fgets( buff, sizeof( buff), ifile))
while( fgets_with_ades_xlation( buff, sizeof( buff), ades_context, ifile))
if( !get_mpc_data( buff, &jd, &ra, &dec))
{
n_ilines++;
Expand All @@ -733,6 +734,7 @@ int main( const int argc, const char **argv)
strcpy( ilines[n_ilines - 1], buff);
}
fclose( ifile);
free_ades2mpc_context( ades_context);
if( is_list_file)
#ifdef _WIN32 /* MS is different. */
_unlink( _dummy_filename);
Expand Down

0 comments on commit 059399e

Please sign in to comment.