Skip to content

modify igc writer for consistent rounding.#146

Merged
tsteven4 merged 3 commits intoGPSBabel:masterfrom
tsteven4:igc
Dec 9, 2017
Merged

modify igc writer for consistent rounding.#146
tsteven4 merged 3 commits intoGPSBabel:masterfrom
tsteven4:igc

Conversation

@tsteven4
Copy link
Copy Markdown
Collaborator

@tsteven4 tsteven4 commented Dec 9, 2017

uggh. writing code to use round(), which has defined behavior for halfway cases, unlike *printf. But it gets our CI passing again.

Copy link
Copy Markdown
Collaborator

@GPSBabelDeveloper GPSBabelDeveloper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a feeling we have a lot of these in our future. It's something we need to look for in new formats and incoming patches, too.

Thanx.

@tsteven4
Copy link
Copy Markdown
Collaborator Author

tsteven4 commented Dec 9, 2017

This original commit in this PR was problematic. It could end up with n degrees and 60000 milliminutes.

The original test data that failed before the PR is 48.2709750, or 2,896,258.5 milliminutes. In this case any accumulated fp math errors can cause it to go either way.

@tsteven4 tsteven4 merged commit 997b8c4 into GPSBabel:master Dec 9, 2017
@tsteven4 tsteven4 deleted the igc branch December 9, 2017 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants