Understanding Rotation in SSC

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
ChrisE
Posts: 2
Joined: 07.01.2009
With us: 15 years 10 months

Understanding Rotation in SSC

Post #1by ChrisE » 07.01.2009, 20:22

I am trying to place objects in orbit around earth with a fixed orientation to the planets surface but dont seem to be able to get it to work under Celestia 1.5.0. My SSC entry looks like this:

"MySat" "Sol/Earth" {
Class "spacecraft"
Mesh "MySat.3ds"
Radius 0.015

Beginning xxxxxxx

Orientation [ 90 0 0 1]

this is followed by the elliptical orbit info. etc.

I have played around with the orientation values but it always seem to orient on the sun rather than the earth. How do I tell celestia that these values apply to orientation in relationship to the earth and not the sun? I use the same SSC (minus the orientation line) in Celestia 1.4.1. Is there a way to specify orientation in that version? Seems the sats stay oriented on some far off point in space.

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

Re: Understanding Rotation in SSC

Post #2by selden » 07.01.2009, 22:34

If you haven't already done so, you should upgrade to Celestia v1.5.1. It includes several important bug fixes.

Orientation is relative to Celestia's internal coordinate system, which is equivalent to the J2000 Ecliptic coordinate system.

If you want the orientation of a body to be fixed relative to the object that it orbits around, i.e. if you want it to be tidally locked, then you should just omit all rotation specifications: tidally locked is the default.

e.g.

Code: Select all

"MySat" "Sol/Earth" {
Class "spacecraft"
Mesh "MySat.3ds"
Radius 0.015
EllipticalOrbit { SemiMajorAxis 10000 Period 1 }
}
Selden

Topic author
ChrisE
Posts: 2
Joined: 07.01.2009
With us: 15 years 10 months

Re: Understanding Rotation in SSC

Post #3by ChrisE » 08.01.2009, 16:06

Thanks Seldon, that pointed me in the right direction. While removing the rotational information in 1.4.1 actually caused the sats to disappear, it did point me in the right direction. Turns out the "RotationPeriod" was set to a value for Solar Orientation. By changing it to 23.9344 I now have the satellites orbiting around earth and maintaining their current orientation in relation to earth (acutually, ove rthe span of 6 months there is a noticiable "slip" so I need to play with that value). Unfortunately the orientations are not correct. Further, since I am using the KDE version of celestia I can not use the --VERBOSE option in edit to show me the correct values, so I guess I will just have to tweak until I get it right.

As for using 1.5 that is an option I am trying to avoid. In essence what I did was started with 1.4.1 and Tim Currey's realtime modifications. After numerous tweaks I now have celestia interfaced with an external satellite simulation and celestia graphically displays my satellites and shows communications occuring between satellites and ground stations. It's all very cool looking. Unfortunately, while 1.5 is an upgrade it also drastically alters render.cpp and the way things are drawn. I have looked at it and trying to fit my enhancements into 1.5 would take a lot of work, whereas simply fixing the orientation problems in 1.4.1 will finish my project. Thanks again for the help.

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: Understanding Rotation in SSC

Post #4by Chuft-Captain » 08.01.2009, 16:21

Subject: Understanding Rotation in SSC

ChrisE wrote:Thanks Seldon, that pointed me in the right direction. While removing the rotational information in 1.4.1 actually caused the sats to disappear, it did point me in the right direction. Turns out the "RotationPeriod" was set to a value for Solar Orientation. By changing it to 23.9344 I now have the satellites orbiting around earth and maintaining their current orientation in relation to earth (acutually, ove rthe span of 6 months there is a noticiable "slip" so I need to play with that value). Unfortunately the orientations are not correct. Further, since I am using the KDE version of celestia I can not use the --VERBOSE option in edit to show me the correct values, so I guess I will just have to tweak until I get it right.

As for using 1.5 that is an option I am trying to avoid. In essence what I did was started with 1.4.1 and Tim Currey's realtime modifications. After numerous tweaks I now have celestia interfaced with an external satellite simulation and celestia graphically displays my satellites and shows communications occuring between satellites and ground stations. It's all very cool looking. Unfortunately, while 1.5 is an upgrade it also drastically alters render.cpp and the way things are drawn. I have looked at it and trying to fit my enhancements into 1.5 would take a lot of work, whereas simply fixing the orientation problems in 1.4.1 will finish my project. Thanks again for the help.
You're certainly IMO "doing it the hard way" by sticking to 1.4.1 (I know this from experience). Whilst this is understandable if you have written a lot of code you don't want to break, I suspect the amount of time you have to spend struggling with issues like this in 1.4.1 probably exceeds the effort which would be involved in upgrading to 1.5.x or 1.6.x where these issues become relatively trivial.

CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: Understanding Rotation in SSC

Post #5by Chuft-Captain » 10.01.2009, 05:34

Chuft-Captain wrote:Subject: Understanding Rotation in SSC

ChrisE wrote:Thanks Seldon, that pointed me in the right direction. While removing the rotational information in 1.4.1 actually caused the sats to disappear, it did point me in the right direction. Turns out the "RotationPeriod" was set to a value for Solar Orientation. By changing it to 23.9344 I now have the satellites orbiting around earth and maintaining their current orientation in relation to earth (acutually, ove rthe span of 6 months there is a noticiable "slip" so I need to play with that value). Unfortunately the orientations are not correct. Further, since I am using the KDE version of celestia I can not use the --VERBOSE option in edit to show me the correct values, so I guess I will just have to tweak until I get it right.

As for using 1.5 that is an option I am trying to avoid. In essence what I did was started with 1.4.1 and Tim Currey's realtime modifications. After numerous tweaks I now have celestia interfaced with an external satellite simulation and celestia graphically displays my satellites and shows communications occuring between satellites and ground stations. It's all very cool looking. Unfortunately, while 1.5 is an upgrade it also drastically alters render.cpp and the way things are drawn. I have looked at it and trying to fit my enhancements into 1.5 would take a lot of work, whereas simply fixing the orientation problems in 1.4.1 will finish my project. Thanks again for the help.
You're certainly IMO "doing it the hard way" by sticking to 1.4.1 (I know this from experience). Whilst this is understandable if you have written a lot of code you don't want to break, I suspect the amount of time you have to spend struggling with issues like this in 1.4.1 probably exceeds the effort which would be involved in upgrading to 1.5.x or 1.6.x where these issues become relatively trivial.

CC
To demonstrate the capabilities of 1.5.1 see this video I created: A satellite in Earth orbit with articulated solar panels

Notice that the satellite body maintains it's orientation in relation to earth, while it's solar panels track the sun.

This is fairly straightforward in 1.5.x and above.

CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS


Return to “Development”