density.nrlmsise: float overload takes radians as documented (was passing them through as degrees) - #171
Merged
Merged
Conversation
ssmichael1
added a commit
that referenced
this pull request
Aug 31, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PG969yapJ84DJceKt21Wen
…de to the degrees the model takes The stub documents latitude_rad / longitude_rad; the binding passed the values through unchanged to nrlmsise::nrlmsise, which takes degrees (the itrfcoord overload and nrlmsise00(latitude_deg=...) already supply degrees). A caller following the stub was evaluated at ~1 deg latitude instead of 60 deg. Regression test: the float form with radians matches the itrfcoord form at the same point. Closes #170 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PG969yapJ84DJceKt21Wen
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PG969yapJ84DJceKt21Wen
ssmichael1
force-pushed
the
fix/density-nrlmsise-radians
branch
from
August 31, 2026 00:57
250d6b4 to
18cbcfc
Compare
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.
satkit.density.nrlmsise(altitude_m, latitude_rad, longitude_rad, time)is documented in radians (satkit's convention without a_degsuffix) but handed the two floats unchanged tonrlmsise::nrlmsise, which takes degrees — the slot theitrfcoordoverload fills withlatitude_deg()(fixed in #154) andsatkit.nrlmsise00(latitude_deg=...)fills explicitly. A caller following the stub at 60° N was evaluated at 1.05° N. Found by the #90 units sweep (#169).Fix is a
.to_degrees()on each value in the float branch ofpython/src/pydensity.rs; stub and docs were already right. New testtest_density_float_form_takes_radianschecks the float form with radians lands on the same density and temperature as theitrfcoordform at the same point (rel 1e-6).Closes #170
🤖 Generated with Claude Code
https://claude.ai/code/session_01PG969yapJ84DJceKt21Wen