• Gotcha 1 Glitches in the data from the BNO055.

    Examine the pitch values which should be around 180 degrees but on occasion read near 0.

    Cal= 3033
    {"st":3033,"yaw":181.6875,"roll":18.5625­,"pitch":-179.3125}
    Cal= 3033
    {"st":3033,"yaw":181.9375,"roll":16.875,­"pitch":177.0625}
    Cal= 3033
    {"st":3033,"yaw":180.875,"roll":6.875,"p­itch":178.25}
    Cal= 3033
    {"st":3033,"yaw":179.8125,"roll":3.375,"­pitch":178.9375}
    Cal= 3033
    {"st":3033,"yaw":181.3125,"roll":3.1875,­"pitch":179.9375}
    Cal= 3033
    {"st":3033,"yaw":181.75,"roll":2.3125,"p­itch":-0.0625}
    Cal= 3033
    {"st":3033,"yaw":181.25,"roll":3.8125,"p­itch":-0.0625}
    Cal= 3033
    {"st":3033,"yaw":182.625,"roll":5.1875,"­pitch":-179.6875}
    Cal= 3033
    {"st":3033,"yaw":183.0625,"roll":6,"pitc­h":-0.0625}
    Cal= 3033
    {"st":3033,"yaw":183.375,"roll":7,"pitch­":-177.75}
    Cal= 3033
    {"st":3033,"yaw":183.125,"roll":7.25,"pi­tch":-177.625}
    Cal= 3033
    {"st":3033,"yaw":183.9375,"roll":7.875,"­pitch":-176.8125}
    Cal= 3033
    {"st":3033,"yaw":184.3125,"roll":-0.0625­,"pitch":-0.0625}
    Cal= 3033
    {"st":3033,"yaw":185.0625,"roll":9.25,"p­itch":-175.75}
    
    Try using a median filter on the Yaw, Roll and Pitch data.

    See attached file medianFilter.js and 3Dmouse8b.js

    var MM=new xyzMF(7); //global
    …
      W.getIMU();
      MMM=MM.getMF(W.Head);
      Msg.yaw=MMM[0];
      Msg.roll=MMM[1];
      Msg.pitch=MMM[2];
      console.log(JSON.stringify(Msg));
    

    And the output:

    Cal= 3003
    {"st":3003,"yaw":178.625,"roll":2.875,"p­itch":179.75}
    Cal= 3003
    {"st":3003,"yaw":178.6875,"roll":2.8125,­"pitch":179.75}
    Cal= 3003
    {"st":3003,"yaw":178.6875,"roll":2.8125,­"pitch":179.75}
    Cal= 3003
    {"st":3003,"yaw":178.625,"roll":2.75,"pi­tch":179.625}
    Cal= 3003
    {"st":3003,"yaw":178.5625,"roll":2.6875,­"pitch":179.5625}
    Cal= 3003
    {"st":3003,"yaw":178.625,"roll":2.625,"p­itch":179.6875}
    Cal= 3003
    {"st":3003,"yaw":178.6875,"roll":2.625,"­pitch":179.75}
    Cal= 3003
    {"st":3003,"yaw":178.625,"roll":2.75,"pi­tch":179.75}
    Cal= 3003
    {"st":3003,"yaw":178.8125,"roll":2.625,"­pitch":179.8125}
    Cal= 3003
    {"st":3003,"yaw":178.875,"roll":2.75,"pi­tch":179.875}
    Cal= 3003
    {"st":3003,"yaw":179.0625,"roll":2.75,"p­itch":179.9375}
    Cal= 3003
    {"st":3003,"yaw":179.0625,"roll":2.8125,­"pitch":179.875}
    Cal= 3003
    {"st":3003,"yaw":179.125,"roll":2.875,"p­itch":179.875}
    
    3DMouse8c.js reconnects the web interface and uses the median filter

    This version eliminates the image radically changing positions on the screen.
    I still wonder if I missed a data ready status in the BNO055 module that might be causing the problem.
    The hypothesis BNO055 is updating values at the same time the PICO is trying to read them. I’ll have to revisit this issue.

    Other gotchas relating to the position of the screen image and the position of the chip still remain to be resolved.

    testws7a.js allows one to type yaw=23; roll=45; or pitch=-179 (supply your value) into the left pane of the WebIde and have the position of the airplane change on the web page.


    5 Attachments

About