Randa 2017 Report – Marble Maps

Just came back home yesterday from Randa Meetings 2017. This year, even though my major motive for the sprint was to use Qt 5.8’s Qt Speech module instead of custom Java for text-to-speech during navigation, that could not be achieved because of a bug which made the routes not appear in the app in the first place. And this bug is reproducible both by using latest code, and old-enough code, and is even there in the prod app in the Google Play Store itself. So, although most of my time had gone in deep-diving on the issue, unfortunately I was not able to find the root-cause to it eventually. I will need to pick up on that in the coming weeks again when I get time, to get it fixed. Apart from that, I managed to fix a few more bugs, and work on adding a splash screen to the Android app:

  • Made the bookmarks dialog responsive to touch everywhere. When we tapped on the Search field in the app, if nothing was written in that field then the bookmarks dialog showed up there. If the number of bookmarks was <= 6, then the far-lower part of the dialog did nothing on being tapped. Made that portion choose the last item from the bookmarks list in that case.
  • There was an issue where pressing the back-button always led to closing the app instead of handling that event depending on the various scenarios. On looking, it was found that the root-cause for the issue was lying in the code of Kirigami itself. Reported the same to Marco Martin, and fixed the issue in the Marble app via a workaround by using Kirigami.AbstractApplicationWindow instead of Kirigami.ApplicationWindow in the Qml. Also reported the issue that svg icons were not showing up in the app on Plasma Mobile because of svg icons not being enabled there.

  • Worked on adding a splash screen to the Marble Maps app. The highest resolution of the Marble logo in png that we had at the moment was 192 x 192, which looked a bit blurry, as if it had been scaled up, so I just displayed it as 100×100 for the splash screen to make it look sharp. Later, Torsten created a 256×256 version of the png from an svg, which got rid of the blur in the previous png. So I added that in the splash screen later, and the icon there looks much bigger, sharper, and non-blurry now.
    wordpress

Apart from work, there was snow this year, did some interesting acro-yoga with Frederik, did a 3-hour hike to walk across the longest pedestrian suspension bridge in the world, went on a tour to Zermatt to catch a glimpse of the Matterhorn, and ended it all with having a delicious barbecue with Emmanuel and Tomaz somewhere up in the mountains on the final evening. Thanks to Mario for organizing the meetings and the cheese and chocolates, without which no work could have been done.

banner-fundraising2017

Advertisements

Marble Maps in KDE Randa Meetings 2016

One more year of fun and intense productivity in Randa came to an end just a few days back, and I feel so good to have been a part of it. Much progress was made by the Marble team this year by Dennis, Torsten, Friedrich, David and me. I mostly worked on the Marble Maps Android app’s navigation feature, and would like to mention the changes here very briefly:

  • First of all, cmake was picking up the wrong target for aprs plugin, so I made cmake to skip the aprs plugin for Android, so that it does not lead to an unnecessary crash during building it.
  • There was a bug in the Route Simulation position provider plugin, it was not working in the Navigation mode. Made a fix to that.
  • Replaced the older QImage based current-position pointer, with a QML based one in the Android app. So now we are able to make our custom animations on it.
  • The current-position pointer will be staying at points on the route itself, when the user is very close to the route (not too deviated from it). With the new QML based pointer, we made sure that the radius of accuracy remains the same with respect to the Earth irrespective of which height we are viewing the map from. Plus, we have got rid of this accuracy-indicator when the position-pointer is already on the route, and are showing it only otherwise.
  • There was a minor bug with this in the desktop version as well. Imagine that while you’re simulating a navigation through a route between New York and Boston, you zoom out till the whole Earth is visible, then rotate the Earth so that the other half of the globe, for example India, is visible now, instead of America. In that case the position marker was showing up on the top-left corner of map (somewhere in the sky), when it was supposed to not be visible at all since it is theoretically present on the other “not-visible” side of the globe now. So this bug was fixed as well.
  • Used some new maneuver direction pixmaps for navigation in the Android app, getting rid of old ones, and also made them look sharper in the Navigation info-bar while they were shown during turn-by-turn navigation, by making some tweaks in the QMLs that were using them.
  • Finally, the distance text that shows on the top while in Navigation mode, its border height has been changed to match the height of that of the maneuver pixmaps shown on its left as well, so that the view looks much more uniform. Plus, a similar panel has been added at the bottom as well, that shows the speed and distance information during the navigation, each at two different sides of the panel.

That’s all about work. And adding to the yummy food that turns out to be truly delicious every single year, this time we had some more fun activities as well. We were fortunate enough to board a cable-car to ride to as high as possible in the mountains, so much that we ended up finding ourselves in snowfall ( it’s my first time being in a snowfall 🙂 ), which was amazing! The special red tea we were greeted at a stop at a restaurant during the hike was pretty unique. We then visited a museum, and that was a lot of fun as well.

Such a lively and eventful week it was, thanks a lot to Mario and Simon for organizing the Randa Meetings one more year. Let’s keep the Marble rolling, and I hope to be a part of this again in the subsequent years to come!  🙂

banner-fundraising2016.png

KDE codesprint, Randa, Switzerland

Well, it’s been quiet some days since I came back from the Randa meetings, and I have to admit that after staying there, I have had the single-most productive experience in my life so far. These Randa Meetings are an event, where KDE developers from all across the globe are invited to come and code away for a week, under one roof, with a common goal, and I am fortunate enough to be a part of this.

randa_group_pic_c_v1

I reached there on the 9th of August in the afternoon. Later that day, I have been able to meet with my mentors Dennis and Torsten. It was great to meet them face-to-face at last. In the next couple of days (after which they had to leave for work), I was able to clear out almost every doubt of mine, about my GSoC project from my mentors, which obviously led to some great progress in my work in one week. I also met my other GSoC colleague there, Calin (one great guy to hang out with).

10272580_503665129765015_7605533007785814273_o

I had a nice chat with the other KDE-edu folks David Guarez (his GSoC student Aniket is from my college 😀 ), and Andreas Cord-Landwehr as well, while sitting in the same table and hacking together, both awesome people to talk to, and some other guys from the other groups as well. I have also been able to have nice chats with Vishesh Handa, Rohan Garg, Kevin Funk, Nicolas Alvarez, David Edmundson, Myriam Schweingruber, Valorie Zimmerman, and many others.

IMG_1385

IMG-20140825-WA0000

Not to mention, the food there was too freaking delicious and also the freshest food I have had since my birth, thanks to every person involved with the kitchen for the great work! Also, the FreeBeer was pretty awesome, along with the loads of free chocolate given in the night. The everyday hikes outside, were a real tension-buster, especially since it was the beautiful Swiss landscapes you were hiking in. I had gone for three hikes, the first one being with the Marble folks Dennis, Torsten, and Calin, and the next two being with the rest of the guys, after Dennis and Torsten had left. There was another trip to Zermatt, in which, during the return trip, I had a great hangout with Myriam, Andreas, and Calin. Talked about culture and many other things. Myriam paid for all our drinks as well, so thanks for the treat! 😀

eu_randa2

Overall, the Randa Meetings was an awesome experience, with loads of fun, and a whole lot of hacking and work done, and something to keep in my memories forever. Thanks to all the KDE developers out there, and most importantly, to Mario Fux, for organizing this amazing event, for inviting me there, and for providing the travel-pass on the 15th without which I couldn’t have survived that day 😀 It was an amazing time spent, and I would love to come back here the next time, and the next, and the next! Thanks again 🙂

GSoC Ends – Project Summary

Hi everyone! Okay, so GSoC finally comes to an end, and I’m going to miss it a lot. Working for Marble has become an addiction, and I am going to keep contributing to it in the future. However, here is a brief summary of what all I have been able to implement in Marble in the duration of the project.

My project is about implementing interactive tours in Marble, a feature by which we would be able to take a virtual tour of the planet, by making the camera fly from location to location on the globe, waiting at certain points, playing some music in the background through certain time-durations, and also possibly showing/hiding placemarks as well at certain moments during the tour. Tours are kml files consist of a playlist with five basic elements:
1) FlyTo : contains the latitude, longitude, altitude, etc. of the locations to which the camera is supposed to fly to.
2) Wait : contains the durations for which the camera should wait (not move) at some instances during the tour.
3) TourControl : these can be used to play / pause the tour automatically during its playback
4) SoundCue : these are required to play some music in the background while the tour is playing.
5) AnimatedUpdate : for being able to show/hide, or also create/delete balloon popups (info-boxes) at different coordinates during the tour.

-> There was a Tour Widget which showed a list-view of the different elements present in the kml tour file that has been loaded. Now I added the functionality to be able to edit the elements directly from the widget itself, thus modifying the tour without having to make any manual changes to the kml file, and providing a nice user-interface while doing so. Please go through my blog post for some screenshots and a clearer explanation of the feature.

-> Refactored tour playback logic, so that the tour is represented by only one serial track, containing of FlyTo, Wait, and TourControl items, and several parallel tracks, each representing either a SoundCue item, or an AnimatedUpdate item, which could overlap with other tracks, both serial and parallel. This refactoring of design was required in order to make the tours look more dynamic, and so that it is easier to handle and work with them in our subsequent codes.

-> Implemented seek functionality for tour playbacks, with a progress bar in the tour widget, which can be dragged manually by the user, to bring it to any position of the tour. Also, while dragging itself (not only just before and after), the respective changes, that is, the movements in the camera, along with the balloon visibility, can be seen getting changed in the map while dragging the slider itself, both forward and backward.

-> Added basic interpolation of tours in Marble, so that the camera makes smooth turns (not sharp ones) when flying from one location to the other (when the Fly-to-mode has been set to smooth). Please go though my blog post to know more about this, and the previous two features mentioned above [Note: In the kml file of the tour in the video shown there, the FlyTo modes are mostly not set to “smooth” so the “smooth interpolation” feature is not quite visible in that video, but the videos which are following later on in this blog, have all its flyto’s modes set to smooth, so it will be visible there.]

-> Next, I implemented the feature of being able to create / delete placemarks, and also to show / hide the popup balloons of existing placemarks, during the playback of the tours. The showing / hiding of popup balloons can be understood more clearly if you go through this video of a tour on the moon of the various landing sites made in it in the recent past. The creation / deletion of placemarks, during the playback of tours, can be understood from this very short video.

-> Then comes viewing of routes as tours. I implemented the functionality to preview routes as tours and showing turn-type icons in waypoints during a route preview, while adjusting the speed and range of the tour according to the density of waypoints in the current visible region in the map. This can get more clear if you look at this video.

-> Finally, I implemented the functionality of being able to create videos from tours directly, without having to play and record them manually in order to get the video. So, I added a new Play button in the Routing widget, clicking on which, a dialog box would come up where we can choose the destination filename with path, along with the fps rate with which we want the video to be written. Clicking on Start would start video recording, showing the % progress in the progress-bar. We can cancel video-recording any time by clicking on Cancel. Below are two pictures showing how it would look like, before and after the the video has finished being written.

Video Export Ongoing  Video Export Complete

 

I would like to thank my mentor Dennis, for his awesome help in making me be able to complete this project. Without his motivation, I wouldn’t have been able to make it to the very end. I am going to miss GSoC like hell. But I’ll obviously keep contributing to Marble in the future. It has been a hell of a great experience for me. Thanks again! 🙂

GSoC: Weeks 2, 3, 4

Marble has got something called “Tours”. It can be used to take a virtual tour of the world by visiting different places according to a defined playlist. These tours, when they are played from the playlist that is contained in the kml file containing the tour, they follow an order shown as given below. That is, there are basically two types of items that are being played here, just like a “track” is played:

  • Serial Tracks: These consist of the FlyTo items, the TourControl Items, and the Wait items. These play serially one after the other according to the order in which they are present in the playlist, and run for its respective duration. No two of items can run parallely.
  • Parallel Tracks: These consist of the SoundCue items, and the AnimatedUpdate items. That is, as you can see below, these items can run parallely, which means, if a sound cue starts at some point, it can keep playing in the background at the same time when the camera hovers on to some location’s coordinates there in the map. In fact, more than one parallel tracks can also play at the same time.

 

tourtimeline_large

So, we needed to refactor our existing code keeping in mind the above design of kml as our goal, so that any type of kml files could be played without any type exceptions. So, I created two new classes, SerialTrack, and ParallelTrack, and further created separate classes for each of the 5 types of items I mentioned above. And then, handled these accordingly in the *Track classes. So, the code looks much cleaner, and clearer (easier to understand) now.

As far as the user-interface is concerned, we made some changes in that as well. So, apart from the previously existing Tour Widget showing the details of the items in the playlist, with an Edit button against each, and a Play, a Pause and a Stop button below it, we added to it a horizontal progress bar as well, so that the user is able to understand how much of the tour has finished and how much remaining. Also, the Play and Pause buttons, instead of making them separate buttons, we fused them into one togglable button that will act as both Play and Pause. Not to mention, the progress bar has also been made seekable, so that, now you can actually drag the slider as desired, and be able to enjoy it from any point of the tour as you want. Here is how the slider looks like now, with the togglable Play/Pause button:

sliderplaysliderpause

Also, in the tour playback, previously when the map’s focus shifted from one coordinate to another coordinate in the map (when proceeding from one FlyTo item to another in the playlist), the camera didn’t actually move along the path joining those two points. So this also had to be implemented. Also, not only should the camera just move, it should move in a way that is not a straight line, so that turnings are smooth. That is, there should not be any pointy edges in the virtual path that the camera should take. So, thanks to my mentor Dennis, with whose help we could be able to implement squad interpolation for smooth playback of tours in Marble, by using some sort of Spline interpolation of three or more points. You are free to go through my code here in case you want 🙂

I have embedded a very short video below, of how it looks like when the tour is played now. I just added a few cities in its playlist and tried to take them from as much around the globe as possible. There are 10 cities in it, each with a duration of 5 seconds, and a Wait element each of one second in between each of those ten FlyTo’s (to keep the tour uniform and unbiased):
(my embedded video is not showing up in Planet KDE, so if you’re reading this post from there, then please open this post separately instead, by clicking on its title, in order to be able to watch the embedded video (which is the main thing in this post really). Thank you!)

Thanks to Dennis Nienhüser, my mentor, without whose help, none of this would have been possible! Thanks again! 🙂

GSoC: Week – 1

So, my scheduled work according to the timeline, for the first week of the coding period, is over. Here are the few changes made to Marble:

Marble has got something called “Tours”. It can be used to take a virtual tour of the world by visiting different places according to a defined playlist. Now, this “timeline” consists of four type of items:

  • FlyTo – These are fixed locations somewhere on Earth, with some coordinates, denoting a definite point on Earth. These are the very locations to which the tours travel to one by one, when it is played.
  • TourControl – These items are used for controlling the tour. These can be either “Play” or “Pause”. With their usual meanings, i.e., “Pause” will pause the tour, and “Play” will resume it.
  • Wait – These items, when encountered in the playlist, the tour playback stops for a definite amount of time. Wait items contain a value in seconds, defining the amount of time the tour has to wait, when it encounters this item.
  • SoundCue – Last but not the least, there is the SoundCue item, which is used for playing background music during the playback of the tour. Generally they are given towards the beginning, but you can place them anywhere in the playlist, and the sound will start playing in the background parallelly, when the item is encountered.

There is a separate TourWidget present in Marble, which handles these tours. Although it did have the functionality to open existing tours, and view them in the playlist, along with removing a few FlyTo items, but it did not have the ability to edit each of the Tour items, from inside the TourWidget itself. So, this is exactly what I did in my first week: Adding functionality for editing Tour items from the TourWidget.

This is how the Tour’s playlist looks like, after a tour is loaded:

Tour Playlist Normally

 

Now, notice the small Edit buttons adjacent to each item. Those are the buttons which trigger the Edit-mode by which we can edit each item. That is the exact functionality which I implemented. So, here goes a preview of the TourWidget, with a few of the item’s Edit button clicked:

Tour Playlist Edit mode

 

Here, the 1st, 2nd, 3rd, and fifth items are in Edit mode, and the others are not. By looking at the preview itself, I guess you can get a feel for what and how the items get changed. Anyways, so after making the desired changes, you just got to click on the Save button adjacent to the item, and the value shows up in the Tour Playlist again, but this time, with the modifications made during Edit-mode.

So, one hurdle complete. More to come, in the coming weeks! 🙂

I’m a GSoC’er! :)

Well, the results for Google Summer of Code are out, and I am proud to say that I am finally a GSoC’er 🙂
My project is on implementing interactive tours in Marble. Tours are a set of related places in Marble with supporting media, visited in a defined timeline, which can be played back, and are useful for a range of tasks, like highlighting places of interest for sightseeing, or taking a trip of the highest skyscrapers of the world, or even showing historic events and political changes happening over decades. Even though the Marble library currently supports these use cases but the UI does not reveal all the features yet. My project is about making them possible.

Well, although I am already super-excited about starting off with my project right now, unfortunately my end-semester exams had to come in between all this, so I can’t start with it right away. My exams are going to end on the 5th of May, after which me and my mentors Dennis and Torsten are going to discuss a few organisational stuff in the beginning, and after that, it’s going to be hardcore coding all the way. Thanks to Lydia and all the mentors of KDE for selecting me in this program. I’m sure it’s gonna be a great summer for me ahead! Just can’t wait for it to start! 🙂