[Ovmsdev] Temperature precision needlessly high
Michael Balzer
dexter at expeedo.de
Wed Feb 10 17:19:53 HKT 2021
Float metrics don't have internal value precision by design. There are
many values not storable precisely by a float. All metrics support
representational precision.
In most cases where you want to reduce internal value precision, you can
simply use the TRUNCPREC or ROUNDPREC macros from the vehicle_bms
module. As they've been used in other modules now as well, I'll move
them to the ovms_utils header.
Regards,
Michael
Am 09.02.21 um 23:46 schrieb jaunius at gmx.com:
> Well I dont't really see a benefit of higher precision for the cabin temperature as well. I guess if we really want to spent time on this it needs to be defined under standard metrics. My suggestion would be to create an issue on GitHub so it can be picked up.
>
> Regards,
> Jaunius
>
> Sent using the GMX mail app
>
> On 2021-02-09 at 12:36, Lance Tjessem wrote:
>
>> For me the value is shown in Home Assistant, which gets the value from
>> my MQTT server. In the past I've just let it use the value directly,
>> which used to operate with a precision of 0.5 C. I can filter it at
>> the front end, it just seemed odd to suddenly jump from 0.5 to 0.00001
>> precision for such a reading.
>> "metrics list v.e.ca" is also returning the same 0.00001 precision
>> but the OVMS android app displays it with a more sensible 0.1
>> precision at least.
>>
>> On Tue, Feb 9, 2021 at 11:22 AM <jaunius at gmx.com> wrote:
>>> Hi Lance,
>>>
>>> The v.e.cabintemp was a float value before as well. But I guess this is because we introduced a user adjustment feature. Anyway, I think it's more of a GUI issue rather than metric itself.
>>>
>>> Where are you trying to check it?
>>>
>>> Regards,
>>> Jaunius
>>>
>>> Sent using the GMX mail app
>>>
>>> On 2021-02-09 at 12:17, Lance Tjessem wrote:
>>>
>>>> I just updated to the latest edge build, and I see that the cabin temp
>>>> metric is now needlessly precise. Examples of v/e/cabintemp I've seen
>>>> today are -5.55556 and -1.66667
>>>> This is on a NL, not sure if it affects other cars as well.
>>>> _______________________________________________
>>>> OvmsDev mailing list
>>>> OvmsDev at lists.openvehicles.com
>>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>>>
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.openvehicles.com
>>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
>>
>> --
>> mvh.
>> Lance Tjessem
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.openvehicles.com
>> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
>>
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.openvehicles.com
> http://lists.openvehicles.com/mailman/listinfo/ovmsdev
--
Michael Balzer * Helkenberger Weg 9 * D-58256 Ennepetal
Fon 02333 / 833 5735 * Handy 0176 / 206 989 26
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20210210/6aca1d9d/attachment.sig>
More information about the OvmsDev
mailing list