Example #1
0
 //When a rise or a set does not occur, the DateTime will return null
 /// <summary>
 /// Creates an empty Celestial.
 /// </summary>
 public Celestial()
 {
     astrologicalSigns = new AstrologicalSigns();
     lunarEclipse      = new LunarEclipse();
     solarEclipse      = new SolarEclipse();
     CalculateCelestialTime(0, 0, new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc), new EagerLoad());
 }
Example #2
0
 //When as rise or a set does not occur, the DateTime will return null
 /// <summary>
 /// Creates an empty Celestial object
 /// </summary>
 public Celestial()
 {
     AstrologicalSigns = new AstrologicalSigns();
     LunarEclipse      = new LunarEclipse();
     SolarEclipse      = new SolarEclipse();
     CalculateCelestialTime(0, 0, new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc));
 }
Example #3
0
        /// <summary>
        /// Creates a Celestial object based on a geographic lat/long coordinate and specified date
        /// </summary>
        /// <param name="lat">Decimal Format Latitude</param>
        /// <param name="longi">Decimal Format Longitude</param>
        /// <param name="geoDate">Geographic UTC DateTime</param>
        public Celestial(double lat, double longi, DateTime geoDate)
        {
            DateTime d = new DateTime(geoDate.Year, geoDate.Month, geoDate.Day, geoDate.Hour, geoDate.Minute, geoDate.Second, DateTimeKind.Utc);

            AstrologicalSigns = new AstrologicalSigns();
            CalculateCelestialTime(lat, longi, d);
        }
 //Creates empty properties
 private void Create_Properties()
 {
     astrologicalSigns = new AstrologicalSigns();
     lunarEclipse      = new LunarEclipse();
     solarEclipse      = new SolarEclipse();
     solstices         = new Solstices();
     equinoxes         = new Equinoxes();
 }
Example #5
0
 private Celestial(bool hasCalcs)
 {
     AstrologicalSigns = new AstrologicalSigns();
     if (hasCalcs)
     {
         CalculateCelestialTime(0, 0, new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc));
     }
 }
Example #6
0
        /// <summary>
        /// Creates a Celestial object based on a location and specified date.
        /// </summary>
        /// <param name="lat">latitude</param>
        /// <param name="longi">longitude</param>
        /// <param name="geoDate">DateTime (UTC)</param>
        /// <remarks>
        /// Celestial information is normally populated within the Coordinate classes CelestialInfo property.
        /// However, you may choose to work directly within the Celestial class.
        /// </remarks>
        /// <example>
        /// The following example demonstrates how to get the sunset time at Seattle on 19-Mar-2019
        /// directly from a Celestial object.
        /// <code>
        /// //Create a Celestial object the calculates from Seattle's signed lat/long on
        /// //19-Mar-2019 (UTC) Date
        /// Celestial cel = new Celestial(47.60357, -122.32945, new DateTime(2019, 3, 19));
        ///
        /// //Check if a sunset will occur on the specified day.
        /// if(cel.SunSet.HasValue)
        /// {
        ///     Console.WriteLine(cel.SunSet.Value); //3/19/2019 2:19:31 AM
        /// }
        /// </code>
        /// </example>
        public Celestial(double lat, double longi, DateTime geoDate)
        {
            DateTime d = new DateTime(geoDate.Year, geoDate.Month, geoDate.Day, geoDate.Hour, geoDate.Minute, geoDate.Second, DateTimeKind.Utc);

            astrologicalSigns = new AstrologicalSigns();
            lunarEclipse      = new LunarEclipse();
            solarEclipse      = new SolarEclipse();
            CalculateCelestialTime(lat, longi, d, new EagerLoad());
        }
Example #7
0
 /// Holdover. Determine if needed.
 internal Celestial(bool hasCalcs)
 {
     astrologicalSigns = new AstrologicalSigns();
     lunarEclipse      = new LunarEclipse();
     solarEclipse      = new SolarEclipse();
     if (hasCalcs)
     {
         CalculateCelestialTime(0, 0, new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc), new EagerLoad());
     }
 }
Example #8
0
 //When as rise or a set does not occur, the DateTime will return null
 /// <summary>
 /// Creates an empty Celestial object
 /// </summary>
 public Celestial()
 {
     AstrologicalSigns = new AstrologicalSigns();
     CalculateCelestialTime(0, 0, new DateTime(1900, 1, 1, 0, 0, 0, DateTimeKind.Utc));
 }