Skip to content

Commit

Permalink
Merge pull request seandepagnier#188 from did-g/warning_cleanup
Browse files Browse the repository at this point in the history
Warning cleanup
  • Loading branch information
seandepagnier authored Apr 11, 2018
2 parents dde522b + 2dd84a1 commit 9ef1967
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Polar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ void Polar::CalculateVMG(int VWi)
for(int i=0; i<4; i++) {
double upwind = i < 2 ? 1 : -1;
double maxVB = 0;
float maxW = NAN;
double maxW = NAN;
unsigned int maxWi = 0;
for(unsigned int Wi = 0; Wi < degree_steps.size(); Wi++) {
double W = degree_steps[Wi];
Expand Down
7 changes: 2 additions & 5 deletions src/RouteMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -637,8 +637,6 @@ bool Position::Propagate(IsoRouteList &routelist, RouteMapConfiguration &configu
Position *points = NULL;
/* through all angles relative to wind */
int count = 0;
bool boundary = false;
bool land = false;

double S = Swell(configuration.grib, lat, lon);
if(S > configuration.MaxSwellMeters)
Expand Down Expand Up @@ -726,7 +724,7 @@ bool Position::Propagate(IsoRouteList &routelist, RouteMapConfiguration &configu
tacked = true;
}

double dlat, dlon, nrdlon;
double dlat, dlon;
if(configuration.Integrator == RouteMapConfiguration::RUNGE_KUTTA) {
double k2_dist, k2_BG, k3_dist, k3_BG, k4_dist, k4_BG;
// a lot more experimentation is needed here, maybe use grib for the right time??
Expand All @@ -753,7 +751,6 @@ bool Position::Propagate(IsoRouteList &routelist, RouteMapConfiguration &configu
}
#endif

nrdlon = dlon;
if(configuration.positive_longitudes && dlon < 0)
dlon += 360;

Expand Down Expand Up @@ -814,7 +811,7 @@ bool Position::Propagate(IsoRouteList &routelist, RouteMapConfiguration &configu
if(configuration.DetectLand) {
double ndlon1 = dlon1;
if (ndlon1 > 360) {
ndlon1 -360;
ndlon1 -= 360;
}
if (CrossesLand(dlat1, ndlon1)) {
configuration.land_crossing = true;
Expand Down

0 comments on commit 9ef1967

Please sign in to comment.