[Ovmsdev] Battery capacity metrics (for the Leaf, and in general)

Robin O'Leary ovmsdev at caederus.org
Sun Mar 3 22:35:06 HKT 2019

On Sun, Mar 03, 2019 at 04:53:08AM +0000, Anko Hanse wrote:
> Just a remark about the naming of your constants.
> The numbering of the generations is always confusing. We are used to Gen1, Gen2, etc for the 2011-2017 models.
> But Nissan itself seems to consistently call all of these Gen1 and only starts Gen2 at 2018. The confusion will even increase more whenever they will introduce a Gen3 in 202x...

Hopefully there is limited scope for confusion, as naming them
"enum battery_type" and "BATTERY_TYPEn..." should make clear they
relate only to the battery, not the car as a whole, or model year.
On reflection though, I think the naming could be simplified by not
conflating the type (as it strictly relates to CAN bus communication
format), with the capacity.  Then the types may as well just be numbers
0,1,2... as they are reported in "xnl.v.b.type" with no deeper meaning.
It is then tempting to add 1 to the enum values so they match this:

> Gen 1.1   2011-2012, 24kwh
> Gen 1.2   2013-2017, 24kwh
> Gen 1.3   2016-2017, 30kwh

> Initial test with your ' leaf-chargetime' code looks good on my 30kwh Leaf (after a short drive):
> xnl.v.b.type = 2
> xnl.v.c.duration = 60;135;195Min      (only 'full', no 'range' values on my model)


Do you get a sensible value in xnl.v.b.soc.nominal?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20190303/6fd1be4c/attachment-0002.sig>

More information about the OvmsDev mailing list