Based on a work at github.com I only implemented orientation sensor to view. There may some bugs or math function errors. Any contribution appreciated.