diff --git a/include/openspace/events/event.h b/include/openspace/events/event.h index 8b2c31b410..bc688822ce 100644 --- a/include/openspace/events/event.h +++ b/include/openspace/events/event.h @@ -73,7 +73,7 @@ struct Event { LayerAdded, LayerRemoved, SessionRecordingPlayback, - PointJwstRequested, + PointSpacecraft, Custom }; constexpr explicit Event(Type type_) : type(type_) {} @@ -378,19 +378,20 @@ struct EventSessionRecordingPlayback : public Event { }; /** - * This event is created when a request for pointing the JWST model to a Ra Dec coordinate - * in the sky is issued. The event contains information about the sky coordinate to point - * the JWST towards and an optional argument for the duration it should do the pointing. + * This event is created when a request for pointing a spacecraft towards a Ra Dec + * coordinate in the sky is issued. The event contains information about the sky + * coordinate to point the spacecraft towards, and an optional argument for the duration + * it should do the pointing. * - * \param Ra The Ra part of the sky coordinate in decimal degrees to point the JWST to - * \param Dec The Dec part of the sky coordinate in decimal degrees to point the JWST to + * \param Ra The Ra part of the sky coordinate in decimal degrees to point towards + * \param Dec The Dec part of the sky coordinate in decimal degrees to point towards * \param Duration The duration of time in seconds that the telescope should redirect * itself to the coordinate. Default is 3 seconds */ -struct EventPointJwstRequested : public Event { - static const Type Type = Event::Type::PointJwstRequested; +struct EventPointSpacecraft : public Event { + static const Type Type = Event::Type::PointSpacecraft; - EventPointJwstRequested(double ra_, double dec_, double duration_ = 3.0); + EventPointSpacecraft(double ra_, double dec_, double duration_ = 3.0); const double ra; const double dec; const double duration; diff --git a/src/events/event.cpp b/src/events/event.cpp index 65bfe9c34b..e02857e7e9 100644 --- a/src/events/event.cpp +++ b/src/events/event.cpp @@ -171,10 +171,10 @@ void log(int i, const EventSessionRecordingPlayback& e) { LINFO(fmt::format("[{}] SessionRecordingPlayback: {}", i, state)); } -void log(int i, const EventPointJwstRequested& e) { - ghoul_assert(e.type == EventPointJwstRequested::Type, "Wrong type"); +void log(int i, const EventPointSpacecraft& e) { + ghoul_assert(e.type == EventPointSpacecraft::Type, "Wrong type"); LINFO(fmt::format( - "[{}] PointJwstRequested: Ra: {}, Dec: {}, Duration: {}", i, e.ra, e.dec, + "[{}] PointSpacecraft: Ra: {}, Dec: {}, Duration: {}", i, e.ra, e.dec, e.duration )); } @@ -203,7 +203,7 @@ std::string_view toString(Event::Type type) { case Event::Type::LayerAdded: return "LayerAdded"; case Event::Type::LayerRemoved: return "LayerRemoved"; case Event::Type::SessionRecordingPlayback: return "SessionRecordingPlayback"; - case Event::Type::PointJwstRequested: return "PointJwstRequested"; + case Event::Type::PointSpacecraft: return "PointSpacecraft"; case Event::Type::Custom: return "Custom"; default: throw ghoul::MissingCaseException(); @@ -259,8 +259,8 @@ Event::Type fromString(std::string_view str) { else if (str == "SessionRecordingPlayback") { return Event::Type::SessionRecordingPlayback; } - else if (str == "PointJwstRequested") { - return Event::Type::PointJwstRequested; + else if (str == "PointSpacecraft") { + return Event::Type::PointSpacecraft; } else if (str == "Custom") { return Event::Type::Custom; @@ -423,10 +423,10 @@ ghoul::Dictionary toParameter(const Event& e) { break; } break; - case Event::Type::PointJwstRequested: - d.setValue("Ra", static_cast(e).ra); - d.setValue("Dec", static_cast(e).dec); - d.setValue("Duration", static_cast(e).duration); + case Event::Type::PointSpacecraft: + d.setValue("Ra", static_cast(e).ra); + d.setValue("Dec", static_cast(e).dec); + d.setValue("Duration", static_cast(e).duration); break; case Event::Type::Custom: d.setValue( @@ -494,8 +494,8 @@ void logAllEvents(const Event* e) { case Event::Type::SessionRecordingPlayback: log(i, *static_cast(e)); break; - case Event::Type::PointJwstRequested: - log(i, *static_cast(e)); + case Event::Type::PointSpacecraft: + log(i, *static_cast(e)); break; case Event::Type::Custom: log(i, *static_cast(e)); @@ -609,7 +609,7 @@ EventSessionRecordingPlayback::EventSessionRecordingPlayback(State state_) , state(state_) {} -EventPointJwstRequested::EventPointJwstRequested(double ra_, double dec_, double duration_) +EventPointSpacecraft::EventPointSpacecraft(double ra_, double dec_, double duration_) : Event(Type) , ra(ra_) , dec(dec_)