Asteroid-magnitude fix for KStars 

I submitted a patch today on the mailing list, to fix magnitudes of asteroids. It was a trivial patch, but involved quite some research to learn the correct formula.

I was trying to find out how I would use the “orbital” elements H (Abs. Magnitude) and G (Slope Parameter) to find the magnitude of a asteroid / comet. After many many futile attempts, Google finally put me at Seichii Yoshida’s (the well known comet researcher) website:

It didn’t take me long to get KStars to use that formula. Now, there’s some agreement between KStars and SB What’s Observable. Vesta was good with KStars showing 7.9 and SBWObs showing 7.97
but I wasn’t so happy with Ceres (KStars = 8.3, SBWObs = 7.95) – but it is far better than the case earlier, which was setting the magnitude to H!!!!

The patch is available here. Ignore the extension and open it with any text editor.