Invliad distance to planet calculation
375gnu opened this issue · 0 comments
375gnu commented
Describe the bug
void
displayPlanetInfo(Overlay& overlay,
int detail,
Body& body,
double t,
const Eigen::Vector3d& viewVec,
const HudSettings& hudSettings)
{
double distanceKm = viewVec.norm();
double distance = distanceKm - body.getRadius();
So this calculation assumes that the planet is a sphere. When close to the surface of oblate bodies this can give negative values. We should take into account actual semiaxes.