Catch 22 with SPICE

General discussion about Celestia that doesn't fit into other forums.
Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Catch 22 with SPICE

Post #1by cartrite » 22.09.2006, 19:54

Anyone remember the movie??:wink:

Problem:
The Spice library only works on my 64 bit OS if it was compiled with a 32 bit compiler. It does work though. It will not work when compiled with a 64 bit compiler.
I can only compile Celestia with a 64 bit compiler on my 64 bit OS. If I try to compile with a 32 bit compiler KDE fails because of QT and GTK and Gnome fails because of a missing jpeg lib.
Those programs are installed and I tell configure where to find them but they are ignored.
So I can't get the 2 of them talking. :? 8O :cry: :?: Any Ideas would be appreciated. I did get it working on my other systems so I can still play around with it. But I would like to get it working on Suse 10 because that's where most of my work is done.

Anyhow, on a different note, while using the Spice libs I came across the program brief.
Running it on a .bsp file gives some interesting output to help with creating ssc files.

Code: Select all

Brief.  Version: 2.3.1        (SPICE Toolkit N0060)


Summary for: 060810R_SCPSE_06162_06193.bsp

Body: CASSINI (-82)
      Start of Interval (ET)              End of Interval (ET)
      --------------------------------    --------------------------------
      2006 JUN 11 12:00:00.000            2006 JUL 12 12:00:00.000

Bodies: EARTH BARYCENTER (3)    MIMAS (601)             HYPERION (607)
        JUPITER BARYCENTER (5)  ENCELADUS (602)         IAPETUS (608)
        SATURN BARYCENTER (6)   TETHYS (603)            PHOEBE (609)
        SUN (10)                DIONE (604)             SATURN (699)
        MOON (301)              RHEA (605)
        EARTH (399)             TITAN (606)
        Start of Interval (ET)              End of Interval (ET)
        --------------------------------    --------------------------------
        2006 JUN 11 12:00:00.000            2006 JUL 12 12:00:00.000
At least I think it would help. I have not created any yet.

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: Catch 22 with SPICE

Post #2by Cham » 22.09.2006, 20:06

cartrite wrote:Anyone remember the movie??:wink:


Actually, I have that great movie in DVD, in my smalll movies collection. :P
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

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

Post #3by chris » 22.09.2006, 20:13

I don't think you'll have to wait too much longer for a 64-bit version. Here's an announcement on NAIF site (http://naif.jpl.nasa.gov/naif/):

The next Toolkit release, N61, is expected in the November 2006 time frame. It will include several new computing environments: PC/Linux 64 bit, Intel Fortran for PC/Windows, and Intel Fortran for Mac/OSX. In response to customer recommendations it will also include substantial hyperlinking of documentation.


--Chris

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #4by cartrite » 22.09.2006, 20:39

Cool, Thats good news. :)
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #5by cartrite » 26.09.2006, 03:32

I tried to construt the Near mission as Chris did and I got it working with my linux version on suse 9.2 but the win32 version will not read the metakernel.

Code: Select all

\begindata

PATH_VALUES = ( 'extras/near/data' )
PATH_SYMBOLS = ( 'P' )

KERNELS_TO_LOAD = (
                    '$P/de403s.bsp',
                    '$P/erosephem_1999004_2002181.bsp',
           '$P/math9749.bsp',
                    '$P/near_cruise_nav_v1.bsp',
           '$P/near_erosorbit_nav_v1.bsp',
           '$P/near_eroslanded_nav_v1.bsp'
                   )


Is there a different path I should be using. I tried a full path, path with "\" instead of "/" , and nothing.

The linux version is from 9/20 and the win32 version is from 9/25 if that make a diiff. 8O My linux version reported touchdown at 19:29:59 on 2/12/2001 UTC.

Image

edit: Actually at 19:44:16 the near model dissappears so I guess that is the actual touhdown time that celestia is reporting. I also guess the negative distance is due to the irregular shape of Eros. Just before touchdown I took this screenshot. The Eros model starts to disappear when veiwed from this angle after this.

Image

I wonder if this was where Near really touched down. Near is the little white dot just above the large crater facing downwards.It will diappear at the next second.

Image

cartrite
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #6by cartrite » 26.09.2006, 14:03

The win32 version of cvs (09/25/2006) doesn't seem to read a ssc file from the extras folder for asteroids or spacecraft correctly. The Replace line doesn't work at all and the Modify line will only work fully if the texture line from the asteroid.ssc file is commented out. If it isn't commented out , then the normalmap is not loaded.

The Near addon from the motherlode will not work at all with or without spice unless it is added to the spacecraft.ssc file and the texture is added to the texture/medres folder.

This doesn't seem to affect the linux kde version from 9/20/06.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #7by Cham » 26.09.2006, 14:49

Take note that the NEAR model has some specular reflection problems here. I've corrected that model to use with Celestia 1.5.0. Just follow that thread :

http://www.celestiaproject.net/forum/viewtopic.php?t=10149

There's a download link to a new version in the middle of the first page. :wink:
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #8by cartrite » 26.09.2006, 15:02

The Near addon I used was created by Jack Higgins and packaged by Frank Gregorio. The only spacecraft addons I seen there from you was Messenger and Luna 1..
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #9by Cham » 26.09.2006, 15:05

O my ! :roll: Just follow that link and read !
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #10by cartrite » 26.09.2006, 15:31

I just downloaded the packages and put together a Near folder and that works so there must be something incompatable between the motherlode addon and cvs ver 1.5. That doesn't explain why the eros model isn't working right with Replace or Modify defs in the other .ssc which looks like this.

Code: Select all

Modify "Eros" "Sol"
{
    Class "asteroid"
    Mesh   "eros-360.cmod"
    Color [ 1.000 0.878 0.853 ]
    BlendTexture true
    Radius 16.3 # maximum semi-axis
    MeshCenter [ -1.262 0.168 -0.164 ]
 
    SpiceOrbit
    {
        Kernel "near-kernels.txt"
        Target "2000433"
        Origin "Sun"
            BoundingRadius 2
            Period 1.761
 
        Beginning "1999 1 3 20:00:00"
        Ending "2002 8 1 00:00:00"
    }
 
    RotationPeriod         5.270
    Obliquity             78.70
    EquatorAscendingNode 107.23
    RotationOffset       338.165
 
    Albedo 0.16
}

"NEAR Shoemaker" "Sol"
{
    Class "spacecraft"
    Mesh "near.3ds"        # substitute "near.3ds" if you have the NEAR
                 # model installed in Celestia
    Radius 0.002
    RotationOffset 270
 
    Beginning "1996 5 31"
    Ending "2001 2 12 19:45:20"
 
    SpiceOrbit
    {
        Kernel "near-kernels.txt"
        Target "NEAR"
            Origin "Sun"
        BoundingRadius 2
 
        Beginning "1996 5 31"
        Ending "2001 2 12 19:45:20"
    }
}

With that file the model eros-360 loads without the normalmap with Modify and doesn't load at all with Replace. This doesn't effect the linux version.
Also, the Near model not only doesn't load, but it is not even defined when trying to enter it on the command line.
Last edited by cartrite on 26.09.2006, 15:54, edited 1 time in total.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Post #11by Cham » 26.09.2006, 15:53

I wasn't able to use the NormalMap either. I don't know why, but no bumps ! :-(
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #12by cartrite » 26.09.2006, 15:59

The model eros-360.cmod is looking for erosnm.png not 2k-erosnm.png or erosnm-2k.png. One of those last 2 names is the name of the file I downloaded. Also.

Cham wrote
I wasn't able to use the NormalMap either. I don't know why, but no bumps

Did you try this?
Modify line will only work fully if the texture line from the asteroid.ssc file is commented out. If it isn't commented out , then the normalmap is not loaded.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #13by chris » 26.09.2006, 16:14

[Editing to add missing image link :oops: ]
http://near.jhuapl.edu/iod/20010202/index.html

This image shows the point where NEAR landed on Eros. It's difficult to tell how closely Celestia matches that image. The fifteen minute discrepancy in the landing time suggests that it's not quite the right spot. If I had to guess what was wrong, I'd blame inaccuracies in the orientation of Eros. There's a large binary file on the NEAR SPICE respository with orientation information for Eros. Celestia can't yet use that type of SPICE file. But, tuning the rotation parameters for Eros so that they're exactly right at the time of touchdown might be a shortcut to a perfect recreation of the NEAR Shoemaker mission.

--Chris
Last edited by chris on 26.09.2006, 17:19, edited 1 time in total.

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #14by cartrite » 26.09.2006, 16:48

Chris,
I'm not sure which image you mean.
Is this the file you were referring to. erosatt_1999304_200115.bpc.
If it is, I'll try running some of the spice tools on it to see what it says to see if I can come up with a correct orientation. This was the description in the lbl file
"The latest Eros body-fixed frame
orientation binary PCK file provided by the NEAR NAV, JPL to the NEAR
project and used to support Eros orbit phase operations and science data
processing "
Also the file eros80.bsp had an lbl counterpart that had this description. Mabey this file would work better than erosephem_1999004_2002181.bsp.
"SPK file containing Asteroid Eros
ephemerides, provided by the Solar System Dynamics Group, JPL in September
2001. This solution has higher accuracy than the files used during the
mission operations because it is based on a greater number of observations,
many of which were obtained over the course of the NEAR mission. "
The spkinfo.txt file from the folder where all the kernels were downloaded had this to say
EROS80 SPK file containing the Asteroid Eros
ephemerides, provided by the Solar
System Dynamics Group, JPL in
September 2001. This solution has
higher accuracy than the file used
during the mission operations because
it is based on a greater number of
observations, many of which were
obtained over the course of the NEAR
mission. The average difference
between this file and the
'EROSEPHEM_1999004_2002181' file is on
the order of 30-50 kilometers.
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #15by chris » 26.09.2006, 17:26

cartrite wrote:Chris,
I'm not sure which image you mean.
It was left out my original post; I edited it to add the link.

Is this the file you were referring to. erosatt_1999304_200115.bpc.
If it is, I'll try running some of the spice tools on it to see what it says to see if I can come up with a correct orientation. This was the description in the lbl file
"The latest Eros body-fixed frame
orientation binary PCK file provided by the NEAR NAV, JPL to the NEAR
project and used to support Eros orbit phase operations and science data
processing "

That's the one. I'd be very interested in the results of your attempts to correct the orientation of Eros.

Also the file eros80.bsp had an lbl counterpart that had this description. Mabey this file would work better than erosephem_1999004_2002181.bsp.
"SPK file containing Asteroid Eros
ephemerides, provided by the Solar System Dynamics Group, JPL in September
2001. This solution has higher accuracy than the files used during the
mission operations because it is based on a greater number of observations,
many of which were obtained over the course of the NEAR mission. "


I think that I looked at that one and it didn't have coverage for the entire NEAR mission. I could be mistaken about that. Anyhow, it doesn't matter much for the NEAR touchdown since the position of NEAR in the Eros orbiting phase of the mission is relative to Eros in the SPK files (you can use brief with the -c option to show the centers for each segment of the trajectory.)

--Chris

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #16by cartrite » 26.09.2006, 18:18

I just tried to replace the file erosephem_1999004_2002181.bsp with eros80.bsp and that didn't work. Everything disappeared. Using both didn't make much (if any) of a difference either.

The ship is not really touching down. This sreenshot shows the veiw of the last second before everything disappears. Trouble is, that when eros is rotated, Near's position changes too. (I'll have to post it later. Image Shack will not upload anything now)
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

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

Post #17by chris » 26.09.2006, 18:42

cartrite wrote:I just tried to replace the file erosephem_1999004_2002181.bsp with eros80.bsp and that didn't work. Everything disappeared. Using both didn't make much (if any) of a difference either.

Yes, I think that's because eros80.bsp doesn't cover the entire mission timespan.

The ship is not really touching down. This sreenshot shows the veiw of the last second before everything disappears. Trouble is, that when eros is rotated, Near's position changes too. (I'll have to post it later. Image Shack will not upload anything now)
[/quote]

I see the probe disappear inside of Eros before disappearing about 15 minutes later. The orientation of Eros shouldn't affect the position of NEAR. You have the parent object of NEAR set to Sol, not Eros right?

--Chris

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #18by cartrite » 26.09.2006, 19:56

Yes. Near's parent is Sol. It doesn't really change poitions. It just looks that way. As eros is rotated, the white dot that represents Near "appears" to be over a different part of eros. But if you "zoom in", eros dissapears and Near is actually inside the model. Or at least it seems that way. It's hard to tell what's really happening.

I'm not having much luck with the bpc file yet. I tried the tools commt and spacit to try and summarize the file but there were not many good details. Start time, End time, body Id. Nothing on orientation.
:?
I am starting to study the pck.req in doc so..........
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #19by cartrite » 26.09.2006, 20:20

I managed to convert the bpc file to transfer mode and the first few lines look like

Code: Select all

DAFETF NAIF DAF ENCODED TRANSFER FILE
'DAF/PCK '
'2'
'5'
'astatt.tst                                                  '
BEGIN_ARRAY 1 3496387
'asteroid attitude                       '
'-51144^6'
'2A8EEC^7'
'1E8631'
'1'
'3'
1024
'B^1'



last few lines of the data area look like this

Code: Select all

'44^2'
'1^1'
'11^2'
END_ARRAY 1 3496387
TOTAL_ARRAYS 1


Not much ayy :(
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4

Avatar
Topic author
cartrite
Posts: 1978
Joined: 15.09.2005
With us: 19 years 2 months
Location: Pocono Mountains, Pennsylvania, USA Greate Grandfother from Irshava, Zakarpattia Oblast Ukraine

Post #20by cartrite » 26.09.2006, 21:24

I found another way to do multi kernels. Using the tool spkmerge on a command file that looks like this

Code: Select all

leapseconds_kernel  = /home/cartrite/bin/09202006/cspice/exe/naif0007.tls
spk_kernel          = /home/cartrite/bin/09202006/cspice/exe/near-eros.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/de403s.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/erosephem_1999004_2002181.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/eros80.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/math9749.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/near_cruise_nav_v1.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/near_erosorbit_nav_v1.bsp
source_spk_kernel   = /home/cartrite/bin/09202006/cspice/exe/near_eroslanded_nav_v1.bsp


combined all the spk files into one. So I used only one kernel to reconstruct the near mission. Works good with Linux.

BUT it still will not work with Windows.8O
Something happened to eros though. One bookmark I created with the old way did not work because eros shifted by a few hundred KM's. So part of it is working. Near is still MIA. :?
VivoBook_ASUSLaptop X712JA_S712JA Intel(R) UHD Graphics 8gb ram. Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz, 1190 Mhz, 4 Core(s), 8 Logical Processor(s) 8 GB ram. Running on Windows 11 and OpenSuse 15.4


Return to “Celestia Users”