Beispiel #1
0
        public static double Get(JPLDENumber denum)
        {
            TidalAccelerationMode mode;

            switch (denum)
            {
            case JPLDENumber.DE200:
                mode = TidalAccelerationMode.DE200;
                break;

            case JPLDENumber.DE403:
                mode = TidalAccelerationMode.DE403;
                break;

            case JPLDENumber.DE404:
                mode = TidalAccelerationMode.DE404;
                break;

            case JPLDENumber.DE405:
                mode = TidalAccelerationMode.DE405;
                break;

            case JPLDENumber.DE406:
                mode = TidalAccelerationMode.DE406;
                break;

            case JPLDENumber.DE421:
                mode = TidalAccelerationMode.DE421;
                break;

            case JPLDENumber.DE422:
                mode = TidalAccelerationMode.DE422;
                break;

            case JPLDENumber.DE430:
                mode = TidalAccelerationMode.DE430;
                break;

            case JPLDENumber.DE431:
                mode = TidalAccelerationMode.DE431;
                break;

            case JPLDENumber.Auto:
                mode = TidalAccelerationMode.Default;
                break;

            default:
                mode = TidalAccelerationMode.Default;
                break;
            }
            return(Get(mode));
        }
Beispiel #2
0
        /// <see cref="swi_get_tid_acc"/>
        public static double Calculate(EphemerisMode ephemerisMode, JulianDayNumber julianDay, JPLDENumber denum)
        {
            if (denum == JPLDENumber.Auto)
            {
                switch (ephemerisMode)
                {
                case EphemerisMode.Moshier:
                    denum = JPLDENumber.DE404;
                    break;

                case EphemerisMode.JPL:
                    throw new NotImplementedException();

                case EphemerisMode.SWISSEPH:
                    /*
                     * tjd_et = tjd_ut; // + swe_deltat_ex(tjd_ut, 0, NULL); we do not add delta t, because it would result in a recursive call of swi_set_tid_acc()
                     * if (swed.fidat[SEI_FILE_MOON].fptr == NULL ||
                     *      tjd_et < swed.fidat[SEI_FILE_MOON].tfstart + 1 ||
                     *        tjd_et > swed.fidat[SEI_FILE_MOON].tfend - 1)
                     * {
                     *      iflag = SEFLG_SWIEPH | SEFLG_J2000 | SEFLG_TRUEPOS | SEFLG_ICRS;
                     *      iflag = swe_calc(tjd_et, SE_MOON, iflag, xx, serr);
                     * }
                     * if (swed.fidat[SEI_FILE_MOON].fptr != NULL)
                     * {
                     *      denum = swed.fidat[SEI_FILE_MOON].sweph_denum;
                     * }
                     * // Moon ephemeris file is not available, default to Moshier ephemeris
                     * else
                     */
                    denum = JPLDENumber.DE404;                                     // DE number of Moshier ephemeris
                    break;
                }
            }

            return(Get(denum));
        }