Commits, commits, let it rain

So, I have stayed quiet for a number of days without blogging. Well, but I have been pretty busy in sending patches and making commits to Marble in all these days. So here goes a list of the commits made by me to Marble in all these days:

1. Added support for reading the gx:AnimatedUpdate KML tag: A Tours in Marble is represented as nothing but a kml file, containing the tag <gx:Tour> with a <gx:Playlist>. The playlist contains many children, out of which, one of them is the <gx:AnimatedUpdate>. Previously, there did not contain any handler, nor any GeoData class to parse the above tag. So I added those.

2. Simplified the ScreenOverlay unit test: The idea was to remove TestScreenOverlay, so that instead of putting the kml fine as inline in TestScreenOverlay, to move to a new file in tests/data and add it to the TestGeoDataWriter, so that, ScreenOverlay gets tested by testing TestGeoDataWriter itself and we don’t have to make some individual test like before for it. Also, the kml file I was talking about, there the ScreenOverlay was a child of <Folder>, so I added one more file, where it is a direct child of the <kml> tag. And made a few corrections in the writer of the above tag as well.

3. Implemented equality operators for GeoDataSimpleArrayData, GeoDataData and GeoDataExtendedData: Added operator== and operator!= to each of the three classes mentioned above, and extended tests/TestEquality by a new unit test method for each of the classes, which verifies the implementation for several instances of each class.

4. Added a .kml file as a unit test for gx:Track and gx:MultiTrack parsing/writing: Created a track from Marble itself, exported it to a kml file, calling it Track.kml and added it as a new unit test to tests/data and added the file to TestGeoDataWriter.

5. Changed GeoDataObject id and targetId from int to QString: The idea was to remove the id member from the following classes: GeoDataTourControl, GeoDataTour, GeoDataWait, GeoDataSoundCue and make them inherit it directly from GeoDataObject, without having to have any extra private id member in any of the above classes, nor any getters/setters for it. So I changed id of GeoDataObject from int to QString, and made them inherit it from GeoDataObject. Also made a few modifications in the test case TestGeoDataCopy, to comply with the changes.

6. Added equality operators for GeoDataFlyTo, GeoDataHotSpot, GeoDataImagePyramid, GeoDataItemIcon and GeoDataLink: Added operator== and operator!= functions to each of the classes mentioned above, and then extended tests/TestEquality by a new unit test method for each of the classes, which verifies the implementation for several instances of each class, and to check the working of the newly added methods.

7. KML unit test case for Camera and LookAt: Just added a CameraLookAt.kml file as unit test in tests/data/ which covers the tags supported by Camera and LookAt.

8. Equality operator for GeoDataTour and related classes: Added operator== and operator!= to GeoDataAnimatedUpdate, GeoDataSoundCue, GeoDataTourControl, GeoDataWait, GeoDataPlaylist and GeoDataTour.

9. Hiding of two never-used options from the Marble Configure dialog: There were two options present in the Configure Marble Dialog Box called “Place names:” and another one being “Drag location:”. These options had never been implemented in Marble till now. So it was decided to keep these options hidden from being shown in the dialog, without making any changes in the ui itself.  I made the changes both in the Qt and the KDE version.

I owe my thanks to Dennis Nienhüser and Torsten Rahn for mentoring me in the above tasks 🙂

Advertisements

My comeback with Marble and KDE

Well, I have to say I had been in some kind of “mental shutdown” ever since the series of bad incidents that had happened to me, but it feels good to say, that now after coming back home, and getting a few days to get a grip back on myself, I am back with FOSS again.

I just pushed my latest patch to the upstream git repository of Marble after it got accepted in the git reviewboard, and thus have enabled the support for reading and writing of the gx:altitudeMode KML tag in Marble, which means that, from now on, along with being able to get the height of any location relative to ground, the height clamped to the ground, and the absolute height, we will also be able to get the height relative to and clamped to sea floor as well.

Here are the contents that were present in the previous tag of <altitudeMode>

  • relativeToGround – (default) Interprets the <altitude> as a value in meters above the ground. If the point is over water, the <altitude> will be interpreted as a value in meters above sea level.
  • clampToGround – For a camera, this setting also places the camera relativeToGround, since putting the camera exactly at terrain height would mean that the eye would intersect the terrain (and the view would be blocked).
  • absolute – Interprets the <altitude> as a value in meters above sea level.

And here are the contents of the new tag <gx:altitudeMode> whose reading/writing have been enabled by me:

  • relativeToSeaFloor – Interprets the <altitude> as a value in meters above the sea floor. If the point is above land rather than sea, the <altitude> will be interpreted as being above the ground.
  • clampToSeaFloor – The <altitude> specification is ignored, and the Camera will be positioned on the sea floor. If the point is on land rather than at sea, the Camera will be positioned on the ground.

Thanks to my mentor Dennis Nienhüser for reviewing my patch 🙂

Implementation of automatic SNR detection in Simon-listens

Made my first commit to simon-listens today, a speech-recognition solution by which you can control your computer by giving commands with your voice. Previously, the users needed to separately do “training”s inside Simon to configure their mic settings according to their voice, and adjust it in a way such that there is not much background noise and their voice can be heard distinctly. Well, that problem just got resolved, because from now on, their is no need for the users to undergo any “training”s before using Simon to control their system. He/she can simply talk directly on the mic, and they will be shown on the main window itself, if the signal-to-noise-ratio (SNR) is sufficiently high or not, and the mic configuration can be changed accordingly if required.

Thanks to my mentor Peter Grasch for helping me understand the working components of the software, and the source code in details 🙂

My contribution to Marble so far

Well, it’s been a long time since I had written my last blog. But I’m happy to say I have managed to make 5 commits in total so far (2 of them very small ones) in less than a month which has been pushed to the upstream by my mentor, Dennis Nienhüser. So here’s a brief summary of my commits:

1) April 24- Improve rendering of GPX tracks and routes. Well this one was a rather simple one. Basically, the aim was to make it possible for the active tracks to be distinguished from the ones loaded from file. So after the commit, the rendering of tracks and routes has become identical to the rendering of tracks and routes created by Marble itself, except that the color has been made slightly more saturated in order to make it possible to distinguish them.

2) May 17- Add support for reading the KML Model tag. As for now, Marble does not produce 3D images on closeup views. Although Google Earth has the facility. In KML, you can import 3D models—such as buildings, bridges, monuments, and statues—in the COLLADA interchange file format. So the first step for bringing 3D features to Marble would be to add support for reading/writing the KML Model Tag. So I wrote the GeoDataModel and other associated classes along with the various tag handlers and added “read” support for the tags. Although the patch was tremendously long (of 60 files) still fortunately a portion of the patch was done from before so it made my work a bit easier.

3) May 19- Fix capitalization according to kml spec. This one was a very small bug which fixed the the enumerator values of the altitudeMode tag. Previously they started with capital letters, and I changed it to small letters (made the first letter from caps to small).

4) May 19- KML Model tag writer The reading/writing of the tag could only be completed if the “writing” part was done as well. So, I wrote the KmlModelTagWriter which could do the job. I had created a kml test-file containing the Model object in it, for testing my work.

5) May 19- Fixed include guard. There was a very silly mistake in the include guards in one of the files. Changed it to the correct one.

As for now, I am working on adding support for writing the KML gx:TimeStamp and gx:TimeSpan tags and hope to complete the task by the next day…

🙂