Ejemplo n.º 1
0
        public static PlanetPosition NorthSouthNode(double jul_ut, PlanetId id, SeFlg flag)
        {
            if (id != PlanetId.SE_NORTHNODE && id != PlanetId.SE_SOUTHNODE)
            {
                throw new Exception("Wrong parameter of " + id.ToString());
            }

            double[] xnasc    = new double[6];
            double[] xndsc    = new double[6];
            double[] xperi    = new double[6];
            double[] xaphe    = new double[6];
            String   errorMsg = "";

            if (swe_nod_aps_ut(jul_ut, PlanetId.SE_MOON, flag, 0, xnasc, xndsc, xperi, xaphe, errorMsg) == SeFlg.ERR)
            {
                DateTime utc = SweWrapper.UtcFromJulianDay(jul_ut);
                Console.WriteLine(String.Format("Error for {0}@{1} with Flag of {2}: {3}", id, utc, SeFlg.DEFAULT, errorMsg));
                return(null);
            }
            else
            {
                PlanetPosition nodePos = new PlanetPosition(id, (id == PlanetId.SE_NORTHNODE) ? xnasc : xndsc);
                return(nodePos);
            }
        }
Ejemplo n.º 2
0
        public Form1()
        {
            InitializeComponent();
            DateTime date = dateTimePicker1.Value.Date;

            start = new DateTimeOffset(date.Year, date.Month, date.Day, 0, 0, 0, TimeSpan.Zero);

            for (PlanetId id = PlanetId.SE_SUN; id <= PlanetId.SE_PLUTO; id++)
            {
                if (id == PlanetId.SE_MOON)
                {
                    continue;
                }

                comboBoxPlanets.Items.Add(id.ToString());
            }
            comboBoxPlanets.SelectedIndex = 0;
        }
Ejemplo n.º 3
0
 public override string ToString()
 {
     return(PlanetId.ToString());
 }
Ejemplo n.º 4
0
 public string GetModelId()
 {
     return(PlanetId.ToString());
 }