Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

J2 predictor yields passes that don't match the specified LTAN #119

Open
fisadev opened this issue Jan 19, 2021 · 0 comments
Open

J2 predictor yields passes that don't match the specified LTAN #119

fisadev opened this issue Jan 19, 2021 · 0 comments

Comments

@fisadev
Copy link
Contributor

fisadev commented Jan 19, 2021

If I create a J2 predictor with LTAN 22:30 (so LTDN 10:30), and then request passes over the target at lat:0 lon:0, with off nadir close to 0 degrees (max elevation greater than 89.5), I would expect to see passes with TCA at 22:30 or 10:30. But I get passes at 22:40 and 10:40 instead:

from datetime import datetime, timedelta

from orbit_predictor.predictors.numerical import J2Predictor
from orbit_predictor.locations import Location
from orbit_predictor.predictors.pass_iterators import SmartLocationPredictor

start = datetime.now()

# LTDN = 10:30, we add 12 hours to compute from LTAN
pred = J2Predictor.sun_synchronous(
    alt_km=470,
    ecc=0.001,
    ltan_h=10.5 + 12,
    ta_deg=0,
    date=start,
)

target = Location("center", 0, 0, 0)

passes = list(pred.passes_over(
    target, 
    start,
    aos_at_dg=45,
    max_elevation_gt=89.5,
    limit_date=start + timedelta(days=365),
    location_predictor_class=SmartLocationPredictor, 
    tolerance_s=1e-3,
))

print("TCA | days after start | off nadir")
for pass_ in passes:
    print(
        pass_.max_elevation_date, 
        (pass_.max_elevation_date - start).days,
        pass_.off_nadir_deg, 
        sep=' | ',
    )

outputs:

TCA | days after start | off nadir
2021-02-11 22:40:54.811966 | 23 | 0.09343809745045528
2021-09-10 10:40:51.711328 | 233 | -0.26910660672500436
2021-11-22 22:41:00.570154 | 307 | -0.23366980504172796

Maybe I'm doing something wrong, or it's something related to the geometry of coordinates and the orbit, that I ignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant