Loading isis/src/system/apps/kerneldbgen/SpiceDbGen.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ using namespace std; using namespace Isis; const char *SpiceDbGen::calForm = "YYYY MON DD HR:MN:SC.### TDB ::TDB"; const char *SpiceDbGen::calForm = "YYYY MON DD HR:MN:SC.###### TDB ::TDB"; /** * Constructs a new SpiceDbGen. * Loading Loading @@ -65,6 +65,9 @@ SpiceDbGen::SpiceDbGen(QString type) { * @history 2010-04-27 Stuart Sides Changed to work with vector of filters * instead of a single filter * * @history 2015-03-27 Stuart Sides Changed the number of decimal places * written to the Time keyword for kernel.###.db files from three to six * * @throws Isis::iException::Message */ PvlObject SpiceDbGen::Direct(QString quality, QString location, Loading Loading @@ -93,8 +96,9 @@ PvlObject SpiceDbGen::Direct(QString quality, QString location, } } //check each group to make sure it is the same type as others // Check each group to make sure it is the same type as others PvlObject::PvlGroupIterator grp = result.beginGroup(); while (grp != result.endGroup()) { // The kernel did not have any time coverage, so ignore it if (grp->name() == "No coverage" || grp->name() == "Null") { Loading Loading @@ -248,7 +252,7 @@ PvlGroup SpiceDbGen::FormatIntervals(SpiceCell &coverage, QString type) { NaifStatus::CheckErrors(); PvlGroup result(type); SpiceChar begStr[32], endStr[32]; SpiceChar begStr[35], endStr[35]; //Get the number of intervals in the object. int niv = card_c(&coverage) / 2; //Convert the coverage interval start and stop times to TDB Loading @@ -257,8 +261,8 @@ PvlGroup SpiceDbGen::FormatIntervals(SpiceCell &coverage, QString type) { //Get the endpoints of the jth interval. wnfetd_c(&coverage, j, &begin, &end); //Convert the endpoints to TDB calendar timout_c(begin, calForm, 32, begStr); timout_c(end, calForm, 32, endStr); timout_c(begin, calForm, 35, begStr); timout_c(end, calForm, 35, endStr); result += PvlKeyword("Time", "(\"" + (QString)begStr + "\", \"" + (QString)endStr + "\")"); } Loading isis/src/system/apps/kerneldbgen/kerneldbgen.xml +4 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,10 @@ Added the EXTRA option. Also, added basic support for kerneldb files being specified for SCLK/LSK parameters. Fixes #1023. </change> <change name="Stuart Sides" date="2015-03-29"> Added three additional decimal places to the output of the TIME keyword in output kernel database file. Fixes #2236. </change> </history> <groups> Loading isis/src/system/apps/kerneldbgen/tsts/spk/Makefile 0 → 100644 +25 −0 Original line number Diff line number Diff line # SPK Test for kerneldbgen # This test creates an output database file from the SPICE tables in the input file # that follow the given filter for reconstructed spk file name patterns. # Note that the array style for this input is \("pattern1","pattern2"\) # # After the output PVL is created, when compared, the DIFF file indicates to # ignore RunTime and File. The File keyword is ignored since, depending on # where the test is run, files may have different paths. These paths can not be # removed since they may be long enough to take up multiple lines. # # The kernelFileNamesWithPath file is created to pull out the File keyword # values, in order. This is then passed into SED, removing the paths and # leaving only the ordered kernel names. APPNAME = kerneldbgen include $(ISISROOT)/make/isismake.tsts commands: $(APPNAME) to=$(OUTPUT)/kernel.db.pvl \ type=SPK \ recondir=$(INPUT) \ reconfilter=\("M3*.bsp"\) \ lsk=\$$base/kernels/lsk/naif0008.tls > /dev/null; \ grep "M3" $(OUTPUT)/kernel.db.pvl > $(OUTPUT)/kernelFileNamesWithPath.txt; $(SED) s+.*/++ $(OUTPUT)/kernelFileNamesWithPath.txt > $(OUTPUT)/orderedKernelFileNames.txt; $(RM) $(OUTPUT)/kernelFileNamesWithPath.txt; Loading
isis/src/system/apps/kerneldbgen/SpiceDbGen.cpp +9 −5 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ using namespace std; using namespace Isis; const char *SpiceDbGen::calForm = "YYYY MON DD HR:MN:SC.### TDB ::TDB"; const char *SpiceDbGen::calForm = "YYYY MON DD HR:MN:SC.###### TDB ::TDB"; /** * Constructs a new SpiceDbGen. * Loading Loading @@ -65,6 +65,9 @@ SpiceDbGen::SpiceDbGen(QString type) { * @history 2010-04-27 Stuart Sides Changed to work with vector of filters * instead of a single filter * * @history 2015-03-27 Stuart Sides Changed the number of decimal places * written to the Time keyword for kernel.###.db files from three to six * * @throws Isis::iException::Message */ PvlObject SpiceDbGen::Direct(QString quality, QString location, Loading Loading @@ -93,8 +96,9 @@ PvlObject SpiceDbGen::Direct(QString quality, QString location, } } //check each group to make sure it is the same type as others // Check each group to make sure it is the same type as others PvlObject::PvlGroupIterator grp = result.beginGroup(); while (grp != result.endGroup()) { // The kernel did not have any time coverage, so ignore it if (grp->name() == "No coverage" || grp->name() == "Null") { Loading Loading @@ -248,7 +252,7 @@ PvlGroup SpiceDbGen::FormatIntervals(SpiceCell &coverage, QString type) { NaifStatus::CheckErrors(); PvlGroup result(type); SpiceChar begStr[32], endStr[32]; SpiceChar begStr[35], endStr[35]; //Get the number of intervals in the object. int niv = card_c(&coverage) / 2; //Convert the coverage interval start and stop times to TDB Loading @@ -257,8 +261,8 @@ PvlGroup SpiceDbGen::FormatIntervals(SpiceCell &coverage, QString type) { //Get the endpoints of the jth interval. wnfetd_c(&coverage, j, &begin, &end); //Convert the endpoints to TDB calendar timout_c(begin, calForm, 32, begStr); timout_c(end, calForm, 32, endStr); timout_c(begin, calForm, 35, begStr); timout_c(end, calForm, 35, endStr); result += PvlKeyword("Time", "(\"" + (QString)begStr + "\", \"" + (QString)endStr + "\")"); } Loading
isis/src/system/apps/kerneldbgen/kerneldbgen.xml +4 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,10 @@ Added the EXTRA option. Also, added basic support for kerneldb files being specified for SCLK/LSK parameters. Fixes #1023. </change> <change name="Stuart Sides" date="2015-03-29"> Added three additional decimal places to the output of the TIME keyword in output kernel database file. Fixes #2236. </change> </history> <groups> Loading
isis/src/system/apps/kerneldbgen/tsts/spk/Makefile 0 → 100644 +25 −0 Original line number Diff line number Diff line # SPK Test for kerneldbgen # This test creates an output database file from the SPICE tables in the input file # that follow the given filter for reconstructed spk file name patterns. # Note that the array style for this input is \("pattern1","pattern2"\) # # After the output PVL is created, when compared, the DIFF file indicates to # ignore RunTime and File. The File keyword is ignored since, depending on # where the test is run, files may have different paths. These paths can not be # removed since they may be long enough to take up multiple lines. # # The kernelFileNamesWithPath file is created to pull out the File keyword # values, in order. This is then passed into SED, removing the paths and # leaving only the ordered kernel names. APPNAME = kerneldbgen include $(ISISROOT)/make/isismake.tsts commands: $(APPNAME) to=$(OUTPUT)/kernel.db.pvl \ type=SPK \ recondir=$(INPUT) \ reconfilter=\("M3*.bsp"\) \ lsk=\$$base/kernels/lsk/naif0008.tls > /dev/null; \ grep "M3" $(OUTPUT)/kernel.db.pvl > $(OUTPUT)/kernelFileNamesWithPath.txt; $(SED) s+.*/++ $(OUTPUT)/kernelFileNamesWithPath.txt > $(OUTPUT)/orderedKernelFileNames.txt; $(RM) $(OUTPUT)/kernelFileNamesWithPath.txt;