Skip to content
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

Log polar error code, Log polar parsing warnings + polar parsing logic when value is zero #302

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Revert setting speed to 0 when importing polars
  • Loading branch information
sebastien-rosset committed Jul 7, 2024
commit 8596f7fed82df95e15491c8ce603114712a74c48
4 changes: 2 additions & 2 deletions include/Polar.h
Original file line number Diff line number Diff line change
@@ -113,8 +113,8 @@ class Polar
SailingWindSpeed(double nVW) : VW(nVW) {}

float VW;
std::vector<float> speeds; // by degree_count
std::vector<float> orig_speeds; // by degree_count, from polar file
std::vector<float> speeds; // by degree_count
std::vector<float> orig_speeds; // by degree_count, from polar file.
SailingVMG VMG;
}; // num_wind_speeds
bool VMGAngle(SailingWindSpeed &ws1, SailingWindSpeed &ws2, float VW, float &W);
2 changes: 1 addition & 1 deletion src/Polar.cpp
Original file line number Diff line number Diff line change
@@ -304,7 +304,7 @@ bool Polar::Open(const wxString &filename, wxString &message)
"To specify interpolated, leave blank values.\n"
"To specify course as 'invalid' use 0.0 rather than 0\n"));
warn_zeros = true;
s = 0;
// Intentionally set s = NAN. This is to indicate the boat speed is unknow.
} else if(*token) {
s = strtod(token, 0);
if(s < .05)