2025-12-24 18:11:34 +01:00
|
|
|
#include "core/cli/cli.h"
|
2024-09-25 12:01:24 +02:00
|
|
|
#include "core/plugin.h"
|
|
|
|
|
#include "logger.h"
|
|
|
|
|
|
2025-12-24 18:11:34 +01:00
|
|
|
#include "cli/discover.h"
|
|
|
|
|
|
2025-08-05 19:07:45 +02:00
|
|
|
#include "old/off2pro/module_off2pro.h"
|
|
|
|
|
#include "processors/hdf/gpm/gpm_calibrator.h"
|
2024-09-25 12:01:24 +02:00
|
|
|
|
2025-08-14 17:44:45 +02:00
|
|
|
#include "processors/nc/aws/mwr_calibrator.h"
|
2025-08-05 19:07:45 +02:00
|
|
|
#include "processors/nc/goes/abi_nc_calibrator.h"
|
|
|
|
|
#include "processors/nc/mtg/fci_nc_calibrator.h"
|
2025-06-14 21:56:36 +02:00
|
|
|
|
2025-08-05 19:07:45 +02:00
|
|
|
#include "old/nc2pro/jpss/viirs_nc_calibrator.h"
|
2024-09-25 12:01:24 +02:00
|
|
|
|
2024-09-27 20:20:51 +02:00
|
|
|
//////////
|
|
|
|
|
|
2025-08-05 19:07:45 +02:00
|
|
|
#include "processors/nat/metop/amsu_nat_calibrator.h"
|
|
|
|
|
#include "processors/nat/metop/avhrr_nat_calibrator.h"
|
|
|
|
|
#include "processors/nat/metop/mhs_nat_calibrator.h"
|
|
|
|
|
#include "processors/nat/msg/msg_nat_calibrator.h"
|
2024-09-28 12:53:03 +02:00
|
|
|
|
2025-08-12 13:42:31 +02:00
|
|
|
class FirstPartySupport : public satdump::Plugin
|
2024-09-25 12:01:24 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2025-08-12 13:42:31 +02:00
|
|
|
std::string getID() { return "firstparty_support"; }
|
2024-09-25 12:01:24 +02:00
|
|
|
|
|
|
|
|
void init()
|
|
|
|
|
{
|
2025-05-31 20:26:47 +02:00
|
|
|
satdump::eventBus->register_handler<satdump::pipeline::RegisterModulesEvent>(registerPluginsHandler);
|
2025-03-13 14:19:35 +01:00
|
|
|
satdump::eventBus->register_handler<satdump::products::RequestImageCalibratorEvent>(provideImageCalibratorHandler);
|
2025-12-24 18:11:34 +01:00
|
|
|
satdump::eventBus->register_handler<satdump::cli::RegisterSubcommandEvent>(registerCliCommands);
|
2024-09-25 12:01:24 +02:00
|
|
|
}
|
|
|
|
|
|
2025-12-24 18:11:34 +01:00
|
|
|
static void registerCliCommands(const satdump::cli::RegisterSubcommandEvent &evt) { evt.cmd_handlers.push_back(std::make_shared<satdump::DiscoverProductsCmdHandler>()); }
|
|
|
|
|
|
2025-05-31 20:26:47 +02:00
|
|
|
static void registerPluginsHandler(const satdump::pipeline::RegisterModulesEvent &evt) { REGISTER_MODULE_EXTERNAL(evt.modules_registry, off2pro::Off2ProModule); }
|
2024-09-25 12:01:24 +02:00
|
|
|
|
2025-03-13 14:19:35 +01:00
|
|
|
static void provideImageCalibratorHandler(const satdump::products::RequestImageCalibratorEvent &evt)
|
2025-01-17 18:12:23 +01:00
|
|
|
{
|
|
|
|
|
if (evt.id == "metop_avhrr_nat")
|
2025-08-12 13:42:31 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::AVHRRNatCalibrator>(evt.products, evt.calib));
|
2025-03-13 11:22:37 +01:00
|
|
|
else if (evt.id == "msg_nat_seviri")
|
2025-08-12 13:42:31 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::MSGNatCalibrator>(evt.products, evt.calib));
|
2025-03-13 11:22:37 +01:00
|
|
|
else if (evt.id == "mtg_nc_fci")
|
|
|
|
|
evt.calibrators.push_back(std::make_shared<nc2pro::FCINcCalibrator>(evt.products, evt.calib));
|
2025-03-13 12:15:31 +01:00
|
|
|
else if (evt.id == "goes_nc_abi")
|
2025-08-12 13:42:31 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::ABINcCalibrator>(evt.products, evt.calib));
|
2025-03-13 14:19:35 +01:00
|
|
|
else if (evt.id == "metop_mhs_nat")
|
2025-08-12 13:42:31 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::MHSNatCalibrator>(evt.products, evt.calib));
|
2025-03-13 14:19:35 +01:00
|
|
|
else if (evt.id == "metop_amsu_nat")
|
2025-08-12 13:42:31 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::AMSUNatCalibrator>(evt.products, evt.calib));
|
2025-06-14 21:56:36 +02:00
|
|
|
else if (evt.id == "jpss_nc_viirs")
|
|
|
|
|
evt.calibrators.push_back(std::make_shared<nc2pro::VIIRSNcCalibrator>(evt.products, evt.calib));
|
2025-08-02 14:56:42 +02:00
|
|
|
else if (evt.id == "gpm_hdf")
|
2025-08-12 13:42:31 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::GPMHdfCalibrator>(evt.products, evt.calib));
|
2025-08-14 17:44:45 +02:00
|
|
|
else if (evt.id == "aws_mwr_nc")
|
|
|
|
|
evt.calibrators.push_back(std::make_shared<satdump::firstparty::MWRNcCalibrator>(evt.products, evt.calib));
|
2025-01-17 18:12:23 +01:00
|
|
|
}
|
2024-09-25 12:01:24 +02:00
|
|
|
};
|
|
|
|
|
|
2025-08-12 13:42:31 +02:00
|
|
|
PLUGIN_LOADER(FirstPartySupport)
|