2022-03-05 12:44:19 +01:00
|
|
|
#include "core/plugin.h"
|
2022-02-21 23:32:11 +01:00
|
|
|
#include "logger.h"
|
2022-03-05 12:44:19 +01:00
|
|
|
#include "core/module.h"
|
2024-11-15 10:19:51 -05:00
|
|
|
#include "core/config.h"
|
2022-02-21 23:32:11 +01:00
|
|
|
|
|
|
|
|
#include "goes/gvar/module_gvar_decoder.h"
|
|
|
|
|
#include "goes/gvar/module_gvar_image_decoder.h"
|
|
|
|
|
#include "goes/hrit/module_goes_lrit_data_decoder.h"
|
|
|
|
|
#include "goes/grb/module_goes_grb_cadu_extractor.h"
|
|
|
|
|
#include "goes/grb/module_goes_grb_data_decoder.h"
|
2022-08-20 20:22:46 +02:00
|
|
|
#include "goes/mdl/module_goes_mdl_decoder.h"
|
2023-03-08 19:43:11 +01:00
|
|
|
#include "goes/sd/module_goesn_sd_decoder.h"
|
2023-03-09 02:48:06 +01:00
|
|
|
#include "goes/sd/module_sd_image_decoder.h"
|
2023-08-18 16:38:39 +02:00
|
|
|
#include "goes/raw/module_goesr_instruments.h"
|
2022-02-21 23:32:11 +01:00
|
|
|
|
2024-04-22 12:17:41 +02:00
|
|
|
#include "geo_false_color.h"
|
2024-04-23 22:41:14 +02:00
|
|
|
#include "geo_false_color_ir_merge.h"
|
2024-04-22 12:17:41 +02:00
|
|
|
|
2024-11-15 10:19:51 -05:00
|
|
|
#include "goes/hrit/dcs/dcs_settings.h"
|
|
|
|
|
|
2022-02-21 23:32:11 +01:00
|
|
|
class GOESSupport : public satdump::Plugin
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
std::string getID()
|
|
|
|
|
{
|
2022-02-22 14:16:53 +01:00
|
|
|
return "goes_support";
|
2022-02-21 23:32:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void init()
|
|
|
|
|
{
|
|
|
|
|
satdump::eventBus->register_handler<RegisterModulesEvent>(registerPluginsHandler);
|
2024-04-20 18:02:28 +02:00
|
|
|
// satdump::eventBus->register_handler<satdump::ImageProducts::RequestCalibratorEvent>(provideImageCalibratorHandler);
|
2024-04-22 12:17:41 +02:00
|
|
|
satdump::eventBus->register_handler<satdump::RequestCppCompositeEvent>(provideCppCompositeHandler);
|
2024-11-15 10:19:51 -05:00
|
|
|
satdump::eventBus->register_handler<satdump::config::RegisterPluginConfigHandlersEvent>(registerConfigHandler);
|
2025-01-03 14:33:53 -05:00
|
|
|
satdump::eventBus->register_handler<goes::hrit::GOESLRITDataDecoderModule::DCPUpdateEvent>(goes::hrit::GOESLRITDataDecoderModule::updateDCPs);
|
2024-11-15 10:19:51 -05:00
|
|
|
goes::hrit::initDcsConfig();
|
2022-02-21 23:32:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void registerPluginsHandler(const RegisterModulesEvent &evt)
|
|
|
|
|
{
|
|
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::gvar::GVARDecoderModule);
|
|
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::gvar::GVARImageDecoderModule);
|
|
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::hrit::GOESLRITDataDecoderModule);
|
|
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::grb::GOESGRBCADUextractor);
|
|
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::grb::GOESGRBDataDecoderModule);
|
2022-08-20 20:22:46 +02:00
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::mdl::GOESMDLDecoderModule);
|
2023-03-08 19:43:11 +01:00
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::sd::GOESNSDDecoderModule);
|
2023-03-09 02:48:06 +01:00
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::sd::SDImageDecoderModule);
|
2023-08-18 16:38:39 +02:00
|
|
|
REGISTER_MODULE_EXTERNAL(evt.modules_registry, goes::instruments::GOESRInstrumentsDecoderModule);
|
2022-02-21 23:32:11 +01:00
|
|
|
}
|
2024-04-19 12:02:16 +02:00
|
|
|
|
2024-11-15 10:19:51 -05:00
|
|
|
static void registerConfigHandler(const satdump::config::RegisterPluginConfigHandlersEvent &evt)
|
|
|
|
|
{
|
|
|
|
|
evt.plugin_config_handlers.push_back({"GOES HRIT DCS Parser", goes::hrit::renderDcsConfig, goes::hrit::saveDcsConfig });
|
|
|
|
|
}
|
|
|
|
|
|
2024-04-20 18:02:28 +02:00
|
|
|
// static void provideImageCalibratorHandler(const satdump::ImageProducts::RequestCalibratorEvent &evt)
|
|
|
|
|
// {
|
|
|
|
|
// if (evt.id == "goes_xrit")
|
|
|
|
|
// evt.calibrators.push_back(std::make_shared<goes::hrit::GOESxRITCalibrator>(evt.calib, evt.products));
|
|
|
|
|
// }
|
2024-04-22 12:17:41 +02:00
|
|
|
|
|
|
|
|
static void provideCppCompositeHandler(const satdump::RequestCppCompositeEvent &evt)
|
|
|
|
|
{
|
2024-04-24 14:45:23 +02:00
|
|
|
if (evt.id == "goes_abi_false_color")
|
2024-04-22 12:17:41 +02:00
|
|
|
evt.compositors.push_back(goes::goesFalseColorCompositor);
|
2024-04-23 22:41:14 +02:00
|
|
|
else if (evt.id == "goes_abi_false_color_ir_merge")
|
|
|
|
|
evt.compositors.push_back(goes::goesFalseColorIRMergeCompositor);
|
2024-04-22 12:17:41 +02:00
|
|
|
}
|
2022-02-21 23:32:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
PLUGIN_LOADER(GOESSupport)
|