/// <summary>
        /// Recalculate the swisseph flag and parameters
        /// </summary>
        protected void RecalcSwephState()
        {
            _SwephFlag = SwissEph.SEFLG_SPEED;
            // Ephemeris type
            switch (Ephemeris)
            {
            case EphemerisMode.Moshier:
                _SwephFlag |= SwissEph.SEFLG_MOSEPH;
                break;

            case EphemerisMode.JPL:
                _SwephFlag |= SwissEph.SEFLG_JPLEPH;
                break;

            case EphemerisMode.SwissEphemeris:
            default:
                _SwephFlag |= SwissEph.SEFLG_SWIEPH;
                break;
            }
            // Position center
            var sidmode = SwissEph.SE_SIDM_FAGAN_BRADLEY;

            switch (PositionCenter)
            {
            case PositionCenter.Topocentric:
                _SwephFlag |= SwissEph.SEFLG_TOPOCTR;
                break;

            case PositionCenter.Heliocentric:
                _SwephFlag |= SwissEph.SEFLG_HELCTR;
                break;

            case PositionCenter.Barycentric:
                _SwephFlag |= SwissEph.SEFLG_BARYCTR;
                break;

            case PositionCenter.SiderealFagan:
                _SwephFlag |= SwissEph.SEFLG_SIDEREAL;
                sidmode     = SwissEph.SE_SIDM_FAGAN_BRADLEY;
                break;

            case PositionCenter.SiderealLahiri:
                _SwephFlag |= SwissEph.SEFLG_SIDEREAL;
                sidmode     = SwissEph.SE_SIDM_LAHIRI;
                break;

            case PositionCenter.Geocentric:
            default:
                break;
            }
            Sweph.swe_set_sid_mode(sidmode, 0, 0);
        }
Exemplo n.º 2
0
 /// <summary>
 /// set sidereal mode
 /// </summary>
 public void swe_set_sid_mode(Int32 sid_mode, double t0, double ayan_t0)
 {
     Sweph.swe_set_sid_mode(sid_mode, t0, ayan_t0);
 }