In Kepler:
Given: x0, y0, z0, vx0, vy0 and vz0
I can find Longitude of the Ascending Node(N), inclination(i), Argument of Periapsis(w) and True Anomaly(TA).
I can find the perifocal(the plane of the conic(ellipse, circle, hyperbola or parabola)) coordinates from the above.
rp = x * (Cos(N) * Cos(w) - Sin(N) * Sin(w) * Cos(i)) + y * (Sin(N) * Cos(w) + Cos(N) * Sin(w) * Cos(i)) + z * (Sin(w) * Math.Sin(i))
rq = x * (-Cos(N) * Sin(w) - Sin(N) * Cos(w) * Cos(i)) + y * (-Sin(N) * Sin(w) + Cos(N) * Cos(w) * Cos(i)) + z * (Cos(w) * Sin(i))
rw = x * (Sin(N) * Sin(i)) + y * (-Cos(N) * Sin(i)) + z * (Cos(i))
I get a different answer for the Perifocal if a use the Equations:
rp = r*cos(TA)
rq = r*sin(TA)
rw = 0
How can I reconcile?
Given: x0, y0, z0, vx0, vy0 and vz0
I can find Longitude of the Ascending Node(N), inclination(i), Argument of Periapsis(w) and True Anomaly(TA).
I can find the perifocal(the plane of the conic(ellipse, circle, hyperbola or parabola)) coordinates from the above.
rp = x * (Cos(N) * Cos(w) - Sin(N) * Sin(w) * Cos(i)) + y * (Sin(N) * Cos(w) + Cos(N) * Sin(w) * Cos(i)) + z * (Sin(w) * Math.Sin(i))
rq = x * (-Cos(N) * Sin(w) - Sin(N) * Cos(w) * Cos(i)) + y * (-Sin(N) * Sin(w) + Cos(N) * Cos(w) * Cos(i)) + z * (Cos(w) * Sin(i))
rw = x * (Sin(N) * Sin(i)) + y * (-Cos(N) * Sin(i)) + z * (Cos(i))
I get a different answer for the Perifocal if a use the Equations:
rp = r*cos(TA)
rq = r*sin(TA)
rw = 0
How can I reconcile?