I've been hunting all over but can't seem to find the "right" tutorial to get me going on this. I want to write a script that will let me view the Earth from somewhere near the L1 point in order to show both the seasonal tilt and why eclipses only happen during certain times of the year.
I found these notes
http://www.lepp.cornell.edu/~seb/celest ... tml#5.10.5
But I can't find anything that tells me how to write a script using this object reference frame, nor have I found any examples.
Can someone give me a clue, or better yet, an example?
TIA,
roland
Newbie trying to use object reference frame totally lost
Newbie trying to use object reference frame totally lost
Roland B. Roberts, PhD
6818 Madeline Court
Brooklyn, NY 11220
6818 Madeline Court
Brooklyn, NY 11220
Let me add some more and maybe someone can help.
I've created a new SSC file in celestia's data directory called "earth_lagrange.ssc" with this content lifted from Seldon's notes:
So how to I look up and use this frame in a celx script? This is wrong, but is the idea I have in mind:
I want to go to the origin of that coordinate system than look at Earth. Help!
TIA,
roland
I've created a new SSC file in celestia's data directory called "earth_lagrange.ssc" with this content lifted from Seldon's notes:
Code: Select all
"Earth L1" "Sol"
{
Radius 4000
Color [ 1 0 0 ]
OrbitFrame {
TwoVector {
Center "Sol/Earth"
Primary {
Axis "x"
RelativePosition {
Observer "Sol/Earth"
Target "Sol"
} }
Secondary {
Axis "y"
RelativeVelocity {
Observer "Sol/Earth"
Target "Sol"
}
}
}
}
# units in AU: they should be KM since this is relative to "Sol/Earth"
# FixedPosition [ 0.01 0 0 ]
# units in km
FixedPosition [ 1500000 0 0 ]
}
So how to I look up and use this frame in a celx script? This is wrong, but is the idea I have in mind:
Code: Select all
obs = celestia:getobserver()
L1 = celestia:newframe("observer", "Earth L1")
pos = obs:getposition()
pos.x = 0
pos.y = 0
pos.z = 0
obs:goto(pos)
earth = celestia:find("Earth")
obs:follow(earth)
flash("Welcome to "..L1:name())
I want to go to the origin of that coordinate system than look at Earth. Help!
TIA,
roland
Roland B. Roberts, PhD
6818 Madeline Court
Brooklyn, NY 11220
6818 Madeline Court
Brooklyn, NY 11220
Okay, I've figured out that what this is really doing is creating an object tied to that reference frame. So now I've got something that kind of works.
with this script
This does almost what I want. The last problem I've got is that fake moon. I really don't want anything at that location; I want the observer to be at that location. Because I've got something sitting there, I end up having it come into my field of view once every orbit due to the way the observer ends up sitting at a fixed offset from the object.
How can I get rid of the object (or make it invisible, or specify my location so it stays on the Earth-side of the object)?
Code: Select all
"Earth-L1" "Sol/Earth"
{
Class "Moon"
#Mesh ""
Color [ 0 0 1 ]
Radius 0.001
OrbitFrame
{
TwoVector
{
Center "Sol/Earth"
Primary
{
Axis "x"
RelativePosition { Target "Sol" }
}
Secondary
{
Axis "y"
RelativeVelocity { Target "Sol" }
}
}
}
FixedPosition [ 1496553.588 0. 0 ]
}
with this script
Code: Select all
obs = celestia:getobserver()
L1 = celestia:find("Earth-L1")
earth = celestia:find("Earth")
sol = celestia:find("Sol")
obs:goto(sol)
wait(5)
obs:goto(earth)
wait(5)
obs:goto(L1)
wait(5)
celestia:flash("Welcome to "..L1:name())
obs:follow(L1)
wait(5)
obs:center(earth)
obs:track(earth)
This does almost what I want. The last problem I've got is that fake moon. I really don't want anything at that location; I want the observer to be at that location. Because I've got something sitting there, I end up having it come into my field of view once every orbit due to the way the observer ends up sitting at a fixed offset from the object.
How can I get rid of the object (or make it invisible, or specify my location so it stays on the Earth-side of the object)?
Roland B. Roberts, PhD
6818 Madeline Court
Brooklyn, NY 11220
6818 Madeline Court
Brooklyn, NY 11220
- Chuft-Captain
- Posts: 1779
- Joined: 18.12.2005
- With us: 18 years 11 months
Code: Select all
Class "Invisible"
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS
-- Gerard K. O'Neill (1969)
CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS