Did you ever manage to get it to be accurate, though? I tried something similar but the accelerometer and gyro were nowhere near accurate enough.
Full article reviewing MagicPlan and RoomScan: http://www.younghouselove.com/2014/03/apps-and-zerts/
Lately I've seen a lot of app notes and open-source code written by/for amateur drone guidance developers, which I suspect would have helped me a lot.