Page 1 of 2

Making Orion Dock at Space Station V

Posted: 14.01.2006, 11:02
by Chuft-Captain
What I'm trying to do is to make the Orion spacecraft travel from it's original position to Space Station V over a period of ~ 5 minutes, as shown by the red line in the picture:
Image

The original position is a "fixed" orbit around Space Station V described by:
"Space Station V" "Sol/Earth-Moon/Earth"
{
Class "spacecraft"
Beginning "2001 01 01 12:00:00"
Mesh "stationV_new.3ds" # Jens's latest mesh - great detail
Radius 0.15 #150m radius generates lunar gravity at rim

EllipticalOrbit {
Period 0.063
SemiMajorAxis 6700 #200 miles altitude
}


Obliquity 90
RotationPeriod -0.017 #one minute rotation period

Albedo 0.10
}

"Orion" "Sol/Earth-Moon/Earth/Space Station V"
{
Class "spacecraft"
Beginning "2001 01 01 12:00:00"
Ending "2001 01 01 12:00:15" #Make it disappear when the flight begins
Mesh "orion2.3ds"
Radius 0.020

EllipticalOrbit {
Period 1.0e12
SemiMajorAxis 1.0 # 1 km
Inclination 90
MeanAnomaly -90
}

Orientation [180 1 0 0]
RotationPeriod -0.017 #matched with station

Albedo 0.80
}

I've tried generating an XYZ file with XYZ Builder, and adding the following to the .SSC file:
"OrionInFlight" "Sol/Earth-Moon/Earth/Space Station V"
{
Class "spacecraft"
Beginning "2001 01 01 12:00:15" # Appears when flight begins
Ending "2001 01 01 12:06:00" # Disappears when flight ends
Mesh "orion2.3ds"
Radius 0.020

#SampledOrbit "orionflightinterpolated.xyz"
SampledOrbit "fly.xyz"

Orientation [180 1 0 0]
RotationPeriod -0.017 #matched with station

Albedo 0.80
}

"OrionDocked" "Sol/Earth-Moon/Earth/Space Station V"
{
Class "spacecraft"
# Appears in the docking bay when flight ends:
Beginning "2001 01 01 12:06:00"
Mesh "orion2.3ds"
Radius 0.020

EllipticalOrbit {
Period 1.0e12
SemiMajorAxis 0.05
Inclination 90
MeanAnomaly -90
}

Orientation [180 1 0 0]
RotationPeriod -0.017 #matched with station

Albedo 0.80
}


but, the "OrionInFlight" object (controlled by the XYZ file) always appears about 0.99 AU's away and is moving much too fast relative to the Space Station.
I suspect it's to do with selecting the appropriate frames of reference when generating the XYZ, but I don't know the correct way to do this. Also I believe that XYZ's work in units of micro-light-yrs, so may not be accurate enough for this task, even if I can get it in the right place.
The other bits work perfectly, it's just the XYZ that doesn't work.

Can anyone offer any advice, or any other way to achieve what I want?
Another approach I considered is described here:
http://celestiaproject.net/forum/viewtopic.php ... highlight=

I'm getting desparate for a solution!

Posted: 20.04.2006, 13:22
by osmium
Hi Chuft-captain,

Did you have any luck with this in the end?

I would love to see it in Celestia with the stereo pumping ol' Johanns' classic :wink:

Cheers

osmium

Posted: 20.04.2006, 16:46
by Chuft-Captain
Osmium,

Gave up on the XYZ approach, but did find another way of doing it:

http://celestiaproject.net/forum/viewtopic.php ... ght=#66980

Posted: 20.04.2006, 22:42
by jestr
Hi Chuft,I dont think the xyz option will be accurate enough as you found out.One way to acheive this though (maybe how you did it in the end),would be to make a simple animation of this.Having many different definitions of the Orion at different time intervals,starting with it away from the station and finishing with it docked in the landing bay.The main drawback to this is that it can only happen once at a specific time,but the code should be quite simple if you define Orion's position using LongLat varying over time.If you have a starting position of 1km from the station,and the start time today (April 20 12:00:00 UTC),The first definition should look like this

Code: Select all


"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 1 ]
   Orientation      [180 1 0 0]
   Albedo 0.01
}



Say,it takes 1 minute to dock,then the end definition should be like this

Code: Select all


"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846.00069
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 -0.095 ]
   Orientation      [180 1 0 0]
   Albedo 0.01
}



Then simply add an Ending time to the start definition and if you want a smooth progression between the two positions add as many frames as you want in between,moving the Orion's "height" from the Station V model by adjusting the z component of the LongLat line.Hope this helps,Jestr

ps,here's the code for the docking with three steps on the way,every 15 secs,and a definition for the craft before the animation starts.Obviously with 15 second intervals the Orion jumps about pretty oddly,but with enough steps in between there is no reason why it shouldnt look quite smooth

Code: Select all


"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Ending 2453846.0
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 1 ]
   Orientation [180 1 0 0]
   Albedo 0.01
}


"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846.0
   Ending 2453846.0001725
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 1 ]
   Orientation [180 1 0 0]
   Albedo 0.01
}

"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846.0001725
   Ending 2453846.000345
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 0.72625 ]
   Orientation [180 1 0 0]
   Albedo 0.01
}

"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846.000345
   Ending 2453846.0005175
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 0.4525 ]
   Orientation [180 1 0 0]
   Albedo 0.01
}

"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846.0005175
   Ending 2453846.00069
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 0.17875 ]
   Orientation [180 1 0 0]
   Albedo 0.01
}

"Orion" "Sol/Earth/Space Station V"
{
   Class "spacecraft"
   Beginning 2453846.00069
   Mesh "orion.3ds"
   Radius 0.020
   LongLat [ 90 -90 -0.095 ]
   Orientation [180 1 0 0]
   Albedo 0.01
}



Cheers,Jestr

Posted: 21.04.2006, 12:10
by osmium
Oh Man!

Please give me some time to digest all of that!

(Quantum leap in learning here...phew!) :o

Cheers

Osmium

Posted: 21.04.2006, 12:59
by selden
Think of it as Celestia's version of "page flipping" animation.

Posted: 21.04.2006, 14:39
by Chuft-Captain
jestr wrote:Hi Chuft,I dont think the xyz option will be accurate enough as you found out.One way to acheive this though (maybe how you did it in the end),would be to make a simple animation of this.Having many different definitions of the Orion at different time intervals,starting with it away from the station and finishing with it docked in the landing bay.The main drawback to this is that it can only happen once at a specific time,but the code should be quite simple if you define Orion's position using LongLat varying over time.If you have a starting position of 1km from the station,and the start time today (April 20 12:00:00 UTC),.....

Yep,
That looks like pretty much what I did Jestr (except I adjusted SemiMajorAxis, rather than LongLat...but same result). It's not exactly an elegant or permanent solution, and only really practical for very simple trajectories, (unless you're really into maths :wink:), but if a small enough timeslice is used will give a smooth animation, and at least it is accurate to the meter. EDIT: from memory, I think I generated a "frame-rate" (or to use Selden's terminology: a "flip"-rate) of 15fps, which is fast enough to fool the human eye.
Interestingly Jestr, you seem to have found a way to re-use the "Orion" name for each frame. (It was a while ago that I did this, but I seem to remember I had problems with that, and had to generate a separate name for each frame as you can see...maybe that was a 1.3.2 limitation --- I'm not sure)

Osmium, if you want to try this it's here: http://traitorsclaw.sitesled.com/downloads.html

Posted: 22.04.2006, 12:43
by osmium
....Okay I have downloaded your script. I now have to put it somewhere then select said spacecraft and spacestation( which ,yes I have already downloaded and working) and select the time jestr mentioned. will give it a shot. time to study Seldens "not so brief intro to addons" in depth...

let you know how I go..

Cheers

Osmium

Posted: 22.04.2006, 14:51
by Chuft-Captain
osmium wrote:....Okay I have downloaded your script. I now have to put it somewhere then select said spacecraft and spacestation( which ,yes I have already downloaded and working) and select the time jestr mentioned. will give it a shot. time to study Seldens "not so brief intro to addons" in depth...

let you know how I go..

Cheers

Osmium


Just rename or backup the existing SpaceStationV.ssc and replace it with my one.

NOTE: You'll need to set the date to "2001 01 01 12:00:00" rather than the date Jestr suggested if you want to see the animation.

Posted: 28.04.2006, 02:31
by fsgregs
Chuft-Captain:

Congratulations! Your ssc file works great and the effect is awesome. One point, however. The first Orion entry calls for a model mesh named "celestia1-warp.3ds". This is a mesh which depicts the Celestia 1, our educational spaceship that was designed from the original Orion mesh. That name has to be changed in the ssc file to "orion2.3ds", and users must make sure they have the orion2.3ds mesh in their models folder.

:)

Frank

Posted: 28.04.2006, 17:17
by Chuft-Captain
Frank,

Thanks very much for the feedback. I've corrected the mesh name.
I've also changed the radius of Orion in my SSC to make it smaller (so that it doesn't punch a hole with it's nose into the back wall of the Space Station's docking bay :x )

and I've used Jestr's approach of re-using the "Orion" name for each step...seems to work OK in 1.4.x anyway. (thanks Jestr)


Downloadable from same place as before: http://traitorsclaw.sitesled.com/downloads.html

Here: http://traitorsclaw.sitesled.com/videos.html you will find a short movie of the last 40 seconds or so of flight viewed from within the docking bay (plays back at approx. 2.5x actual speed)...
Image


Let me know what you think...
CC

Posted: 09.05.2006, 15:46
by Chuft-Captain
For anyone who's already downloaded the SSC file above, I've added a celURL to the download page that will take you to the viewpoint as seen in the video clip above.

Hope this is useful.
CC

Posted: 09.05.2006, 19:59
by fsgregs
Chuft-Captain:

Thanks for the cel:url. Unfortunately, I cannot get the avi video file to play on either Windows media player 10, or Irfanview. In both cases, I get a "codec" error, even if I download it and try playing it externally. is it possible the file is corrupted, or does anyone else know why it doesn't play?

Frank

Posted: 09.05.2006, 21:48
by jestr
Frank,it works OK for me,but I think you need the Divx5.0 codec installed on your machine to play it,Jestr

Posted: 09.05.2006, 22:56
by Chuft-Captain
fsgregs wrote:Chuft-Captain:

Thanks for the cel:url. Unfortunately, I cannot get the avi video file to play on either Windows media player 10, or Irfanview. In both cases, I get a "codec" error, even if I download it and try playing it externally. is it possible the file is corrupted, or does anyone else know why it doesn't play?

Frank

Frank,

Jestr's correct, but I just put the video there as a preview, so I wouldn't worry about the video if I was you. It's very low quality compared to viewing it in Celestia.
If you've downloaded the SSC, then I suggest you use the CelURL to see it in Celestia. Of course, you can also capture your own video from whatever viewpoint you want, using whatever codec(s) you already have installed on your machine.

Does that make sense?

Posted: 12.06.2006, 22:42
by Chuft-Captain
Hi folks,

Yahoo/Geocities very kindly :evil: deleted my website, so some or all of the links in this thread will no longer work.

The Space Station V download is now here: http://traitorsclaw.sitesled.com/downloads.html

Anything else should be accessible from the link in my signature below.

Any probs. let me know by PM or email.

Re: Making Orion Dock at Space Station V

Posted: 17.12.2008, 10:51
by ANDREA
Hello Chuff, sorry for troubling, but the link to your Orion ssc file looks broken. :(
Could you please give a new link, or, if you want, PM me the file?
Thanks a lot.
Bye

Andrea :D

Re: Making Orion Dock at Space Station V

Posted: 17.12.2008, 12:57
by Chuft-Captain
ANDREA wrote:Hello Chuff, sorry for troubling, but the link to your Orion ssc file looks broken. :(
Could you please give a new link, or, if you want, PM me the file?
Thanks a lot.
Bye

Andrea :D
Hi Andrea,

Sorry. A while ago my website got deleted by SITESLED and I haven't had the time or inclination to restore it.
I probably have the original file somewhere, and I could PM / email to you if you really want it, however the technique I used at the time is definitely not recommended. (It was when I was new to Celestia, and before I understood how to construct XYZ trajectories, which is actually the CORRECT way to do it).

The SSC used several thousand individual "keyframes", each with a separate object.
The same result can very easily be achieved with an XYZ file containing just 2 lines:
(1. Start position/time, and 2. End position/time )
This also allows the vehicle to be followed, sync'd, tracked, etc, which was difficult with the old approach.

I strongly suggest you use an XYZ. I'm sure that you're capable of this, but if you want advice, just let me know.

Regards
CC.

Re: Making Orion Dock at Space Station V

Posted: 17.12.2008, 14:28
by fsgregs
Andrea:
As part of his 2001 add-on, Linuxman has the Orion docking with the space station using a two line xyz file. It is very smooth. The add-on with models and all files is available at his website, at http://celestiasws.free.fr/index_en.html

FYI

Frank

Re: Making Orion Dock at Space Station V

Posted: 17.12.2008, 14:51
by ANDREA
Chuff, thank you for your suggestion to use an xyz file, but I never tried them, so I should start from beginning, this means a lot of time for me.
So I followed Frank's suggestion, and I'm downloading linuxm@n's addon. :wink:
Hope this will solve my needs.
So many thanks to both of you.
Bye

Andrea :D