My Assistant
| Posted on: Aug 12 2017, 08:14 PM | |
|
Newbie ![]() Group: Members Posts: 2 Joined: 8-August 17 Member No.: 8223 |
Thanks for the comments/suggestions. It looks like the NAIF kernels and software are right and the reference to "It came within 570,000 km of the planet's cloud tops", which may come from a JPL Voyager web page is wrong. The Wikipedia article for Voyager 2 detailed "Timeline of Travel" says "1979-07-09 - 22:29 Jupiter closest approach at 721,670 km from the center of mass", which matches the NAIF/SPICE values. By the way, when I tried running the script with target JUPITER instead of JUPITER_BARYCENTER I got an error "Insufficient ephemeris data has been loaded to compute the position of 599 (JUPITER) relative to -32 (VOYAGER 2) at the ephemeris epoch 1979 JUL 08 00:00:50.183." |
| Forum: Voyager and Pioneer · Post Preview: #236790 · Replies: 10 · Views: 22048 |
| Posted on: Aug 11 2017, 02:28 PM | |
|
Newbie ![]() Group: Members Posts: 2 Joined: 8-August 17 Member No.: 8223 |
Hi Brian Thanks for posting this example, it has been very helpful to me. However, when I tried plugging in the variables to look at the Voyager 2 encounter, I don't get the right distances. Any idea why? >>> import math >>> import spiceypy as spice >>> >>> >>> # utc time range for Voyager 1 ... #utcStart = '1979-03-01' ... #utcStop = '1979-03-10' ... >>> # utc time range for Voyager 2 ... utcStart = '1979-07-05' >>> utcStop = '1979-07-13' >>> >>> # target and observer ... target = 'JUPITER BARYCENTER' >>> #observer = 'VOYAGER 1' ... observer = 'VOYAGER 2' >>> >>> >>> def et2str(et): ... "Convert an ephemeris time (seconds after J2000) to a UTC string." ... formatStr = "ISOC" ... prec = 0 ... s = spice.et2utc(et, formatStr, prec, lenout=256) ... return s ... >>> # load leap second data ... spice.furnsh('naif0012.tls') >>> >>> # load voyager data ... #spice.furnsh('Voyager_1.a54206u_V0.2_merged.bsp') ... spice.furnsh('Voyager_2.m05016u.merged.bsp') >>> >>> # get ephemeris time (seconds since J2000) ... etStart = spice.str2et(utcStart) >>> etStop = spice.str2et(utcStop) >>> >>> # get time range ... nsteps = 50 >>> etTimes = [i*(etStop-etStart)/nsteps + etStart for i in range(nsteps)] >>> >>> # get vectors from observer to target ... # see http://naif.jpl.nasa.gov/pub/naif/toolkit_...e/spkpos_c.html ... frame = 'J2000' >>> abcorr = 'NONE' # abberation correction >>> positions, lightTimes = spice.spkpos(target, etTimes, frame, abcorr, observer) >>> >>> # get distances ... distances = [math.sqrt(x**2+y**2+z**2) for x,y,z in positions] >>> >>> # Voyager 1's closest approach to Jupiter occurred March 5, 1979 ... # Distance 349,000 km ... # Voyager 2's closest approach to Jupiter occurred on July 9, 1979. ... # It came within 570,000 km of the planet's cloud tops. ... >>> for i, distance in enumerate(distances): ... print "%s %.0f" % (et2str(etTimes[i]), distance) ... 1979-07-05T00:00:00 5101847 1979-07-05T03:50:24 4963408 1979-07-05T07:40:48 4824321 1979-07-05T11:31:12 4684556 1979-07-05T15:21:36 4544084 1979-07-05T19:12:00 4402875 1979-07-05T23:02:24 4260894 1979-07-06T02:52:48 4118107 1979-07-06T06:43:12 3974475 1979-07-06T10:33:36 3829961 1979-07-06T14:24:00 3684521 1979-07-06T18:14:24 3538113 1979-07-06T22:04:48 3390691 1979-07-07T01:55:12 3242209 1979-07-07T05:45:36 3092620 1979-07-07T09:36:00 2941877 1979-07-07T13:26:24 2789938 1979-07-07T17:16:48 2636766 1979-07-07T21:07:12 2482335 1979-07-08T00:57:36 2326640 1979-07-08T04:48:00 2169709 1979-07-08T08:38:24 2011626 1979-07-08T12:28:48 1852573 1979-07-08T16:19:12 1692903 1979-07-08T20:09:36 1533246 1979-07-09T00:00:00 1374686 1979-07-09T03:50:24 1219135 1979-07-09T07:40:48 1069943 1979-07-09T11:31:12 933190 1979-07-09T15:21:36 819242 1979-07-09T19:12:00 743424 1979-07-09T23:02:24 721909 1979-07-10T02:52:48 760496 1979-07-10T06:43:12 849068 1979-07-10T10:33:36 970787 1979-07-10T14:24:00 1111683 1979-07-10T18:14:24 1262874 1979-07-10T22:04:48 1419237 1979-07-11T01:55:12 1577894 1979-07-11T05:45:36 1737225 1979-07-11T09:36:00 1896315 1979-07-11T13:26:24 2054649 1979-07-11T17:16:48 2211944 1979-07-11T21:07:12 2368051 1979-07-12T00:57:36 2522903 1979-07-12T04:48:00 2676485 1979-07-12T08:38:24 2828807 1979-07-12T12:28:48 2979899 1979-07-12T16:19:12 3129800 1979-07-12T20:09:36 3278556 >>> |
| Forum: Voyager and Pioneer · Post Preview: #236777 · Replies: 10 · Views: 22048 |
New Replies No New Replies Hot Topic (New) Hot Topic (No New) |
Poll (New) Poll (No New) Locked Topic Moved Topic |
|
Lo-Fi Version | Time is now: 17th December 2024 - 03:35 AM |
|
RULES AND GUIDELINES Please read the Forum Rules and Guidelines before posting. IMAGE COPYRIGHT |
OPINIONS AND MODERATION Opinions expressed on UnmannedSpaceflight.com are those of the individual posters and do not necessarily reflect the opinions of UnmannedSpaceflight.com or The Planetary Society. The all-volunteer UnmannedSpaceflight.com moderation team is wholly independent of The Planetary Society. The Planetary Society has no influence over decisions made by the UnmannedSpaceflight.com moderators. |
SUPPORT THE FORUM Unmannedspaceflight.com is funded by the Planetary Society. Please consider supporting our work and many other projects by donating to the Society or becoming a member. |
|