SUMMARY The returned value for the camera field of view is wrong when the focal length is short. OBSERVED RESULT - Canon 6D mk II pixel pitch of 5,67 um and 6240x4160 px - 24 mm lens Returns : 84,47 x 56.31° This is completely wrong EXPECTED RESULT 73,6° x 53,1° ADDITIONAL INFORMATION Apparently your logic is to multiply the pixel sampling by the number of pixels. If this is a good approximation when the focal length is at least 10x bigger than the sensors size, it completely fails otherwise. The formula that gives the proper result each time (but fisheyes) is : fov = 2*atan[L/(2*F)]
More details here : https://www.webastro.net/forums/topic/192785-fiabilité-calcul-champ/?tab=comments#comment-2897344
Thank you for the report. What's L?
Hi! L is a length of the active region of the sensor. Whether the width, the height or the diagonal. Fred
… and of course F is the focal length of the optical system. L and F shall be expressed in the same unit.
The problem is this information is not available right now in Ekos. I believe a long term solution is to enable selection of scopes OR lenses in the equipment profile which can then be used to better calculated the FOV.
You can have it differently. Just multiply the pixel size by the number of pixels and you get the sensor’s dimension. The formula becomes : - fov(width)=2*atan(P*Nw/(2F)) - fov(height)=2*atan(P*Nh/(2F)) Where P is the pixel size, Nw and Nh are the number of pixels of the sensor, and F the focal length. Take care with the units.
This formula is valid for all optical equipment, from lenses to telescopes, focused at infinity, which is the general use in astrophoto. It doesn’t work with fisheyes and at macro/proxy focus (macro photo) but we rarely need to do macro photographies with DSOs ;-)
Jasem the bug fix is in fovdialog.cpp replace the lines : // FOV in arcmins double fov_x = 206264.8062470963552 * ui->cameraWidth->value() * ui->cameraPixelSizeW->value() / 60000.0 / ui->TLength2->value(); double fov_y = 206264.8062470963552 * ui->cameraHeight->value() * ui->cameraPixelSizeH->value() / 60000.0 / ui->TLength2->value(); By: // FOV in arcmins double fov_x = (60*180 / M_PI) * 2 * atan( ui->cameraWidth->value() * ui->cameraPixelSizeW->value() / (2 * ui->TLength2->value())); double fov_y = (60*180 / M_PI) * 2 * atan( ui->cameraHeight->value() * ui->cameraPixelSizeH->value() / (2 * ui->TLength2->value())); You can replace (60*180 / M_PI) * 2 by 6875.5. There is no need to use dozen of decimals… I haven’t checked if the fov is calculated elsewhere.
I forgot to say that you just have to check if all units are consistent !!! The pixel width and focal length shall be expressed in the same unit (both in mm, or both in inch, or both in m…).
Apparently the pixel size is in um (10^-6 m) and the focal length is in mm (10^-3 m), therefore the full formula is : // FOV in arcmins double fov_x = 6875.5 * atan( ui->cameraWidth->value() * ui->cameraPixelSizeW->value() / (2000 * ui->TLength2->value())); double fov_y = 6875.5 * atan( ui->cameraHeight->value() * ui->cameraPixelSizeH->value() / (2000 * ui->TLength2->value()));
Perhaps you can submit a merge request? https://invent.kde.org/education/kstars/-/merge_requests/
So if we can add a test to see which method is used to calculate. However, for the camera lens, there aren't information for that available in Ekos right now. It just has access to focal length and aperture.
I'm about to add support for this in Ekos but the math doesn't check out. For your camera, this would be fov_w = 6875.5*atan(6240*5.67 / (2000*24)) = 250226.44 arcsecs which is 69.5 degrees. While you say it should be 73.6 degrees?
Created attachment 151562 [details] attachment-24758-0.html Hi Jasem The maths are : FOV = 2.atan(dimension/(2*focal length)) That is as simple as that. All the best Fred Fred ________________________________ De : Jasem Mutlaq <bugzilla_noreply@kde.org> Envoyé : Wednesday, August 24, 2022 7:22:49 PM À : fred_76_@hotmail.fr <fred_76_@hotmail.fr> Objet : [kstars] [Bug 439221] Incorrect calculation of camera field of view https://bugs.kde.org/show_bug.cgi?id=439221 --- Comment #13 from Jasem Mutlaq <mutlaqja@ikarustech.com> --- I'm about to add support for this in Ekos but the math doesn't check out. For your camera, this would be fov_w = 6875.5*atan(6240*5.67 / (2000*24)) = 250226.44 arcsecs which is 69.5 degrees. While you say it should be 73.6 degrees? -- You are receiving this mail because: You reported the bug.
Yes thanks, I already figured it out. It should be fixed in 3.6.1
Ok it should be fixed in 3.6.1