The Firefox orientation system has been tricky to work with, but using PORTRAIT mode with these values for alpha, beta, gamma.
Gives a glitch free Virtual Reality / Augmented Reality system.
It works with the rotation code from an earlier post.
Swap rx, ry, rz with lx, ly, lz for portrait resolution.
Un-optimized commercial build 30 fps on LG G3.
*update: Firefox deviceOrientation now works perfectly. The landscape version works on Chrome and Firefox. Can now do VR/AR in any orientation on any system.
***IMPORTANT***
Someone has a patent for GPS and VR/AR so I wouldn't recommend using GPS in games. Python and HTML5 now offer a different way to get positional data.
Also was able to create AR without a camera with my new arcade machine.
G A M E O V E R