newRPL: Handling of units
|
09-30-2015, 06:02 PM
Post: #5
|
|||
|
|||
RE: newRPL: Handling of units
(09-30-2015 04:15 PM)David Hayden Wrote: Even addition is hard. What is 10_C + 5_F? Is it 10_C + 5_ΔF? Or 5_F + 10_ΔC? Or 10_ΔC + 5_ΔF? All of these will produce different answers.All those things are not the same. Because the scales have a non-null zero, 10_C is actually: ZeroC + 10_ΔC (where ZeroC is a vector to the origin of the scale, and ΔC is a unit vector in the direction of the scale, and the _ operator is just a multiplication). 5_F = ZeroF + 5_ΔF Therefore: 10_C+5_F = ZeroC+ZeroF+10_ΔC+5_ΔF Adding ZeroC+ZeroF has no physical meaning (it would be just another origin of an unknown useless scale), so I like better: 10_C+5_F = 10_C- (-5_F) ZeroC+10_ΔC - (ZeroF-5_ΔF) (ZeroC-ZeroF) + 10_ΔC + 5_ΔF where ZeroC-ZeroF is an actual Δ unit, so the result will be in ΔC direction. The second case you propose is: 10_C+5_ΔF ZeroC + 10_ΔC + 5_ΔF ZeroC + 12.77777..._ΔC = 12.7777..._C And this is an actual temperature, not a Δ. Right now this latter case is not supported but will be in short. Everything else is already implemented and working like a charm. PS: Everything else is finished, I'm just debugging/polishing the units module and I'll update the firmware image for testing in a few days. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)