PHD2 ROI (star capture area) calculated incorrectly by NINA on call
To reproduce set the ROI in the equipment setup for PHD2 to 60% (or some such number), and check the log for the call to PHD2.
The call should include [x, y, width, height]. For my ASI174mm mini the log showed:
2021-04-28T23:10:33.1417|DEBUG|PHD2Guider.cs|SendMessage|505|Phd2 - Sending message '{"id":"3","method":"guide","params":{"settle":{"pixels":2.0,"time":10,"timeout":45},"recalibrate":false,"roi":[387,243,1548,972]}}'
The pixel dimensions are [1936,1217]. 60% of that should start at 387 and 243 (correct), but the width and height of the ROI should be 60% of the actual total, so it should have been [1161,730] instead of [1548,972]. It looks like it is taking the balance of the frame, since the area i the log is essentially beginning at the right place, and going all the way to the right edge and bottom.
Basically the math is wrong. The result should have been [387,243,1161,730[ instead (+/- rounding).
Comments (7)
-
-
Oh oh oh, the 3rd + 4th parameters are supposed to width and height, not the other corner of the bounding box. In that case, correct! Easy bug fix, I’ll submit one now
-
reporter Ah… I think I now understand the misunderstanding. The 3rd and 4th parameter per PHD2 (see guide here: https://github.com/OpenPHDGuiding/phd2/wiki/EventMonitoring ) is width and height of the ROI, not the bottom right coordinates. Or am I misunderstanding you. In the original call 387 + 1548 = 1935 which is basically the right edge.
-
reporter Sorry, we overlapped – yes.
-
reporter Good, I figured if this hits when the keep-guiding trigger does it’s a chance to test both.
-
repo owner - changed status to resolved
-
repo owner - removed version
Removing version: 1.11 Nightly (automated comment)
- Log in to comment
1936 * 60% = 1161
1548 - 387 = 1161
The math looks correct! Perhaps I’m missing something?