brickbots / PiFinder

A plate solving telescope finder based around a Raspberry PI and RPI HQ Camera
GNU General Public License v3.0
162 stars 31 forks source link

Chart rotation potentially incorrect very near celestial poles #117

Open brickbots opened 1 year ago

brickbots commented 1 year ago

When aligned on a pixel off-center from the camera image, the chart rotation appears incorrect when the celestial pole is between the geometric center of the camera image and the target pixel.

Tetra3 returns roll based on the geometric center, not the target pixel. According to Gustav this would be tricky to implement.

A potential solution is to render the chart based on the geometric center of the camera image (raw solution values + roll) then offset this render by the target pixel values to align it with the target pixel before copying it to the screen and adding the reticle. This would ultimately center the chart on the target pixel, but provide a more stable rotation reference.

TakKanekoGit commented 4 months ago

@brickbots -- I will try to pick this issue up in step 2 of the "Roll Issue Fix".

As I understand from your comments above, the roll measured by plate solving is only valid at the centre of the camera FoV. The difference between the roll at the camera centre and the target pixel becomes bigger higher declinations. If we want to use the roll as a measurement, as proposed for later enhancements, I think we need to fix this?

Here's how I propose to fix it:

  1. Take the (ra_camera, dec_camera, roll_camera) from plate solving. Compare the measured roll against the roll calculated at (ra_camera, dec_camera) against the measured roll_camera to get the roll_offset. This should be reasonably constant for an Alt/Az mount.
  2. Work out the (ra_scope, dec_scope) at the target pixel as done currently. Calculate the roll at the target and add the roll_offset. This should give the correct roll as seen by the scope.

Do you think this will work or is there more to the problem?