Skip navigation links
astro

Class Broker

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class and Description
      static class  Broker.Height
      Test the height of an astronomical object.
      static class  Broker.Sol
      Test the solar height.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      private static double A1EQC
      The constant coefficient in equation of center of the sun.
      private static double A2EQC
      The constant coefficient in equation of center of the sun.
      private static double A3EQC
      The linear coefficient in equation of center of the sun.
      private static double ALAM
      The constant coefficient in apparent longitude.
      private static double AM
      The constant coefficient in geometric mean longitude.
      private static double ANU
      Constant coefficient for calculating mean perihelium.
      private static double ANULL
      The constant coefficient in geometric mean anomaly.
      private static double ASUN
      The constant coefficient, ecliptic obliquity.
      private static double B1EQC
      The linear coefficient in equation of center of the sun.
      private static double B2EQC
      The linear coefficient in equation of center of the sun.
      private static double BLAM
      The linear coefficient in apparent longitude.
      private static double BM
      The linear coefficient in geometric mean longitude.
      private static double BNU
      Linear coefficient for calculating mean perihelium.
      private static double BNULL
      The linear coefficient in geometric mean anomaly.
      private static double BSUN
      The linear coefficient, ecliptic obliquity.
      private static double C1EQC
      The quadratic coefficient in equation of center of the sun.
      private static double CM
      The quadratic coefficient in geometric mean longitude.
      private static double CNULL
      The quadratic coefficient in geometric mean anomaly.
      private static double[] CONST
      Constants required for the siderael time algorithm.
      static double DEFAULTHEIGHT
      Default minimum object height.
      static double DEFAULTSOL
      Default maximum solar height.
      private static DateFormat ISODATE
      The ISO-date formatter
    • Constructor Summary

      Constructors 
      Constructor and Description
      Broker() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static double getEclipticObliquity(Date time)
      Calculates the obliquity of the ecliptic in degrees.
      static double getHeight(Date time, double ra, double de, double longitude, double latitude)
      Calculates the height above the horizon for a given astronomical object at a certain site, for time time.
      static double getJd(Date time)
      Gets the julian date from a date object.
      static double getJulianCentury(Date time)
      Calculates the julian centruries since 2000.0 from a date object.
      static double getSidereal(Date time, double longitude)
      Calculates the apparent sidereal time for a given time and longitude in degrees.
      static double getSolLambda(Date time)
      Calculates the solar apparent ecliptic longitude in degrees.
      static double getSunHeight(Date time, double longitude, double latitude)
      Returns the solar hight for a given time and a certain location.
      static boolean isObservable(Date time, double longitude, double latitude, double ra, double de)
      Returns true, if the given target is currently observable at this location.
      static boolean isObservable(Date time, double longitude, double latitude, double ra, double de, double maxsol)
      Returns true, if the given target is currently observable at this location.
      static boolean isObservable(Date time, double longitude, double latitude, double ra, double de, double minheight, double maxsol)
      Returns true, if the given target is currently observable at this location.
      static boolean isObservable(double longitude, double latitude, double ra, double de)
      If the time of the observation is unknown, we can deduce if the target might be visible at all.
      static boolean isObservable(double longitude, double latitude, double ra, double de, double minheight)
      If the time of the observation is unknown, we can deduce if the target might be visible at all.
    • Field Detail

      • ANULL

        private static final double ANULL
        The constant coefficient in geometric mean anomaly.
        See Also:
        Constant Field Values
      • BNULL

        private static final double BNULL
        The linear coefficient in geometric mean anomaly.
        See Also:
        Constant Field Values
      • CNULL

        private static final double CNULL
        The quadratic coefficient in geometric mean anomaly.
        See Also:
        Constant Field Values
      • AM

        private static final double AM
        The constant coefficient in geometric mean longitude.
        See Also:
        Constant Field Values
      • BM

        private static final double BM
        The linear coefficient in geometric mean longitude.
        See Also:
        Constant Field Values
      • CM

        private static final double CM
        The quadratic coefficient in geometric mean longitude.
        See Also:
        Constant Field Values
      • A1EQC

        private static final double A1EQC
        The constant coefficient in equation of center of the sun.
        See Also:
        Constant Field Values
      • B1EQC

        private static final double B1EQC
        The linear coefficient in equation of center of the sun.
        See Also:
        Constant Field Values
      • C1EQC

        private static final double C1EQC
        The quadratic coefficient in equation of center of the sun.
        See Also:
        Constant Field Values
      • A2EQC

        private static final double A2EQC
        The constant coefficient in equation of center of the sun.
        See Also:
        Constant Field Values
      • B2EQC

        private static final double B2EQC
        The linear coefficient in equation of center of the sun.
        See Also:
        Constant Field Values
      • A3EQC

        private static final double A3EQC
        The linear coefficient in equation of center of the sun.
        See Also:
        Constant Field Values
      • ALAM

        private static final double ALAM
        The constant coefficient in apparent longitude.
        See Also:
        Constant Field Values
      • BLAM

        private static final double BLAM
        The linear coefficient in apparent longitude.
        See Also:
        Constant Field Values
      • ANU

        private static final double ANU
        Constant coefficient for calculating mean perihelium.
        See Also:
        Constant Field Values
      • BNU

        private static final double BNU
        Linear coefficient for calculating mean perihelium.
        See Also:
        Constant Field Values
      • ASUN

        private static final double ASUN
        The constant coefficient, ecliptic obliquity.
        See Also:
        Constant Field Values
      • BSUN

        private static final double BSUN
        The linear coefficient, ecliptic obliquity.
        See Also:
        Constant Field Values
      • CONST

        private static final double[] CONST
        Constants required for the siderael time algorithm.
      • DEFAULTSOL

        public static final double DEFAULTSOL
        Default maximum solar height.
        See Also:
        Constant Field Values
      • DEFAULTHEIGHT

        public static final double DEFAULTHEIGHT
        Default minimum object height.
        See Also:
        Constant Field Values
      • ISODATE

        private static final DateFormat ISODATE
        The ISO-date formatter
    • Constructor Detail

      • Broker

        public Broker()
    • Method Detail

      • getJd

        public static double getJd(Date time)
        Gets the julian date from a date object.
        Parameters:
        time - Date of observation.
        Returns:
        The JD correponding to the date object.
      • getJulianCentury

        public static double getJulianCentury(Date time)
        Calculates the julian centruries since 2000.0 from a date object.
        Parameters:
        time - Date of observation.
        Returns:
        The passed julian centuries since 2000.0.
      • getSidereal

        public static double getSidereal(Date time,
                                         double longitude)
        Calculates the apparent sidereal time for a given time and longitude in degrees. Approximate formular.
        Parameters:
        time - Date of observation.
        longitude - Geographical longirude in degrees, W is negative.
        Returns:
        The local apparent sidereal time in degrees.
      • getSolLambda

        public static double getSolLambda(Date time)
        Calculates the solar apparent ecliptic longitude in degrees. Refer to NOAA solar position calculator.
        Parameters:
        time - Date of observation.
        Returns:
        Apparent ecliptical longitude of the Sun in degrees.
      • getEclipticObliquity

        public static double getEclipticObliquity(Date time)
        Calculates the obliquity of the ecliptic in degrees. Refer to NOAA solar position calculator.
        Parameters:
        time - Date of observation.
        Returns:
        Ecliptic Obliquity in degrees.
      • getSunHeight

        public static double getSunHeight(Date time,
                                          double longitude,
                                          double latitude)
        Returns the solar hight for a given time and a certain location. Calculates right ascension and declination of sun and get's this object's height via getHeight(java.util.Date, double, double, double, double).
        Parameters:
        time - Date of the observation as a Java Date object.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
      • getHeight

        public static double getHeight(Date time,
                                       double ra,
                                       double de,
                                       double longitude,
                                       double latitude)
        Calculates the height above the horizon for a given astronomical object at a certain site, for time time. The right ascension and declination of the object are apparent right ascension and declination of the object, both in degrees. The telescope's location is defined by its longitude and latitude, both in degrees. Longitude is negative for Western longitudes.
        Does not include refraction or aberration.
        Parameters:
        time - Date of the observation as a Java Date object.
        ra - Right ascension of object, degrees.
        de - Declination of object, degrees.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
      • isObservable

        public static boolean isObservable(double longitude,
                                           double latitude,
                                           double ra,
                                           double de)
        If the time of the observation is unknown, we can deduce if the target might be visible at all. Note: Longitude and ra are not used.
        Parameters:
        ra - Right ascension of object, degrees.
        de - Declination of object, degrees.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
      • isObservable

        public static boolean isObservable(double longitude,
                                           double latitude,
                                           double ra,
                                           double de,
                                           double minheight)
        If the time of the observation is unknown, we can deduce if the target might be visible at all. Note: Longitude and ra are not used.
        Parameters:
        ra - Right ascension of object, degrees.
        de - Declination of object, degrees.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
        minheight - Star should be at least that high.
      • isObservable

        public static boolean isObservable(Date time,
                                           double longitude,
                                           double latitude,
                                           double ra,
                                           double de)
        Returns true, if the given target is currently observable at this location.
        Parameters:
        time - Date of the observation as a Java Date object.
        ra - Right ascension of object, degrees.
        de - Declination of object, degrees.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
      • isObservable

        public static boolean isObservable(Date time,
                                           double longitude,
                                           double latitude,
                                           double ra,
                                           double de,
                                           double maxsol)
        Returns true, if the given target is currently observable at this location.
        Parameters:
        time - Date of the observation as a Java Date object.
        ra - Right ascension of object, degrees.
        de - Declination of object, degrees.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
      • isObservable

        public static boolean isObservable(Date time,
                                           double longitude,
                                           double latitude,
                                           double ra,
                                           double de,
                                           double minheight,
                                           double maxsol)
        Returns true, if the given target is currently observable at this location.
        Parameters:
        time - Date of the observation as a Java Date object.
        ra - Right ascension of object, degrees.
        de - Declination of object, degrees.
        longitude - Longitude of site, in degrees, W negativ.
        latitude - Latitude of site, in degrees.
        minheight - Star should be at least that high.
        maxsol - Sun should be at least this low.