Lunar Terminator Shadow Orientation

All about writing scripts for Celestia in Lua and the .cel system
Topic author
rbroberts
Posts: 23
Joined: 05.11.2006
With us: 17 years 6 months
Location: Brooklyn, NY

Lunar Terminator Shadow Orientation

Post #1by rbroberts » 28.03.2008, 20:40

I'm trying to get a reference frame to show the Lunar Libration. I'm 99% of the way there with this:

Code: Select all

"LEO Moon Track" "Sol/Earth" {
  Class  "Invisible"
  Radius 0.001

  OrbitFrame {
    TwoVector {
      Center  "Sol/Earth"
      Primary {
        Axis "x"
        RelativePosition { Target "Sol/Earth/Moon" }
      }
      Secondary {
        Axis "y"
        RelativeVelocity { Target "Sol/Earth/Moon" }
      }
    }
  }

  BodyFrame {
    TwoVector {
      Center  "Sol/Earth"
      Primary {
        Axis "x"
        RelativePosition { Target "Sol" }
      }
      Secondary {
        Axis "y"
        RelativeVelocity { Target "Sol/Earth" }
      }
    }
  }

  FixedPosition [ 7000.0 0. 0]
  RelativeVelocity { Target "Sol/Earth/Moon" }
}


When I go to this location, then center and track the moon, I can see both the effect of libration and the changing distance. But....

I am trying to orient myself so the lunar terminator is always "vertical" in my field of view; i.e., the northern-most and southern-most points for a vertical line. I thought that's what I had with the above bodyframe. But it's obvious when watching that the line it sweeps out is often not vertical and this can be seen at some quarter-phases most clearly.

How can I define this frame?

roland
Roland B. Roberts, PhD
6818 Madeline Court
Brooklyn, NY 11220

Return to “Scripting”