XSD: add scaling value 2E-3#1224
Conversation
|
This works, but why not the full range? Leaving room for flag "not supplied values, of course. I also suggest making the soc 0-1 rather than as a percentage to make things simpler. Usually that will be scaled to a percentage, but it may not need to go via that before the GCS renders a little "gauge" icon, for example. We're trying to move away from percentages generally in ArduPilot, preferring a scaler of 0-1 (or -1 to 1 in places...) |
|
@peterbarker There's literally no difference in the data conveyed by a scaled percentage or a normalized value from 0 to 1, so if you want to call SoC a normalized scaled value then go for it :-). I'm opposed to scaling across the full range though because it makes the maths a little bit harder, and a lot less intuitive. You could argue that doesn't matter, but I think it increases the chance for error. If the argument is that the extra range gained from scaling from 50K up to 64K ish will make a difference, then you're arguing that it makes sense to move back to a float :-) EDIT PS This is just my opinion. You're welcome to take this to the dev call since we're not getting this resolved right now unless you agree with me. I would like to come out of the call on Wednesday with agreement that this is the message. 3 years is a long wait. |
|
On Thu, 25 Jun 2026, Hamish Willee wrote:
If the argument is that the extra range will make a difference, then you're arguing that it makes sense to move back to a float :-)
Yeah, I don't think *that* logics ;-)
|
I'm sure you get my point
I know I'd prefer to work with numbers that are easy to convert to decimal unless there is real value in it. |
Allow efficient scaling of a % value in UINT16 value. With this, 0 to 100 is represented by 50000.
This is needed for https://github.com/mavlink/mavlink/pull/2526/changes#r3465455513 - but would do no harm anyway.