Remove increased altitude resolution from plain decoder
This commit is contained in:
parent
45b0bae945
commit
19ee712e51
@ -20,7 +20,7 @@ function Decoder(bytes, port) {
|
|||||||
decoded.longitude = ((bytes[i++] << 24) | (bytes[i++] << 16) | (bytes[i++] << 8) | bytes[i++]);
|
decoded.longitude = ((bytes[i++] << 24) | (bytes[i++] << 16) | (bytes[i++] << 8) | bytes[i++]);
|
||||||
decoded.sats = bytes[i++];
|
decoded.sats = bytes[i++];
|
||||||
decoded.hdop = (bytes[i++] << 8) | (bytes[i++]);
|
decoded.hdop = (bytes[i++] << 8) | (bytes[i++]);
|
||||||
decoded.altitude = ((bytes[i++] << 8) | (bytes[i++])) / 4 - 1000;
|
decoded.altitude = ((bytes[i++] << 8) | (bytes[i++]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ function Decoder(bytes, port) {
|
|||||||
decoded.longitude = ((bytes[i++] << 24) | (bytes[i++] << 16) | (bytes[i++] << 8) | bytes[i++]);
|
decoded.longitude = ((bytes[i++] << 24) | (bytes[i++] << 16) | (bytes[i++] << 8) | bytes[i++]);
|
||||||
decoded.sats = bytes[i++];
|
decoded.sats = bytes[i++];
|
||||||
decoded.hdop = (bytes[i++] << 8) | (bytes[i++]);
|
decoded.hdop = (bytes[i++] << 8) | (bytes[i++]);
|
||||||
decoded.altitude = ((bytes[i++] << 8) | (bytes[i++])) / 4 - 1000;
|
decoded.altitude = ((bytes[i++] << 8) | (bytes[i++]));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (port === 5) {
|
if (port === 5) {
|
||||||
|
Loading…
Reference in New Issue
Block a user