OpenCPN / OpenCPN

A concise ChartPlotter/Navigator. A cross-platform ship-borne GUI application supporting * GPS/GPDS Postition Input * BSB Raster Chart Display * S57 Vector ENChart Display * AIS Input Decoding * Waypoint Autopilot Navigation
https://opencpn.org/
GNU General Public License v2.0
1.05k stars 501 forks source link

PI: Weather_routing limits on Grib_pi version -needs update #2903

Closed rgleason closed 1 year ago

rgleason commented 1 year ago

In weather_routing_pi.cpp about line 48 // Define minimum and maximum versions of the grib plugin supported

define GRIB_MAX_MAJOR 4

define GRIB_MAX_MINOR 1

define GRIB_MIN_MAJOR 4

define GRIB_MIN_MINOR 1

I cannot find the version number for grib_pi. Does it exist?

rgleason commented 1 year ago

https://github.com/rgleason/weather_routing_pi/blob/master/src/weather_routing_pi.cpp

I looked in opencpn grib_pi src and still cant find it. If the version number no longer exists, what should be done about checking for it in wx_route?

rgleason commented 1 year ago

Fixed for Climatology version, but have no version for grib_pi https://github.com/OpenCPN/plugins/pull/782

leamas commented 1 year ago

grib_pi is bundled in main opencpn so it has no independent, maintained version. That is, the very idea to check the grib_pi version is outdated since long.

If something like this should be checked it is the main opencpn version. IIRC this is not directly available for the plugin. However, API_VERSION_MINOR in _ocpnplugin.h should be sufficient to figure out if main opencpn is recent enough to have a usable grib_pi.

I actually doubt that this needs to be checked at all, but might certainly be wrong. Havn't checked the actual code.

Hakansv commented 1 year ago

And when checked today wmm still reports major 4 and minor 1 while requested. But I do agree about it would not be necessary to check the inbound wmm version.

leamas commented 1 year ago

@Hakansv: wmm? grib_pi?

Hakansv commented 1 year ago

Hmmm. Yes sorry grib it would have been, not wmm. Thanks

rgleason commented 1 year ago

Hakan wrote:

when checked today wmm [corrected to grib_pi} still reports major 4 and minor 1 while requested.

This is good because before that is change or removed, I think we should probably remove weather_routing code that checks for min and max vesions, if that is what we should do.

The reason this checking was added was because grib_pi was improved with additional data and that caused issues when run with earlier versions of weather_routing, same thing with climatology changes during development.

Perhaps this should be kept then?

PS thank you Alec for your contribution too.

rgleason commented 1 year ago

User reports indicate wxroute + climatology now works. Thank you.