Celestia icon indicating copy to clipboard operation
Celestia copied to clipboard

Add "Remove" statement

Open SevenSpheres opened this issue 4 years ago • 12 comments

Like "Modify" and "Replace". "Wishlist" item for after the 1.7.0 release.

SevenSpheres avatar Mar 01 '20 19:03 SevenSpheres

It was one of targets of my big 'astrodb' branch. And this particular feature appeared to be most problematic, what was one of reason this project once overhelmed me. Technically speaking: removable objects needs dynamic octree. Currently Celestia uses dynamic octree onlt during startup, to sort object by spatial position and then move it to a static octree. This gives extra performence, which lacks in astrodb and was major issue.

pirogronian avatar Mar 01 '20 20:03 pirogronian

Hi @pirogronian! Do you plan on coming back to Celestia eventually? Astrodb would solve a lot of problems; another one that just came up on the Discord is renaming planets.

SevenSpheres avatar Mar 01 '20 20:03 SevenSpheres

Hi @SevenSpheres! I would be very happy to participate in Celestia again, but I dont feel enough strong. Especially with such a big task. Even if I would eventually overcome performance issue, Astrodb is so different from master, I would definitely need help with testing and merging. I dont want to squeez rest of my power just to see my code isn't appropriate to merging and needs lots of changes or even rewrite. Sadly, I cant find a way to do it in smaller steps. Maybe someone else could find it. So, anyway, I would need help.

pirogronian avatar Mar 01 '20 22:03 pirogronian

Potentially we can simplify the task if limit "Remove" only to data loading stage (i.e. when octree is dynamic).

ghost avatar Mar 02 '20 09:03 ghost

Yes, moreover we can do it even before populating dynamic octree. But current databases stores objects in raw static arrays. Deleted object cannot be easly "deleted" from memory. Perhaps should have apropriate flag set or so. But it myst be done twice for stars and dsos. Bodies and locations probably needs separate mechanism. Thats why I started astrodb in fact...

pirogronian avatar Mar 02 '20 11:03 pirogronian

I thought a bit more and again came to conclusion that we don't need this. If we have incorrect stars in our stars.dat we can easily remove them. I don't block implementation of this feature but I accept it only if the change is nonintrusive, i.e. it doesn't require any other changes and we don't trade performance for imaginal "flexibility".

375gnu avatar Mar 07 '20 11:03 375gnu

If we have incorrect stars in our stars.dat we can easily remove them.

This was intended more for ssc objects...

SevenSpheres avatar Mar 07 '20 16:03 SevenSpheres

why do you need it in ssc files?

375gnu avatar Mar 08 '20 20:03 375gnu

why do you need it in ssc files?

for addons, so the user doesn't have to modify the default data files

SevenSpheres avatar Mar 08 '20 21:03 SevenSpheres

why not? if they are incorrect, they must be fixed, not workarounded

375gnu avatar Mar 08 '20 21:03 375gnu

The other way is user may just want be able to create custom configuration without certain objects. However, I think REPLACE with empty object and set off visibility should do the same. The only real reason for deleting I can imagine is memory saving. But someone would have to delete really large number if objects to achieve it, I think. In that case, custom data file is better indeed.

pirogronian avatar Mar 08 '20 22:03 pirogronian

Another related thing; Modify/Replace are very much needed for DSC files.

SevenSpheres avatar Apr 08 '20 20:04 SevenSpheres