X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=static%2Fstereoview.js;h=50863d5533f5219f0db0aff3362d36e2b8a4ffc6;hb=7b674b9084ef483caee686be6cc051920eae2a70;hp=dd9b4e3a6818a3b11624f6dbcc082aa58606b0c9;hpb=699ce04d08d429ef5a7dbda90134965927588a5e;p=serve0 diff --git a/static/stereoview.js b/static/stereoview.js index dd9b4e3..50863d5 100644 --- a/static/stereoview.js +++ b/static/stereoview.js @@ -100,7 +100,7 @@ function stereoview(layout, video) { ty = 0; y.forEach( function(n, i){ ty += n; } ); ty /= inertia; tz = 0; z.forEach( function(n, i){ tz += n; } ); tz /= inertia; - pitch = Math.asin((tz / 9.81 > 1)?1:(tz/9.81)) / Math.PI * 180; + pitch = Math.asin((tz / 9.81 > 1)?1:(tz/9.81)) / Math.PI * 180 + 22.5; roll = - Math.asin((ty / 9.81 > 1)?1:(ty/9.81)) / Math.PI * 180; yaw = (yaw + ty) % 360; };