Page 1 of 1
BodyFrame for ScriptedRotation
Posted: 05.04.2007, 10:26
by mjoubert
Hi all,
I use ScriptedRotation to send solar panel attitude. Usually, it's given in local frame. Follow the corresponding ssc definition :
ScriptedRotation
{
Module "rtorbits"
Function "rtattitude"
ObjectID "SOLARPANEL"
}
BodyFrame { BodyFixed { Center "Sol/Earth/MySpacecraft" } }
However, attitude reference frame seems to be J2000 (Earth centered). So I'm currently using a quaternion product to display solar panels properly.
My question is : Is this the expected behaviour? (maybe it's not possible to use a different frame than J2000)
Mathieu (spacebel)
Posted: 05.04.2007, 10:55
by selden
Your example uses a BodyFrame declaration which uses J2000.
Have you tried other BodyFrame declarations?
See
http://en.wikibooks.org/wiki/Celestia/R ... e_property
Posted: 05.04.2007, 11:44
by mjoubert
Hi Selden,
None of other BodyFrame is correct.
When sending quaternion 1 0 0 0 to solar panel object, I'd it to "stick" the spacecraft is refering to. I cannot find a ssc definition that provide this behaviour with ScriptedRotation.
Thank you for your answer.
Posted: 05.04.2007, 17:03
by chris
Mathieu,
What you are doing should be working. The attitude reference frame should be the body fixed frame of the spacecraft. It's possible that there's some strange interaction between ScriptedRotations and reference frames. I will have a chance to test this case later today. It would be useful to see the complete ssc file that you're using.
--Chris
Posted: 06.04.2007, 09:37
by mjoubert
Code: Select all
"MySpacecraft" "Sol/Earth"
{
Class "spacecraft"
Mesh ""
Radius 0.00205
ScriptedOrbit
{
Module "rtorbits"
Function "rtposition"
ObjectID "SATID"
BoundingSphereRadius 10000
}
ScriptedRotation
{
Module "rtorbits"
Function "rtattitude"
ObjectID "SATID"
}
OrbitFrame { EquatorJ2000 { Center "Sol/Earth" } }
BodyFrame { EquatorJ2000 { Center "Sol/Earth" } }
}
"MySpacecraft-mesh" "Sol/Earth/MySpacecraft"
{
Class "spacecraft"
Mesh "MySpacecraft_BODY.3ds"
Radius 0.00205
Albedo 0.7
FixedPosition [-0.00198 -0.000115 0.0]
OrbitFrame { BodyFixed { Center "Sol/Earth/MySpacecraft" } }
FixedRotation { }
BodyFrame { BodyFixed { Center "Sol/Earth/MySpacecraft" } }
}
"MySpacecraft-solarpanel" "Sol/Earth/MySpacecraft"
{
Class "spacecraft"
Mesh ""
Radius 0.004823
Albedo 0.7
FixedPosition [-0.000855 0.0 0.0]
OrbitFrame { BodyFixed { Center "Sol/Earth/MySpacecraft" } }
ScriptedRotation
{
Module "rtorbits"
Function "rtattitude"
ObjectID "SATID-sp"
}
BodyFrame { EquatorJ2000 { Center "Sol/Earth/MySpacecraft" } }
}
"MySpacecraft-solarpanelmesh" "Sol/Earth/MySpacecraft/MySpacecraft-solarpanel"
{
Class "spacecraft"
Mesh "MySpacecraft_solarpanel.3ds"
Radius 0.004823
Albedo 0.7
FixedPosition [-7e-05 0.0 0.0]
OrbitFrame { BodyFixed { Center "Sol/Earth/MySpacecraft/MySpacecraft-solarpanel" } }
FixedRotation { }
BodyFrame { BodyFixed { Center "Sol/Earth/MySpacecraft/MySpacecraft-solarpanel" } }
}
Posted: 10.04.2007, 10:23
by mjoubert
If I replace SriptedRotation by SampledOrientation, everything works well.
So this problem is probably linked to ScriptedRotation.