Пример #1
0
        /// <summary>
        /// Constructor, set path for Se, defines jdnr and constructs house positions.
        /// </summary>
        /// <param name="jdnr">Value for jdnr</param>
        /// <param name="latitude">Latitude of location</param>
        /// <param name="longitude">Longitude of location</param>
        /// <param name="houseSystem">Housesystem to use</param>
        public HousePositionsBuilder(double jdnr, double latitude, double longitude, char houseSystem)
        {
            this.jdnr        = jdnr;
            this.latitude    = latitude;
            this.longitude   = longitude;
            this.houseSystem = houseSystem;
            string sedir = Environment.CurrentDirectory + "\\sweph\\";

            Sweph.setEphePath(sedir);
            constructPositions();
        }
Пример #2
0
        /// <summary>
        /// Constructor, set path for SE, defines jdnr and constructs planetary positions.
        /// </summary>
        /// <param name="jdnr">Value for jdnr</param>
        /// <param name="lunarNode">Indicates if lunar node should be used</param>
        /// <param name="nodeType">Type of lunar node</param>
        public PlanetaryPositionsBuilder(double jdnr, Boolean lunarNode, int nodeType)
        {
            this.jdnr      = jdnr;
            this.lunarNode = lunarNode;
            this.nodeType  = nodeType;

            string sedir = Environment.CurrentDirectory + "\\sweph\\";

            Sweph.setEphePath(sedir);

            planetaryPositionList = new ArrayList();
            constructPositions();
        }
Пример #3
0
        private void calcJd()
        {
            int    dayCorrection = 0;
            double hourFract     = hours - zoneOffset - dst + minutes / 60 + seconds / 3600;

            if (hourFract >= 24)
            {
                hourFract    -= 24;
                dayCorrection = 1;
            }
            if (hourFract < 0)
            {
                hourFract    += 24;
                dayCorrection = -1;
            }
            this.jd = Sweph.getJD(year, month, day, hourFract, calendar) + dayCorrection;
        }
Пример #4
0
 private void constructPositions()
 {
     // standard planets
     for (int i = Constants.SE_SUN; i <= Constants.SE_PLUTO; i++)
     {
         double[]          x  = Sweph.getPlanet(i, jdnr);
         PlanetaryPosition pp = new PlanetaryPosition(i, x);
         planetaryPositionList.Add(pp);
     }
     // mean node if defined in config
     if (lunarNode && nodeType == Constants.SE_MEAN_NODE)
     {
         double[]          x  = Sweph.getPlanet(Constants.SE_MEAN_NODE, jdnr);
         PlanetaryPosition pp = new PlanetaryPosition(Constants.SE_MEAN_NODE, x);
         planetaryPositionList.Add(pp);
     }
     // oscillating node if defined in config
     if (lunarNode && nodeType == Constants.SE_TRUE_NODE)
     {
         double[]          x  = Sweph.getPlanet(Constants.SE_TRUE_NODE, jdnr);
         PlanetaryPosition pp = new PlanetaryPosition(Constants.SE_TRUE_NODE, x);
         planetaryPositionList.Add(pp);
     }
 }
Пример #5
0
 private void constructPositions()
 {
     double[] x = Sweph.getHouses(jdnr, latitude, longitude, houseSystem);
     housePositionSet = new HousePositionSet(houseSystem, x);
 }