Improve high_latency_tgt_dist()#32856
Conversation
|
I wonder if we should spell out "decameters".... I didn't recognize |
Just ICYDK, it's the preferred abbrev from our wiki. |
|
If you want my two cents on the units, maybe it should not be in the function name. There are all sorts of weird units in these high latency functions like duodegrees and quintimeters per second. But they are listed in the comments in GCS_Common.cpp. Not every bug needs the entire thing rearchitected to fix :) As mentioned I do like the improvement in very high distance scenarios. |
We have a fairly well discussed list of standard units here https://ardupilot.org/dev/docs/style-guide.html#preferred-abbreviations-for-units and "dam" isn't on the list. I think adding units to the method fits the pattern we are going for, but if so probably add it to the list maybe with a comment "only used for high latency mavlink messages" (or somethink like that. |
lets just add it to the list: https://ardupilot.org/dev/docs/style-guide.html#preferred-abbreviations-for-units |
Is it? I do not see it, and it's not on the page Tim linked. Can you provide a link? How did you decide that it is? |
Wiki says "Functions that return a single physical value or variables that represent a physical value should be suffixed by the physical unit." From NIST, the abbreviation for this unit is 'dam', and nothing in the table overrides that. |
a221e2b to
f4fdb9b
Compare
Summary
Some spots were incorrectly using decimeters (dm) rather than decameters (dam). Also improved some values and typecasting.
Classification & Testing (check all that apply and add your own)
Description
This resolves #32838 .
0.001to1e-3was made, because I find that easier to read for exponents >= 3.