Release v4.5.2 - docs + contract bugfixes - #40
Merged
Merged
Conversation
Old bullets labeled every cardinal wrong (0°=crosswind, 90°=headwind, 180°=tailwind). Implementation is vWind*sin→x, vWind*cos→y (ShotPhysicsContext.cpp:117-118), so 0°=tailwind, 90°=crosswind L→R, 180°=headwind. Doc now matches the trig; code unchanged.
getLandingResult derived distance, bearing, and xF/yF/zF from the world origin, contradicting their docstrings ("straight-line distance from launch to final position",
bearing "from start to landing"). The start position was consumed at construction and never retained, so a nonzero startX/startY (e.g. an approach shot) skewed every output
by the start offset.
Persist the launch origin and subtract it once, in feet, before converting to yards and deriving the polar pair.
Output changes for nonzero startX/startY; zero-start shots are unaffected.
getRhoImperial is lb/ft³, not slugs/ft³ the documented label was off by ~32×. Annotate every ShotPhysicsContext getter with its unit to match the AerodynamicState convention (imperial kinematics, SI atmosphere), so the conversion boundary is self-documenting.
set() defined golf_VERSION_MAJOR (lowercase) but version.hpp.in substitutes @GOLF_VERSION_MAJOR@, leaving the generated header's MAJOR define empty. Uppercase it so the configured version.hpp carries all four version values.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs and contract bugfixes, no API change.
Changes
getLandingResultmeasures from launch start — subtracts{startX,startY}.phiWinddirection table inatmospheric_data.hpp(code unchanged).getRhoImperial; annotated context getters with what isn't pluggable.GOLF_VERSION_MAJORcasing.Downstream callers
The landing-result fix changes numeric output for nonzero
startX/startY. Previously the result was not offset by launch start; now it is. Callers passing a nonzero start will see different landing coordinates.Tag
v4.5.2after merge.