Two years with magnetic implants

The 22nd of this December marked the completion of two years since I had magnets implanted into the middle and ring fingers of my left hand in the hopes of developing a new type of human-machine interface while at University. The research was finally published in our paper "A Novel Human-Machine Interface using Subdermal Magnetic Implants" in the Proc. IEEE International Conference on Cybernetic Intelligent Systems in September this year.

Looking back, it is amusing to see that I had made a post on this blog on my initial thoughts on the possibility of an interface being developed from magnetic implants around the time I first came up with the idea for it. And looking further back, it is kind of embarassing to see the over-excited mildly juvenile post I had made after attending a lecture by Prof. Kevin Warwick, with whom I ended up publishing my first paper with!

Anyway, here is a very recent X-ray image of my hand showing the current state of the 3mm diameter, 0.7mm thick neodymium disc magnets I have implanted in my fingers.

As the X-ray image shows, the magnet in the middle finger stands perpendicular to the phalanx while the one in the ring finger lies parallel. I had intended both magnets to lie parallel to the bone but an unfortunate injury in the first few days post-implantation upset the magnet in the middle finger and eventually had it settle in the position it is in now. I had anticipated pain and other potential issues from to the increased pressure levied on tissue by the edge of the magnet during gripping due to the position it had moved to. Luckily, except for a few situations involving a lot of pressure applied on the finger pad it has not been an issue at all.

The ring finger implant has remained without incident and is the most sensitive to external magnetic fields. Hopefully, it will continue to be like that in the years to come!

Thaana on Amazon Kindle

I tinkered with the Amazon Kindle ebook reader device a few nights back and explored the use of Thaana on it. Here are my findings.


The Kindle is an amazing product - the screen is extremely easy on the eyes, the device is light and comfortable to handle and the battery lasts for a few weeks without a charge. The software supports MOBI, PRC, TXT, TPZ, AAX and PDF format books and documents and also includes a web browser.

Kindle 2 devices do not come with any Thaana Unicode fonts bundled in, hence making it impossible to view Thaana documents on a vanilla device. Kindle 3 does come with the impressive Code2000 Unicode font bundled in. This is good news for Thaana support as Code2000 currently contains over 61,000 glyphs from a huge range of writing systems and has supported Thaana for what must be close to a decade. However, the use of Code2000 seems to be limited to the web browser and is not involved in rendering ebooks.

It is possible to use either of the Kindle font hacks (see "Adding a Thaana font" below) to replace the system's ebook reader font to get Thaana to display within the reader component for all of the supported ebook formats. But this turns out to be pointless as neither device has proper support for handling right-to-left scripts like Thaana and hence words and paragraphs are all jumbled up in reverse.

Kindle screenshot: No Thaana characters in a vanilla device
Kindle screenshot: No Thaana characters in a vanilla device

Kindle screenshot: Thaana characters display after hack
Kindle screenshot: Thaana characters display after hack

PDF with font-embedding: The only thing that works!

The only ebook format that worked for Thaana was PDF with font-embedding (PDFs without the fonts embedded fails to render Thaana correctly even when the device was loaded with a Thaana Unicode font). Many of the existing Thaana PDF documents work just fine (see the screenshots below) as most of them have the required Thaana fonts embedded.

Kindle screenshot: PDF with Thaana fonts embedded
Kindle screenshot: PDF with Thaana fonts embedded

Kindle screenshot: Thaana Quran translation PDF
Kindle screenshot: Thaana Quran translation PDF.

Thaana in the browser

Thaana viewing via the WebKit-based web browser in Kindle was flawless in websites using Unicode Thaana (hence Haveeru Daily website is excluded). Code2000 has decent Thaana glyphs and looks very much readable on the device.

Kindle screenshot: on Kindle
Kindle screenshot: on Kindle

Unlike desktop systems, there is no native option to switch to a Thaana keyboard but because Javascript works, Thaana entry on websites using my Javascript Thaana Keyboard handler works just fine.

Kindle screenshot: Thaana entry using JTK
Kindle screenshot: Thaana entry using JTK

Adding a Thaana font

There are two ways of loading a Kindle with a Thaana font, though it is quite pointless for ebook reading purposes due to the reasons above. The rooted device method can be used to replace Code2000 with a font of your liking within the browser but keep in mind that Kindle will use the same font for the glyphs for English, numbers and puncuation and hence the font should be easy on the eye. In my opinion, this rules out most of the existing Thaana fonts, especially the common ones such as Faruma and the MV series of Thaana Unicode fonts. The best font I could find was the opensourced GNU Freefont which has very nice English glyphs and also includes the Thaana glyphs from Mohamed Ishan's Thaana Unicode Akeh font.

Rooted device + font replacement method
This method makes permanent changes to the Kindle and requires that you root your Kindle through a very simple procedure and install an associated custom fonts hack. The details are available here.

User fonts method
This method only works for Kindle 3 devices and does not require rooting the device and makes temporary changes to the Kindle by enabling a hidden user font mode in the device. The changes persist as long as you do not alter the font-face settings on the Kindle. Details on how to do this are available here.

Creating Thaana ebooks

For now, the only method for getting Thaana to work on Kindle devices seem to be via font-embedding in PDF documents. The easiest, and perhaps the most cost effective, method of producing such documents would be to prepare the document using your choice of document editor (like MS Word or OpenOffice) and printing out the document to the virtual printer provided by print-to-PDF software such as the free PDFCreator applications.

How-to for Windows:
1. Download and install the PDFCreator application.
2. Go to the print function in whichever software you are using and select the PDFCreator virual printer.

3. When the PDFCreator print window comes up, click the "Options" button.

4. On the PDFCreator print options window that comes up. Select "PDF" under "Formats" from the left, switch the "Fonts" tab and make sure "Embed all fonts" is ticked. Customise the "Subset font..." option if you would like and click "Save".

5. You only need to set font embedding as above once and the program will use it in future prints. When you are back at the print screen, set the Document title and other details as you please and click "Save".

To ensure that the PDF you saved (or any other PDF that you may have) has the Thaana fonts embedded, load it up your favourite PDF viewer software and check the document properties.


Thaana on Kindle is very limited for now. The only option to produce and read Thaana ebooks is using the PDF ebook format with the Thaana fonts embedded in the PDF. This does mean that Kindle devices can be used to read Thaana without rooting or any hacks. Thaana usage on the web browser in Kindle matches that of a mobile device or even a desktop or laptop computer.


Total lunar eclipse on 21 Dec: Not visible in Maldives

Shame. The last eclipse for 2010, a total lunar eclipse, to occur on the 21st of December will not be visible in the Maldives. The entire 72 minutes of totality will be visible for North America and parts of it visible to South America, UK, most European countries, East Asia and much of Australia.

The next earliest eclipse visible in the Maldives will be a total lunar eclipse occurring on 15 June 2011 with the penumbral phase beginning at 10:25PM. The next solar eclipse visible in the Maldives isn't due to occur until 2016.

More info on the 21st Dec eclipse:
- Eclipse event page at NASA
- Eclipse path and visibility

Flight from Gan to Hulhule in Google Earth

I took the flight operated by Maldivian on the way back to Male' from a little holiday to Fuvahmulah and Addu atolls last month and logged the flight path using the GPS on my phone. I finally had a moment today to pass the track log to Google Earth and look at it inside the program's great 3D visualization of the globe. And it looks atleast as cool as I had hoped!

The journey was logged from boarding to landing, from the Gan International Airport in Addu Atoll to Hulhule International Airport in Male' Atoll. To log the flight path, I used the free and very capable OruxMaps application for Android on my Google Nexus One phone (which was put in flight mode throughout). The track log was exported from OruxMaps as a GPX format file which can be read easily by Google Earth. The free application TourMaker helped convert the GPX data to KML code for a nice Google Earth "tour" of the path, which then I tweaked by hand a little bit to fit my liking.

Anyway, check out the video of the tour I made below. I am putting up for download, the raw GPX data (which contains latitude/longitude, timestamp, altitude, bearing and speed information) and the Google Earth KMZ files I made (one showing the flight path with altitude and the other a tour).

- Gan to Hulhule flight: GPX GPS log (Zip, 54KB)
- Gan to Hulhule flight: Google Earth tour (Kmz, 40KB)
- Gan to Hulhule flight: Google Earth track (Kmz, 37KB)

"We, Machines" lecture

(I am a bit late in posting it here but...) I would like to convey a big thank you to all those who attended my recent lecture, "We, Machines" at the 6th edition of the Buraasfathivaru series, and the organisers "26". I hope the lecture imparted something of value and provided some food for thought.

We, Machines - Lecture promo