diff --git a/plugins/fengyun3_support/fengyun3/module_fy3_instruments.cpp b/plugins/fengyun3_support/fengyun3/module_fy3_instruments.cpp index 5012cfdc6..0fad05303 100644 --- a/plugins/fengyun3_support/fengyun3/module_fy3_instruments.cpp +++ b/plugins/fengyun3_support/fengyun3/module_fy3_instruments.cpp @@ -341,7 +341,14 @@ namespace fengyun3 // Products dataset satdump::ProductDataSet dataset; dataset.satellite_name = sat_name; - // dataset.timestamp = avg_overflowless(avhrr_reader.timestamps); + if ((d_satellite == FY_AB || d_satellite == FY_3C) && d_downlink == AHRPT) + dataset.timestamp = avg_overflowless(virr_reader.timestamps); + else if (d_satellite == FY_AB && d_downlink == MPT) + dataset.timestamp = avg_overflowless(mersi1_reader.timestamps); + else if (d_satellite == FY_3D) + dataset.timestamp = avg_overflowless(mersi2_reader.timestamps); + else if (d_satellite == FY_3E) + dataset.timestamp = avg_overflowless(mersill_reader.timestamps); // Satellite ID { diff --git a/src-interface/viewer/image_handler.cpp b/src-interface/viewer/image_handler.cpp index 4cf2b4524..a17114af9 100644 --- a/src-interface/viewer/image_handler.cpp +++ b/src-interface/viewer/image_handler.cpp @@ -80,6 +80,9 @@ namespace satdump if (normalize_image) current_image.normalize(); + int pre_corrected_width = current_image.width(); + int pre_corrected_height = current_image.height(); + std::vector corrected_stuff; if (correct_image) { @@ -95,8 +98,8 @@ namespace satdump if (map_overlay || cities_overlay) { current_image.to_rgb(); // Ensure this is RGB!! - auto proj_func = satdump::reprojection::setupProjectionFunction(current_image.width(), - current_image.height(), + auto proj_func = satdump::reprojection::setupProjectionFunction(pre_corrected_width, + pre_corrected_height, products->get_proj_cfg(), current_proj_metadata, products->get_tle(),