Tweaking the Death Star orbit and other such thoughts

Post requests, images, descriptions and reports about work in progress here.
Topic author
berg
Posts: 7
Joined: 20.09.2009
With us: 15 years 2 months

Tweaking the Death Star orbit and other such thoughts

Post #1by berg » 30.09.2009, 14:38

So i have successfully placed the Death Star in orbit around earth. Now I want to replicate the orbit it had around the Endor moon in Return of the Jedi. By this I mean that I need it to tidal lock the Deathstar and have it stay centered on one spot on the planet. (it needs to have the shield remember?) maybe to simplify it, i need to tidal lock both? I changed the period of rotation to 1 but when you speed time up, earth always starts to rotate away. any ideas?




i'm running mac os x 10.5 and celestia 1.6

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

Re: Tweaking the Death Star orbit and other such thoughts

Post #2by selden » 30.09.2009, 16:09

Celestia defaults to tidally locked if you omit the rotation period entirely.
Selden

Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Re: Tweaking the Death Star orbit and other such thoughts

Post #3by Reiko » 30.09.2009, 16:20

But how would you make it stay stationary over one spot on the planet. I've wondered myself how to place an object at any altitude and have it always remain over the same spot above the planet.

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

Re: Tweaking the Death Star orbit and other such thoughts

Post #4by selden » 30.09.2009, 17:38

The easiest way to place one object in a fixed location relative to another object is to use the FixedPosition directive.
You can specify either xyz coordinates or longitude, latitude and altitude.

Here it is above Hawaii. I used size and altitude info taken from
http://www.theforce.net/swtc/ds/index.html

Code: Select all

"Death Star" "Sol/Earth"
{
        Class "spacecraft"
        Mesh "dstar.3ds"
        Radius 400

   OrbitFrame { BodyFixed { Center "Sol/Earth"}}
   FixedPosition { Planetographic [ -156 21 2000 ]}

   BodyFrame { BodyFixed { Center "Sol/Earth"}}
   FixedRotation {}

   Albedo       0.10
}
Selden

Reiko
Posts: 1119
Joined: 05.10.2006
Age: 41
With us: 18 years 1 month
Location: Out there...

Re: Tweaking the Death Star orbit and other such thoughts

Post #5by Reiko » 01.10.2009, 19:58

I knew of the xyz option but for some reason they wouldn't stop rotating relative to each other. I never tried the longitude latitude with something up in space, just surface objects.

Thanks! :blue:

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

Re: Tweaking the Death Star orbit and other such thoughts

Post #6by selden » 01.10.2009, 20:16

You're very welcome.
Selden

Topic author
berg
Posts: 7
Joined: 20.09.2009
With us: 15 years 2 months

Re: Tweaking the Death Star orbit and other such thoughts

Post #7by berg » 02.10.2009, 15:23

So right now as i've entered your code, i'm getting the deathstar like inside the atmosphere of earth. I want to put it in an orbit out from earth, yet centered like you have it. any help? I tried to put both the codes together but that didn't work. probably because the Custom orbit overrides the orbit frame right?

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

Re: Tweaking the Death Star orbit and other such thoughts

Post #8by selden » 02.10.2009, 16:33

berg wrote:So right now as i've entered your code, i'm getting the deathstar like inside the atmosphere of earth. I want to put it in an orbit out from earth, yet centered like you have it. any help? I tried to put both the codes together but that didn't work. probably because the Custom orbit overrides the orbit frame right?

That's very strange. Is there any chance you accidentally dropped a 0?
An altitude of 2000 should place its center 2000 km above the surface of the reference object (Earth in this case). That would be well above the Earth's atmosphere.

CustomOrbit is irrelevant: the CustomOrbit specification is valid only for specific planets and moons in our solar system. It's ignored if the specified orbit is not already defined in Celestia's source code.
Selden

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

Re: Tweaking the Death Star orbit and other such thoughts

Post #9by selden » 02.10.2009, 17:10

FWIW, here's what it looks like on my system, along with a Cel URL to take you to this viewpoint.
Be sure to do a copy-and-paste of the ssc info that I provided above, into an SSC file that contains nothing else, so that you don't have to worry about having made typos. Also, make sure that the other SSC files defining DeathStars are not in use. Either rename them so that the filetype is not SSC (I usually use .sscNO) or move them out of Celestia's directory tree (e.g. drag them to the desktop).

URL: DeathStar at Earth
Selden


Return to “Add-on development”