Added the calculation of the magnitude out of the atmosphere. Validation pending