Jump to content

Darkvidor

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

1 Neutral
  1. Nooo Well, I will try to solve it myself. I'll post the corrected formulas here if I succeed. Thank you anyway! Edit: Turns out I made a mistake when I entered the formulas to generate my points. Here are Yasmy's equations in a readable form. Circular equatorial orbit of radius r with angular speed omega, inclination phi0 and longitude of ascending node lambda0: x(t) = r*cos(omega*t) y(t) = r*sin(omega*t) z(t) = 0 Note that omega = 2*Pi/T = sqrt(G*M/a3) with T the orbital period, G the gravitational constant, M the mass of the body and a the radius of the circular orbit. Rotation around the x axis to change inclination to phi0 by the transformation: x -> x y -> y*cos(phi0) - z*sin(phi0) z -> y*sin(phi0) + z*cos(phi0) This gives us: x(t) = r*cos(omega*t) y(t) = r*sin(omega*t)*cos(phi0) z(t) = r*sin(omega*t)*sin(phi0) Rotation around the z axis to change longitude of ascending node to lambda0 by the transformation: x -> x*cos(lambda0) - y*sin(lambda0) y -> x*sin(lambda0) + y*cos(lambda0) z -> z That gives us: x(t) = r*cos(omega*t)*cos(lambda0) - r*sin(omega*t)*cos(phi0)*sin(lambda0) y(t) = r*cos(omega*t)*sin(lambda0) + r*sin(omega*t)*cos(phi0)*cos(lambda0) z(t) = r*sin(omega*t)*sin(phi0) We finally have: phi(t) = sin-1(z(t)/r) = sin-1(sin(omega*t)*sin(phi0)) lambda(t) = tan-1(y(t)/x(t)) = tan-1((cos(omega*t)*sin(lambda0) + sin(omega*t)*cos(phi0)*cos(lambda0)) / (cos(omega*t)*cos(lambda0) - sin(omega*t)*cos(phi0)*sin(lambda0))) And remember to use atan2(y,x) when possible to dissipate any sign ambiguity. To have the coordinates of the orbiting object on the surface of the body, apply the transformation: lambda(t) -> lambda(t) - omegab*t (With omegab the angular speed of the body's surface.)
  2. Hello everybody, I may have missed something, but what I assume are greek characters in this thread are displayed to me as a mangle of characters (for example "Ãâ€" for what appears to be Lambda and "ÃŽÂ" for what seems to be Phi. Is there a way to display those characters appropriately? Anyway, I didn't wait for a solution and tried to implement Yasmy's formulas in one of my projects by identifying the characters and decyphering the formulas. It mostly works, I have all the orbital paths I want, except when my ascending node is set too close to Pi/4 mod(Pi/2) (ie 45°, 135°, etc) where I get non-sensical orbits. I tried to debug the formulas but the display errors makes it very difficult. Below is an example of the problem I am running into; there are three curves, one of which is pretty and has ascending node at 0°, and the ugly ones are close to 45° and -45°.
×
×
  • Create New...