Exemplo n.º 1
0
 public Transits(Ephemeris eph, double orb, Boolean degrees = true)
 {
     this.eph = eph;
     if (degrees)
     {
         this.orb = orb;
     }
     else
     {
         this.orb = Angle.ToDegrees(orb);
     }
 }
Exemplo n.º 2
0
        static void Main()
        {
            Ephemeris ephemeris = Ephemeris.JPL430;
            DateTime  Natal     = DateTime.Parse("1993-11-30T21:30:00Z").ToUniversalTime();

            System.Console.WriteLine(Natal.ToString("u").Replace(" ", "T"));
            Console.WriteLine(Ephemeris.toJD());
            foreach (Body body in ephemeris.getBodies())
            {
                Console.WriteLine(
                    body.getName() + ": " + Math.Round(Angle.ToDegrees(body.getSpherical(Natal, ephemeris).theta.Measure()), 3));
            }
        }
Exemplo n.º 3
0
            public Block getBlock(double jDate)
            {
                int blockNumber = (int)Math.Ceiling((jDate - this.startTime) / daysPerBlock);

                double[]             blockData = new double[linesPerBlock * numbersPerLine];
                IEnumerable <string> rawData   = fileReader.getLines(filename, (blockNumber - 1) * linesPerBlock + 1, linesPerBlock);
                int i = 0;

                foreach (string line in rawData)
                {
                    foreach (string entry in line.Split(" ", System.StringSplitOptions.RemoveEmptyEntries))
                    {
                        blockData[i] = Ephemeris.parser(entry);
                        i++;
                    }
                }
                return(new Block(blockData));
            }
Exemplo n.º 4
0
 public Coordinate getSpherical(DateTime time, Ephemeris eph) => eph.geoSpherical(this, time);