Loading isis/src/rosetta/apps/rosvirtis2isis/rosvirtis2isis.cpp +46 −35 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ void IsisMain () p.SetDataSuffixBytes(4); } double startScet = 0; p.StartProcess(); // Get the directory where the Rosetta translation tables are. Loading Loading @@ -342,7 +343,6 @@ void IsisMain () Table table("VIRTISHouseKeeping", rec); std::vector<std::vector<char *> > dataSuffix = p.DataSuffix(); double startScet = 0; for (unsigned int i=0; i < dataSuffix.size(); i++) { std::vector<char*> dataSuffixRecord = dataSuffix[i]; Loading @@ -363,11 +363,27 @@ void IsisMain () table += rec; } outcube->write(table); std::cout << "starting SCET: " << toString(startScet) << std::endl; } // Create a PVL to store the translated labels in Pvl outLabel; // Translate the Archive group FileName transFile = transDir + "virtisArchive.trn"; PvlToPvlTranslationManager archiveXlater (pdsLabel, transFile.expanded()); archiveXlater.Auto(outLabel); // Translate the Instrument group transFile = transDir + "virtisInstruments.trn"; PvlToPvlTranslationManager instrumentXlater (pdsLabel, transFile.expanded()); instrumentXlater.Auto(outLabel); if (procLevel == 3) { // Fix the StartTime and SpacecraftStartClockCount in the ISIS3 label PvlGroup &inst = outLabel.findGroup("Instrument", Pvl::Traverse); // translate to SSSSSSSSSS:FFFFF format QString scetString = toString(startScet); std::cout << "scetString: " << scetString << std::endl; // seconds stay the same QStringList scetStringList = scetString.split('.'); Loading @@ -383,49 +399,44 @@ void IsisMain () scetStringList = toString(fractValue).split("."); scetFinal.append(scetStringList[1].left(5)); std::cout << "final scet value: " << scetFinal << std::endl; // pass this value to naif to get the utc time. QString sclk = "$ISIS3DATA/rosetta/kernels/sclk/ROS_??????_STEP.TSC"; QString lsk = "$ISIS3DATA/base/kernels/lsk/naif????.tls"; FileName sclkName(sclk); FileName lskName(lsk); // change this to ask the kerneldb to return the most recent rosetta sclk kernel? // actually // add this to the changeset /* KernelDb baseKernels(0); baseKernels.loadSystemDb("rosetta", lab); // do we have a label at this point... is there another // possible input? sclkName = sclkName.highestVersion(); lskName = lskName.highestVersion(); sclk = baseKernels.spacecraftClock(lab); lsk = baseKernels.leapSecond(lab); */ furnsh_c("/usgs/cpkgs/isis3/data/rosetta/kernels/sclk/ROS_160929_STEP.TSC"); furnsh_c("/usgs/cpkgs/isis3/data/base/kernels/lsk/naif0012.tls"); furnsh_c(lskName.expanded().toLatin1().data()); furnsh_c(sclkName.expanded().toLatin1().data()); SpiceDouble et; scs2e_c( (SpiceInt) -226, scetFinal.toLatin1().data(), &et); QString startTime = iTime(et).UTC(); std::cout << "starting SCET: " << iTime(et).UTC() << std::endl; double exposureTime = toDouble(frameParam[0]*0.001); // covert to s SpiceChar sclkString[50]; SpiceChar endSclkString[50]; sce2s_c( (SpiceInt) -226, et, (SpiceInt) 50, sclkString); sce2s_c( (SpiceInt) -226, et+exposureTime, (SpiceInt) 50, endSclkString); std::cout << "starting spacecraft clock start count: " << sclkString << std::endl; } inst.findKeyword("StartTime").setValue(startTime); inst.findKeyword("SpacecraftClockStartCount").setValue(sclkString); // Create a PVL to store the translated labels in Pvl outLabel; PvlKeyword &frameParam = inst["FrameParameter"]; // Translate the Archive group FileName transFile = transDir + "virtisArchive.trn"; PvlToPvlTranslationManager archiveXlater (pdsLabel, transFile.expanded()); archiveXlater.Auto(outLabel); QString stopTime = iTime(et + exposureTime).UTC(); inst.findKeyword("StopTime).setValue(stopTime); //TODO: inst.findKeyword("SpacecraftClockStopCount); outcube->putGroup(inst); // Translate the Instrument group transFile = transDir + "virtisInstruments.trn"; PvlToPvlTranslationManager instrumentXlater (pdsLabel, transFile.expanded()); instrumentXlater.Auto(outLabel); // Unload the naif kernels unload_c(lsk.toLatin1().data()); unload_c(sclk.toLatin1().data()); } // Write the Archive and Instrument groups to the output cube label outcube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); Loading isis/src/rosetta/objs/RosettaVirtisCamera/RosettaVirtisCamera.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ SCLK Format */ QString scetString = toString(scet); std::cout << "scetString: " << scetString << std::endl; // std::cout << "scetString: " << scetString << std::endl; // seconds stay the same QStringList scetStringList = scetString.split('.'); Loading @@ -335,7 +335,7 @@ SCLK Format scetStringList = toString(fractValue).split("."); scetFinal.append(scetStringList[1].left(5)); std::cout << "final scet value: " << scetFinal << std::endl; // std::cout << "final scet value: " << scetFinal << std::endl; /* if (i==0) { setTime(iTime(scetFinal)); Loading Loading
isis/src/rosetta/apps/rosvirtis2isis/rosvirtis2isis.cpp +46 −35 Original line number Diff line number Diff line Loading @@ -106,6 +106,7 @@ void IsisMain () p.SetDataSuffixBytes(4); } double startScet = 0; p.StartProcess(); // Get the directory where the Rosetta translation tables are. Loading Loading @@ -342,7 +343,6 @@ void IsisMain () Table table("VIRTISHouseKeeping", rec); std::vector<std::vector<char *> > dataSuffix = p.DataSuffix(); double startScet = 0; for (unsigned int i=0; i < dataSuffix.size(); i++) { std::vector<char*> dataSuffixRecord = dataSuffix[i]; Loading @@ -363,11 +363,27 @@ void IsisMain () table += rec; } outcube->write(table); std::cout << "starting SCET: " << toString(startScet) << std::endl; } // Create a PVL to store the translated labels in Pvl outLabel; // Translate the Archive group FileName transFile = transDir + "virtisArchive.trn"; PvlToPvlTranslationManager archiveXlater (pdsLabel, transFile.expanded()); archiveXlater.Auto(outLabel); // Translate the Instrument group transFile = transDir + "virtisInstruments.trn"; PvlToPvlTranslationManager instrumentXlater (pdsLabel, transFile.expanded()); instrumentXlater.Auto(outLabel); if (procLevel == 3) { // Fix the StartTime and SpacecraftStartClockCount in the ISIS3 label PvlGroup &inst = outLabel.findGroup("Instrument", Pvl::Traverse); // translate to SSSSSSSSSS:FFFFF format QString scetString = toString(startScet); std::cout << "scetString: " << scetString << std::endl; // seconds stay the same QStringList scetStringList = scetString.split('.'); Loading @@ -383,49 +399,44 @@ void IsisMain () scetStringList = toString(fractValue).split("."); scetFinal.append(scetStringList[1].left(5)); std::cout << "final scet value: " << scetFinal << std::endl; // pass this value to naif to get the utc time. QString sclk = "$ISIS3DATA/rosetta/kernels/sclk/ROS_??????_STEP.TSC"; QString lsk = "$ISIS3DATA/base/kernels/lsk/naif????.tls"; FileName sclkName(sclk); FileName lskName(lsk); // change this to ask the kerneldb to return the most recent rosetta sclk kernel? // actually // add this to the changeset /* KernelDb baseKernels(0); baseKernels.loadSystemDb("rosetta", lab); // do we have a label at this point... is there another // possible input? sclkName = sclkName.highestVersion(); lskName = lskName.highestVersion(); sclk = baseKernels.spacecraftClock(lab); lsk = baseKernels.leapSecond(lab); */ furnsh_c("/usgs/cpkgs/isis3/data/rosetta/kernels/sclk/ROS_160929_STEP.TSC"); furnsh_c("/usgs/cpkgs/isis3/data/base/kernels/lsk/naif0012.tls"); furnsh_c(lskName.expanded().toLatin1().data()); furnsh_c(sclkName.expanded().toLatin1().data()); SpiceDouble et; scs2e_c( (SpiceInt) -226, scetFinal.toLatin1().data(), &et); QString startTime = iTime(et).UTC(); std::cout << "starting SCET: " << iTime(et).UTC() << std::endl; double exposureTime = toDouble(frameParam[0]*0.001); // covert to s SpiceChar sclkString[50]; SpiceChar endSclkString[50]; sce2s_c( (SpiceInt) -226, et, (SpiceInt) 50, sclkString); sce2s_c( (SpiceInt) -226, et+exposureTime, (SpiceInt) 50, endSclkString); std::cout << "starting spacecraft clock start count: " << sclkString << std::endl; } inst.findKeyword("StartTime").setValue(startTime); inst.findKeyword("SpacecraftClockStartCount").setValue(sclkString); // Create a PVL to store the translated labels in Pvl outLabel; PvlKeyword &frameParam = inst["FrameParameter"]; // Translate the Archive group FileName transFile = transDir + "virtisArchive.trn"; PvlToPvlTranslationManager archiveXlater (pdsLabel, transFile.expanded()); archiveXlater.Auto(outLabel); QString stopTime = iTime(et + exposureTime).UTC(); inst.findKeyword("StopTime).setValue(stopTime); //TODO: inst.findKeyword("SpacecraftClockStopCount); outcube->putGroup(inst); // Translate the Instrument group transFile = transDir + "virtisInstruments.trn"; PvlToPvlTranslationManager instrumentXlater (pdsLabel, transFile.expanded()); instrumentXlater.Auto(outLabel); // Unload the naif kernels unload_c(lsk.toLatin1().data()); unload_c(sclk.toLatin1().data()); } // Write the Archive and Instrument groups to the output cube label outcube->putGroup(outLabel.findGroup("Archive", Pvl::Traverse)); Loading
isis/src/rosetta/objs/RosettaVirtisCamera/RosettaVirtisCamera.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -319,7 +319,7 @@ SCLK Format */ QString scetString = toString(scet); std::cout << "scetString: " << scetString << std::endl; // std::cout << "scetString: " << scetString << std::endl; // seconds stay the same QStringList scetStringList = scetString.split('.'); Loading @@ -335,7 +335,7 @@ SCLK Format scetStringList = toString(fractValue).split("."); scetFinal.append(scetStringList[1].left(5)); std::cout << "final scet value: " << scetFinal << std::endl; // std::cout << "final scet value: " << scetFinal << std::endl; /* if (i==0) { setTime(iTime(scetFinal)); Loading