Page 1 of 2
Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 19:30
by Stuffer
Hi all,
I have a problem concerning the orientation of my spacecraft.
As you can see in the pictures the velocity vector neither is normal the yz plane nor within the xz plane.
.
And I'm not able to figure out why it is like that or how I can fix that problem.
Does anyone have an idea?
here's the SSC file I use for this:
Code: Select all
"mySatellite" "Sol/Earth"
{
Class "spacecraft"
# OrbitFrame { BodyFixed { Center "Sol/Earth" }}
Mesh "mySatellite.cmod"
MeshCenter [-15 50 75]
# Texture "solpanel.jpg"
Emissive true
Radius 1000 #0.0007
Beginning "2006 06 07 15:20:00"
EllipticalOrbit
{
# Epoch 2453445.28885625
Period 1
SemiMajorAxis 7877.661
# Eccentricity 0.0008874
Inclination 90 #97.4274
AscendingNode 0# 324.0722
ArgOfPericenter 0 #124.2127
MeanAnomaly 0 #235.9981
}
Obliquity 90 #97.4274 = Inclination
EquatorAscendingNode 90 # = AscendingNode
# RotationOffset 180.0
Orientation [ 90 0 0 1 ]
RotationPeriod 0 #23.9344
Albedo 0.05
}
I need the velocity vector to be normal to the yz-plane (RotationPeriod=0) to get a proper pointing and behavior. (Fixed pointing to earth's centre, fixed pointing to the sun or any star).
Thanks for any help.
Stuffer
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 20:42
by selden
RotationPeriod = 0 means infinite rotation velocity. That's certainly going to mess things up.
[edit]
If you don't want it to rotate (or to rotate very, very slowly), then you need something like
RotationPeriod 1e32
or FixedRotation.
[/edit]
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 20:53
by Stuffer
hm, thanks Selden.
but commenting it out or giving it a value != 0 doesn't change this behavior! I need the velocity to be in the rotation plane --> normal to the z-axis.
I can't imagine why this doesn't work since the body axes seem to be in the right way. Could this be a model problem anyway?
Are all the values I can specify changing the rotation about the z-axis only?
Stuffer
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 20:56
by selden
What is it that you're actually trying to accomplish?
Are you perhaps trying to have one axis of the satellite aligned with the Earth in some way and the solar panels pointed toward the Sun as best they can in spite of the Earth-oriented alignment?
If that's what you're trying to do, I had a mostly-private conversation with ChuftCaptain about something similar tp that. I'll see if I can find it.
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 20:56
by chris
selden wrote:RotationPeriod = 0 means infinite rotation velocity. That's certainly going to mess things up.
If you want the satellite to not rotate (within its reference frame), then you should use a FixedRotation instead of a UniformRotation. You may be able to use just the default parameters, in which case you can replace all of this:
Code: Select all
Obliquity 90 #97.4274 = Inclination
EquatorAscendingNode 90 # = AscendingNode
# RotationOffset 180.0
RotationPeriod 0
with this:
--Chris
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 21:03
by Stuffer
No, I do not want to have it not rotating.
In fact I would like it to point to Earth's center all around its orbit in this case.
Another behavior is that it's fixing a point on earth's surface.
Furthermore I want it to always point to the sun with its solar panels.
Of course these are different scenarios.
When I observe its behavior for some time the velocity vector aligns with the y-axis for a short period. Is it possible that this a reference frame problem?
Thank you very much to both of you.
edit: what I'm trying to accomplish for example is that the antenna points to the earth whereas the solar panels are aligned along the velocity vector meaning one of the body axis should have the same or opposite direction as the vel. vector has. z-axis (rotation axis) normal to velocity. In this case I would need a RotationPeriod of 23.9344 about z.
Stuffer
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 21:39
by chris
Stuffer wrote:No, I do not want to have it not rotating.
...
edit: what I'm trying to accomplish for example is that the antenna points to the earth whereas the solar panels are aligned along the velocity vector meaning one of the body axis should have the same or opposite direction as the vel. vector has. z-axis (rotation axis) normal to velocity. In this case I would need a RotationPeriod of 23.9344 about z.
You can accomplish this most easily by setting up an appropriate reference frame for the spacecraft and keeping the spacecraft fixed within that frame. Assuming that the antenna points along the +y axis and the solar panels are normal to +x:
Code: Select all
BodyFrame {
TwoVector {
Primary {
Axis "y"
RelativePosition {
Target "Sol/Earth"
Observer "Sol/Earth/mySatellite"
}
}
Secondary {
Axis "x"
RelativeVelocity {
Target "Sol/Earth"
Observer "Sol/Earth/mySatellite"
}
}
}
}
--Chris
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 21:52
by selden
I've usually used the TwoVector frame to accomplish something like what you describe.
Here's an example:
Code: Select all
"MySatellite" "Sol/Earth"
{
Class "spacecraft"
NormalizeMesh false
MeshScale 1
Mesh "satellite.3ds"
Radius 100
EllipticalOrbit { SemiMajorAxis 10000 Period 1 Inclination 45}
BodyFrame { BodyFixed { Center "Sol/Earth" } }
FixedRotation { }
}
# Orient satellite so it always points toward the Earth
# with fixed orientation relative to orbit
Modify "MySatellite" "Sol/Earth"
{
BodyFrame
{
TwoVector
{
Center "Sol/Earth/MySatellite"
Primary
{
Axis "-y"
RelativePosition {Target "Sol/Earth"}
}
Secondary
{
Axis "x"
RelativeVelocity {Target "Sol/Earth"}
}
}
}
}
I used Modify because MySatellite needs to be defined before the TwoVector's Center can be specified.
I suspect there's a better way to write this Frame definition.
(Chris, I tried to eliminate the Center and make the TwoVector part of the MySatellite definition, but the satellite doesn't actually get drawn when I do that. Right now I dunno if I made a typo or if its a bug in Celestia.)
If the solar panels are a separate model, they can be oriented relative to the satellite and as nearly face-on to the Sun as the satellite's orbital geometry allows.
Code: Select all
# specify location of 1st solar panel relative to satellite body
"panel_1" "Sol/Earth/MySatellite"
{
Class "component"
NormalizeMesh false
MeshScale 1
Mesh "solar_panel_left.3ds"
Radius 100
OrbitFrame { BodyFixed { Center "Sol/Earth/MySatellite" }}
FixedPosition [ 0 10 -5 ]
BodyFrame { BodyFixed { Center "Sol/Earth/MySatellite" }}
FixedRotation { MeridianAngle -90 }
}
# Orient panel relative to satellite
# and orient front of panel toward sun
Modify "panel_1" "Sol/Earth/MySatellite"
{
BodyFrame
{
TwoVector
{
Center "Sol/Earth/MySatellite/panel_1"
Primary
{
Axis "y"
ConstantVector {
Vector [ 0 0 1]
Frame { BodyFixed { Center "Sol/Earth/MySatellite" }}
}
}
Secondary
{
Axis "-z"
RelativePosition {Target "Sol"}
}
}
}
}
And here's what the bodyframe and velocity vectors look like:
my_satellite.jpg
More information about Frames is available in the Celestia WikiBook.
http://en.wikibooks.org/wiki/Celestia
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 22:37
by Stuffer
Chris, Selden,
Actually I wouldn't call it "most easily"
.
Thanks very much to both of you, anyway.
At least my satellite is now pointing to the center of the earth.
Unfortunately the velocity vector is still not in line with (in my case) the y-axis. It still changes its direction relative to the y-axis along the orbit. It's within the xz-plane though.
Thanks
Stuffer
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 22:54
by Stuffer
I tried to do the same thing replacing RealtivePosition with "Sol" to achieve a target pointing towards sun.
why is it that my satellite always points to the sun with the specified axis, but after half of an orbit it makes a quick (meaning during only a small part of the orbit) rotation about this axis through about 180 degrees? And on the other side of earth it rotates through about 180 degrees again.
And despite FixedRotation{} rotates little through the whole orbit.
Thanks
Stuffer
edit: already fixed the sun/ rotating probelm
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 13.05.2009, 23:57
by chris
Stuffer wrote:edit: already fixed the sun/ rotating probelm
Good to hear this. So what problem remains? Just orienting the model correctly with respect to its body axes?
--Chris
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 00:09
by Stuffer
That the velocity vector is still not fixed related to the body axis.
I observed it for some time and I think the point is that the satellite doesn't follow a circular orbit around earth but it seems to me that it's kind of a sinuous line.
But I'm not clear about why this happens. I only used Selden's SSC where the EllipticalOrbit is a circular orbit (SemiMajorAxis 10000).
edit: Actually it performs kind of an '8' and doesn't orbit around(!) earth at all.
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 00:15
by chris
Stuffer wrote:That the velocity vector is still not fixed related to the body axis.
I observed it for some time and I think the point is that the satellite doesn't follow a circular orbit around earth but it seems to me that it's kind of a sinuous line.
But I'm not clear about why this happens. I only used Selden's SSC where the EllipticalOrbit is a circular orbit (SemiMajorAxis 10000).
edit: Actually it performs kind of an '8' and doesn't orbit around(!) earth at all.
Please post the satellite definition then so I can take a look...
--Chris
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 00:37
by Stuffer
here it is:
Code: Select all
"MySatellite" "Sol/Earth"
{
Class "spacecraft"
NormalizeMesh false
MeshScale 1
Mesh "flyinglaptop.cmod"
MeshCenter [-15 50 75]
Radius 1000
Emissive true
EllipticalOrbit { SemiMajorAxis 10000 Period 1 Inclination 45}
BodyFrame { BodyFixed { Center "Sol/Earth" } }
FixedRotation { }
Orientation [ 90 0 0 1 ]
}
# Orient satellite so it always points toward the Earth
# with fixed orientation relative to orbit
Modify "MySatellite" "Sol/Earth"
{
BodyFrame
{
TwoVector
{
Center "Sol/Earth/MySatellite"
Primary
{
Axis "x"
RelativePosition {Target "Sol/Earth"}
}
Secondary
{
Axis "y"
RelativeVelocity {Target "Sol/Earth"}
}
}
}
}
thanks in advance
Stuffer
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 01:12
by chris
Stuffer wrote:here it is:
thanks in advance
It's working fine for me (though I'm using a different model, of course.) The y-axis points exactly opposite to the velocity vector and the x-axis points at Earth. Which version of Celestia are you using?
--Chris
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 01:15
by Stuffer
I think I was mistaken by the sinuous line. Probably it was working properly but I looked at it with a wrong expectation.
I changed inclination and now it's as I expect it to be again. Sorry for misleading.
But the vel. vector problem still remains.
edit: it's going back and forth with the body axis as kind of a base line. Like a periodic swinging.
I'm currently using 1.5.1
Does this cause the difference?
Stuffer
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 01:24
by Stuffer
can I define a place on earth's surface as target for the provided function? With long/lat?
For a target pointing mode, e.g. for observation reasons.
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 14.05.2009, 06:38
by Chuft-Captain
If you already have the Earth selected (and Location display enabled) then it's possible to use the ENTER menu to select any of the "locations" already defined for Earth.
I think you then should be able to track it as for any other selected object.
(I would assume this is also possible in a script )
EDIT: I forgot to mention that you can of course define your own "Locations" as well.
If this fails, you can always place an object at the required position using an SSC definition and then select that object.
CC
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 15.05.2009, 15:16
by BrianJ
Hi,
sorry to jump in on this thread but I'm having a similar problem regarding spacecraft orientation.
Quick question: Can the "Two Vector frame" be used with a sampled orbit (.xyz file)?
I want my spacecraft to point it's Solar Panels(y-axis)toward the sun, while it's x-axis points along the velocity vector (although x-axis orientation is for convenience/testing purposes)
The orbit .xyz file is referenced to the Earth (works fine).
Here's what I have in my .ssc file:
Code: Select all
"Herschel" "Sol/Earth"
{
Class "spacecraft"
Mesh "herschel.3ds"
Radius 0.004
Beginning "2009 05 14 13:42:00"
Ending "2014 02 06 13:42:00"
SampledOrbit "herschel.xyz"
}
Modify "Herschel" "Sol/Earth"
{
BodyFrame {
TwoVector {
Center "Sol/Earth/Herschel"
Primary {
Axis "y"
RelativePosition { Target "Sol" }
}
Secondary {
Axis "x"
RelativeVelocity { Target "Sol" }
}
}
}
}
The orientation starts off OK (see first image) but after two years simulated time it has drifted off considerably (see second image)
1st image
http://img198.imageshack.us/img198/6607/cel1.jpg2nd image
http://img198.imageshack.us/img198/1740/cel2.jpgAlthough I note that the Sun always remains exactly in the spacecraft x-y plane (just not always on the y-axis!).
Any suggestions as to how I can maintain the y-axis pointing at the Sun?
Many thanks,
Brian
Re: Spacecraft Orientation Problem: Velocity != planes
Posted: 15.05.2009, 15:44
by selden
The position of the object (OrbitFrame + xyz trajectory) is handled separately from the orientation of the object (BodyFrame TwoVector + FixedRotation).