• @DrBard One thing to watch out for is the acos part, which is one of the last calculations you have to do - there is an issue in the Bangle firmware with that function on negative values and you'll get strange results. There are several ways to estimate acos you can find online and I've used one of those for now myself and it's close enough for this kind of thing. It's a known issue but fairly new so fixed for Espruino but it's not in the latest standard Bangle firmware.

    function acos_estimate(x) {

    return (-0.69813170079773212 * x * x - 0.87266462599716477) * x + 1.5707963267948966;
    

    }

About

Avatar for BenJabituya @BenJabituya started