mirror of https://github.com/espruino/BangleApps
Update app.js
parent
d9a5c3d5c0
commit
16115f8343
|
@ -144,7 +144,7 @@ Bangle.on('pressure', function(e) {
|
||||||
altSlow=e.altitude;
|
altSlow=e.altitude;
|
||||||
altRaw=e.altitude;
|
altRaw=e.altitude;
|
||||||
}
|
}
|
||||||
altRaw=e.altitude;
|
altRaw=altRaw+(e.altitude-altRaw)*0.2;
|
||||||
});
|
});
|
||||||
|
|
||||||
Bangle.on('GPS', function(fix) {
|
Bangle.on('GPS', function(fix) {
|
||||||
|
@ -156,8 +156,8 @@ Bangle.on('GPS', function(fix) {
|
||||||
}, BTN1);*/
|
}, BTN1);*/
|
||||||
|
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
altFast=altFast+(e.altitude-altFast)*fastGain;
|
altFast=altFast+(altRaw-altFast)*fastGain;
|
||||||
altSlow=altSlow+(e.altitude-altSlow)*0.09093;
|
altSlow=altSlow+(altRaw-altSlow)*0.09093;
|
||||||
altH.push(altSlow);
|
altH.push(altSlow);
|
||||||
if (altH.length>intTime*1000/pressureInterval) {
|
if (altH.length>intTime*1000/pressureInterval) {
|
||||||
altH.shift();
|
altH.shift();
|
||||||
|
|
Loading…
Reference in New Issue