Make the DestinationFrame in the SpiceRotation option and use GALACTIC if it is not specified

This commit is contained in:
Alexander Bock
2024-02-12 11:39:08 +09:00
parent 1691b92575
commit adad4ab0ff
2 changed files with 6 additions and 4 deletions
+5 -3
View File
@@ -68,8 +68,10 @@ namespace {
std::string sourceFrame
[[codegen::annotation("A valid SPICE NAIF name or integer")]];
// [[codegen::verbatim(DestinationInfo.description)]]
std::string destinationFrame;
// This value specifies the destination frame that is used for the coordinate
// transformation. This has to be a valid SPICE name. If this value is not
// 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;
@@ -99,7 +101,7 @@ SpiceRotation::SpiceRotation(const ghoul::Dictionary& dictionary)
const Parameters p = codegen::bake<Parameters>(dictionary);
_sourceFrame = p.sourceFrame;
_destinationFrame = p.destinationFrame;
_destinationFrame = p.destinationFrame.value_or("GALACTIC");
if (p.kernels.has_value()) {
if (std::holds_alternative<std::string>(*p.kernels)) {