Skip to content

Conversation

@MrD-RC
Copy link
Member

@MrD-RC MrD-RC commented Feb 12, 2022

  1. Fixed rounding error
  2. Fixed error that displayed centi° for nav_fw_pitch2thr_threshold. It should have been deci°. The calculation was fine (10 x multiplier). Only the label was wrong.
  3. Added conversions for:
    a) vertical speed
    b) metres
    c) temperature
  4. Added support on Failsafe and OSD pages
  5. Sorted out alignment issues, due to different implementations on different pages
  6. Hovering over a field shows the CLI command

This should now take care of all places that need unit conversion, other than Mission Control.

Examples

Advanced Tuning

image
Alignment all looks fine. Note the speeds in the General Navigation Settings and Automatic landing settings are now in metres per second for vertical speeds. This matches the units used in the OSD for the digital vario. Imperial is feet per second and GA is 100 feet per second.

Failsafe

image
Looks the same, but quite a lot has changed. All data except for the procedure checkboxes no uses the data-setting method. This will be able to be fully converted one PR #7734 is merged. As that has the changes required to handle string over the data-setting method.

OSD

image
Just the alarms here. I chose to keep Fly Time as minutes. But I could change it to be hours with non-default units if people wish. You may also notice that the imperial temperatures are in Fahrenheit.

As always, open to comments or suggestions.

Half-Fixes #1428

1. Fixed rounding error.
2. Added conversions for:
a) vertical speed
b) metres
c) temperature
3. Added support on Failsafe and OSD pages.
4. Sorted out alignment issues, due to different implementations.
@MrD-RC MrD-RC added this to the 5.0 milestone Feb 12, 2022
@MrD-RC MrD-RC requested a review from DzikuVx February 19, 2022 17:27
@MrD-RC
Copy link
Member Author

MrD-RC commented Feb 19, 2022

@DzikuVx review requested as it would be handy to get this merged before I continue on another PR.

@DzikuVx
Copy link
Member

DzikuVx commented Feb 21, 2022

@MrD-RC go with the merge

@MrD-RC MrD-RC merged commit a2fe532 into master Feb 21, 2022
@MrD-RC MrD-RC deleted the MrD-Enhance-and-extend-conversions branch February 21, 2022 15:40
@Jetrell
Copy link
Collaborator

Jetrell commented Mar 9, 2022

@MrD-RC I noticed in the 5.0 build, the Automatic Landing Settings have turned out a bit jumbled.

landing 5 0

Due to this requiring a fix... I thought I would suggest an idea.
Recently on Discord, I explained how these settings work. Because the user gets confused by the label's, rather than what the setting actually does.

And due to the current label's in the Configurator having nothing to do with the CLI commands for these set points,
nav_land_maxalt_vspd
nav_land_minalt_vspd
nav_land _slowdown_maxalt
nav_land_slowdown_minalt

I thought it could be more directly worded to something like this. Which explains exactly what each of these settings do.
unknown

It does require a change in the code, to swap setting 3 and 4. Which makes it more systematic, according to the landing sequence than at present.

What do you think?

@MrD-RC
Copy link
Member Author

MrD-RC commented Mar 9, 2022

@Jetrell I agree. Those labels have never made any sense to me. They’ve been like that since the landing stuff was changed; think that was 3.0. Can’t remember when I saw that PR? What you’ve suggested would make a lot more sense. Though there’s no need for the max values, these are set automatically in the fields and change with the unit types now.

BTW, to find out the CLI commands, just hover over the input box.

@MrD-RC
Copy link
Member Author

MrD-RC commented Mar 9, 2022

@Jetrell #1477

@Jetrell
Copy link
Collaborator

Jetrell commented Mar 9, 2022

Nice work! Thanks Darren 👍

const convertedValue = Number((oldValue / multiplier).toFixed(2));
const newValue = Number.isInteger(convertedValue) ? Math.round(convertedValue) : convertedValue;
let newValue = "";
if (multiplier == 'FAHREN') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

===

@elgansayer
Copy link
Contributor

Nice to see. Great work!
There a few minor JS coding improvements i could suggest. Like literally nothing impacting but i'd like to see the JS codebase slowly modernise and use more robust JS.

I wish i had time finishing my own Inav configurator i started in dart. The best i could do is try and keep an eye on the PR's and suggest some edits if you wish?

Infact in the future we could try and replace some of the ever so outdated page systems with something more modern, robust and slowly strangle it out. oo That would be fun. At least bump some deps and add in some unit testing on UI. Oh yes yes now im drooling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change displayed units in metric rendering option

4 participants