Help with Spice2xyzv.exe

Have a question about using Celestia? Check here first for FAQs and helpful advice.
Forum rules
Please help to make this forum more useful by checking the FAQs before posting! Keep it clean, keep it civil, keep it truthful, stay on topic, be responsible, share your knowledge.
Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Help with Spice2xyzv.exe

Post #1by BrianJ » 24.08.2011, 10:22

Hi,
I'm trying to extract the .xyzv data for the "Grail" mission from a Spice SPK file, using Chris' "Spice2xyzv.exe" tool.

However it keeps giving me an error saying "Target not found - aborting".

I've tried using every variation for the Target string - GRAIL-A, GRAIL_A, GRAILA, GRAIL, etc.etc.
(also tried lower-case, GRAIL_B and the NAIF IDs -177, -181) - but no luck.

I'm using the NAIF Spice SPK file
spk_grlab_110908_120605_110602_mar2011ref.bsp

Can anyone help? Thanks!
Brian

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Help with Spice2xyzv.exe

Post #2by John Van Vliet » 27.08.2011, 00:42

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 06:48, edited 1 time in total.

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #3by BrianJ » 27.08.2011, 10:30

Hi John :-)
my computer/programming knowledge is ...errr....minimal and patchy, but I'll try to answer your questions as best I can...
john Van Vliet wrote:-- are you using XP's very very very bad terminal or the slightly better "advanced" windows7 one ?
Using Windows XP - I just click on the "C-Prompt" icon in my start menu to bring up the C-prompt window and type in this command string:

Code: Select all

Spice2xyzv.exe grail.cfg > grail.xyzv
then hit enter.

john Van Vliet wrote:or did you make a windows *.bat file
No.

john Van Vliet wrote:is the *.exe in the same folder as the *.bsp ?
and did you cd to the folder that the *.bsp is in ?
Yes, it's all in my C:\Documents and Settings\Brian folder.
The full command line in my C-prompt window looks like this:

Code: Select all

C:\Documents and Settings\Brian> Spice2xyzv.exe grail.cfg > grail.xyzv


My grail.cfg looks like this:

Code: Select all

StartDate   "2011-Sep-09 00:00:00 TDB"
EndDate     "2012-Jan-01 00:00:00 TDB"
Observer    "EARTH"
Target      "GRAIL_A"
Frame       "eclipJ2000"
Tolerance   1
MinStep     10
MaxStep     86400
Kernels ["spk_grlab_110908_120605_110602_mar2011ref.bsp"]


I've tried every variation on the "Target" string, but it just gives me an empty grail.xyzv file and an error message "Target Not Found".

Any thoughts?
I guess I can always wait until JPL Horizons make the data available (hopefully).

Many thanks,
Brian

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #4by BrianJ » 27.08.2011, 11:27

Well, I just succeeded in making an .xyzv file for DAWN spacecraft (as per the example included with Spice2xyzv.exe) - but still no joy with GRAIL (or GRAIL_A, grail_a, Grail_A, Grail_a, GRAILA, graila, grla, GRAIL-A, grail-a, etc.etc.etc.)

Stll getting the "Aborting - Target GRAIL_A Not Found" error message.

Hey ho.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Re: Help with Spice2xyzv.exe

Post #5by selden » 27.08.2011, 11:48

There are utilities which will show the names used for objects inside a Spice file. Have you looked at it with one of them? My guess is that the capitalization or spelling isn't quite right. (Sorry: it's been quite a while since I did anything with Spice files, so I don't recall the names of the utilities that are available.)
Selden

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #6by BrianJ » 27.08.2011, 17:51

Hi Selden,
good idea, but to no avail....

Grabbed the "brief.exe" from the NAIF Spice Toolkit, ran it on the .bsp file and it gave me the spacecraft ID's as:
GRAIL-A [-177]
GRAIL-B [-181]

(same info as the .lbl file that is associated with the .bsp file)

which I've tried already.

Ah well, never mind :-)
Mucho thanks for the helps.

Cheers,
Brian

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Help with Spice2xyzv.exe

Post #7by John Van Vliet » 27.08.2011, 21:07

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 06:47, edited 1 time in total.

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #8by BrianJ » 28.08.2011, 10:45

That's a very kind offer, John - if it's convenient for you, that would be great, but please don't waste any time on it. I'm just indulging my own curiosity!

BTW spice2xyzv.exe comes with a .tls file, and also gives an error report of any other files it needs but aren't present (as happened when I was trying it out with the Dawn .bsp).

Anyway, thanks again.
Brian

PS good luck with rebuilding your solar system!

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Help with Spice2xyzv.exe

Post #9by John Van Vliet » 08.09.2011, 08:18

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 06:44, edited 1 time in total.

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #10by BrianJ » 09.09.2011, 10:22

Many thanks for the help John - but still no go here :-(

Got the de421.bsp, changed the Kernels line in the .cfg file as per your post above - but still gives the "target not found - aborting" message.

Tried GRAIL-A , GRAIL_A, GRAILA, GRAIL, etc.

However, it DOES work if I use "MOON" or "MARS" as the target.
So I'm stumped!

Anyway, hope NASA has more luck than me with the launch today.
Go GRAIL!

Thanks and best regards,
Brian

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #11by BrianJ » 09.09.2011, 10:27

Ha! Trajectory data now on JPL Horizons - so that's made my life easier :-D
It still rankles not to be able to make the software cooperate though!

Cheers,
Brian

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Help with Spice2xyzv.exe

Post #12by chris » 09.09.2011, 15:17

BrianJ wrote:Many thanks for the help John - but still no go here :-(

Got the de421.bsp, changed the Kernels line in the .cfg file as per your post above - but still gives the "target not found - aborting" message.

Tried GRAIL-A , GRAIL_A, GRAILA, GRAIL, etc.

However, it DOES work if I use "MOON" or "MARS" as the target.
So I'm stumped!

Anyway, hope NASA has more luck than me with the launch today.
Go GRAIL!

Thanks and best regards,
Brian

Brian,

I double-checked, and spice2xyzv will handle numeric IDs as well as strings. So, "-177" should work, as Selden suggested. I'm downloading the GRAIL kernels right now to try it myself.

EDIT: Ok, using "-177" worked for me. "GRAIL_A" doesn't work--the name/NAIF ID table is hardcoded in the SPICE library. Only the most recent version of it includes the names GRAIL_A and GRAIL_B.

--Chris

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Help with Spice2xyzv.exe

Post #13by chris » 09.09.2011, 16:29

john Van Vliet wrote:i think i found your error
your cgf file is missing the de421.bsp
your kernels line should read

Code: Select all

Kernels [
"de421.bsp"
"spk_grlab_110908_120605_110602_mar2011ref.bsp"
]

John,

In this case it's not necessary to include de421, because the planetary ephemeris is built into the SPICE kernel for GRAIL. You can check this by running brief on the GRAIL kernel: you'll see it includes ephemeris data for all of the planets (though presumably, only the Earth, Sun, and Moon are required.) In general, it's best to use whatever planetary ephemeris may be included in the spacecraft kernel (of course, in some cases there's none and you do need another kernel file.)

--Chris

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #14by BrianJ » 09.09.2011, 17:52

Hi Chris,
still not working for me if I use the NAIF ID -177.

Here's what I used in my .cfg file

Code: Select all

StartDate   "2011-Sep-10 00:00:00 TDB"
EndDate     "2011-Dec-31 00:00:00 TDB"
Observer    "EARTH"
Target      "-177"
Frame       "eclipJ2000"
Tolerance   1
MinStep     10
MaxStep     86400
Kernels      ["spk_grlab_110908_120605_110602_mar2011ref.bsp"]


As I mentioned above, all works fine for DAWN (as per example included with spice2xyzv.exe) or if I change the Target string to "MARS" or "MOON"

Could it be a compatability issue between UK/US keyboard characters? (guessing wildly here)
I'm using Windows XP Home, UK keyboard and character set.

Best regards,
Brian

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Help with Spice2xyzv.exe

Post #15by chris » 09.09.2011, 18:08

BrianJ wrote:Could it be a compatability issue between UK/US keyboard characters? (guessing wildly here)
I'm using Windows XP Home, UK keyboard and character set.

I think the likeliest source of the problem is that you have a very old version of spice2xyzv. Support for numeric IDs was added in a change that was committed to SVN in November 2009. If you've got an older binary, numeric IDs won't work. I'll build and upload a new version.

--Chris

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #16by BrianJ » 10.09.2011, 09:40

Ah. FYI, the spice2xyzv.exe I have is dated 30/05/2008. Dowloaded from http://www.celestiaproject.net/~claurel/celestia/files/

Now, let's see if Grail is going today! (crossed fingers)

Thanks and best regards,
Brian

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Help with Spice2xyzv.exe

Post #17by chris » 10.09.2011, 20:40

BrianJ wrote:Ah. FYI, the spice2xyzv.exe I have is dated 30/05/2008. Dowloaded from http://www.celestiaproject.net/~claurel/celestia/files/

Now, let's see if Grail is going today! (crossed fingers)

Thanks and best regards,

I just uploaded the latest version of spice2xyzv for Windows:
http://www.celestiaproject.net/~claurel/celest ... e2xyzv.zip

Nice to see GRAIL off the ground and bound for the Moon! There doesn't appear to be a new SPICE kernel that reflects the new launch date, however. It probably won't take too long though...

--Chris

Topic author
BrianJ
Posts: 63
Joined: 17.07.2008
With us: 16 years 4 months

Re: Help with Spice2xyzv.exe

Post #18by BrianJ » 12.09.2011, 20:21

Hi Chris,
I grabbed the new spice2xyz.exe but not having any luck with it :-(

On first try it gave an error message asking for msvcr90.dll, so I copied msvcr90.dll, msvcm90.dll and msvcp90.dll from my Celestia install into the directory with spice2xyzv.exe.

Now it gives a different error message:
Image

Doh!

Nevermind, at least the Grails are off safely :-)

Thanks,
Brian

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Re: Help with Spice2xyzv.exe

Post #19by chris » 12.09.2011, 22:02

BrianJ wrote:Hi Chris,
I grabbed the new spice2xyz.exe but not having any luck with it :-(

On first try it gave an error message asking for msvcr90.dll, so I copied msvcr90.dll, msvcm90.dll and msvcp90.dll from my Celestia install into the directory with spice2xyzv.exe.

Why is it always a complete PITA to get C runtime working on Windows? I'll see what I can do about it...

--Chris

Avatar
John Van Vliet
Posts: 2944
Joined: 28.08.2002
With us: 22 years 2 months

Re: Help with Spice2xyzv.exe

Post #20by John Van Vliet » 12.09.2011, 22:06

--- edit ---
Last edited by John Van Vliet on 19.10.2013, 06:43, edited 1 time in total.


Return to “Help Central”