IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Obtaining Voyager positions relative to targets
Brian Burns
post Jul 23 2016, 07:03 PM
Post #1


Junior Member
**

Group: Members
Posts: 54
Joined: 7-July 16
From: Austin, Texas
Member No.: 7991



I'd like to obtain or create a table for the Voyager images with distance information, e.g.

Volume, Image, Target, Distance (km)
5101, C1327538, Io, 134474

(The indexes with the PDS volumes have the times for each image)

Does anyone know a source for this or good or simple way to calculate it? I've just started looking at the documentation for SPICE at http://naif.jpl.nasa.gov/naif/, which looks like it would be the way to do it, but I'm not sure how involved it would be.

This would give you the size of the target relative to the camera field of view, which would allow you to interleave the narrow and wide angle camera views, and also turn off the center-detection algorithm when generating movies.

Thank you for any pointers!
Go to the top of the page
 
+Quote Post
JohnVV
post Jul 24 2016, 06:19 AM
Post #2


Member
***

Group: Members
Posts: 890
Joined: 18-November 08
Member No.: 4489



use the spice kernels
if you do not know C well there is a idl and FORTRAN and MatLab versions
http://naif.jpl.nasa.gov/naif/toolkit.html

but voyager predates this so the data is a reconstructed on "best GUESS"

the voyager kernels are here
ftp://naif.jpl.nasa.gov/pub/naif/VOYAGER/

voy 1&2 were recalculated in 2015
Voyager_2.m05016u.merged.bsp
Voyager_1.a54206u_V0.2_merged.bsp

please read the README file
ftp://naif.jpl.nasa.gov/pub/naif/VOYAGER/...ls/aareadme.txt


getting your mind wrapped around SIPCE is fun , it is a bit complicated
it is like drinking a "pan galactic gargle blaster"

for example "voyager_1.ST+1991_a54418u.merged.bsp" uses
CODE
-31 VOYAGER 1 w.r.t. 5 JUPITER BARYCENTER              1979 JAN 14 15:51:03.735        1979 APR 24 07:33:02.637
-31 VOYAGER 1 w.r.t. 6 SATURN BARYCENTER               1980 OCT 06 10:14:10.024        1980 DEC 20 16:45:19.847
-31 VOYAGER 1 w.r.t. 10 SUN                            1977 SEP 08 09:08:16.593        1979 JAN 14 15:51:03.735

depending on the time the sun Barycenter ( 10) or Jupiters ( 5) or saterns ( 6)
not the Physical center Jupiter 599 and Saturn 699 but the gravity Barycenter

i use it is Celestia and have some guides on celestialmatters
-- celestia ONLY ( and Casmographica )
http://forum.celestialmatters.org/viewforum.php?f=18

the NAIF tutorials are here
http://naif.jpl.nasa.gov/naif/tutorials.html

Go to the top of the page
 
+Quote Post
Gerald
post Jul 24 2016, 08:35 AM
Post #3


Senior Member
****

Group: Members
Posts: 2346
Joined: 7-December 12
Member No.: 6780



The SPICE / NAIF spy.exe utility is a way to dump SPICE kernels in a fairly easy way with a simple scripting language. I'd recommend to try this first, unless you favor access to all detail of NAIF/SPICE via programming API.
You'll need to set about a dozen of parameters to get the results in the way you require them.
Go to the top of the page
 
+Quote Post
Brian Burns
post Jul 25 2016, 01:20 AM
Post #4


Junior Member
**

Group: Members
Posts: 54
Joined: 7-July 16
From: Austin, Texas
Member No.: 7991



Thanks for all the information - I stumbled across a nice Python interface for SPICE here - https://github.com/AndrewAnnex/SpiceyPy. It probably saved me lots of hair-pulling dealing with C.

I got a simple example working, calculating the distance from Voyager 1 to Jupiter - so now I can find the distance to the target for each image, and so its angular size (though maybe SPICE would provide that also?) -

CODE
# Voyager distance calculations

# Instructions:
# run `pip install spicepy`
# Download
# ftp://naif.jpl.nasa.gov/pub/naif/generic_kernels/lsk/naif0012.tls
# ftp://naif.jpl.nasa.gov/pub/naif/VOYAGER/kernels/spk/Voyager_1.a54206u_V0.2_merged.bsp
# ftp://naif.jpl.nasa.gov/pub/naif/VOYAGER/kernels/spk/Voyager_2.m05016u.merged.bsp

import math
import spiceypy as spice


# utc time range
utcStart = '1979-03-01'
utcStop  = '1979-03-10'

# 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_docs/C/cspice/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-03-04T10:04:48   1720452
# 1979-03-04T14:24:00   1482460
# 1979-03-04T18:43:12   1238139
# 1979-03-04T23:02:24   987003
# 1979-03-05T03:21:36   730901
# 1979-03-05T07:40:48   485618
# 1979-03-05T12:00:00   348461
# 1979-03-05T16:19:12   477570
# 1979-03-05T20:38:24   721531
# 1979-03-06T00:57:36   977694
# 1979-03-06T05:16:48   1229137
# 1979-03-06T09:36:00   1473770
# 1979-03-06T13:55:12   1712063

# Clean up the kernels
spice.kclear()


Note: If you want to work with the satellites, you'll need some additional kernel files:

Jupiter - 20mb
ftp://naif.jpl.nasa.gov/pub/naif/generic_...ions/jup100.bsp

Saturn - 63mb
ftp://naif.jpl.nasa.gov/pub/naif/generic_...ions/sat132.bsp

Uranus - 81mb
ftp://naif.jpl.nasa.gov/pub/naif/generic_...ions/ura083.bsp

Neptune - 9mb
ftp://naif.jpl.nasa.gov/pub/naif/generic_...ns/nep016-6.bsp
Go to the top of the page
 
+Quote Post
Brian Burns
post Jul 25 2016, 01:29 AM
Post #5


Junior Member
**

Group: Members
Posts: 54
Joined: 7-July 16
From: Austin, Texas
Member No.: 7991



QUOTE
The SPICE / NAIF spy.exe utility is a way to dump SPICE kernels in a fairly easy way with a simple scripting language. I'd recommend to try this first, unless you favor access to all detail of NAIF/SPICE via programming API.
You'll need to set about a dozen of parameters to get the results in the way you require them.


Thank you - I didn't see your post until after I got something working with Python (see above), though it does look useful - http://naif.jpl.nasa.gov/pub/naif/utilitie...ws_32bit/spy.ug

The SpiceyPy interface seems pretty easy to use also, so I'll probably keep working with that.
Go to the top of the page
 
+Quote Post
Mike Martin
post Aug 11 2017, 02:28 PM
Post #6


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
>>>
Go to the top of the page
 
+Quote Post
mcaplinger
post Aug 11 2017, 03:32 PM
Post #7


Senior Member
****

Group: Members
Posts: 2502
Joined: 13-September 05
Member No.: 497



QUOTE (Mike Martin @ Aug 11 2017, 06:28 AM) *
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?

Your distances don't look too far off. The closest you have was 721909 km relative to the center, which is about 650000 relative to the cloud tops, so if you reduced your time spacing you may be close. It's possible that the descriptive text was approximate.


--------------------
Disclaimer: This post is based on public information only. Any opinions are my own.
Go to the top of the page
 
+Quote Post
JohnVV
post Aug 11 2017, 03:39 PM
Post #8


Member
***

Group: Members
Posts: 890
Joined: 18-November 08
Member No.: 4489



the voyager kernels are only an approximate and a reconstruction many years after the fact

see the "ReadMe"
ftp://naif.jpl.nasa.gov/pub/naif/VOYAGER/...ls/aareadme.txt

and use the kernels listed in that file
ftp://naif.jpl.nasa.gov/pub/naif/VOYAGER/kernels/
Go to the top of the page
 
+Quote Post
Gerald
post Aug 12 2017, 08:25 AM
Post #9


Senior Member
****

Group: Members
Posts: 2346
Joined: 7-December 12
Member No.: 6780



According to this (obsolete) SPK Tutorial, Jupiter is offset from Jupiter BC by 165 km, according to this current version, it's up to 220 km. Did you try JUPITER (599) instead of JUPITER_BARYCENTER (5)?
I'm usually working with IAU_JUPITER, i.e. System III, for JunoCam, but there are several other Jupiter coordinate systems, too. Voyager might use systems different from these.

Some effect might also be caused by aberration correction, which is switched off in your Py code.
Go to the top of the page
 
+Quote Post
Mike Martin
post Aug 12 2017, 08:14 PM
Post #10


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."
Go to the top of the page
 
+Quote Post
mcaplinger
post Aug 13 2017, 12:01 AM
Post #11


Senior Member
****

Group: Members
Posts: 2502
Joined: 13-September 05
Member No.: 497



QUOTE (Mike Martin @ Aug 12 2017, 12:14 PM) *
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...

Yes, that's typical. If the kernel doesn't contain records for the geometric object you have to use the barycenter. The offset is insignificant for most purposes.

In my experience numerical values in press releases and other prose descriptions are sometimes not very trustworthy.


--------------------
Disclaimer: This post is based on public information only. Any opinions are my own.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 19th March 2024 - 02:55 AM
RULES AND GUIDELINES
Please read the Forum Rules and Guidelines before posting.

IMAGE COPYRIGHT
Images posted on UnmannedSpaceflight.com may be copyrighted. Do not reproduce without permission. Read here for further information on space images and 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.