diff --git a/resources/projections_settings/meteor_m2-2_msumr.json b/resources/projections_settings/meteor_m2-2_msumr.json index 58c212f15..1567166d4 100644 --- a/resources/projections_settings/meteor_m2-2_msumr.json +++ b/resources/projections_settings/meteor_m2-2_msumr.json @@ -1,10 +1,10 @@ { "type": "normal_single_line", - "scan_angle": 110.6, - "roll_offset": 0, //-0.35, + "scan_angle": 110.3, + "roll_offset": -0.15, "pitch_offset": 0, - "yaw_offset": 0.8, //.8, - "timestamp_offset": -1.8, + "yaw_offset": 2.6, //.8, + "timestamp_offset": -1.0, "image_width": 1572, "gcp_spacing_x": 100, "gcp_spacing_y": 100, diff --git a/src-interface/viewer/image_handler.cpp b/src-interface/viewer/image_handler.cpp index 258806b8f..aea9f2047 100644 --- a/src-interface/viewer/image_handler.cpp +++ b/src-interface/viewer/image_handler.cpp @@ -95,16 +95,27 @@ namespace satdump products->get_proj_cfg(), products->get_tle(), current_timestamps, - rotate_image); + !(corrected_stuff.size() != 0 && correct_image) && rotate_image); if (corrected_stuff.size() != 0 && correct_image) { + int fwidth = current_image.width(); + int fheight = current_image.height(); + bool rotate = rotate_image; + std::function(float, float, int, int)> newfun = - [proj_func, corrected_stuff](float lat, float lon, int map_height, int map_width) mutable -> std::pair + [proj_func, corrected_stuff, fwidth, fheight, rotate](float lat, float lon, int map_height, int map_width) mutable -> std::pair { std::pair ret = proj_func(lat, lon, map_height, map_width); if (ret.first != -1 && ret.second != -1 && ret.first < (int)corrected_stuff.size() && ret.first >= 0) + { ret.first = corrected_stuff[ret.first]; + if (rotate) + { + ret.first = (fwidth - 1) - ret.first; + ret.second = (fheight - 1) - ret.second; + } + } else ret.second = ret.first = -1; return ret;