examples/javascript/bno055.js
function outputData()
{
    sensor.update();

    var floatData = sensor.getEulerAngles();
    console.log("Euler: Heading: " + floatData.get(0)
                + " Roll: " + floatData.get(1)
                + " Pitch: " + floatData.get(2)
                + " degrees");

    floatData = sensor.getQuaternions();
    console.log("Quaternion: W: " + floatData.get(0)
                + " X:" + floatData.get(1)
                + " Y: " + floatData.get(2)
                + " Z: " + floatData.get(3));

    floatData = sensor.getLinearAcceleration();
    console.log("Linear Acceleration: X: " + floatData.get(0)
                + " Y: " + floatData.get(1)
                + " Z: " + floatData.get(2)
                + " m/s^2");

    floatData = sensor.getGravityVectors();
    console.log("Gravity Vector: X: " + floatData.get(0)
                + " Y: " + floatData.get(1)
                + " Z: " + floatData.get(2)
                + " m/s^2");

    console.log("");
}
function outputData()
{
    sensor.update();

    var floatData = sensor.getEulerAngles();
    console.log("Euler: Heading: " + floatData.get(0)
                + " Roll: " + floatData.get(1)
                + " Pitch: " + floatData.get(2)
                + " degrees");

    floatData = sensor.getQuaternions();
    console.log("Quaternion: W: " + floatData.get(0)
                + " X:" + floatData.get(1)
                + " Y: " + floatData.get(2)
                + " Z: " + floatData.get(3));

    floatData = sensor.getLinearAcceleration();
    console.log("Linear Acceleration: X: " + floatData.get(0)
                + " Y: " + floatData.get(1)
                + " Z: " + floatData.get(2)
                + " m/s^2");

    floatData = sensor.getGravityVectors();
    console.log("Gravity Vector: X: " + floatData.get(0)
                + " Y: " + floatData.get(1)
                + " Z: " + floatData.get(2)
                + " m/s^2");

    console.log("");
}
function outputData ( ) { sensor . update ( ) ; var floatData = sensor . getEulerAngles ( ) ; console . log ( "Euler: Heading: " + floatData . get ( 0 ) + " Roll: " + floatData . get ( 1 ) + " Pitch: " + floatData . get ( 2 ) + " degrees" ) ; floatData = sensor . getQuaternions ( ) ; console . log ( "Quaternion: W: " + floatData . get ( 0 ) + " X:" + floatData . get ( 1 ) + " Y: " + floatData . get ( 2 ) + " Z: " + floatData . get ( 3 ) ) ; floatData = sensor . getLinearAcceleration ( ) ; console . log ( "Linear Acceleration: X: " + floatData . get ( 0 ) + " Y: " + floatData . get ( 1 ) + " Z: " + floatData . get ( 2 ) + " m/s^2" ) ; floatData = sensor . getGravityVectors ( ) ; console . log ( "Gravity Vector: X: " + floatData . get ( 0 ) + " Y: " + floatData . get ( 1 ) + " Z: " + floatData . get ( 2 ) + " m/s^2" ) ; console . log ( "" ) ; }
now output various fusion data every 250 milliseconds
now output various fusion data every 250 milliseconds