PHD2 ROI (star capture area) calculated incorrectly by NINA on call

Issue #857 resolved
Linwood Ferguson created an issue

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)

  1. George Hilios

    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

  2. Linwood Ferguson reporter

    Good, I figured if this hits when the keep-guiding trigger does it’s a chance to test both.

  3. Log in to comment