Power/Battery percentage

renaud 9 years ago

Hello,

Instead of putting the power in numbers like
06=100% 05=80% 04=60% 03=40% 02=20% 01=10%

Wouldn't it be better to show them directly as percentage in the web interface? That would be clearer for most people I think.

Regards

Anton Tananaev 9 years ago

You need to specify what protocol you are talking about. Each protocol is different.

renaud 9 years ago

I was speaking about h02, but it should be for all protocols which include battery stats. Instead of putting a number representing the charge of the battery, which may be different for each protocol, put a percentage. That way, all protocols will look the same in the web interface.

Anton Tananaev 9 years ago

The problem is that some protocols report battery voltage instead of percentage.

renaud 9 years ago

OK, for those it's probably better to leave voltage. But for the others it could be interesting to put a percentage instead of having a number which doesn't indicate much.

Anton Tananaev 9 years ago

Where did you get the mapping between numbers and percentage from?

abyss 9 years ago

Anton, I have found it in new documentation (in English). Also confirmed here http://stackoverflow.com/questions/30652661/gps-tracking-grtq and in examples from this thread https://www.traccar.org/forums/topic/traccar-3-7-odd-position-issue/ values are looks like fit to such decoding.

Anton Tananaev 9 years ago

Can I see the documentation?

renaud 9 years ago

It's in https://dl.dropboxusercontent.com/s/th4i62kmuvxq6vy/H02%20protocol%20EN.doc

Multi-base battery Protocol: adding one byte behind status means battery. *HQ,7893267560,NBR,081606,460,0,1,4,9338,3692,150,9338,3691,145,9338,3690,140, 9338,3692,139,220513,FFFFFBFF,cell# cell range of value: 1-6 6=100% 5=80% 4=60% 3=20% 2=10%

It's quite interesting as 2 is already 10%, which probably means 1 is 0%, so it will never arrive there

Anton Tananaev 9 years ago

Are you saying that "cell range" means battery level? I thought it's something to do with GSM cell signal.

renaud 9 years ago

Yes, it's battery "cells". Besides, it's written battery on top.

Anton Tananaev 9 years ago

I have implemented decoding of battery percentage.

renaud 9 years ago

awesome, thanks