fix: use getElevation for elevation sampling (same function as getLeoPass)
getFullPosition and getElevation both call calculateObs internally, but the elevation values reported by the user (-60°) suggest they may differ. Now elevation is computed via getElevation (same as getLeoPass), while getFullPosition is only used for azimuth.
This commit is contained in:
1 parent
7bdff5df81
commit
670444858c
1 file changed
+4
-2
+4
-2
@@ -271,10 +271,12 @@ class MutualViewModel(
|
||||
|
||||
var tSample = refinedAos
|
||||
while (tSample <= refinedLos) {
|
||||
// Use getElevation (same function used by getLeoPass) for elevation,
|
||||
// and getFullPosition only for azimuth.
|
||||
val elevA = sat.getElevation(posA, tSample) * 180.0 / PI
|
||||
val elevB = sat.getElevation(posB, tSample) * 180.0 / PI
|
||||
val fullA = sat.getFullPosition(posA, tSample)
|
||||
val fullB = sat.getFullPosition(posB, tSample)
|
||||
val elevA = fullA.elevation * 180.0 / PI
|
||||
val elevB = fullB.elevation * 180.0 / PI
|
||||
if (elevA > maxElevA) maxElevA = elevA
|
||||
if (elevB > maxElevB) maxElevB = elevB
|
||||
samples.add(tSample to (elevA to elevB))
|
||||
|
||||
Reference in new issue
Block a user