[Solved] Compass App unreliable? How to do a compass callibration?

Posted on
Page
of 2
/ 2
Next
  • I received my bangle.js today. Totally awsome!
    One of the I tried first was the compass app, however this seems to have problems to point to north and to keep pointing to north...
    Is there some compass callibration needed? If yes, how to do it?

  • Unfortunately for me it's exactly the same. Besides the non-functioning loudspeaker, the compass does not work at all or only shows something randomly. That the loudspeaker does not work was already announced by mail, but what is wrong with the compass?

  • The compass should just need calibrating. At the moment it doesn't store the calibration so needs it each time you start the compass app, but it's as easy as just turning around in a complete circle.

    The compass app also expects to work like a 'real' compass - so with the watch face parallel to the ground rather than perpendicular.

    Does that help?

  • Unfortunately, that doesn't help. I turned the clock around the X, Y and Z axis and also in a circle without rotation but nothing helps. The compass still seems very random.

  • Hi Gordon,
    I always tried parallel to the ground. I first tried to callibrate by rotating the clock around its z-axis, it seems what works a bit better is holding it out on the stretched arm and "rotate" yourself, ie moving the watch in a great circle. I will try this in the garden tomorrow, to rule out effects from the building/metal roof.
    Regards,
    DerGuteWold

  • I have the same problem, the compass points in one direction, if I turn with it, the compass needle moves as well. I have also tried a calibration as described here, but without any change. Has something improved with you?

  • Hi there !
    I tested the compass and, unfortunately, it doesn't work...
    It shows random directions and I found nothing to do to calibrate it (on my arm, moving around, up and down etc etc...).
    Francis

  • It could be another electrical component inside the watch that generates a disturbing magnetic field ?

  • Maybe you could look at the raw data if you connect with the IDE and do:

    Bangle.on('mag',m=>print(m.x,m.y,m.z))
    Bangle.setCompassPower(1);
    

    The absolute values look quite small, and maybe there's something that could be done to improve sensitivity - but when I look at the values I can see them changing pretty repeatably in response to the orientation of the watch, so I guess it's possible that there's something wrong with the code that works out the heading from that data?

  • I have no idea how to determine the direction from the three absolute values, but these values seem plausible to me (I rotated the clock around an axis, one value remained almost constant and the other values increased or decreased, just as I would have expected when rotating around an axis). If I orientate the clock to north, I get (I thought correctly) the 0 for heading, unfortunately I get the same value for an orientation approximately to south. I do not understand the values of heading at all. Since they change reproducibly in the same way, I also assume that the calculation of heading is wrong. Maybe someone else can confirm this (?)

  • With the basic sport software installed, calibrating the compass was done by moving the watch in a horizontal figure 8 path... keeping the watch face level was not that important... it was more like you would fly an figure 8. I used it with Espruino compass app loaded and it worked as well pretty accurate.

  • I had also tried the 8, but unfortunately without any effect. So then probably a hardware problem after all? Is there a way to find out?

  • Ok, I just found the issue. It's just a software problem.

    Basically the calibration range was reset to 0, so if the magnetometer didn't have much of an offset and the values for north and south lay either side of 0 (as somehow happened on my development watches) then it's fine.

    If you update the Bangle.js interpreter firmware to a firmware from http://www.espruino.com/binaries/travis/­master/ then it'll be fixed!

  • Do I have to update the compass app?
    Because it does not work anymore, just shows '---' at the top and the blue ring.

  • Because it does not work anymore, just shows '---' at the top and the blue ring.

    That's it saying it's not calibrated. Turn around 360 degrees and it'll start working

  • That's it saying it's not calibrated. Turn around 360 degrees and it'll start working

    I found it misleading and changed it, see PR https://github.com/espruino/BangleApps/p­ull/316

  • But it works now?

  • Yes, it gets calibrated when turning.

  • The compass seems veeeery sensitive to really being parallel to the ground.
    If I orient the watch so that is displays around 355-005 and tilt the watch a bit to the right or left, it will go to around 40 or 320. I made a short video to demonstrate this.


    1 Attachment

  • I have the same problem. It looks like the compass shows random values with no visible correlations to the real cardinal points and it is very sensitive to tilt movements.

  • Mon 2020.04.20

    'If I orient the watch so that is displays'
    'I made a short video to demonstrate this'

    Unless the video was shot through a fish eye lens, it appears the base plane is offset 60 degrees to the ground. Not very parallel.

    See #3 post:
    "The compass app also expects to work like a 'real' compass - so with the watch face parallel to the ground rather than perpendicular."


    Maybe the face needs color hinting feedback when not parallel?

  • @Robin: Yes, sort of, the video was taken with Pixel 3, which has a very wide-angled lens and the video was croppend. Rest assured that it was really parallel to the ground floor!

    Having sort of spirit level indicator for orientation (bubble in the middle) might be helpful, though. I don't know if the KX023 accelerometer used is capable of providing the necessary data for this.

  • @DerGuteWolf There's already a spirit level app, so integrating this into the compass should be possible.
    https://github.com/espruino/BangleApps/t­ree/master/apps/slevel

  • @user111620 you'll need to update your Bangle.js firmware to the latest version to have it reliable.

    Right now we use just the magnetometer X and Y values for the angle. If you don't hold it level then like a real compass it'll read differently.

    I guess you can't easily just add the Z value in, so I guess as you say I think you'd have to:

    • Look at the accelerometer values
    • work out a 'corrected' dy based on something like mag.dy*accel.z + mag.dz*accel.y (may not be exactly that, but that's the idea)
    • Use Math.atan2 to work out the angle from dx/dy

  • Yes, you could do a tilt compensation, cf. eg. https://www.instructables.com/id/Tilt-Co­mpensated-Compass/ , which is imho a better idea than to incorporate the spritit level.

    And then there is the declination and inclination deviation of magnetic and geographic north, cf. https://www.ngdc.noaa.gov/geomag/WMM/

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

[Solved] Compass App unreliable? How to do a compass callibration?

Posted by Avatar for DerGuteWolf @DerGuteWolf

Actions