Repository navigation
Fix jump range model: drop stray x1000 (Route card hint was ~17x too high) - #223
Merged
Merged
Conversation
…rd hint ~17x
ShipFsdProfile.JumpRangeAt multiplied the fuel by 1000 before applying the
fuel-power term, so it answered in the hundreds of ly. The Route card's
"No boost" hint ("plain jumps at your ship's ~N ly range") showed that figure.
The pinned test copied the same mistake, and the Twitch mapper's comments
explained the gap away as "solving a different problem".
Against 19 recent real Loadouts (Anaconda Mk II, Panther Mk II, Explorer NX,
Mandalay, Lakon Miner, ...), the standard formula at unladen mass + one jump's
fuel matches the game's MaxJumpRange to 0.00% for every build without a
Guardian booster. So the FsdCatalog constants are current; only the formula
was wrong.
The Route card now prefers the Loadout's own MaxJumpRange (which includes a
booster) and falls back to the model.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 53 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Problem
The Route card's No boost hint ("plain jumps at your ship's ~N ly range") showed a range roughly 17× too high.
Cause
ShipFsdProfile.JumpRangeAtcomputed(1000 * fuel / fuelMultiplier)^(1/power). The standard FSD formula has no1000. The pinned unit test repeated the same mistake, and comments inStreamCardMapper/ its test explained the discrepancy away as "solving a different problem" rather than questioning it.How I checked
For every
Loadoutin the commander's last 25 journals (19 distinct builds, incl. the new Anaconda Mk II, Panther Mk II, Explorer NX, Small Combat NX, Mandalay, Lakon Miner), compared the model to the game's ownMaxJumpRange:×1000)The 2 Type-9 builds with a Guardian FSD booster are off by design (the model excludes the booster, as documented).
Side result for the "game update" question: no FSD in those loadouts is missing from
FsdCatalog, and the constants are exact for the SCO / Mk II-era drives, so the catalog itself needs no change.Change
JumpRangeAt: remove the1000 *; doc comment says what it matches and when.RouteCardViewModel.ShipRange: prefer the Loadout'sMaxJumpRange(includes a booster), fall back to the model.Verified
dotnet build0 warnings; all suites green (24 + 214 + 28 + 421 + 1127).🤖 Generated with Claude Code