Ejemplo n.º 1
0
        MeanAnomalyTest(double expected_mean_anomaly,
                        DateTime test_time,
                        OrbitingBodyMathematics planet)
        {
            double mean_anomaly = planet.mean_anomaly(test_time); // in radians

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

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