Closed Meshalaw closed 6 years ago
Hello i get formula from official documentation. Check point 8.2.5 (pag 14) in MEITRACK_MVT380_User_Guide.pdf
But when I applied the value I get for AD4 from the device (After converting it from hexa to decimal then to voltage), the formula gives me a negative number. I'm not sure what I'm doing wrong.
Paste your raw data for debugging
{
"_index": "logstash-2018.11",
"_type": "logs",
"_id": "AWIZcBxBIXjdt0iwPXaF",
"_score": null,
"_source": {
"altitude": "538",
"latitude": "24.500020",
"SLA": "5",
"ignitionON": "true",
"portStatus": "xxxxxx",
"feedStatus": "valid",
"battery": 95,
"speed": 87,
"protocol": "TCP_xxx",
"datetime": "20180312085958",
"Runtime": "13364922",
"CommandType": "AAA",
"checksum": "E9",
"longitude": "46.938750",
"direction": "317",
"mileage": "573564",
"satellites": "9",
"imeiStatus": "1",
"unique_id": "xxxxxxxxxx",
"functionName": "Time Interval Tracking",
"BaseStationInfo": "420|1|0C95|00919F18",
"gsm_signal": "17",
"AnalogInputValue": "0000|0000|0000|01A0|0558",
"EventName": "Time Interval Tracking",
"panicButon": "false",
"PositioningStatus": "Valid",
"imei": "xxxxxxx",
"deviceModel": "MVT600",
"HDOP": "1.0",
"device": "MEITRACK",
"@version": "1",
"@timestamp": "2018-03-12T08:59:59.777Z",
"kafka": {
"msg_size": 734,
"topic": "golive",
"consumer_group": "logstash",
"partition": 0,
"offset": 801393792,
"key": null
},
"geoip": {
"location": [
46.93875,
24.50002,
46.93875,
24.50002,
46.93875,
24.50002,
46.93875,
24.50002
]
}
},
"fields": {
"@timestamp": [
1520845199777
]
},
"highlight": {
"device": [
"@kibana-highlighted-field@MEITRACK@/kibana-highlighted-field@"
]
},
"sort": [
1520845199777
]
}
Check battery calculation in https://runkit.com/lgatica/meitrack-mvt380-battery
Meitrack devices behave strange, the battery percentage equation they provide doesn't make sense to me. It contradicts with the actual data the device sends. We made our own equation and it is kind of working, I have to keep debugging.
Meitrack equation 0000|0000|0000|01A0|0558 01A0 = 416 Vmax = 4.2 (416 3 2) / 1024 = 2.43V 2.43/4.2 = 0.58 0.65 * 100% = 58% Doesn't make sense to me, because the device is fully charged at this moment, it can't be 58%.
Our equation 416/100 = 4.16V Vmin = 3.4 4.16 - 3.4 / (4.2-3.4) =0.95 Now 0.95 * 100% = 95%
Thanks for your support.
:+1:
Thank you for your efforts. How did you calculate the battery in your code?