SleepyHead

SleepyHead is my little piece of open-source, cross platform, sleep tracking software with a focus on monitoring CPAP treatment for sleep apnoea. It does Oximetry as well.

It's sourceforge page is here.

Still a very young project, but it has turned out to be quite usable software.

The Beginnings
It all started in early March 2011, due to lack of software to read my Philips Respironics CPAP machines SD card on Linux.  I only just got on the machine, and my treatment was getting nowhere fast. By chance, hunting for programming information on my CPAP machine, I stumbled across the CPAPTalk forum and the wonderful group of people who hang out there and help one another deal with this affliction.
Early Python Version

Python Version
SleepyHead began as a cheap and dirty python hack, involving some loader code I wrote for the Philips Respironics System One data, and the very well made MathPlotLib graphing library.

A lot of the groundwork for hacking the undocumented PR System One data format was laid by Mike Hoolehan, creator of the Onkor project, an excellent open source web based program that has similar goals. I did help hack a fair bit of this data format too, discovering how to get the waveform alignment working properly, found the event counts in the summary data, and a few other useful bits of info.
Oximeter Overlay Experiments

I was very much focused on interactivity, as I wanted to link CPAP data with other sleep machine data sources, and python quickly became too slow for the purpose.



  
C++ and wxWidgets
wxWidgets Version
 I switched to C++ in April, which is my "native tongue" in programming, and tried to use the wxWidgets library, which while nice and light, caused me no end of headaches with graphics performance, and cross platform problems. I wrote my own graphing system to alleviate the problems. Still too slow..

I switched the graphs to OpenGL, and it quickly became apparent wx wasn't the best choice for this kind of app.


Qt Port
Qt port prior to graph rewrite
In June, I ported the app to Qt , and things have been running a lot more smoothly. Also wrote the ResMed S9 importer around this time. Initial teething problems with graphics on non Linux platforms have been solved, thanks to a complete redesign of my graphing system, and I am now very happy with the performance.

Thanks
This project could not have happened without the encouragement and help of numerous CPAPTalk members.

I'd like to say a special thankyou to the following people, for their much appreciated contribution in shaping this software, and putting up with me in many emails:
Mike Hoolehan, Mark Brushke, Troy Schultz, John Masters and James Marshall.

Also like to say thanks to the many CPAPTalkers who kindly shared their private CPAP data so I could make this software work, who tested the program in all it's buggy glory, and shared their cool ideas with me.

Notes
There is a flickr photo stream with more screenshots taken over the course of developing this application.