Page 1 of 2

Help with Spice2xyzv.exe

Posted: 24.08.2011, 10:22
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 27.08.2011, 00:42
by John Van Vliet
--- edit ---

Re: Help with Spice2xyzv.exe

Posted: 27.08.2011, 10:30
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 27.08.2011, 11:27
by BrianJ
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.

Re: Help with Spice2xyzv.exe

Posted: 27.08.2011, 11:48
by selden
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.)

Re: Help with Spice2xyzv.exe

Posted: 27.08.2011, 17:51
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 27.08.2011, 21:07
by John Van Vliet
--- edit ---

Re: Help with Spice2xyzv.exe

Posted: 28.08.2011, 10:45
by BrianJ
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!

Re: Help with Spice2xyzv.exe

Posted: 08.09.2011, 08:18
by John Van Vliet
--- edit ---

Re: Help with Spice2xyzv.exe

Posted: 09.09.2011, 10:22
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 09.09.2011, 10:27
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 09.09.2011, 15:17
by chris
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

Re: Help with Spice2xyzv.exe

Posted: 09.09.2011, 16:29
by chris
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

Re: Help with Spice2xyzv.exe

Posted: 09.09.2011, 17:52
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 09.09.2011, 18:08
by chris
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

Re: Help with Spice2xyzv.exe

Posted: 10.09.2011, 09:40
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 10.09.2011, 20:40
by chris
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

Re: Help with Spice2xyzv.exe

Posted: 12.09.2011, 20:21
by BrianJ
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

Re: Help with Spice2xyzv.exe

Posted: 12.09.2011, 22:02
by chris
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

Re: Help with Spice2xyzv.exe

Posted: 12.09.2011, 22:06
by John Van Vliet
--- edit ---