Decided to put this in a new topic as subject is going further than my initial topic around coordinate calculation.
If you feel its better to integrate my early topics please do so.
After successfully displaying my own images, I fetched via the RestAPI the center coordinates, width, height, pixel scale and rotation of all Astrobin Images of the Day (IOTD) which are having a valid plate solving solution.
Basic idea is to put a catalog of all Astrobin IOTD together showing the areas most captured/awarded and providing some image details such as date, image rig used, etc.
Salvatore, the owner of Astrobin, is well aware of the project.
Here the first preview of the generated Cartes du Ciel catalog using the RA, DEC center coordinates and image circle.
Thanks to support in an early topic about coordinate calculation https://www.cloudyni...e-calculations/ I also managed to draw rectangles of the images instead only circles to create a more realistic appearance.
(for testing it's only a selection of IOTDs)
However, as closer it gets to the pole or for widefield images the rectangles start looking strange, which I understand as I try to display a simple 2D rectangle on a sphere.
Here a preview of what I mean:
I am doing the calculations in a script for each image corner as following:
// corner down left $nX_Old = RA Center - image width in decimal degrees / 2 $nX_Rot = RA Center in decimal degrees as image center = rotation center $nY_Old = DEC Center - image height in decimal degrees / 2 $nY_Rot = DEC Center in decimal degrees as image center = rotation center $angle = rotation angle converted in Radiant // for the new X-Coordinate $nX_New = ($nX_Old - $nX_Rot) * cos($angle) - ($nY_Old - $nY_Rot) * sin($angle) ; if ($nX_New < 0) $nX_New = 360 - $nX_New; if ($nX_New > 360) $nX_New = $nX_New - 360; // for the new Y-Coordinate $nY_New = ($nX_Old - $nX_Rot) * sin($angle) + ($nY_Old - $nY_Rot) * cos($angle) ;
For the other corners I accordingly add half of the image width or half of the image height or I subtract it to get the orginal (old) corner coordinates of a not rotated rectangle.
Being honest, I have reached limits of my capabilities here, the whole topic about coordinate transformation is far too long ago for me and especially transforming them to be correctly displayed on a sphere, I am out unfortunately.
I would be extremely happy someone could give a helping hand with the formulas supporting the creation of a correctly appearing catalogue or at least point me to a solution.
No ultimate precision is required here as the catalog is for information purpose only.
Here are some data, who wants to give it a try calculating (Epoch 2000):
RA: 22.00600 DEC: -73.3340 Width: 1.023120 Height: 0.682080 Angle: 177.8280
RA: 106.4650 DEC: 51.41700 Width: 8.990975 Height: 13.48646 Angle: 358.7710
RA: 84.61900 DEC: 28.18700 Width: 6.362222 Height: 4.214972 Angle: 177.0880
Edited by astro_alex80, 05 December 2021 - 07:11 AM.