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: 818
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: 1841
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

Reply to this topicStart new topic

 



RSS Lo-Fi Version Time is now: 29th July 2017 - 11:52 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 a project of the Planetary Society and is funded by donations from visitors and members. Help keep this forum up and running by contributing here.