Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird system where a planet's reference frame includes its star #5885

Open
lolo101 opened this issue Aug 4, 2024 · 8 comments
Open

Weird system where a planet's reference frame includes its star #5885

lolo101 opened this issue Aug 4, 2024 · 8 comments

Comments

@lolo101
Copy link
Contributor

lolo101 commented Aug 4, 2024

Observed behaviour

I just jumped into system GJ1057 and my ship is immediately in the reference frame of GJ1057 d
Furthermore, planet GJ1057 d has a moon GJ1057 d 3 that orbits at 0.75 AU from its planet, whereas the planet itself is at 0.71 AU from its star.

Also the autopilot behaves strangely

Expected behaviour

In a system, when the ship is closer to the star than to any planet it should be in the frame of the star. A planet should not have moons that orbit further from the planet than the planet is from its star

Steps to reproduce

Just load the saved game

  1. The ship is 0.04 AU from the star (0.41 solar masses)
  2. The ship is 0.65 AU from the planet (10.29 earth masses)
  3. The frame of reference is the one of the planet 🤷

My pioneer version (and OS):

20240314 (Linux)

My output.txt (required) and game save (optional, but recommended)
output.txt
lolo1.gz

@lolo101 lolo101 changed the title Weird system where a planet's reference frame includes it's star Weird system where a planet's reference frame includes its star Aug 4, 2024
@lolo101
Copy link
Contributor Author

lolo101 commented Aug 4, 2024

Actually it looks like the whole system is in the reference frame of GJ1057 d

@lolo101
Copy link
Contributor Author

lolo101 commented Aug 4, 2024

Not sure that's related but when I ask the autopilot to send me to one of the stations on Boer's claim, it sends me right through the planet (and the ship doesn't crash, but the autopilot is unable to get out of the planet)

@lolo101
Copy link
Contributor Author

lolo101 commented Aug 4, 2024

And it's impossible to land on the station. The ship simply goes through the landing pad and into the planet (still without crashing)

@bszlrd
Copy link
Contributor

bszlrd commented Aug 5, 2024

I think this is related to #5830

@fluffyfreak
Copy link
Contributor

I think that our system generation has gone a little awry, I added some code to export the system to a json file that can be loaded and edited by the system editor and this is a screenshot from it showing that GJ 1057 d has moons in orbits that overlap with the main star of the system!
image

@fluffyfreak
Copy link
Contributor

@impaktor @Web-eWorks Does the Frame sysytem work purely off of the distance of the main bodies distance from the centre of the system? It's not very easy to understand, but it seems like the GJ 1057 d bodies Frame has a vast radius that encompasses all of it's moons orbits, those moons shouldn't exist as they overlap with the orbits of other planets and indeed the main star.

@fluffyfreak
Copy link
Contributor

This is also the same bug as in #5839

@Web-eWorks
Copy link
Member

Frame is entirely based on distance, yeah. It's a glorified sphere test. The problem lies in the system generation code - I introduced this bug, though it was rare enough I didn't see it before we shipped the update. The system generation "should" be bounding the maximum radius for a body's children, but somewhere in there it broke.

If you want to take a crack at this - systems in general should be bigger, the system generation code has a very nasty (and mostly unchanged by me) habit of cramming 5-10 satellites into <1AU around even very large stars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants