Custom Asteroids

Custom Asteroids

21.6k Downloads

Intermittent bug when MeanLongitude specified

Starstrider42 opened this issue ยท 0 comments

commented

Most of the time, when an asteroid group is given with a orbitPhase->MeanLongitude constraint, the asteroid appears at the requested longitude. However, around 1/6 of the time, the asteroid appears in the wrong place. This is shown in the screenshot below, which shows a run of the Mean Longitude test case.

screenshot0

Asteroids circled in green are correctly placed. Asteroids in red are incorrectly placed, with an arrow pointing to where they are supposed to be.

To reproduce:

  1. Place the test.cfg file at https://gist.github.com/Starstrider42/429a770c4e64631b5acf in the CustomAsteroids/config directory, removing any other files present.
  2. Start a new game of KSP, then start a new sandbox game.
  3. Immediately go into the flight center, track all asteroids, time warp until more asteroids appear, then repeat until you have 50 or so tracked asteroids.
  4. Display the distribution of tracked asteroids.

output_log.txt and persistent.sfs for the run in the screenshot are provided at https://gist.github.com/Starstrider42/429a770c4e64631b5acf. The file testlog.csv has a data dump of all the asteroids and their orbital elements, together with the quality of the placement: "BAD" represents the two asteroids circled in red in the screenshot, while "Marginal" indicates asteroids that are almost, but not quite, where they should be.

Save file editing proves that the problem is with the sign of the mean anomaly for these cases. However, I have not been able to find a correlation between the bug and any of the orbital elements, or any combination of them, including combinations used in choosing the sign.