So after having played with ATan2 (which works perfectly!) I have realised that I can't get a Yaw value from the accelerometers alone
Unless someone can prove otherwise (please!).
Pitch and roll works great, but without yaw my project cannot fly.
I think I need to be able to read gyroscope. The GetRawGyroVelocityX/Y/Z don't appear to work at all.
Here's a little example for pitch and roll:
rem Set camera pitch and roll for movement tracking
rem Can be used for Augmented Reality applications or Head Tracking
rem in VR games.
setcamerarotation(1,0-atan2(getrawaccely(),getrawaccelz()),0,0-atan2(getrawaccelx(),getrawaccely()))
If we can get yaw working too, then fully immersive VR and Augmented Reality applications in AppGameKit will be a reality!
p.s. How do I get my V2 backer badge?