MAC OSX SPICE support

Post requests, images, descriptions and reports about work in progress here.
Topic author
FrankC
Posts: 4
Joined: 18.02.2009
With us: 16 years 1 month

MAC OSX SPICE support

Post #1by FrankC » 19.02.2009, 22:05

Hi, I'm Frank, and I'm working on the LRO camera science ops team at ASU. I'm trying to build a sim of LRO using SPICE. I've had luck on Windows, but I want to run this on a Mac, eventually. We're intending to run a huge, up-to-date display of the spacecraft in lunar orbit, which will be part outreach, and part-rough visualization support for the ops team.

Does there exist a Celestia build with spice support for OSX? Or is there and add-on that I can install to provide this? I'm not familiar with making my own builds. If I have to, I'll try, but I hope it doesn't come to that... yet.

I might have missed the literature on it in the boards here, but I feel like I've picked them thoroughly enough by now, and I've also tried several builds by Markerz and BlindedByTheLight, who are users of these boards. I followed the conversation (viewtopic.php?f=6&t=10724&p=84093#p84093) between volcanopele and selden, which is how I beat my windows version into accepting spice orbits.

Any help you could provide would be great. Thanks and have a good one!

ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 20 years 2 months

Re: MAC OSX SPICE support

Post #2by ElChristou » 19.02.2009, 22:15

Hi, welcome!
Try PM Chris Laurel (pseudo -> Chris) or Da Woon (pseudo -> Dirkpitt); they are the ones who can eventually help you on the topic.
Image

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

Re: MAC OSX SPICE support

Post #3by selden » 19.02.2009, 22:32

Frank,

I would have expected the standard v1.5.1 Mac version of Celestia to include Spice support. Are you saying it doesn't?

The change in Spice for v1.6 is the support for rotations.
Selden

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

Re: MAC OSX SPICE support

Post #4by chris » 19.02.2009, 22:38

Unless someone has modified the project file, SPICE isn't included in the Mac version. I've had some trouble figuring out how to get the SPICE libraries to build with a universal binary (PPC and x86) for the Mac. This is a definite to-do item for version 1.6.0. I'll contact dirkpitt (our resident Mac expert) about it.

--Chris

Topic author
FrankC
Posts: 4
Joined: 18.02.2009
With us: 16 years 1 month

Re: MAC OSX SPICE support

Post #5by FrankC » 19.02.2009, 22:39

I have tried both 1.6 versions posted by Markerz, and haven't had any luck.

Thanks for your help guys.

Markerz
Developer
Posts: 274
Joined: 29.01.2009
Age: 29
With us: 16 years 2 months
Location: Suzhou, China

Re: MAC OSX SPICE support

Post #6by Markerz » 21.02.2009, 06:02

That may help you. SVN 4659 has enabled Spice in all build targets.

Mac OS X Version From SVN

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

Re: MAC OSX SPICE support

Post #7by chris » 21.02.2009, 20:57

I just tested SPICE support on Mac OS X, and it's working great. Many thanks to Da Woon Jung for making the necessary changes.

--Chris

Topic author
FrankC
Posts: 4
Joined: 18.02.2009
With us: 16 years 1 month

Re: MAC OSX SPICE support

Post #8by FrankC » 23.02.2009, 15:42

Hi Chris, thanks for testing that. I didn't get it to work yet. I am using one of our example scripts that I've had luck with on my windows version:

I have the correct kernel in a data file along with this. And I've tried both 4650 and 4650 RDR...

Thanks again, -Frank

Topic author
FrankC
Posts: 4
Joined: 18.02.2009
With us: 16 years 1 month

Re: MAC OSX SPICE support

Post #9by FrankC » 25.02.2009, 16:43

Chris & co. I realize I just left my last response up for you to telepathically figure out what I was thinking. Sorry - little scatter brained on this end.

Here is what I've figured out: Objects for which I declare FixedPosition[] show up, as long as my SpiceOrbit command has the correct syntax & subsequent declarations. I noticed this problem occurring in other threads, but I've been unable to resolve it based on those conversations.

Also, even though I feel like I'm close to getting this to work with OSX, I found out that I'm going to have to port this result to SuSE linux. I found a build for linux that appears to have Spice support at (http://sourceforge.net/project/showfile ... _id=173862). In the past few days, I've been able to make the same amount of progress on this build as I have on OSX, meaning I can get SpiceOrbit objects to show up as long as I specify FixedPosition[]. Does that mean the build I found has spice support enabled, or not?

Here are my other questions:
1) What is the exact version of the build for OSX you're using?
2) Why do I need that FixedPosition command?
3) Is it that I need to use FixedPosition to define the first spice object I'm creating, so that all subsequent objects can reference that one? (I have found no evidence in my futzing around to indicate this is true)
4) Why will SpiceOrbit have to have correct syntax if I'm going to specify FixedPosition?
5) Can a spice object orbit a non-spice object? (I've tried making sure spice objects are defined relative to other objects defined by SpiceOrbit, all the way down to Sol and/or sol. sys. bary., but have not seen any success with this attempt either.)

Again, I appreciate all of your assistance. -Frank

volcanopele
Posts: 103
Joined: 05.02.2007
With us: 18 years 2 months

Re: MAC OSX SPICE support

Post #10by volcanopele » 25.02.2009, 19:51

As far as your last question goes, you can have a "spice orbit" object orbit a non-spiced up one. If you are using the latest beta for Mac OSX (I'm using the Windows one, so I can only assume it has the same new features), you can use the timelines feature to be sure that you using the right orbit frame for the different parts of the mission. For example, from launch to LOI, it maybe useful to tie the orbit frame to the Earth, while after LOI you will need to tie the orbit frame to the moon. Basically, when you have a spice orbit object orbit a non-spiced orbit one (in this case, let's say LRO and either the Moon or Earth), precision will be maintained in XYZ space between LRO and the orbit frame object (Earth or the Moon), but you will lose precision when dealing with distance to any other body. Another alternative would be just to have the orbit frame be the moon for the entire mission, and live with the lack of precision between LRO and the Earth during the cruise phase. That cruise phase is pretty short anyway, right?

As for why you might have issues with the spice kernel file (and need to use fixed position), can you run the naif program "brief" on the file? What is the output you get? Is only LRO defined? Does it kinda look like this:

Code: Select all

tethys:../SPICE 13:04 % brief dawn_ref_081031-090601_090213_dc024p1_v1.bsp
Brief.  Version: 2.2.0        (SPICE Toolkit N0058)
 
 
Summary for: dawn_ref_081031-090601_090213_dc024p1_v1.bsp
 
Body: DAWN (-203)
      Start of Interval (ET)              End of Interval (ET)
      --------------------------------    --------------------------------
      2008 OCT 31 23:00:00.000            2009 JUN 01 00:00:00.000


In which case, you will need to use another kernel in addition to define an orbit frame to refer to. For dawn, I solved this:

Code: Select all

         OrbitFrame { EclipticJ2000 { Center "SSB"}}

         SpiceOrbit
         {
            Kernel
            [
               "dawn_ref_081031-090601_090213_dc024p1_v1.bsp"
               "de421.bsp"
            ]
                     Target "-203"
                      Origin "0"
            BoundingRadius 1e10
            Beginning "2008 11 01 00:00"
            Ending    "2009 06 01 00:00"
         }

the de421.bsp file has spice defined position for various planet barycenters, the sun, the solar system barycenter, Earth, and the Moon. You can download it at ftp://naif.jpl.nasa.gov/pub/naif/generi ... /de421.bsp

For LRO, you can use this as:

Code: Select all

         OrbitFrame { EclipticJ2000 { Center "Sol/Earth/Moon"}}

         SpiceOrbit
         {
            Kernel
            [
               "LRO_Reference_trajectory.bsp"
               "de421.bsp"
            ]
                     Target "-85"
                      Origin "301"
            BoundingRadius 1e10
         }
Hands off: C55AFB738D58F4B81D3A4722551D25E1
The Gish Bar Times - A Blog all about Jupiter's Moon Io


Return to “Add-on development”