Remove the ability to implicitly load kernels from SpiceTranslation and SpiceRotations

This commit is contained in:
Alexander Bock
2024-03-07 14:58:12 +01:00
parent 0d96df01b0
commit 2ed6907cf1
2 changed files with 0 additions and 29 deletions
-14
View File
@@ -73,9 +73,6 @@ namespace {
// specified, a reference frame of 'GALACTIC' is used instead
std::optional<std::string> destinationFrame;
// [[codegen::verbatim(DestinationInfo.description)]]
std::optional<std::variant<std::vector<std::string>, std::string>> kernels;
// [[codegen::verbatim(TimeFrameInfo.description)]]
std::optional<ghoul::Dictionary> timeFrame
[[codegen::reference("core_time_frame")]];
@@ -103,17 +100,6 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary)
_sourceFrame = p.sourceFrame;
_destinationFrame = p.destinationFrame.value_or("GALACTIC");
if (p.kernels.has_value()) {
if (std::holds_alternative<std::string>(*p.kernels)) {
SpiceManager::ref().loadKernel(std::get<std::string>(*p.kernels));
}
else {
for (const std::string& s : std::get<std::vector<std::string>>(*p.kernels)) {
SpiceManager::ref().loadKernel(s);
}
}
}
_fixedDate.onChange([this]() {
if (_fixedDate.value().empty()) {
_fixedEphemerisTime = std::nullopt;
@@ -88,10 +88,6 @@ namespace {
std::optional<std::string> fixedDate
[[codegen::annotation("A date to lock the position to")]];
// A single kernel or list of kernels that this SpiceTranslation depends on. All
// provided kernels will be loaded before any other operation is performed
std::optional<std::variant<std::vector<std::string>, std::string>> kernels;
};
#include "spicetranslation_codegen.cpp"
} // namespace
@@ -126,17 +122,6 @@ SpiceTranslation::SpiceTranslation(const ghoul::Dictionary& dictionary)
}
};
if (p.kernels.has_value()) {
if (std::holds_alternative<std::string>(*p.kernels)) {
loadKernel(absPath(std::get<std::string>(*p.kernels)).string());
}
else {
for (const std::string& k : std::get<std::vector<std::string>>(*p.kernels)) {
loadKernel(absPath(k).string());
}
}
}
_target.onChange([this]() {
_cachedTarget = _target;
requireUpdate();