Changeset 8232 for trunk/psLib/src/astro
- Timestamp:
- Aug 8, 2006, 1:32:23 PM (20 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 5 edited
-
. (modified) (1 prop)
-
astro/psCoord.c (modified) (4 diffs)
-
astro/psEarthOrientation.c (modified) (13 diffs)
-
astro/psSphereOps.c (modified) (8 diffs)
-
astro/psTime.c (modified) (43 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src
- Property svn:ignore
-
old new 10 10 libpslib.la.temp 11 11 config.h.in 12 psErrorText.h13 12 *.bb 14 13 *.bbg
-
- Property svn:ignore
-
trunk/psLib/src/astro/psCoord.c
r7914 r8232 10 10 * @author GLG, MHPCC 11 11 * 12 * @version $Revision: 1.12 1$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-15 02:57:12 $12 * @version $Revision: 1.122 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:22 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 26 26 #include "psLogMsg.h" 27 27 #include "psTrace.h" 28 #include "psErrorText.h" 28 29 29 #include "psMatrix.h" 30 30 #include "psMinimizePolyFit.h" … … 435 435 default: 436 436 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 437 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,437 _("The projection type, %d, is unknown."), 438 438 projection->type); 439 439 psFree(out); … … 537 537 default: 538 538 psError(PS_ERR_BAD_PARAMETER_TYPE, true, 539 PS_ERRORTEXT_psCoord_PROJECTION_TYPE_UNKNOWN,539 _("The projection type, %d, is unknown."), 540 540 projection->type); 541 541 psFree(out); -
trunk/psLib/src/astro/psEarthOrientation.c
r7766 r8232 8 8 * @author Robert Daniel DeSonia, MHPCC 9 9 * 10 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 6-30 02:20:06$10 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:22 $ 12 12 * 13 13 * Copyright 2005 Maui High Performance Computing Center, University of Hawaii … … 24 24 #include "psMetadataConfig.h" 25 25 #include "psError.h" 26 #include "psErrorText.h" 26 27 27 #include "psMemory.h" 28 28 #include "psCoord.h" … … 103 103 "psLib.eoc.precession.table.format"); 104 104 if(! success || tableFormat == NULL) { 105 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,105 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 106 106 "psLib.eoc.precession.table.format"); 107 107 return false; … … 112 112 if(! success || xTableName == NULL) { 113 113 psFree(tableFormat); 114 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,114 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 115 115 "psLib.eoc.precession.x.file"); 116 116 return false; … … 122 122 psFree(tableFormat); 123 123 psFree(xTableName); 124 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,124 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 125 125 "psLib.eoc.precession.y.file"); 126 126 return false; … … 133 133 psFree(xTableName); 134 134 psFree(yTableName); 135 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,135 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 136 136 "psLib.eoc.precession.s.file"); 137 137 return false; … … 145 145 psFree(yTableName); 146 146 psFree(sTableName); 147 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,147 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 148 148 "psLib.eoc.precession.iers.file"); 149 149 return false; … … 158 158 psFree(sTableName); 159 159 psFree(iersTableName); 160 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,160 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 161 161 "psLib.eoc.precession.finals.file"); 162 162 return false; … … 172 172 psFree(iersTableName); 173 173 psFree(finalsTableName); 174 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,174 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 175 175 "psLib.eoc.precession.iers.table.format"); 176 176 return false; … … 187 187 psFree(finalsTableName); 188 188 psFree(iersTableFormat); 189 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,189 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 190 190 "psLib.eoc.precession.iers.table.format"); 191 191 return false; … … 214 214 psVector* xCoeff = psMetadataLookupPtr(&success, eocMetadata, "psLib.eoc.precession.poly.x"); 215 215 if(! success || xCoeff == NULL || xCoeff->type.type != PS_TYPE_F64) { 216 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,216 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 217 217 "psLib.eoc.precession.poly.x"); 218 218 return false; … … 221 221 if(! success || yCoeff == NULL || yCoeff->type.type != PS_TYPE_F64) { 222 222 psFree(xCoeff); 223 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,223 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 224 224 "psLib.eoc.precession.poly.y"); 225 225 return false; … … 229 229 psFree(xCoeff); 230 230 psFree(yCoeff); 231 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,231 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 232 232 "psLib.eoc.precession.poly.s"); 233 233 return false; -
trunk/psLib/src/astro/psSphereOps.c
r7914 r8232 8 8 * @author Dave Robbins, MHPCC 9 9 * 10 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $11 * @date $Date: 2006-0 7-15 02:57:12 $10 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2006-08-08 23:32:22 $ 12 12 * 13 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psLogMsg.h" 27 #include "psErrorText.h" 27 28 28 29 29 … … 225 225 // Check the specified MJD is greater than 1900 226 226 if ( MJD < MJD_1900 ) { 227 psError(PS_ERR_BAD_PARAMETER_TYPE,true, PS_ERRORTEXT_psCoord_INVALID_MJD);227 psError(PS_ERR_BAD_PARAMETER_TYPE,true,_("Specified time is less than 1900.")); 228 228 return NULL; 229 229 } … … 252 252 // Check the specified MJD is greater than 1900 253 253 if ( MJD < MJD_1900 ) { 254 psError(PS_ERR_BAD_PARAMETER_TYPE,true, PS_ERRORTEXT_psCoord_INVALID_MJD);254 psError(PS_ERR_BAD_PARAMETER_TYPE,true,_("Specified time is less than 1900.")); 255 255 return NULL; 256 256 } … … 361 361 else { 362 362 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 363 PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,363 _("Specified units, 0x%x, is not supported."), 364 364 unit); 365 365 psFree(tmp); … … 370 370 } else { 371 371 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 372 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,372 _("Specified offset mode, 0x%x, is not supported."), 373 373 mode); 374 374 psFree(tmp); … … 432 432 } else { 433 433 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 434 PS_ERRORTEXT_psCoord_UNITS_UNKNOWN,434 _("Specified units, 0x%x, is not supported."), 435 435 unit); 436 436 return NULL; … … 451 451 } else { 452 452 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 453 PS_ERRORTEXT_psCoord_OFFSET_MODE_UNKNOWN,453 _("Specified offset mode, 0x%x, is not supported."), 454 454 mode); 455 455 return NULL; -
trunk/psLib/src/astro/psTime.c
r7961 r8232 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.9 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2006-0 7-25 01:16:04$12 * @version $Revision: 1.93 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2006-08-08 23:32:22 $ 14 14 * 15 15 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 33 33 #include "psLookupTable.h" 34 34 #include "psAssert.h" 35 #include "psErrorText.h" 35 36 36 37 37 #include "config.h" … … 205 205 // Check if table not a metadata item 206 206 if(tableMetadataItem == NULL) { 207 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,207 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 208 208 tableName); 209 209 *status = PS_LOOKUP_ERROR; … … 282 282 if(metadataItem == NULL) { 283 283 p_psMemAllocatePersistent(initialPersistence); 284 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,284 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 285 285 "psLib.time.tables.n"); 286 286 return false; … … 292 292 if(metadataItem == NULL) { 293 293 p_psMemAllocatePersistent(initialPersistence); 294 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,294 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 295 295 "psLib.time.tables.from"); 296 296 return false; … … 299 299 if(tablesFrom->n != numTables) { 300 300 p_psMemAllocatePersistent(initialPersistence); 301 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_BAD_VECTOR, tablesFrom->n, numTables);301 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %d, Expected %d."), tablesFrom->n, numTables); 302 302 psFree(tablesFrom); 303 303 return false; … … 308 308 if(metadataItem == NULL) { 309 309 p_psMemAllocatePersistent(initialPersistence); 310 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,310 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 311 311 "psLib.time.tables.to"); 312 312 psFree(tablesFrom); … … 316 316 if(tablesTo->n != numTables) { 317 317 p_psMemAllocatePersistent(initialPersistence); 318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_BAD_VECTOR, tablesTo->n, numTables);318 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Incorrect vector size. Size: %d, Expected %d."), tablesTo->n, numTables); 319 319 psFree(tablesFrom); 320 320 psFree(tablesTo); … … 326 326 if(metadataItem == NULL) { 327 327 p_psMemAllocatePersistent(initialPersistence); 328 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,328 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Failed find '%s' in time metadata."), 329 329 "psLib.time.tables.index"); 330 330 psFree(tablesFrom); … … 335 335 if(tablesIndex->n != numTables) { 336 336 p_psMemAllocatePersistent(initialPersistence); 337 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_BAD_VECTOR,tablesIndex->n,numTables);337 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Incorrect vector size. Size: %d, Expected %d."),tablesIndex->n,numTables); 338 338 psFree(tablesFrom); 339 339 psFree(tablesTo); … … 346 346 if(metadataItem == NULL) { 347 347 p_psMemAllocatePersistent(initialPersistence); 348 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,348 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 349 349 "psLib.time.tables.dir"); 350 350 psFree(tablesFrom); … … 359 359 if(metadataItem == NULL) { 360 360 p_psMemAllocatePersistent(initialPersistence); 361 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,361 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 362 362 "psLib.time.tables.files"); 363 363 … … 374 374 if(metadataItem == NULL) { 375 375 p_psMemAllocatePersistent(initialPersistence); 376 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,376 psError(PS_ERR_BAD_PARAMETER_VALUE,true, _("Failed find '%s' in time metadata."), 377 377 "psLib.time.tables.format"); 378 378 psFree(tablesFrom); … … 404 404 tableFormat = getToken(&formatPtr,",",&status); 405 405 if(tableFormat == NULL) { 406 psError(PS_ERR_BAD_PARAMETER_VALUE,no_problem, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,406 psError(PS_ERR_BAD_PARAMETER_VALUE,no_problem,_("Failed find '%s' in time metadata."), 407 407 "psLib.time.tables.format"); 408 408 no_problem = false; … … 415 415 } else { 416 416 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, 417 PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, i+1, numTables);417 _("Incorrect number of table files entered. Found: %d. Expected: %d."), i+1, numTables); 418 418 no_problem = false; 419 419 } … … 429 429 } else if(foundTable==false && j==numTables-1) { 430 430 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, 431 PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, j, numTables);431 _("Incorrect number of table files entered. Found: %d. Expected: %d."), j, numTables); 432 432 no_problem = false; 433 433 } … … 444 444 445 445 if(numTables != i) { 446 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, PS_ERRORTEXT_psTime_BAD_TABLE_COUNT, i, numTables);446 psError(PS_ERR_BAD_PARAMETER_VALUE, no_problem, _("Incorrect number of table files entered. Found: %d. Expected: %d."), i, numTables); 447 447 } 448 448 … … 480 480 type!=PS_TIME_TT) { 481 481 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 482 PS_ERRORTEXT_psTime_TYPE_UNKNOWN,482 _("Specified type, %d, is not supported."), 483 483 type); 484 484 return NULL; … … 521 521 if (gettimeofday(&now, 0) == -1) { 522 522 psError(PS_ERR_OS_CALL_FAILED, true, 523 PS_ERRORTEXT_psTime_GET_TOD_FAILED);523 _("Failed to determine the current time from gettimeofday function.")); 524 524 return NULL; 525 525 } … … 728 728 // Convert from TAI to unknown time type 729 729 } else { 730 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);730 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type); 731 731 return NULL; 732 732 } … … 753 753 // Convert from TT to unknown time type 754 754 } else { 755 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);755 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type); 756 756 return NULL; 757 757 } … … 772 772 // Convert UTC to unknown time type 773 773 } else { 774 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, type);774 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), type); 775 775 return NULL; 776 776 } 777 777 // Convert unknown time type 778 778 } else { 779 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_UNKNOWN, time->type);779 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is not supported."), time->type); 780 780 return NULL; 781 781 } … … 810 810 // Verify input time is not in UT1 seconds 811 811 if(time->type == PS_TIME_UT1) { 812 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_TYPE_INCORRECT,time->type);812 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),time->type); 813 813 return NAN; 814 814 } … … 897 897 898 898 // Date too early for tables. Get default time delta value from metadata, and issue warning. 899 psLogMsg(__func__,PS_LOG_WARN, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES,mjd,"UT1-UTC");899 psLogMsg(__func__,PS_LOG_WARN,_("Specified psTime predates (%g) all tables of %s information."),mjd,"UT1-UTC"); 900 900 901 901 // Lookup value from time metadata loaded from pslib.config 902 902 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.before.dut"); 903 903 if(tableMetadataItem == NULL) { 904 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,904 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 905 905 "psLib.time.before.dut"); 906 906 return NAN; … … 917 917 */ 918 918 // Generate warning of postdate information 919 psLogMsg(__func__,PS_LOG_WARN, PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "UT1-UTC");919 psLogMsg(__func__,PS_LOG_WARN,_("Specified psTime postdates (%g) all tables of %s information."), mjd, "UT1-UTC"); 920 920 921 921 // Lookup values to calculate prediction 922 922 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.dut"); 923 923 if(tableMetadataItem == NULL) { 924 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,924 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 925 925 "psLib.time.predict.dut"); 926 926 return NAN; … … 935 935 936 936 } else if(status != PS_LOOKUP_SUCCESS) { 937 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);937 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation.")); 938 938 return NAN; 939 939 } … … 1059 1059 1060 1060 if(time->type != PS_TIME_TAI) { 1061 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_INCORRECT, time->type);1061 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified type, %d, is incorrect."), time->type); 1062 1062 return NULL; 1063 1063 } … … 1075 1075 // Date too earlier for tables. Get default polar coodinate values from metadata, and issue warning. 1076 1076 #if 0 1077 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES, mjd, "polar motion");1077 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified psTime predates (%g) all tables of %s information."), mjd, "polar motion"); 1078 1078 return NULL; 1079 1079 #else 1080 1080 1081 psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, PS_ERRORTEXT_psTime_TIME_PREDATES_TABLES, mjd, "polar motion");1081 psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, _("Specified psTime predates (%g) all tables of %s information."), mjd, "polar motion"); 1082 1082 #endif 1083 1083 … … 1085 1085 if(tableMetadataItem == NULL) { 1086 1086 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1087 PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.before.xp");1087 _("Failed find '%s' in time metadata."), "psLib.time.before.xp"); 1088 1088 return NULL; 1089 1089 } … … 1092 1092 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.before.yp"); 1093 1093 if(tableMetadataItem == NULL) { 1094 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.before.yp");1094 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.before.yp"); 1095 1095 return NULL; 1096 1096 } … … 1110 1110 #if 0 1111 1111 psError(PS_ERR_BAD_PARAMETER_VALUE, true, 1112 PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "polar motion");1112 _("Specified psTime postdates (%g) all tables of %s information."), mjd, "polar motion"); 1113 1113 return NULL; 1114 1114 #else 1115 1115 1116 1116 psLogMsg(PS_FILE_LINE, PS_LOG_ERROR, 1117 PS_ERRORTEXT_psTime_TIME_POSTDATES_TABLES, mjd, "polar motion");1117 _("Specified psTime postdates (%g) all tables of %s information."), mjd, "polar motion"); 1118 1118 #endif 1119 1119 … … 1121 1121 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.mjd"); 1122 1122 if(tableMetadataItem == NULL) { 1123 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED,1123 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), 1124 1124 "psLib.time.predict.mjd"); 1125 1125 return NULL; … … 1130 1130 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.xp"); 1131 1131 if(tableMetadataItem == NULL) { 1132 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.predict.xp");1132 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.predict.xp"); 1133 1133 return NULL; 1134 1134 } … … 1139 1139 tableMetadataItem = psMetadataLookup(timeMetadata, "psLib.time.predict.yp"); 1140 1140 if(tableMetadataItem == NULL) { 1141 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "psLib.time.predict.yp");1141 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "psLib.time.predict.yp"); 1142 1142 return NULL; 1143 1143 } … … 1163 1163 1164 1164 } else if(xStatus!=PS_LOOKUP_SUCCESS || yStatus!=PS_LOOKUP_SUCCESS) { 1165 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);1165 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation.")); 1166 1166 return NULL; 1167 1167 } … … 1193 1193 // Check if psTime tables are loaded/loadable 1194 1194 if(!p_psTimeInit(p_psGetConfigFileName())) { 1195 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_FILE_NOT_FOUND,1195 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed to open file %s."), 1196 1196 p_psGetConfigFileName()); 1197 1197 return NAN; … … 1201 1201 tableMetadataItem = psMetadataLookup(timeMetadata, "taiTable"); 1202 1202 if(tableMetadataItem == NULL) { 1203 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_LOOKUP_METADATA_FAILED, "taiTable");1203 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed find '%s' in time metadata."), "taiTable"); 1204 1204 return NAN; 1205 1205 } … … 1228 1228 // Check for successful interpolation 1229 1229 if(results == NULL) { 1230 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);1230 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Failed time table interpolation.")); 1231 1231 return NAN; 1232 1232 } … … 1273 1273 // Verify time is UTC type 1274 1274 if(utc->type != PS_TIME_UTC) { 1275 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_TYPE_INCORRECT,utc->type);1275 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),utc->type); 1276 1276 return false; 1277 1277 } … … 1371 1371 // Converts psTime to YYYY-MM-DDThh:mm:ss.sss in string form 1372 1372 if (!strftime(tempString, MAX_TIME_STRING_LENGTH, "%Y-%m-%dT%H:%M:%S", tmTime)) { 1373 psError(PS_ERR_OS_CALL_FAILED, true, PS_ERRORTEXT_psTime_CONVERT_TIME_TO_STRING_FAILED);1373 psError(PS_ERR_OS_CALL_FAILED, true, _("Failed to convert a time via strftime function.")); 1374 1374 return NULL; 1375 1375 } … … 1385 1385 // Create string with milliseconds 1386 1386 if (snprintf(timeString, MAX_TIME_STRING_LENGTH, "%s.%1dZ", tempString, ds) < 0) { 1387 psError(PS_ERR_OS_CALL_FAILED, true, PS_ERRORTEXT_psTime_APPEND_MSEC_FAILED);1387 psError(PS_ERR_OS_CALL_FAILED, true, _("Failed to append millisecond to time string with snprintf function.")); 1388 1388 return NULL; 1389 1389 } … … 1501 1501 if (sscanf(input, "%d-%d-%dT%d:%d:%d.%d", &tmTime.tm_year, &tmTime.tm_mon, &tmTime.tm_mday, 1502 1502 &tmTime.tm_hour, &tmTime.tm_min, &tmTime.tm_sec,&millisecond) < 7) { 1503 psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_ISOTIME_MALFORMED, input);1503 psError(PS_ERR_BAD_PARAMETER_VALUE, true, _("Specified ISO Time string, '%s', is malformed. Must be in 'YYYY-MM-DDThh:mm:ss.sss' format."), input); 1504 1504 return NULL; 1505 1505 } … … 1760 1760 // Verify both times of the same type 1761 1761 if(time1->type != time2->type) { 1762 psError(PS_ERR_BAD_PARAMETER_VALUE,true, PS_ERRORTEXT_psTime_TYPE_INCORRECT,time1->type);1762 psError(PS_ERR_BAD_PARAMETER_VALUE,true,_("Specified type, %d, is incorrect."),time1->type); 1763 1763 return NAN; 1764 1764 }
Note:
See TracChangeset
for help on using the changeset viewer.
