Here is what I used for my decorder. This was like 4 months ago so please don’t ask me questions
function Decoder (bytes) {
var _lat = ((bytes[0] << 16) + (bytes[1] << 8) + bytes[2]) / 16777215.0 * 180.0 - 90;
var _lng = ((bytes[3] << 16) + (bytes[4] << 8) + bytes[5]) / 16777215.0 * 360.0 - 180;
var _alt = (bytes[6] << 8) + bytes[7];
var _acc = bytes[8] / 10.0;
var _VCC = bytes[9] / 50;
var _tempCPU = bytes[10] -100;
var _time_to_fix_bin = bytes[11];
var _time_to_fix;
if (_time_to_fix_bin>=218) { _time_to_fix = 60*60+(_time_to_fix_bin-218)*600 }
else if (_time_to_fix_bin>=168) { _time_to_fix = 10*60+(_time_to_fix_bin-168)*60 }
else if (_time_to_fix_bin>=60) { _time_to_fix = 60+(_time_to_fix_bin-60)*5 }
else {_time_to_fix = _time_to_fix_bin }
// 0..60 sec at 1 sec interval <==> values 0 .. 60
// 1..10 min at 5 sec interval <==> values 60 .. 168
// 10..60 min at 1 min interval <==> values 168 .. 218
// 1..7 hour at 10 min interval <==> values 218 ..254; 255 means "more than 7 hours"
return {
gps_lat: _lat,
gps_lng: _lng,
gps_alt: _alt,
gps_prec: _acc,
arduino_VCC: _VCC,
arduino_temp: _tempCPU,
time_to_fix: _time_to_fix,
};
}