On 13/07/2010 21:36, Fred_76 wrote: > Public bug reported: > > In the CCD.cpp file, here is a formula that is used to calculate the > field of view of the CCD sensor : > > float CCD::getActualFOVx(Ocular *ocular) > { > float FOVx = (chip_width * 206.265) / ocular->getEffectiveFocalLength(); > return FOVx; > } > > float CCD::getActualFOVy(Ocular *ocular) > { > float FOVy = (chip_height * 206.265) / ocular->getEffectiveFocalLength(); > return FOVy; > } > > > There are two errors : > 1) The factor 206.265 is not adequate. It is adequate to calculate the sampling angle of one pixel by using the following formula : > > sampling (in arc. sec) = 206.265 * pixel width (µm) / telescope focal > length (mm) > > but it is not suitable for the FOV of the whole sensor. > > The right exact formula for the field of view of the CCD shall be : > > FOVx (arc. min) = 2 * atan(chip_width (mm) / (2* telescope focal length (mm)) * 180 / pi() * 60 > FOVy (arc. min) = 2 * atan(chip_height (mm) / (2* telescope focal length (mm)) * 180 / pi() * 60 > > This formula can be simplified : > > FOVx (arc. min) = 6875.5 * atan(chip_width (mm) / (2* telescope focal length (mm)) > FOVy (arc. min) = 6875.5 * atan(chip_height (mm) / (2* telescope focal length (mm)) > > It can even be further simplified if chip size<< telescope focal > length, but to allow the use of DSLR lenses (with short focal length) > the above formula would be better. > > FOVx (arc.min) = 3437.7 * chip_width (mm) / telescope focal length (mm) > FOVy (arc. min) = 3437.7 * chip_height (mm) / telescope focal length (mm) > > > 2) The formula in the CCD.ccp file is using the "ocular" focal length. > It is not correct. The focal length of the telescope shall be used. Most > astronomers are using their CCD in the focal plane of their telescope, > and not in line behind an ocular. Even behind an ocular the use of the > ocular focal length only is not adequate. > > > Therefore the right code in CCD.cpp should be : > > float CCD::getActualFOVx(Telescope *telescope) > { > float FOVx = 6875.5 * atan(chip_width / telescope->getEffectiveFocalLength() / 2); > return FOVx; > } > > float CCD::getActualFOVy(Telescope *telescope) > { > float FOVy = 6875.5 * atan(chip_height / telescope->getEffectiveFocalLength() / 2); > return FOVy; > } > > or something like that... > > Fred > > ** Affects: stellarium > Importance: Undecided > Status: New > > As mentioned a several days ago, I was working on a patch for Oculars. It includes several bug fixes (including this one) and some new options. The problem is, patches being submitted are not being accepted so I wasn't exactly rushing to finish this one... @Timothy: I wanted to get this finished properly and then contact you to discuss, but as this is the second bug report that will cause over-lapping code changes that are a real pain to merge, I've pushed my patch to LP for review (see ~scrupeus/stellarium/oculars). There is still a little cleaning up to do but the main components are there. I have some other ideas but they can wait. Check the bzr log for changes made. If you want this patch, let me know and I'll finish it properly. If not, I won't bother with it but you can cherry-pick my fixes. Peter