Beispiel #1
0
        EccentricAnomalyTest(double expected_eccentric_anomaly,
                             DateTime test_time,
                             OrbitingBodyMathematics planet)
        {
            double eccentric_anomaly = planet.eccentric_anomaly(test_time, 100); // in radians

            double acceptable_error = 0.005;
            double actual_error     = Math.Abs(eccentric_anomaly - expected_eccentric_anomaly);
            string error_message    = differing_results_error_message(
                Convert.ToString(expected_eccentric_anomaly),
                Convert.ToString(eccentric_anomaly),
                "radians"
                );

            Assert.LessOrEqual(actual_error, acceptable_error, error_message);
        }