Changeset 6184 for trunk/psLib/test/astro
- Timestamp:
- Jan 23, 2006, 10:04:31 AM (21 years ago)
- Location:
- trunk/psLib/test/astro
- Files:
-
- 2 edited
-
tst_psEarthOrientation.c (modified) (10 diffs)
-
tst_psTime_04.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/astro/tst_psEarthOrientation.c
r6039 r6184 5 5 * @author d-Rob, MHPCC 6 6 * 7 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $8 * @date $Date: 2006-01- 18 23:49:06$7 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2006-01-23 20:04:31 $ 9 9 * 10 10 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 132 132 speed /= c; 133 133 134 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 134 135 empty = psAberration(empty, apparent, direction, speed); 135 136 if (empty != NULL) { … … 138 139 return 1; 139 140 } 141 psLogMsg(__func__,PS_LOG_INFO,"Following should generate error message"); 140 142 empty = psAberration(empty, actual, apparent, speed); 141 143 if (empty != NULL) { … … 951 953 psTime* fromTime = psTimeFromMJD(MJD_2100); 952 954 psTime* toTime = psTimeFromMJD(MJD_1900); 953 955 psSphereRot *rot = NULL; 954 956 // Set input coordinate 955 957 inputCoord->r = SPHERE_PRECESS_TP1_R; … … 959 961 960 962 // Calculate precess 961 outputCoord = psSpherePrecess(inputCoord, fromTime, toTime); 963 rot = psSpherePrecess(fromTime, toTime, PS_PRECESS_ROUGH); 964 outputCoord = psSphereRotApply(NULL, rot, inputCoord); 965 if (outputCoord->r < -0.0001) { 966 outputCoord->r += 2.0 * M_PI; 967 } 968 // outputCoord = psSpherePrecess(inputCoord, fromTime, toTime, PS_PRECESS_ROUGH); 962 969 // Verify return is not NULL 963 970 if(outputCoord == NULL) { … … 977 984 } 978 985 psFree(outputCoord); 986 psFree(rot); 979 987 980 988 // Set input coordinate … … 985 993 986 994 // Calculate precess 987 outputCoord = psSpherePrecess(inputCoord, fromTime, toTime); 995 rot = psSpherePrecess(fromTime, toTime, PS_PRECESS_ROUGH); 996 outputCoord = psSphereRotApply(NULL, rot, inputCoord); 997 if (outputCoord->r < -0.0001) { 998 outputCoord->r += 2.0 * M_PI; 999 } 1000 // outputCoord = psSpherePrecess(inputCoord, fromTime, toTime, PS_PRECESS_ROUGH); 988 1001 // Verify return is not NULL 989 1002 if(outputCoord == NULL) { … … 1003 1016 } 1004 1017 psFree(outputCoord); 1018 psFree(rot); 1005 1019 1006 1020 // Set input coordinate … … 1011 1025 1012 1026 // Calculate precess 1013 outputCoord = psSpherePrecess(inputCoord, fromTime, toTime); 1027 rot = psSpherePrecess(fromTime, toTime, PS_PRECESS_ROUGH); 1028 outputCoord = psSphereRotApply(NULL, rot, inputCoord); 1029 if (outputCoord->r < -0.0001) { 1030 outputCoord->r += 2.0 * M_PI; 1031 } 1032 // outputCoord = psSpherePrecess(inputCoord, fromTime, toTime, PS_PRECESS_ROUGH); 1014 1033 // Verify return is not NULL 1015 1034 if(outputCoord == NULL) { … … 1029 1048 } 1030 1049 psFree(outputCoord); 1031 1050 psFree(rot); 1051 1052 // Invoke precess with invalid parameter 1053 /* 1054 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message"); 1055 outputCoord = psSpherePrecess(inputCoord, fromTime, NULL); 1056 if(outputCoord != NULL) { 1057 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1058 return 10; 1059 } 1060 1061 // Invoke precess with invalid parameter 1062 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message"); 1063 outputCoord = psSpherePrecess(inputCoord, NULL, toTime); 1064 if(outputCoord != NULL) { 1065 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1066 return 11; 1067 } 1068 */ 1032 1069 // Invoke precess with invalid parameter 1033 1070 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message"); 1034 outputCoord = psSpherePrecess(inputCoord, fromTime, NULL); 1035 if(outputCoord != NULL) { 1036 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1037 return 10; 1038 } 1039 1040 // Invoke precess with invalid parameter 1041 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message"); 1042 outputCoord = psSpherePrecess(inputCoord, NULL, toTime); 1043 if(outputCoord != NULL) { 1044 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1045 return 11; 1046 } 1047 1048 // Invoke precess with invalid parameter 1049 psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message"); 1050 outputCoord = psSpherePrecess(NULL, fromTime, toTime); 1051 if(outputCoord != NULL) { 1071 rot = psSpherePrecess(fromTime, toTime, 10); 1072 // outputCoord = psSpherePrecess(NULL, fromTime, toTime, PS_PRECESS_ROUGH); 1073 if(rot != NULL) { 1074 // if(outputCoord != NULL) { 1052 1075 psError(PS_ERR_UNKNOWN,true,"Did not return NULL with invalid input"); 1053 1076 return 12; 1054 1077 } 1078 psFree(rot); 1055 1079 1056 1080 // Free objects -
trunk/psLib/test/astro/tst_psTime_04.c
r6036 r6184 18 18 * @author David Robbins, MHPCC 19 19 * 20 * @version $Revision: 1. 5$ $Name: not supported by cvs2svn $21 * @date $Date: 2006-01- 18 20:59:32$20 * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $ 21 * @date $Date: 2006-01-23 20:04:31 $ 22 22 * 23 23 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 39 39 40 40 testDescription tests[] = { 41 {testTimeInit1, -1,"p_psTimeInit",0,false},42 {testTimeInit2, -2,"p_psTimeInit",0,false},43 {testTimeInit3, -3,"p_psTimeInit",0,false},44 {testTimeInit4, -4,"p_psTimeInit",0,false},45 {testTimeInit5, -5,"p_psTimeInit",0,false},46 {testTimeInit6, -6,"p_psTimeInit",0,false},47 {testTimer1, -7,"psTimer",0,false},48 {testTideUT1Corr, -8,"psTime_TideUT1Corr",0,false},41 {testTimeInit1,1,"p_psTimeInit",0,false}, 42 {testTimeInit2,2,"p_psTimeInit",0,false}, 43 {testTimeInit3,3,"p_psTimeInit",0,false}, 44 {testTimeInit4,4,"p_psTimeInit",0,false}, 45 {testTimeInit5,5,"p_psTimeInit",0,false}, 46 {testTimeInit6,6,"p_psTimeInit",0,false}, 47 {testTimer1,8,"psTimer",0,false}, 48 {testTideUT1Corr,9,"psTime_TideUT1Corr",0,false}, 49 49 {NULL} 50 50 };
Note:
See TracChangeset
for help on using the changeset viewer.
