From 225c0bdd58c6874189cf16125a8de95a7b26783a Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Tue, 15 Sep 2015 13:38:48 +0000 Subject: [PATCH] VLab Issue #10353 - SVG solution to DCS_10257. Severe PIREP should be separate color; fixes #10353 Change-Id: I1ad8b823cf67a4a1217ef5eb5ec60085f857c471 VLab Issue #10353 - SVG solution to DCS_10257. Severe PIREP and AIREP should be separate color; fixes #10353 Change-Id: Iddb7c0e9e22b4a9793fd5d44a5a201f73d0c072f Former-commit-id: 6f7c50bb773c8b5e99c2b08ed5f8dd70866ebb5f --- .../localization/bundles/PirepPlot.xml | 48 ++++++ .../localization/menus/upperair/basePirep.xml | 18 ++ .../plotModels/airepIcingDesign.svg | 27 +++ .../plotModels/airepIcingDesignSev.svg | 112 +++++++++++++ .../plotModels/airepTurbDesign.svg | 27 +++ .../plotModels/airepTurbDesignSev.svg | 116 +++++++++++++ .../plotModels/icing_intens_trans.txt | 3 +- .../plotModels/pirepIcingDesign.svg | 62 ++++++- .../plotModels/pirepIcingDesignSev.svg | 99 +++++++++++ .../plotModels/pirepPlotDesign.svg | 57 ++++++- .../plotModels/pirepPlotDesignSev.svg | 155 ++++++++++++++++++ .../plotModels/pirepTurbDesign.svg | 59 +++++++ .../plotModels/pirepTurbDesignSev.svg | 99 +++++++++++ 13 files changed, 876 insertions(+), 6 deletions(-) create mode 100644 cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesignSev.svg create mode 100644 cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesignSev.svg create mode 100644 cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesignSev.svg create mode 100644 cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg create mode 100644 cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesignSev.svg diff --git a/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/bundles/PirepPlot.xml b/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/bundles/PirepPlot.xml index 9dd887bbe7..4f4a98ec2d 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/bundles/PirepPlot.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/bundles/PirepPlot.xml @@ -23,6 +23,7 @@ + @@ -69,6 +70,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/basePirep.xml b/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/basePirep.xml index e74a905470..235b388877 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/basePirep.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui.upperair/localization/menus/upperair/basePirep.xml @@ -24,6 +24,8 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesign.svg index 2e77f224de..9f92c85c43 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesign.svg @@ -56,6 +56,32 @@ class AirepPlotDelegate(PlotDelegate): sampleString += turbType return sampleString + def isValid(self, rec): + # DCS10257 + # need icing or hazard + # only show non-severe / no severity + if rec.isValidParameter("iceInten"): + iceInten = rec.getString("iceInten") + else: + iceInten = "" + if rec.isValidParameter("iceType"): + iceType = rec.getString("iceType") + else: + iceType = "" + if rec.isValidParameter("flightHazard"): + flightHazard = rec.getInt("flightHazard") + else: + flightHazard = -1 + if (iceInten == "") and (iceType == "") and (flightHazard == -1): + # no icing or hazard data + return False + elif (iceInten == "SEV") or (iceInten == "EXTRM") or (flightHazard == 8) or (flightHazard == 9): + # incorrect severity/hazard level (from AIREPWeather) + return False + else: + # low or no severity, and has some icing data + return True + plotDelegate = AirepPlotDelegate() @@ -83,6 +109,7 @@ plotDelegate = AirepPlotDelegate() + 0 0 75 diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesignSev.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesignSev.svg new file mode 100644 index 0000000000..5de1756fef --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepIcingDesignSev.svg @@ -0,0 +1,112 @@ + + + + + + + + + 0 + 0 + 75 + + + + + diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesign.svg index f7d733be6d..5918f430b0 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesign.svg @@ -56,6 +56,32 @@ class AirepPlotDelegate(PlotDelegate): sampleString += turbType return sampleString + def isValid(self, rec): + # DCS10257 + # need some turbulence data + # only show non-severe / no severity + if rec.isValidParameter("turbInten"): + turbInten = rec.getString("turbInten") + else: + turbInten = "" + if rec.isValidParameter("turbFreq"): + turbFreq = rec.getString("turbFreq") + else: + turbFreq = "" + if rec.isValidParameter("turbType"): + turbType = rec.getString("turbType") + else: + turbType = "" + if (turbInten == "") and (turbFreq == "") and (turbType == ""): + # no turbulence data present + return False + elif (turbInten == "SEV") or (turbInten == "EXTRM"): + # turbulence data present, but not correct severity + return False + else: + # turbulence data present, and if severity is present it is not high + return True + plotDelegate = AirepPlotDelegate() @@ -91,6 +117,7 @@ plotDelegate = AirepPlotDelegate() + 0 0 0 75 diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesignSev.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesignSev.svg new file mode 100644 index 0000000000..a16bffaa12 --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/airepTurbDesignSev.svg @@ -0,0 +1,116 @@ + + + + + + + + + 0 + 0 + 75 + + + + + diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/icing_intens_trans.txt b/cave/com.raytheon.viz.pointdata/localization/plotModels/icing_intens_trans.txt index c713d898a4..e1d425c80c 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/icing_intens_trans.txt +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/icing_intens_trans.txt @@ -6,4 +6,5 @@ LGT : 125 LGTMOD : 194 MOD : 126 MODSEV : 195 -SEV : 127 \ No newline at end of file +SEV : 127 +EXTRM : 127 \ No newline at end of file diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesign.svg index 52b91b723f..db6e07fc52 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesign.svg @@ -5,6 +5,65 @@ overflow="visible" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> + - + + 0 0 75 0 diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesignSev.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesignSev.svg new file mode 100644 index 0000000000..c6cbf8da17 --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepIcingDesignSev.svg @@ -0,0 +1,99 @@ + + + + + + + + 0 + 75 + 0 + + + + + diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesign.svg index c9c55b5469..06f29a13b6 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesign.svg @@ -44,9 +44,19 @@ class PirepPlotDelegate(PlotDelegate): windSpeed = int(rec.getFloat("windSpeed")) if windDir > -1080 or windSpeed > 0: sampleString += " %d/%dKT" % (windDir, windSpeed) - turbFreq = rec.getString("turbFreq") - turbInten = rec.getString("turbInten") - turbType = rec.getString("turbType") + + try: + turbFreq = rec.getString("turbFreq") + except ValueError: + turbFreq = "" + try: + turbInten = rec.getString("turbInten") + except ValueError: + turbInten = "" + try: + turbType = rec.getString("turbType") + except ValueError: + turbType = "" if turbFreq != "" or turbInten != "" or turbType != "": sampleString += " TB" if turbFreq != "": @@ -58,7 +68,45 @@ class PirepPlotDelegate(PlotDelegate): if turbType != "": sampleString += " " sampleString += turbType + + try: + iceInten = rec.getString("iceInten") + except ValueError: + iceInten = "" + try: + iceType = rec.getString("iceType") + except ValueError: + icetype = "" + if iceInten != "" or iceType != "": + sampleString += " IC" + if iceInten != "": + sampleString += " " + sampleString += iceInten + if iceType != "": + sampleString += " " + sampleString += iceType return sampleString + + def isValid(self, rec): + # DCS10257 + # only show non-severe Turb/Ice data, non-UUA (urgent) + if rec.isValidParameter("obsText"): + obsText = rec.getString("obsText") + if "UUA" in obsText: + # urgent message + return False + if rec.isValidParameter("turbInten"): + turbInten = rec.getString("turbInten") + if (turbInten == "SEV") or (turbInten == "EXTRM"): + # high severity turbulence + return False + if rec.isValidParameter("iceInten"): + iceInten = rec.getString("iceInten") + if (iceInten == "SEV") or (iceInten == "EXTRM"): + # high severity turbulence, high severity icing + return False + # low or no severity, non-urgent data + return True plotDelegate = PirepPlotDelegate() @@ -92,7 +140,8 @@ plotDelegate = PirepPlotDelegate() - + + 0 75 75 diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg new file mode 100644 index 0000000000..f9f900edff --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepPlotDesignSev.svg @@ -0,0 +1,155 @@ + + + + + + + + + 0 + 75 + 75 + + 0 + arrow + + + + + + diff --git a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg index dbb0e08d1f..6a203d6831 100644 --- a/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg +++ b/cave/com.raytheon.viz.pointdata/localization/plotModels/pirepTurbDesign.svg @@ -5,6 +5,65 @@ overflow="visible" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> + + + + 0 + 75 + 0 + + + + +