Created
April 25, 2019 17:35
-
-
Save translunar/401a9489c8575aad99f498fcc40f8ee4 to your computer and use it in GitHub Desktop.
This file contains 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
import numpy as np | |
from spiceypy import spiceypy as spice | |
r_lclf = spice.georec(lon, lat, 0.0, r_eq, f) | |
normal = spice.latrec(1.0, lon, lat) | |
topo_xform = spice.twovec(normal, 3, np.array([0.0, 0.0, 1.0]), 1) | |
# Get sun state relative to topo frame | |
x_sun, lt = spice.spkcpo('SUN', et, 'MOON_ME', 'OBSERVER', 'NONE', r_lclf, 'MOON', 'MOON_ME') | |
r_sun_topo = spice.mxv(topo_xform, x_sun[0:3]) | |
rho, lon, el = spice.reclat(r_sun_topo) | |
az = -lon |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment