My original post was mistaken - please see the addendum.
On closer inspection - the altitudes do change with a units change.
However - speed always stays at meters per second.
Is there a way to program or display waypoint speeds in Mission Planner in MPH?
Are you talking on the HUD or where are you looking at these units.
Here on the Plan screen.
When a speed is set with the DO_CHANGE_SPEED it’s always in meters per second - even if speed is set on the Config-Planner screen to MPH.
You are correct. Speed will remain in m/s on that window regardless of what is chosen on the Planner screen.
It will not change.
parameters in mission commands are not translated to non SI units, because it needs rules for every command that uses speed.
Alt is recalculated, since is is fixed and exists at every command.
By the way, it is just masking the units. The autopilot always uses SI units.
Do yourself a favor and keep all in metric units which is native to Ardupilot as stated. Adjust accordingly. Anything other than SI units should be banished from use IMO
Devil’s advocate: If you wish to operate under FAA or ICAO regulations, you’d better be able to measure in feet and knots…
Yes, I get that. But even Engineering things here (USA) Imperial units are such a pain in the ass!
I think the root cause of my concern and post is that units are displayed for speed - meters per second - but no units are displayed for altitude.
That’s why when I changed the parameters from metric to English units, I thought Mission Planner failed to make changes according my new settings.
In both places on creating a mission - speed and altitude - these values are entered by the user. I don’t see how it would be any more difficult to program the ability to conform to the specified units in one case, and not in the other.
Regardless - without units appearing in the altitude column, there is cause for confusion - and by including units in that label (and all other such columns) there would be less chance for error.
I’m sure we all recall the NASA embarrassment when they crashed a Mars lander due to mistakes with units. As there are legal limits for UAS altitudes, it would be good to avoid any chance for such confusion.
Due to the nature of how mavlink commands are defined, Mission Planner does not have any information about the range or unit of parameters 1-4 in a mavlink command. The header is just a text, which can even be omitted. It is possible to add, for example, DO_CHANGE_SPEED as an exception and recalculate the speed to freedom units, but this does not guarantee that any other or new command is handled, which IMHO creates more confusion.
Thanks Andras -
The issue isn’t the column headings. The issue is the chance of inconsistent units.
This would be especially problematic if a user is working on a mission created by someone else.
I believe someone said that all units stored on a mission are metric. So the config/planner screen is simply storing information about what units are to be used when data is displayed.
So for example, when I create a mission with English altitudes specified, when I change the altitude units in config/planner meters - the mission plan grid automatically shows the altitudes in meters.
And as noted in this thread - these units are used in other places such as the HUD.
No doubt there are complexities I’m unaware of. But if the user specifically specified “MPH” for units on config/planner - its a source of confusion for them to be displayed anywhere in different units - even if they are labeled correctly.
Indeed, Mission is always saved in SI units either into a file or a flight controller. Data is always coming in SI. Changing units in Mission Planner will ONLY change how it is displayed. In the backend, it is always in SI.
The conversions to display in different units are done everywhere where MP knows automatically that a number is a speed or altitude. As said, unfortunately, this is not a case for param1 - param2 in mission commands.
It would be possible to change the text in the GUI for the table depending on the selected units and apply the unit conversion scalar. On the Data screen Actions tab the change altitude input is in the selected altitude units, but the change speed input is always in m/s. I haven’t messed with the Set Loiter Radius button though.
At some point I want to add units everywhere there is an input box just to clarify to the user what they are about to input.
Thank you Charlie -
Anything to reduce possible confusion - especially for rookies like me, would be helpful.
Imagine the following; I write a Lua script that uses the do_script_message command to set something that is speed-related, and its unit is m/s. How on earth would Mission Planner know that this should be displayed in freedom units ?
There are also mavlink commands that set vertical speed in m/s; should we display them as mph, or for those, should we use feet/second to make it more challenging?
Unit’s of a mavlink command parameters are not defined anywhere in the code in a way that a program can make an automated decision on how to display it. All we have is a freeform description field, which is not mandatory.
Selecting commands by hand and hardcoding unit conversion rules into the code creates an extra need for maintaining and guaranteeing more confusion.
That is all fine, but the crux of the problem of telling the user what the units for an input box when they are know is still present. Right now the only way to determine what units the input box uses is to read the code or try it and see what happens. I certainly don’t like the second option for every input box and the first option is not practical for a typical user to undertake. The best option is to tell the user what the units are. Honestly that would have solved some bugs that I have found and patched much sooner than me coming along to dig into the code to find how to solve them. There are huge benefits to clear user communication.
Of course I don’t know enough about the ArduPilot code to argue - I trust your knowledge.
I was making a point from a high-level software engineer perspective. I believe I recall hearing that all the units stored in a mission are metric. This may be where I’ve gone wrong.
But if its true - then it would seem the only matter at hand is knowing what units the user wants to do entry and read displayed.
That’s what I was thinking this screen was about: