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"
|
2023-10-23 14:52:35 +02:00
|
|
|
#include "products/image_products.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_hrpt_decoder.h"
|
|
|
|
|
#include "noaa/module_noaa_gac_decoder.h"
|
|
|
|
|
#include "noaa/module_noaa_dsb_decoder.h"
|
2022-04-04 16:28:02 +02:00
|
|
|
#include "noaa/module_noaa_instruments.h"
|
2022-02-21 23:32:11 +01:00
|
|
|
|
2023-10-23 14:52:35 +02:00
|
|
|
#include "instruments/avhrr/avhrr_calibrator.h"
|
2023-10-23 19:38:41 +02:00
|
|
|
#include "instruments/mhs/mhs_calibrator.h"
|
2023-10-23 14:52:35 +02:00
|
|
|
|
2022-02-21 23:32:11 +01:00
|
|
|
class NOAAMetOpSupport : public satdump::Plugin
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
std::string getID()
|
|
|
|
|
{
|
|
|
|
|
return "noaa_metop_support";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void init()
|
|
|
|
|
{
|
|
|
|
|
satdump::eventBus->register_handler<RegisterModulesEvent>(registerPluginsHandler);
|
2023-10-23 14:52:35 +02:00
|
|
|
satdump::eventBus->register_handler<satdump::ImageProducts::RequestCalibratorEvent>(provideImageCalibratorHandler);
|
2022-02-21 23:32:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void registerPluginsHandler(const RegisterModulesEvent &evt)
|
|
|
|
|
{
|
|
|
|
|
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::ImageProducts::RequestCalibratorEvent &evt)
|
|
|
|
|
{
|
|
|
|
|
if (evt.id == "noaa_avhrr3")
|
2023-10-28 18:56:15 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<NoaaAVHRR3Calibrator>(evt.calib, evt.products));
|
2023-10-23 19:38:41 +02:00
|
|
|
else if (evt.id == "noaa_mhs" || evt.id == "noaa_amsu")
|
2023-10-28 18:56:15 +02:00
|
|
|
evt.calibrators.push_back(std::make_shared<NoaaMHSCalibrator>(evt.calib, evt.products));
|
2023-10-23 14:52:35 +02:00
|
|
|
}
|
2022-02-21 23:32:11 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
PLUGIN_LOADER(NOAAMetOpSupport)
|