Description
I check the latest alpha version.
You did a whole lot of fixes.
Excellent.
But there is one thing that I find not a good idea: Your change from kWh to Joule.
In the entire industry energy is measured in Watt.
A nuclear power station delivers Giga Watt's.
A electricity bill shows your consumption of the last month in Kilo Watt.
That is what people are used to.
On the other hand Joule is a unit which is only used in physics.
I have never seen anybody using Joules, except in my classes of physics in school.
I have never seen Joule on the electricity bill or elsewhere.
The users of your database who will see units in Joule will be lost, because this is not a usual unit.
They will have to use a calculator to convert your new unit into something understandable.
But it is the job of the application that uses your database to do these conversions.
It is the job of the application to:
- convert Watt into kW, MW, GW
- convert Watt hours into kWh, MWh, GWh
- convert Pascal into kPa, MPa, GPa
- convert Hertz into kHz, MHz, GHz
- convert VAr into kVAr, MVAr, GVAr
The database should contain the base units for all these, so the conversion can be done in one single function easily.
This function takes the base uint as parameter and simply adds a "k", a "M" or a "G" to it.
It requires a few lines of code to format the display values correctly.
Here you see a screenshot of the J1939 PGN 65005 with a value of 15 Mega Watt hours from dirona-actisense-serial.raw
The raw value of this parameter is 14959.
You multiply this with 3.6e+06 to get Joule.
This results in a display of 53852400000 Joule.
This values do not say me anything.
By the way:
I use the official display names of the J1939 SPNs that you find here:
https://www.isobus.net/isobus/pGNAndSPN/?type=SPN
Here I searched for SPN 2502:
There is nothing about Joule.