feat: mark static body keys AlwaysEvaluable#88
Open
jonpepler wants to merge 1 commit into
Open
Conversation
The b.* body data (name, radius, soi, orbit elements, etc.) reads straight from FlightGlobals.Bodies, not from the active vessel, so gating it on 'Flight scene with vessel' just hides data from non- flight scenes (KSC, Tracking Station, editors). Marks every b.* key AlwaysEvaluable except b.o.phaseAngle, which is genuinely vessel-relative (uses ds.vessel.orbit and ds.vessel.mainBody). Lets the gonogo SystemView widget populate its body diagram + almanac while sitting at the Space Center. The earlier draft of this change also marked tar.availableVessels AlwaysEvaluable, but that endpoint is introduced by the tar-available-vessels branch — moved out of this commit so this branch sits cleanly on origin/main. The tar-available-vessels branch should fold AlwaysEvaluable into its tar.availableVessels TelemetryAPI attribute directly when it lands.
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.
Summary
Marks 40 of the 41
b.*body-data keysAlwaysEvaluable = trueinVesselDataHandlers.cs. They read exclusively fromFlightGlobals.Bodies[bodyId]and have no dependency on the activevessel, so gating them on "Flight scene with an active vessel" just hides
working data from the Space Center, Tracking Station, and editor scenes.
Currently any client querying body data outside a flight scene gets null.
The one key left alone is
b.o.phaseAngle: it walksds.vessel.orbitand branches on
ds.vessel.mainBody, so it's genuinely vessel-relativeand would null-ref outside a flight scene.
Scope
Single file, single kind of change — no new keys, no in-flight behaviour
change.
AlwaysEvaluablealready coversa.*(system info) andt.universalTime; this extends the same treatment to theb.*keys.Validation
dotnet buildclean against the reference assemblies. These have beenrunning in my downstream dashboard against live KSP for a while now —
b.*subscriptions populate cleanly at the Space Center, TrackingStation, and editor with no active vessel present, where they previously
returned null. Spot-checked again on this branch via the datalink
endpoint:
b.name[0],b.radius[0], andb.o.PeA[0]all return correctvalues at the Space Center, and
b.o.phaseAnglestill returns nulloutside flight.