Exemplo n.º 1
0
        public void Get_Moon_Position_Returns_Azimuth_Altitude_Distance_And_ParallacticAngle_For_The_Given_Time_And_Location()
        {
            //Arrange
            var date = new DateTime(2013, 3, 5, 0, 0, 0, DateTimeKind.Utc);
            var lat  = 50.5;
            var lng  = 30.5;

            //Act
            var sunPosition = MoonCalc.GetMoonPosition(date, lat, lng);

            //Assert
            Assert.Equal(-0.9783999522438226, sunPosition.Azimuth, 15);
            Assert.Equal(0.0145514822438922, sunPosition.Altitude, 15);
            Assert.Equal(364121.37256256194, sunPosition.Distance, 15);
            Assert.Equal(-0.59832117604234014, sunPosition.ParallacticAngle, 15);
        }
Exemplo n.º 2
0
        public void GetMoonPosition_returns_altitude_given_time_and_location()
        {
            var moonPosition = MoonCalc.GetMoonPosition(_date, _lat, _lng);

            moonPosition.Altitude.Should().BeApproximately(0.014551482243892251, 1e-15);
        }
Exemplo n.º 3
0
        public void GetMoonPosition_returns_distance_given_time_and_location()
        {
            var moonPosition = MoonCalc.GetMoonPosition(_date, _lat, _lng);

            moonPosition.Distance.Should().BeApproximately(364121.37256256194, 1e-15);
        }
Exemplo n.º 4
0
        public void GetMoonPosition_returns_azimuth_given_time_and_location()
        {
            var moonPosition = MoonCalc.GetMoonPosition(_date, _lat, _lng);

            moonPosition.Azimuth.Should().BeApproximately(-0.9783999522438226, 1e-15);
        }