[Feature] Satellite range / range rate / doppler factor, with languages#857
Conversation
accius
left a comment
There was a problem hiding this comment.
PR Review — Satellite Range / Range Rate / Doppler Factor
Nice feature, Michael — this is useful data for satellite ops. A few things to address:
Bug: Range rate sign convention appears inverted
The code computes:
rangeRate = (1 - dopplerFactor) * c;satellite.js's dopplerFactor() returns values > 1 when the satellite is approaching (blueshift). So (1 - dopplerFactor) produces a negative value when approaching — which contradicts the PR description ("positive approaching, negative receding").
Either flip to (dopplerFactor - 1) * c, or update the description to match. Please double-check against a known pass to confirm which convention you intend.
README typos
"dopper factor"→ "doppler factor""downlnk"→ "downlink"
Minor items
- Neutral doppler value:
dopplerFactoris initialized to0when below horizon. Since1.0means "no shift", consider defaulting to1(ornull) so downstream consumers aren't surprised. The popup guards against this, but other code consuming the satellite data might not. - Removed comment: The
// Formula: radius = Earth_radius * arccos(...)comment on the footprint calculation was helpful for readability — consider keeping it. visible→isVisiblerename: This looks safe (onlyuseSatelliteLayer.jsconsumes it), but worth noting it's a breaking change to the satellite data shape if anything else referencessat.visible.
Looks good
- Clean usage of
satellite.jsAPI (geodeticToEcf,eciToEcf,dopplerFactor) - Unit conversion is consistent with existing patterns
- Conditional rendering gated on
isVisible— no wasted computation - Language keys added across all 16 locales
|
@accius after quite some time debugging dopplerFactor (as you observed the value greater than or less than 1 appears faulty), it appears this was corrected in satellite.js 6.0.0 . I notice the version used is currently 5.0.0 . I locally updated my version to 6.0.0, not yet checked-in. https://github.com/shashwatak/satellite-js/blob/develop/CHANGELOG.md satellite receding looks much better,
|
|
satellite.js
see https://github.com/shashwatak/satellite-js/releases/tag/7.0.0 Perhaps there is a way to get it to work? |


What does this PR do?
When satellite is above horizon calculates and displays range / range rate / doppler factor in US or metric units.
Language keys for new words created using 'en' as master, needs non-AI native speakers to update
Language en, th are complete.
Added brief explanation of doppler factor into documentation.
Type of change
How to test
Checklist
server.js: caches have TTLs and size caps (we serve 2,000+ concurrent users)var(--accent-cyan), etc.).bak,.old,console.logdebug lines, or test scripts includedScreenshots (if visual change)