Post Reply 
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.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
newRPL: Handling of units - Claudio L. - 09-23-2015, 03:38 PM
RE: newRPL: Handling of units - Han - 09-27-2015, 02:29 PM
RE: newRPL: Handling of units - Claudio L. - 09-28-2015, 01:50 PM
RE: newRPL: Handling of units - Claudio L. - 09-30-2015 06:02 PM
RE: newRPL: Handling of units - JoJo1973 - 05-08-2016, 01:30 PM
RE: newRPL: Handling of units - JoJo1973 - 05-08-2016, 04:28 PM
RE: newRPL: Handling of units - Claudio L. - 05-08-2016, 05:38 PM
RE: newRPL: Handling of units - Claudio L. - 05-09-2016, 05:42 PM
RE: newRPL: Handling of units - JoJo1973 - 05-09-2016, 06:05 PM
RE: newRPL: Handling of units - Vtile - 05-11-2016, 02:27 PM
RE: newRPL: Handling of units - JoJo1973 - 05-08-2016, 06:21 PM
RE: newRPL: Handling of units - Claudio L. - 05-08-2016, 06:24 PM
RE: newRPL: Handling of units - JoJo1973 - 05-08-2016, 10:44 PM
RE: newRPL: Handling of units - emece67 - 05-08-2016, 09:06 PM
RE: newRPL: Handling of units - Claudio L. - 05-09-2016, 12:41 AM
RE: newRPL: Handling of units - emece67 - 05-08-2016, 10:01 PM
RE: newRPL: Handling of units - Claudio L. - 05-09-2016, 12:59 AM
RE: newRPL: Handling of units - emece67 - 05-09-2016, 05:55 AM
RE: newRPL: Handling of units - JoJo1973 - 05-09-2016, 09:22 AM
RE: newRPL: Handling of units - Claudio L. - 05-09-2016, 01:46 PM
RE: newRPL: Handling of units - JoJo1973 - 05-09-2016, 09:27 PM
RE: newRPL: Handling of units - Claudio L. - 05-11-2016, 02:49 AM
RE: newRPL: Handling of units - JoJo1973 - 05-12-2016, 11:18 AM
RE: newRPL: Handling of units - Claudio L. - 05-09-2016, 09:51 AM
RE: newRPL: Handling of units - Claudio L. - 05-11-2016, 05:01 PM
RE: newRPL: Handling of units - Helix - 05-12-2016, 01:07 PM
RE: newRPL: Handling of units - Claudio L. - 05-12-2016, 04:58 PM
RE: newRPL: Handling of units - Helix - 05-12-2016, 11:58 PM
RE: newRPL: Handling of units - Claudio L. - 05-13-2016, 01:43 AM
RE: newRPL: Handling of units - Claudio L. - 05-13-2016, 01:35 PM
RE: newRPL: Handling of units - Helix - 05-13-2016, 11:12 PM
RE: newRPL: Handling of units - Claudio L. - 05-14-2016, 02:57 AM



User(s) browsing this thread: 1 Guest(s)