-
Notifications
You must be signed in to change notification settings - Fork 339
[Qt] Nebula Type in DSO Browser #2309
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
Conversation
Git f5512c4 removed the type column for nebula objects from the deep sky/celestial browser. Partially finished code still remains. This existing code is updated/finished and type designations are displayed for nebula.
|
Git f5512c4 removed the type column from the celestial browser for nebulae objects. Existing code is updated/finished and type designations are displayable for nebula. Specifically:
Sample nebula files have been tested against Celestia 1.6.4 Linux and Celesta 1.7.0 Win interface versions. Neither codes have a deep sky browser window - neither gtk nor win interfaces have a deep sky browser window. The two systems are not affected by the addition of type tags to the DSO object nebula, as the default reading routines already read those tags but data is just not accessed by these programs. This code modification does not update any celx capabilities to potentially display or use the additional available data. |
|
Attached is a file of sample nebulae to test the code with. There are examples of nebulae that will demonstrate several of the code modifications. planetary nebula: supernova remnant: These two sets will allow testing of the type filter box located near the bottom of the celestial browser window. Success will be if only the type entered into the filter is displayed in the listing and all examples of that type are shown. The cat's eye nebula has multiple cmod files associated with it in the .dsc file. These nebula parts have no names. Success will be if a) the no name sections do not appear in the listing; and b) the cat's eye nebula still shows all of its parts (none of the no name sections are missing) when viewed as an image in the main window. The firework nebula does not have an absolute magnitude associated with it. Success will be if the App. mag. column is blank, and does not display a default -999 magnitude which is impossible. All nebula should display a reasonable information screen in the upper left corner of the main object display window when accessed. Note: The deep sky browser is dynamic. It will change the distance and magnitude values based upon where the observer is located. However, it does need to be reloaded if the observer's location is changed and the user wants to see the new values. Otherwise the initial values based upon an earth observer point are displayed. The samples were obtained from the Celestia Mobi website, then updated with newer information from primarily the NASA and Wikipedia websites. The tags modified in the .dsc were the addition of type and absolute magnitude tags. The "best" distance and magnitude values were selected from multiple conflicting data. Also the clickable tag was verified for multi-cmod files, so only the primary nebula image is clickable. The absolute magnitude was calculated from the apparent magnitude with the formula: |
|
If this code is accepted, there are several items which can be updated. [https://en.wikibooks.org/wiki/Celestia/DSC_File] The models on Celestia mobi and elsewhere can have their .dsc files updated; adding the tags Type and AppMag and Clickable as warranted. If owner/usage considerations prevent model file data from being updated, the necessary information can be posted as a comment and allow users to make the updates. Distance and magnitude data varies widely based upon the source. Newer Gaia DR2 and DR3 data may be of use here. Also, the maintainers of the Celestia Origins website may have improved data. There is also a Planetary Nebula Database on the internet, however internet safety software is blocking my access to it. One thing I have found is many authors declare the magnitude of the nebula to be the magnitude of the central star. Others will keep them separate. Seperate is the better option so the magnitude of the nebula is the magnitude of the nebula object. |
375gnu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i haven't tested the build, just checked the code
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Git f5512c4 removed the type column for nebula objects from the deep sky/celestial browser. Partially finished code still remains. This existing code is updated/finished and type designations are displayed for nebula.
Git f5512c4 removed the type column for nebula objects from the deep sky/celestial browser. Partially finished code still remains. This existing code is updated/finished and type designations are displayed for nebula.
|
Authors have created models with multiple cmod files to draw an object in parts. The submitted code took this into account, removing parts with empty names in the *.dsc file from the DSO window display. However, I found some model builders did not use empty names, but rather blank space names. The code is updated to also remove from the DSO window display any model part with a name composed only of spaces. This code uses a construct that was introduced in C++11. If this is unacceptable, the names could be converted to qstrings, trim the string, then check the string for zero length to achieve the same result. |
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Git f5512c4 removed the type column for nebula objects from the deep sky/celestial browser. Partially finished code still remains. This existing code is updated/finished and type designations are displayed for nebula.
|
The code matches the galaxy.h and galaxy.cpp structure as originally submitted. NebulaType was in class definition in the original code, but it was never accessed as that code was not written. Put NebulaType into Nebula class => multiple iterations of compile failure or class definition error occurred. Suspect that keeping the GalaxyType out of the class was how galaxy got around these problems. Found a way to make it work, but the order of operations in nebula.h is now required as written. It works on the GNU Linux compiler, but I don't know if this will work on Microsoft and Mac compilers. External definition does work because galaxy works on all the systems for a long time. If compiler errors, then roll back to external definition. |
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Co-authored-by: Hleb Valoshka <375gnu@gmail.com>
Git f5512c4 removed the type column for nebula objects from the deep sky/celestial browser. Partially finished code still remains. This existing code is updated/finished and type designations are displayed for nebula.
|
- Use const pointer parameter - Fix potential undefined behavior of `std::isspace`
- Use const pointer parameter - Fix potential undefined behavior of `std::isspace`




Git f5512c4 removed the type column for nebula objects from the deep sky/celestial browser. Partially finished code still remains. This existing code is updated/finished and type designations are displayed for nebula.