Fix an error that causes 2*pi*1000 times too fast movement

This commit is contained in:
Tim Schubert 2020-09-18 15:22:56 +02:00
parent 54709ae1fb
commit a82e22aab7
No known key found for this signature in database
GPG key ID: 99658A3EB5CD7C13

View file

@ -123,7 +123,8 @@ LeoCircularOrbitMobilityModel::GetProgress (Time t) const
{
sign = -1;
}
return sign * (2 * M_PI * ((GetSpeed () * t.GetSeconds ()) / LEO_EARTH_RAD_KM)) + m_offset;
// 2pi * (distance travelled / circumference of earth) + offset
return sign * (((GetSpeed () * t.GetSeconds ()) / (LEO_EARTH_RAD_KM * 1000))) + m_offset;
}
Vector3D