absoluteByParallax function

double absoluteByParallax(
  1. double m,
  2. double parallax
)

Absolute magnitude from apparent magnitude and annual parallax (radians).

Implementation

double absoluteByParallax(double m, double parallax) {
  return m + 5 + 5 * math.log(1 / parallax) / math.ln10;
}