seandepagnier / weather_routing_pi

weather routing plugin for opencpn
GNU General Public License v3.0
47 stars 35 forks source link

end of Grib is dispayed as "Land Error" #246

Open dominig opened 5 years ago

dominig commented 5 years ago

If the grib duration does not cover the tme required for the route, the error message is "land error" while is should be something like "no more data in Grib" or "Grib duration too short"

rgleason commented 5 years ago

How about "Grib duration too short, turn on Climatology"?

dominig commented 5 years ago

If you active climatology it keeps going until the end, but climatology data in Biscay Bay or in the English Channel is of no real value, so I always turn it off. A clean error message is useful. Arpege GRIBS provides better data than GFS in those areas but are limited to 3 days, what can not always cover all routes options.

rgleason commented 5 years ago

Ok, so perhaps "Grib duration too short"

Or if the error happens to be from the beginning, where Grib time range does not match route start.

Trying to generalize , "Grib time is out of range of route start or finish" ? I wonder if this can be tested without going through all the calcs, probably not.

It gets complicated when climatology is run at the beginning and then the grib starts. There are many conditions.

Also related to #193 UI Signal (triangle) on Optimal Route when grib data runs out. #193

rgleason commented 5 years ago

Weather_routing.cpp Line 1903 and afterwards

  else
    if(routemapoverlay->Running())
        State = _("Computing...");
    else {
        if(routemapoverlay->Finished()) {
            if(routemapoverlay->ReachedDestination())
                State = _("Complete");
            else {
                State = _T("");
                if(routemapoverlay->GribFailed()) {
                    State += _("Grib");
                    State += _T(": ");
                }
                if(routemapoverlay->PolarFailed()) {
                    State += _("Polar");
                    State += _T(": ");
                }
                if(routemapoverlay->NoData()) {
                    State += _("No Data");
                    State += _T(": ");
                }
                if(routemapoverlay->LandCrossing()) {
                    State += _("Land");
                    State += _T(": ");
                }
                if(routemapoverlay->BoundaryCrossing()) {
                    State += _("Boundary");
                    State += _T(": ");
                }

                State += _("Failed");
            }
        } else {

So what is if(routemapoverlay->LandCrossing()) {

Not sure where "Land Error" comes from yet. Maybe there needs to be a new condition test in routemapoverlay.cpp?

did-g commented 5 years ago

Hi, PR 239 should correct some bogus errors but in this case WR is probably right, it's just not intuitive and not very useful, we need to find a better way.

In your case it's likely that:

Not sure info is easily available for adding a UI symbol.

rgleason commented 5 years ago

Then perhaps, there should be multiple messages for all of them? I know how in-determinant these failure reports are. We only seem to know what the problem "was" once we get it working.

Is the plugin divided into logical parts for failures?

  1. Configuration (Necessary settings are missing or incorrect, no polar, no start, no finish, outside of default max/mins)
  2. Computation (did not complete or calc is too long, etc)
  3. Climatology Data (data not found, bad data, missing data, Hit Limit: data not complete for that pos)
  4. Grib Data (data not found, bad data, missing data, Hit Limit: data not available for that pos)
  5. Polar Data (data not found, bad data, missing data, Hiit Limit: data not available for that wind angle or speed)
  6. Land Data (data not found, bad data, missing data, Hit Limit: hitting or crossing land)

Have any of these 5 failures (1,2,3,4,5.6) report at the Failure line if they are triggered? Is there some other way to do it?