コード例 #1
0
        static int Main(string[] args)
        {
            var bodies = new Body[]
            {
                Body.Sun, Body.Moon, Body.Mercury, Body.Venus, Body.Mars,
                Body.Jupiter, Body.Saturn, Body.Uranus, Body.Neptune, Body.Pluto
            };

            Observer  observer;
            AstroTime time;

            DemoHelper.ParseArgs("positions", args, out observer, out time);
            Console.WriteLine("UTC date = {0}", time);
            Console.WriteLine();
            Console.WriteLine("BODY           RA      DEC       AZ      ALT");
            foreach (Body body in bodies)
            {
                Equatorial  equ_2000   = Astronomy.Equator(body, time, observer, EquatorEpoch.J2000, Aberration.Corrected);
                Equatorial  equ_ofdate = Astronomy.Equator(body, time, observer, EquatorEpoch.OfDate, Aberration.Corrected);
                Topocentric hor        = Astronomy.Horizon(time, observer, equ_ofdate.ra, equ_ofdate.dec, Refraction.Normal);
                Console.WriteLine("{0,-8} {1,8:0.00} {2,8:0.00} {3,8:0.00} {4,8:0.00}", body, equ_2000.ra, equ_2000.dec, hor.azimuth, hor.altitude);
            }

            return(0);
        }
コード例 #2
0
        static int Main(string[] args)
        {
            Observer  observer;
            AstroTime time;

            DemoHelper.ParseArgs("riseset", args, out observer, out time);
            Console.WriteLine("search   : {0}", time);
            if (0 != PrintEvent("sunrise", Astronomy.SearchRiseSet(Body.Sun, observer, Direction.Rise, time, 300.0)))
            {
                return(1);
            }
            if (0 != PrintEvent("sunset", Astronomy.SearchRiseSet(Body.Sun, observer, Direction.Set, time, 300.0)))
            {
                return(1);
            }
            if (0 != PrintEvent("moonrise", Astronomy.SearchRiseSet(Body.Moon, observer, Direction.Rise, time, 300.0)))
            {
                return(1);
            }
            if (0 != PrintEvent("moonset", Astronomy.SearchRiseSet(Body.Moon, observer, Direction.Set, time, 300.0)))
            {
                return(1);
            }
            return(0);
        }
コード例 #3
0
ファイル: horizon.cs プロジェクト: user9999/astronomy
        static int Main(string[] args)
        {
            Observer  observer;
            AstroTime time;

            DemoHelper.ParseArgs("horizon", args, out observer, out time);
            return(FindEclipticCrossings(observer, time));
        }
コード例 #4
0
        static int Main(string[] args)
        {
            Observer  observer;
            AstroTime time;

            DemoHelper.ParseArgs("culminate", args, out observer, out time);

            var bodies = new Body[]
            {
                Body.Sun, Body.Moon, Body.Mercury, Body.Venus, Body.Mars,
                Body.Jupiter, Body.Saturn, Body.Uranus, Body.Neptune, Body.Pluto
            };

            Console.WriteLine("search   : {0}", time);
            foreach (Body body in bodies)
            {
                HourAngleInfo evt = Astronomy.SearchHourAngle(body, observer, 0.0, time);
                Console.WriteLine("{0,-8} : {1}  altitude={2:##0.00}  azimuth={3:##0.00}",
                                  body, evt.time, evt.hor.altitude, evt.hor.azimuth);
            }

            return(0);
        }
コード例 #5
0
ファイル: camera.cs プロジェクト: user9999/astronomy
 static int Main(string[] args)
 {
     DemoHelper.ParseArgs("camera", args, out Observer observer, out AstroTime time);
     return(CameraImage(observer, time));
 }