satdump/plugins/noaa_metop_support/main.cpp

59 lines
2.7 KiB
C++
Raw Permalink Normal View History

2024-12-06 15:05:50 -05:00
#include "instruments/avhrr/avhrr_calibrator.h"
#include "instruments/mhs/mhs_calibrator.h"
2025-05-28 19:51:33 +02:00
#include "metop/instruments/ascat/ascat_calibrator.h"
2024-12-06 15:05:50 -05:00
#include "metop/instruments/iasi/iasi_img_calibrator.h"
2025-05-28 19:51:33 +02:00
#include "noaa/instruments/hirs/hirs_calibrator.h"
2024-12-06 15:05:50 -05:00
2025-05-28 19:51:33 +02:00
#include "core/plugin.h"
2022-02-21 23:32:11 +01:00
#include "metop/module_metop_ahrpt_decoder.h"
#include "metop/module_metop_dump_decoder.h"
2022-02-24 19:33:58 +01:00
#include "metop/module_metop_instruments.h"
2022-02-21 23:32:11 +01:00
#include "noaa/module_noaa_dsb_decoder.h"
2025-05-28 19:51:33 +02:00
#include "noaa/module_noaa_gac_decoder.h"
#include "noaa/module_noaa_hrpt_decoder.h"
2022-04-04 16:28:02 +02:00
#include "noaa/module_noaa_instruments.h"
2022-02-21 23:32:11 +01:00
#include "pipeline/module.h"
2025-07-23 12:21:02 +02:00
#include "products/image/image_calibrator.h"
2025-01-03 16:26:39 +01:00
2022-02-21 23:32:11 +01:00
class NOAAMetOpSupport : public satdump::Plugin
{
public:
2025-05-28 19:51:33 +02:00
std::string getID() { return "noaa_metop_support"; }
2022-02-21 23:32:11 +01:00
void init()
{
satdump::eventBus->register_handler<satdump::pipeline::RegisterModulesEvent>(registerPluginsHandler);
satdump::eventBus->register_handler<satdump::products::RequestImageCalibratorEvent>(provideImageCalibratorHandler);
2022-02-21 23:32:11 +01:00
}
static void registerPluginsHandler(const satdump::pipeline::RegisterModulesEvent &evt)
2022-02-21 23:32:11 +01:00
{
REGISTER_MODULE_EXTERNAL(evt.modules_registry, metop::MetOpAHRPTDecoderModule);
REGISTER_MODULE_EXTERNAL(evt.modules_registry, metop::MetOpDumpDecoderModule);
2022-03-11 10:38:11 +01:00
REGISTER_MODULE_EXTERNAL(evt.modules_registry, metop::instruments::MetOpInstrumentsDecoderModule);
2022-02-24 19:33:58 +01:00
2022-02-21 23:32:11 +01:00
REGISTER_MODULE_EXTERNAL(evt.modules_registry, noaa::NOAAHRPTDecoderModule);
REGISTER_MODULE_EXTERNAL(evt.modules_registry, noaa::NOAAGACDecoderModule);
REGISTER_MODULE_EXTERNAL(evt.modules_registry, noaa::NOAADSBDecoderModule);
2022-04-04 16:28:02 +02:00
REGISTER_MODULE_EXTERNAL(evt.modules_registry, noaa::instruments::NOAAInstrumentsDecoderModule);
2022-02-21 23:32:11 +01:00
}
2023-10-23 14:52:35 +02:00
static void provideImageCalibratorHandler(const satdump::products::RequestImageCalibratorEvent &evt)
2025-01-03 16:26:39 +01:00
{
if (evt.id == "noaa_avhrr3")
evt.calibrators.push_back(std::make_shared<noaa_metop::NoaaAVHRR3Calibrator>(evt.products, evt.calib));
else if (evt.id == "noaa_mhs" || evt.id == "noaa_amsu")
evt.calibrators.push_back(std::make_shared<noaa_metop::NoaaMHSCalibrator>(evt.products, evt.calib));
2025-01-12 20:25:45 +01:00
else if (evt.id == "metop_iasi_img")
evt.calibrators.push_back(std::make_shared<metop::iasi::MetOpIASIImagingCalibrator>(evt.products, evt.calib));
2025-05-28 19:51:33 +02:00
else if (evt.id == "metop_ascat")
evt.calibrators.push_back(std::make_shared<metop::ascat::MetOpASCATCalibrator>(evt.products, evt.calib));
else if (evt.id == "noaa_hirs")
evt.calibrators.push_back(std::make_shared<noaa_metop::NoaaHIRSCalibrator>(evt.products, evt.calib));
2025-01-03 16:26:39 +01:00
}
2022-02-21 23:32:11 +01:00
};
PLUGIN_LOADER(NOAAMetOpSupport)