Skip to content

Commit

Permalink
Add MSL conf, data, and tests (#28)
Browse files Browse the repository at this point in the history
* Added MSL config, tests, and data

* Added msl config and updated tests

* Updated changelog
  • Loading branch information
AustinSanders authored Apr 26, 2024
1 parent ec13eed commit f6495c0
Show file tree
Hide file tree
Showing 6 changed files with 530 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ release.
- Adds support for Smart1 [#16](https://github.com/DOI-USGS/SpiceQL/issues/16)
- Adds support for Hayabusa2 ONC [#12](https://github.com/DOI-USGS/SpiceQL/issues/12)
- Adds support for Voyager [#13](https://github.com/DOI-USGS/SpiceQL/issues/13)
- Adds support for MSL [#15](https://github.com/DOI-USGS/SpiceQL/issues/15)

### Fixed

Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ if(SPICEQL_BUILD_LIB)
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mex.json
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mgs.json
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/mro.json
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/msl.json
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/odyssey.json
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/smart1.json
${CMAKE_CURRENT_SOURCE_DIR}/SpiceQL/db/tgo.json
Expand Down
56 changes: 56 additions & 0 deletions SpiceQL/db/msl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"msl":{
"ck":{
"reconstructed":{
"kernels":["msl_ra_[a-z]{8}_v[0-9]{1}.bc$",
"msl_cruise_recon_raw[a-z]{2,3}_v[0-9]{1}.bc$",
"msl_edl_v[0-9]{2}.bc$",
"msl_surf_[a-z]{2,5}_tlm[a-z]{0,3}.bc$",
"msl_surf_[a-z]{2,5}_[a-z]{2,6}_[0-9]{4}_[0-9]{4}_v[0-9]{1}.bc$",
"msl_surf_[a-z]{2,5}_tlm[a-z]{0,3}_spanned.bc",
"msl_cruise_recon_nospin.bc$",
"msl_still_at_ls_v1.bc$",
"msl_surf_rover_runout.bc$",
"msl_rover2cacs_v[0-9]{1}.bc$",
"msl_rsm_calpose_v[0-9]{1}.bc$",
"msl_hga_zero_v[0-9]{1}.bc$"]
}
},
"fk":{
"kernels":["msl.tf(.history)?$",
"msl_v[0-9]{2}.tf$",
"msl_tp_gc[0-9]{6}_iau2000_v[0-9]{1}.tf",
"msl_tp_[a-z]{2,3}[0-9]{6}_iau2000_v[0-9]{1}.tf$"]
},
"sclk":{
"kernels":["msl.tsc$",
"msl_lmst_[a-z]{2,3}[0-9]{6}_v[0-9]{1}.tsc$",
"MSL_[0-9]{2}_SCLKSCET.[0-9]{5}.tsc$"]
},
"ik":{
"kernels":["msl_[a-z]{2,5}_[c,v][0-9]{2}.ti$",
"msl_struct_v[0-9]{2}.ti$",
"msl_[a-z]{2,3}_zero_v[0-9]{1}.ti$",
"msl_[a-z]{4,5}_[0-9]{8}_c[0-9]{2}.ti$",
"msl_m[l,r]{1}_[0-9]{8}_c[0-9]{2}.ti$",
"msl_[a-z]{3}_[0-9]{8}_c[0-9]{2}.ti$"]
},
"lsk":{
"kernels":"msl.tls(.history)?$"
},
"spk":{
"kernels":["msl_struct_v[0-9]{2}.bsp$",
"msl_cruise_v[0-9]{1}.bsp$",
"msl_edl_v[0-9]{2}.bsp$",
"msl_ls_ops[0-9]{6}_iau2000_v[0-9]{1}.bsp$",
"msl_surf_rover_[a-z]{0,3}_?(runout)?.bsp$",
"msl_surf_[a-z]{5}_[a-z]{3}_[0-9]{4}_[0-9]{4}_v[0-9]{1}.bsp",
"msl_atls_[a-z]{2,3}[0-9]{6}_v[0-9]{1}.bsp$",
"msl_cruise.bsp(.history)?$",
"msl_[a-z]{2}_gc[0-9]{6}_iau2000_v[0-9]{1}.bsp$",
"msl_still_at_ls_v[0-9]{1}.bsp$",
"msl_spk_cruise_od057_v[0-9]{1}-tcm2_eph-edl-landed.bsp$",
"msl_cruise_merged_[0-9]{6}.bsp"]
}
}
}
2 changes: 1 addition & 1 deletion SpiceQL/tests/FunctionalTestsConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace SpiceQL;
TEST_F(TestConfig, FunctionalTestConfigConstruct) {
json megaConfig = testConfig.globalConf();

EXPECT_EQ(megaConfig.size(), 67);
EXPECT_EQ(megaConfig.size(), 68);
}

TEST_F(TestConfig, FunctionalTestConfigEval) {
Expand Down
73 changes: 73 additions & 0 deletions SpiceQL/tests/QueryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -765,3 +765,76 @@ TEST_F(IsisDataDirectory, FunctionalTestListMissionKernelsVoyager2) {
CompareKernelSets(getKernelsAsVector(res.at("voyager2").at("fk")), expected);

}

TEST_F(IsisDataDirectory, FunctionalTestListMissionKernelsMsl) {

fs::path dbPath = getMissionConfigFile("msl");

compareKernelSets("msl");

ifstream i(dbPath);
nlohmann::json conf = nlohmann::json::parse(i);

MockRepository mocks;
mocks.OnCallFunc(ls).Return(files);

nlohmann::json res = listMissionKernels("doesn't matter", conf);

set<string> kernels = getKernelsAsSet(res);
set<string> mission = missionMap.at("msl");

vector<string> expected = {"msl_ra_toolsref_v1.bc",
"msl_cruise_recon_rawrt_v2.bc",
"msl_cruise_recon_raweng_v1.bc",
"msl_edl_v01.bc",
"msl_surf_hga_tlm.bc",
"msl_surf_ra_tlmenc.bc",
"msl_surf_ra_tlmres.bc",
"msl_surf_rsm_tlmenc.bc",
"msl_surf_rsm_tlmres.bc",
"msl_surf_rover_tlm.bc"};

CompareKernelSets(getKernelsAsVector(res.at("msl").at("ck").at("reconstructed")), expected);


expected = {"msl.tf"};
CompareKernelSets(getKernelsAsVector(res.at("msl").at("fk")), expected);

expected = {"msl_aux_v00.ti",
"msl_chrmi_20120731_c03.ti",
"msl_hbla_20120731_c03.ti",
"msl_hblb_20120731_c03.ti",
"msl_hbra_20120731_c03.ti",
"msl_hbrb_20120731_c03.ti",
"msl_hfla_20120731_c03.ti",
"msl_hflb_20120731_c03.ti",
"msl_hfra_20120731_c03.ti",
"msl_hfrb_20120731_c03.ti",
"msl_mahli_20120731_c02.ti",
"msl_mardi_20120731_c02.ti",
"msl_ml_20120731_c03.ti",
"msl_mr_20120731_c03.ti",
"msl_nla_20120731_c04.ti",
"msl_nlb_20120731_c04.ti",
"msl_nlb_20130530_c05.ti",
"msl_nra_20120731_c04.ti",
"msl_nrb_20120731_c04.ti",
"msl_nrb_20130530_c05.ti",
"msl_struct_v01.ti"};

CompareKernelSets(getKernelsAsVector(res.at("msl").at("ik")), expected);

expected = {"msl.tsl"};
CompareKernelSets(getKernelsAsVector(res.at("msl").at("lsk")), expected);

expected = {"msl.tsc",
"msl_lmst_ops120808_v1.tsc"};
CompareKernelSets(getKernelsAsVector(res.at("msl").at("sclk")), expected);

expected = {"msl_struct_v02.bsp",
"msl_cruise_v1.bsp",
"msl_edl_v01.bsp",
"msl_ls_ops120808_iau2000_v1.bsp",
"msl_surf_rover_loc.bsp"};
CompareKernelSets(getKernelsAsVector(res.at("msl").at("spk")), expected);
}
Loading

0 comments on commit f6495c0

Please sign in to comment.