-
Notifications
You must be signed in to change notification settings - Fork 272
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
OpenAir extended format: use AY indication for colouring #1349
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the work. Please see my comments.
UNCLASSIFIED class/type is now displayed as Unclassified |
da67148
to
faebf34
Compare
src/Airspace/AirspaceParser.cpp
Outdated
@@ -179,7 +183,7 @@ struct TempAirspace | |||
name.clear(); | |||
radio_frequency = RadioFrequency::Null(); | |||
asclass = OTHER; | |||
astype.clear(); | |||
astype = OTHER; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why OTHER
?
faebf34
to
8b5c67e
Compare
Changes have been made according to the notes. I am not satisfied with this pull request. It is not based on a specification, but rather on what has been implemented here and there. However, it is now here. |
Max has stopped working on xcsoar. Ill compile and review it. |
8b5c67e
to
75d172f
Compare
b0d195c
to
7437435
Compare
7437435
to
b0cfe13
Compare
Restricted airspaces don´t seem to work.
|
@ubx Argh. I'm sorry, correct screenshot but wrong text. What doesn't work is danger areas. They are parsed as Unclassified/Unknown.
Parses as Unclassifed/Unkown. The way i see it, is that DANGER is missing from airspace_class_strings[] |
@@ -167,7 +167,35 @@ static constexpr StaticEnumChoice type_filter_list[] = { | |||
{ CLASSG, _T("Class G") }, | |||
{ MATZ, _T("MATZ") }, | |||
{ RMZ, _T("RMZ") }, | |||
nullptr | |||
// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this empty comment please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or give it meaning)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Empty comment removed.
@@ -63,6 +63,34 @@ static constexpr AirspaceClassStringCouple airspace_class_strings[] = { | |||
{ "RMZ", RMZ }, | |||
{ "MATZ", MATZ }, | |||
{ "GSEC", WAVE }, | |||
{ "UNCLASSIFIED", UNCLASSIFIED }, | |||
{ "RESTRICTED", RESTRICTED }, | |||
{ "TMA", TMA }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DANGER is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already defined here:
XCSoar/src/Airspace/AirspaceParser.cpp
Line 50 in 303cb6e
{ "Q", DANGER }, |
Rename it to { "DANGER", DANGER }
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, add. That would break classic openair files. https://pyopenair.readthedocs.io/en/latest/openair.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
{ "DANGER", DANGER2 },
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solid work. Please see the comment concerning danger zones.
What remains to be done, is that in all the dialogs where AirspaceFormatter::GetClass(airspace) is being called, that these get updated and also reflect the type. At least that where the class is unclassified, that the text reflects the airspace type.
src/Dialogs/Airspace/dlgAirspace.cpp
src/Dialogs/Airspace/dlgAirspaceWarnings.cpp
src/Renderer/AirspaceListRenderer.cpp
b0cfe13
to
48bdfe1
Compare
…Type to ParseClass
… class Airspace coloring is done according to the AC tag, or if present and allowed, according to the AY tag.
…gine/Airspace/AirspaceClass.hpp
f436342
to
02db012
Compare
The PR implements airspace coloring, if present and allowed, according to the AY-tag.
Described in #1340