#include #include "hdfi.h" #include "aosr.h" void main(argc, argv) int argc; char *argv[]; { float64 scclock; /* use float64 for spacecraft clock, since some */ /* ancillary functions need sub-second resolution */ struct attorb_entry aosr_struct; uint32 ACE_aosr_structure(); /* function in ancil_subs.c */ int32 init_ACEancillary(); /* function in ancil_subs.c */ if (argc!=3) { printf("Usage: get_aosr_struct hdf_file scclock\n"); exit(1); } scclock = atof(argv[2]); /* load the data from the HDF file */ /* init_ACEancillary() exits if there is an error */ init_ACEancillary(argv[1]); /* get the aosr structure corresponding to the spacecraft clock */ if((ACE_aosr_structure(scclock, &aosr_struct)) == -1){ fprintf(stdout,"scclock out of bounds\n"); } else fprintf(stdout,"%f %f %f\n", aosr_struct.att_RTN[0],aosr_struct.att_RTN[1],aosr_struct.att_RTN[2]); exit(0); }