I am happy to say that I successfully completed making the StarHopper UI for KStars. In my previous blog post, I have given an overview of the feature and documented on its usage. My latest commit ensured that when the StarHopper algorithm returned an empty list, the UI would check for it and then display an error message.
Apart from this, I also worked on developing a Unit Spin-Box widget which contains a Double Spin-Box and a Combo-Box. Units are hard-coded in KStars and through this widget, a unit can be added along with the conversion factor and the widget will return the converted value for the respective unit. This patch was the first commit I committed on my own instead of sending it to my mentor. Git still haunts me though
Currently I’m working on the Observing planner optimizer. It requires me to learn QML (sometimes the fact that I can’t start with small letter for import names makes me want to pull my hair off) and integrate it with C++. Due to my academic constraints, I’ve not been able to dedicate lot of time for this but I hope to spend more time once my exams are done.
I think the taking point from me from this experience of Season of KDE is that my knowledge base has expanded so much! Also, the community is a great one and I am extremely happy on being part of it. The people are very helpful and nice, it’s just amazing! 😀
Part of my project for Season of KDE was to make a UI for the existing Star-Hopper feature in KStars. I recently got to finishing it and decided to document it.
The Star-Hopper is an amazing feature present in KStars which allows you to find a path between two points in the sky. It is very commonly used in astronomy. If you have a bright star as a reference and you want to find an object in its vicinity, you start from your reference star and trace a route to the destination traversing a sequence of stars/pattern of stars.
The existing Starhopper backend present in KStars was showing the results on the terminal. So I worked on developing a frontend to display the results.
Here are steps on how to use the Star-Hopper feature in KStars :
1. Right click on your reference object on the Skymap to get a drop down menu. This object is your start point.
2. In the drop down menu, select “Starhop from here to” option.
3. A dotted line will appear. Move the mouse to your destination object and right click on it.
4. A dialog box requesting for FOV appears. If you have already selected FOV symbols. you will get a drop down menu to select within those FOV symbols. Otherwise you will be asked to enter the FOV in arcminutes.
5. Upon entering the FOV and clicking okay, you will either be presented with a dialog box containing list of objects in the Starhop route or an error dialog box if the Starhop route couldn’t be computed (mostly because of small FOV)
The dialog box has options to produce details of the object, center the object in the map and go to the next object and center it in the map. It also gives directions to the current selected object below the list of objects.
Hope this blog post helps in using the Star-Hopper features. Any questions, feel free to drop into #kde-kstars
After quite a lot of code review and corrections (and some profanity), I completed the UI for Star-Hopper.
Here are the additions :
- The UI now displays directions for star-hopping.
- The next button also centers the object in the map.
- The skymap refreshes itself after drawing the path to star-hop.
- Double clicking the star in the UI list centers the object.
- Single clicking the star in the UI provides directions to star-hop to that particular star.
So I started hacking for KDE (hacking doesn’t refer to cracking — read upon the misnomer) after getting into the Season of KDE program. It feels really great to be part of the amazing KDE community. Currently I’m developing for KStars which is an Astronomy Software under KDE Edu.
My first contribution was about a month ago when I submitted a trivial patch which added a “Delete object” option for the “Execute Session” feature of KStars. Currently I’m working on developing a User interface for the “Star-Hopper” feature of KStars.
I realized that these are the important points to keep in mind while developing for any Open-Source software :
- Get a good grip of the “grep” tool. If I need to trace any method/object used, I use grep to find all occurrences of that pattern throughout the repository. (My mentor pointed me to another awesome tool called ack)
- Git is extremely important and knowing proper usage of its umpteen number of functions is a must!
- Learn to read a lot of code and understand how exactly things are working. Make points if necessary, but reading code is a must. Coding a new feature is not that hard, but merging your code into the code base in an efficient manner is a challenge. I remember, I developed the UI within a day or two, but still have been polishing my patch since few weeks to ensure it matches the coding standards of KDE and KStars.
- Last, but not the least, passion towards contributing. All work towards any open-source software is passion driven. More than anything, enjoy hacking for them!
Regarding the UI for Star-Hopper, its in the final stages. After three reviews, I have finally eradicated most of the “non-standard” coding practices (which I was completely oblivious of. There are somethings which a degree in Computer Science doesn’t teach). Currently I have made the following changes to the existing Star-Hopper :
- Changed the architecture of Star-Hopper so that the front-end (UI) is called upon clicking “Star Hop to” in the menu. The UI further calls the back-end which performs the computation and returns the results to the front-end. The front-end displays the results – 1. In a dialog box with the star names; 2. On the sky map indicating a “bracket” around the star in the result set (which was already present).
- Wrote code for the Star-Hopper Results dialog box which displays the star names in the result set. There are three options provided along with the dialog box : 1. Next – which selects the next star on the list; 2. Details – Which opens the Details dialog for the selected star; 3. Center on map – Which centers the selected star on the map.
- Modifications within the Star-Hopper back-end to perform a const_cast within itself and return an unconst or mutable list rather than performing the cast outside the class.
Link for the review
Screenshot of the UI :
PS : Special thanks to my mentor for his great support and patience to guide me through my n00b-ness!
Hope you enjoyed the blog! Feel free to leave any comments 🙂