Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better flarm colours #1295

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GeorgeDowning20
Copy link
Contributor

This PR shows FLARM targets in different colors according to their FLARM rate. 30s climb rates are compared to the largest between 30s average or set MC.

Red = climbing well (better than your 30s average/ MC)
Yellow = Climbing ok (worse than your 30s average/ MC but still climbing)
Blue = not climbing

light colours = >50 above
normal colours = same level
dark colours = >50m below

Potentially too confusing for most users, but also very powerful for comp pilots. I have been flying with it for a few comps, the main advantages are:

  1. Bubble awareness -> Are gliders climbing better above or below? should you wait for that next pulse to hit?
  2. spread of gliders -> who's climbing the best? are you in the best bit? who is actually climbing vs. circling? See if gaggles are centered, and guess where the core is before even getting there.
  3. Next thermal -> are they out-climbing you? will you connect when you get there (are they at your level)?
  4. Final glide -> Are gliders ahead pulling up in lift?

@GeorgeDowning20 GeorgeDowning20 requested a review from a team as a code owner September 2, 2023 16:42
@mlep
Copy link
Contributor

mlep commented Sep 2, 2023

Shouldn't the red color for dangers?
Maybe use green instead.

@GeorgeDowning20
Copy link
Contributor Author

Shouldn't the red color for dangers? Maybe use green instead.

The alarm warning and Alert colors are still preserved. I would also perhaps argue, that no one actually uses that feature, because we all have flarm displays or similar dedicated for that job.

The colors are based on LX stuff, which works well for me. Also, is similar to the Vario #2 trace. perhaps I could add another one with green and grey like the default vario trace.

@GeorgeDowning20
Copy link
Contributor Author

Reading blackboard incorrectly, fix on way

@lordfolken
Copy link
Contributor

Plesse
No fixup commits
Fix the codacy warnings
Fix the compile issues on osx

@GeorgeDowning20
Copy link
Contributor Author

Plesse No fixup commits Fix the codacy warnings Fix the compile issues on osx

👍 will sort issues and refactor PR once sorted.

Struggling to read the OSX compile log. not sure why its breaking?

Same with the codacy warnings: saying a member of struct is not used when it is?

G

@lordfolken
Copy link
Contributor

Struggling to read the OSX compile log. not sure why its breaking?

Yes i also find these massive logs only partially useful.
src/Renderer/MapItemListRenderer.cpp:30:
./src/Renderer/TrafficRenderer.hpp:17:6: error: expected identifier
YES = 1,

same with The No.

@@ -29,6 +29,8 @@ TrafficRenderer::Draw(Canvas &canvas, const TrafficLook &traffic_look,
{ 0, 3 },
};

if(colorful_traffic) printf("colorful_traffic\n"); //test
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is a debug statement?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume this is a problem because it is part of the commit history, i will refactor PR and remove

@MaxKellermann
Copy link
Contributor

Shouldn't the red color for dangers?

Red should be reserved for indicating danger and other urgent information. XCSoar already abuses red too much, and we shouldn't add more red.

@GeorgeDowning20
Copy link
Contributor Author

Can't seem to shake the codacy problems. it's saying a member of a struct is not used when it definitely is. I think the rest is good to go

@GeorgeDowning20 GeorgeDowning20 marked this pull request as ready for review September 11, 2023 16:53
@GeorgeDowning20
Copy link
Contributor Author

GeorgeDowning20 commented Sep 11, 2023

Shouldn't the red color for dangers?

Red should be reserved for indicating danger and other urgent information. XCSoar already abuses red too much, and we shouldn't add more red.

The color scheme is the same as LXNAV thermal Assist. it also Literally looks like one as well in a big gaggle. My opinion is the colors are very effective for this reason. It is not a safety feature. NB by default it is turned off.

Moving forward, If you agree to merge it with the current color scheme, I would be happy to mitigate the problem by doing one of the following:

  1. Make it a "expert option" , note saying "WARNING, color scheme might mask immanant traffic".

  2. teh above and Add an additional colour scheme using green and gray similar to Vario 1

I would insist the red, blue, and yellow colour scheme should remain as an option. I went through several itterations of color schemes and it is by far the best for a comp pilot.

cheers
G

@MaxKellermann
Copy link
Contributor

If you insist on red, it will not be merged. I won't discuss this. This is a no-go.

@MaxKellermann
Copy link
Contributor

Guidelines for the Use of Color in ATC Displays

Cultural color conventions (such as red for danger and yellow for warning) should not be violated.

This means that red should never mean anything but danger, alert, or warning.

red is best preserved for situations in which an immediate action is required.

when red is used, it should convey critical information.

@DanD222
Copy link
Contributor

DanD222 commented Sep 11, 2023

Could we perhaps leave this open until we clarify how strong of an insistence on red there is from the other side? I would hate to see this go to waste and was looking forward to using this feature.

@GeorgeDowning20
Copy link
Contributor Author

Could we perhaps leave this open until we clarify how strong of an insistence on red there is from the other side? I would hate to see this go to waste and was looking forward to using this feature.

The first time I tried this feature was the final day of the uk club class nationals… I won the day… not a coincidence! It is a very powerful feature.

@GeorgeDowning20
Copy link
Contributor Author

Guidelines for the Use of Color in ATC Displays

Cultural color conventions (such as red for danger and yellow for warning) should not be violated.

This means that red should never mean anything but danger, alert, or warning.

red is best preserved for situations in which an immediate action is required.

when red is used, it should convey critical information.

Better get rid of the red vario trace then.

@DanD222
Copy link
Contributor

DanD222 commented Sep 11, 2023

Yes, but I would rather have the features that I like converge in XCSoar rather than cherry-picking them from several forks and patches :(

Could we perhaps have a very basic colour picker for the three colours so that one can chose whatever colour one wants, with the default being, say, pink, rather than red, regardless of the current colour of the vario trace..?

@GeorgeDowning20
Copy link
Contributor Author

Yes, but I would rather have the features that I like converge in XCSoar rather than cherry-picking them from several forks and patches :(

Could we perhaps have a very basic colour picker for the three colours so that one can chose whatever colour one wants, with the default being, say, pink, rather than red, regardless of the current colour of the vario trace..?

If max agrees….

@DanD222
Copy link
Contributor

DanD222 commented Sep 11, 2023

OK, that sounds promising, and seems like it could potentially lead to a compromise / workable solution - thanks.

@GeorgeDowning20 GeorgeDowning20 marked this pull request as draft December 25, 2023 21:12
@GeorgeDowning20 GeorgeDowning20 force-pushed the Better-Flarm-Colours branch 7 times, most recently from 314743d to 3922bfe Compare December 26, 2023 02:35
@GeorgeDowning20 GeorgeDowning20 marked this pull request as ready for review December 26, 2023 02:48
@@ -14,7 +16,6 @@ Version 7.41 - 2023/12/21
Version 7.40 - 2023/11/02
* user interface
- Added infobox that combines ETA with AAT dT
- FLARM: Add 100m zoom option.
Copy link
Contributor

Choose a reason for hiding this comment

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

????

Copy link
Contributor

Choose a reason for hiding this comment

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

Please do not remove that line. Please rebase to current head

static constexpr Color warning_in_altitude_range_color{0xff, 0x00, 0xff};
static constexpr Color alarm_color{0xfb, 0x35, 0x2f};

struct basic_traffic_brushes
Copy link
Contributor

Choose a reason for hiding this comment

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

Bad indent

} else {
canvas.Select(traffic_look.safe_below_brush);
}
if(colorful_traffic)
Copy link
Contributor

Choose a reason for hiding this comment

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

More bad indent and bad coding style. Please be more careful with that. It's everywhere.

@GeorgeDowning20 GeorgeDowning20 marked this pull request as draft February 28, 2024 12:28
@GeorgeDowning20 GeorgeDowning20 force-pushed the Better-Flarm-Colours branch 2 times, most recently from c8ca9a8 to 35f37bc Compare April 3, 2024 16:06
red for Above MC
yellow for Below MC but climbing
Blue for sinking

lighter for above
Darker for below
Comment on lines +14 to +43
struct TrafficLook
{
struct colorful_traffic_colors
{
struct above
{
static constexpr Color climb_good = {0xff, 0x66, 0x66}; // light red
static constexpr Color climb_up = {0xff, 0xff, 0x66}; // light yellow
static constexpr Color climb_down = {0x66, 0x66, 0xff}; // light blue
};

struct same
{
static constexpr Color climb_good = {0xff, 0x00, 0x00}; // red
static constexpr Color climb_up = {0xff, 0xff, 0x00}; // yellow
static constexpr Color climb_down = {0x00, 0x00, 0xff}; // blue
};

struct below
{
static constexpr Color climb_good = {0x99, 0x00, 0x00}; // dark red
static constexpr Color climb_up = {0x99, 0x99, 0x00}; // dark yellow
static constexpr Color climb_down = {0x00, 0x00, 0x99}; // dark blue
};
};

struct TrafficLookColor
{
static constexpr Color above = {0x1d, 0x9b, 0xc5};
static constexpr Color same = {0xff, 0x00, 0xff};
Copy link
Contributor

Choose a reason for hiding this comment

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

Colors are defined in src/ui/canvas/Color.hpp. There is even a function for darkening and lighting them. Please stick to those definitions.

Red is not a good color.
Find a different solution to display good climb.

Copy link
Contributor

Choose a reason for hiding this comment

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

green would be probably better anyhow.

return GetClimbAltIndicators(traffic,
CommonInterface::GetComputerSettings().polar.glide_polar_task.GetMC(),
CommonInterface::Calculated().average);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

newline missing

RelAlt rel_alt;

static constexpr int similar_altitude_threshold_meters = 50;
};
Copy link
Contributor

Choose a reason for hiding this comment

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

newline missing

Copy link
Contributor

@lordfolken lordfolken left a comment

Choose a reason for hiding this comment

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

Pretty good.
Please fix any style issues, such as indents, brackets etc.
https://xcsoar.readthedocs.io/en/latest/policy.html#code-style as a guideline.
Please rebase. (git pull upstream/master --rebase)
Then there is the bike shed discussion concerning the color red.

@GeorgeDowning20
Copy link
Contributor Author

Pretty good. Please fix any style issues, such as indents, brackets etc. https://xcsoar.readthedocs.io/en/latest/policy.html#code-style as a guideline. Please rebase. (git pull upstream/master --rebase) Then there is the bike shed discussion concerning the color red.

👍. The I just changed to red temporarily for my start of season cherrypick. Will change back to pink, and sort coding style things tommorow.

@lordfolken lordfolken removed the needs-work this closed pull request requires some action to be merged label Jun 2, 2024
@lordfolken lordfolken added this to the v7.44 milestone Jun 2, 2024
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.

None yet

5 participants