Class AbstractHJDConverter

java.lang.Object
org.aavso.tools.vstar.util.date.AbstractHJDConverter
Direct Known Subclasses:
B1950HJDConverter, J2000HJDConverter

public abstract class AbstractHJDConverter extends Object
All HJD converters must extend this base class which also acts as a Factory Method to select a converter for a specified epoch.
  • Constructor Details

    • AbstractHJDConverter

      public AbstractHJDConverter()
  • Method Details

    • getInstance

      public static AbstractHJDConverter getInstance(EpochType epoch)
      Factory method to return suitable converter for a given epoch.
      Returns:
      The HJD converter for the specified epoch.
    • convert

      public abstract double convert(double jd, RAInfo ra, DecInfo dec)
      Given a JD, RA, and Dec, return HJD.
      Parameters:
      jd - The Julian Date to be converted.
      ra - The right ascension coordinate.
      dec - The declination coordinate.
      Returns:
      The corresponding Heliocentric Julian Date.