-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Describe the bug
In file basilisk/src/simulation/dynamics/_GeneralModuleFiles/gravityEffector.cpp, function updateEnergyContributions calculates the potential energy contribution. But in line 299, there's probably a typo.
if (this->centralBody && !body->isCentralBody) // If there is a central body and it's not
// 'body'
{
// potential of central body w/in current planet field. leads to
// relative potential energy solution
orbPotEnergyContr += body->gravityModel->computePotentialEnergy(r_PN_N - r_CN_N);
}
orbPotEnergyContr = body->gravityModel->computePotentialEnergy(
r_cP_N); // Potential w/in current planet field
As shown above, the orbPotEnergyContr
need to add all these energy up. However, it was given by body->gravityModel->computePotentialEnergy(r_cP_N)
at last, which supposed to be +=
To reproduce
see above
Expected behavior
orbPotEnergyContr += body->gravityModel->computePotentialEnergy(
r_cP_N); // Potential w/in current planet field
commit:
2b4dfec
Metadata
Metadata
Assignees
Labels
No labels