IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 10, 2004, 2:57:31 PM (22 years ago)
Author:
harman
Message:

Third redesign of time and date functions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/test/astronomy/tst_psTime_01.c

    r1627 r1788  
    1818 *     M) Convert psTime to tm time
    1919 *     N) Convert tm time to psTime
     20 *     O) Convert psTime time to LST
    2021 *
    2122 *  @author  Ross Harman, MHPCC
    2223 *
    23  *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
    24  *  @date  $Date: 2004-08-25 21:34:26 $
     24 *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
     25 *  @date  $Date: 2004-09-11 00:57:31 $
    2526 *
    2627 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4546    testTime->type = PS_TIME_TAI;
    4647
    47 
    4848    // Test A - Get current TAI time
    4949    printPositiveTestHeader(stdout,"psTime", "Get current TAI time");
     
    5252
    5353
    54     //Test B - Print test time
     54    // Test B - Print test time
    5555    printPositiveTestHeader(stdout,"psTime", "Print test time");
    5656    printf("Test time: Seconds = %ld Microseconds = %ld\n", (long)testTime->sec, (long)testTime->usec);
     
    6262    char *isoString;
    6363    isoString = psTimeToISO(testTime);
     64    printf("%s\n", isoString);
    6465    if(strncmp(isoString, testString, 256)) {
    6566        printf("ERROR - ISO string incorrect\n");
    66         printf("Expected: %s\n", testString);
    6767        printf("Returned: %s\n", isoString);
    6868    }
     
    158158    printFooter(stdout, "psTime", "Convert tm time to psTime", true);
    159159
     160
     161    // Test O - psTime to LST
     162    printPositiveTestHeader(stdout, "psTime", "Convert psTime time to LST");
     163    double dblTime = psTimeToLST(testTime, 1);
     164    printf("LST (rad): %lf\n", dblTime);
     165    printFooter(stdout, "psTime", "Convert psTime time to LST", true);
     166
    160167    return 0;
    161168}
Note: See TracChangeset for help on using the changeset viewer.