One suggestion is to have a set of inexpensive low power lasers arranged in an arc above the upper plane of the door's rotation, pointing directly downwards. A corresponding arc of PIN photodiodes or phototransistors just below the lower plane of the door's rotation can be hooked up to GPIO pins of a microcontroller, to detect the light interruption of each beam in sequence.
I've made a rough illustration of the arrangement, using 5 degree sensing angles. This precision could well be brought down to 1 degree per sensor, if needed.
This 5 Volt 5 mW dot-type red laser would suffice (around $1 on eBay including international shipping):
For the sensor, a PIN photodiode such as the OP906 ($0.59 in single units from Digikey) can be used:
In your microcontroller code, the timings for the successive laser beam interruptions will provide a precise instantaneous rotation speed between any two points separated by 5 degrees, as the door is opened or closed.
The ADC sample rate, timer precision and processing speed of the microcontroller will determine the data precision achievable.
One useful simplification of this design (thanks, @jippie, for getting me thinking in this direction), if precision is not super-critical, is to use a single narrow tube light, such as a 8 watt fluorescent or CFL tube, above the door, to replace the lasers. The light detectors would remain as they are, light to them would be interrupted in sequence as the door closes.
Best Answer
So, first off, after looking at the accel data you sent over it is crucial to consider what the data may represent. It would seem that given the timescale, your device is picking up a very repetitive movement. You can tell based on the repeating high peaks. Now one question is how is this being worn. What I am guessing is that as the swimmer comes up and down or turns left and right, they experience this motion. This motion will manifest with different frequencies based on where it is mounted and thus the coupling to the body. This coupling determines data accuracy, and general tethering of all systems. Since this is not a rigid body, you will experience time delays and force dissipation. On skin, clothes, hair, etc, these give you different filter frequencies.
If you wear this as a belt lets say, you will want to filter out frequencies corresponding to it dragging across your skin and the fabric moving back and forth. This oscillating motion would likely show up as more shifting acceleration than you would see from a general swimmer. You will benefit from a moving average filter. In addition, the large repetitive spikes are probably from smacking on the surface of the water as a quick guess. Perform a median filter on the accel data to rid it of these motions which do not show user speed. Then get the velocity, which will be much cleaner.
These things will not improve the system, but rather knowing how the system manifests in data is more valuable. You can predict why the system is not tethered based on the mounting and filter the data of high frequency noise. Any further improvements could be done in miniaturization or more mechanical filtering with the casing. Feel free to respond with more specifics on the system if you would like more info. Hope this helps.