![]() |
|
#1
|
|||
|
|||
![]()
Hello
Ok this is a difficult one (well for me any way) How do you calculate an objects heilocentric co-ordinates (x,y,z with the sun at the center) of an object given its Epoch,a,e,i,w,Node,M values ? Any pointers will help even if its just a weblink This is what I have so far in c++ double T,au,e,i,omega,n,w,M,F,G,H,P,Q,R,A,B,C,a,b,c = 0.0; CString temp; m_a.GetWindowText(temp); au = atof(temp); m_t.GetWindowText(temp); T = atof(temp); m_e.GetWindowText(temp); e = atof(temp); m_i.GetWindowText(temp); i = atof(temp); m_omega.GetWindowText(temp); omega = atof(temp); m_w.GetWindowText(temp); w = atof(temp); m_n.GetWindowText(temp); n = atof(temp); F = cos(omega * DegRad); G = (sin(omega * DegRad) * 0.917482062); H = (sin(omega * DegRad) * 0.397777156); P = -sin(omega * DegRad) * cos(i * DegRad); Q = (cos(omega * DegRad) * cos(i * DegRad) * 0.917482062) - (sin(i * DegRad) * 0.397777156); R = (cos(omega * DegRad) * cos(i * DegRad) * 0.397777156) + (sin(i * DegRad) * 0.917482062); A = rev(atan2(F,P) * RadDeg); B = rev(atan2(G,Q) * RadDeg); C = rev(atan2(H,R) * RadDeg); a = sqrt(F*F + P*P); b = sqrt(G*G + Q*Q); c = sqrt(H*H + R*R); n = 0.9856076696 / (au * sqrt(au)); M = T * n; double E0 = M; double E1 = E0 + ((M + (e * RadDeg) * sin(E0 * DegRad) - E0) / (1 - e * cos(E0 * DegRad))); double E2 = E1 + ((M + (e * RadDeg) * sin(E1 * DegRad) - E1) / (1 - e * cos(E1 * DegRad))); double E3 = E2 + ((M + (e * RadDeg) * sin(E2 * DegRad) - E2) / (1 - e * cos(E2 * DegRad))); double E4 = E3 + ((M + (e * RadDeg) * sin(E3 * DegRad) - E3) / (1 - e * cos(E3 * DegRad))); double x = au * (cos(E4 * DegRad) - e); double y = au * sqrt(1 - e*e) * sin(E4 *DegRad); double v = atan2(y,x); v = v * RadDeg; double r = au * ( 1 - e * cos(E4 * DegRad) ); double X = r * a * sin((A + w + v) * DegRad); double Y = r * b * sin((B + w + v) * DegRad); double Z = r * c * sin((C + w + v) * DegRad); temp.Format("%f",X); m_x.SetWindowText(temp); temp.Format("%f",Y); m_y.SetWindowText(temp); temp.Format("%f",Z); m_z.SetWindowText(temp); |
#2
|
|||
|
|||
![]()
james wrote:
Hello Ok this is a difficult one (well for me any way) How do you calculate an objects heilocentric co-ordinates (x,y,z with the sun at the center) of an object given its Epoch,a,e,i,w,Node,M values ? Hi, One (immodest) suggestion , Go to http://www.mkas.org.uk/planetfinder.htm and do a "view source" on the page. I have implemented routines by Paul Schlyter and there is a pointer to his site which explains it all. All the best, JK. |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hans Moravec's Original Rotovator Paper | James Bowery | Policy | 0 | July 6th 04 07:45 AM |
Need orbital elements at ET sep | Ian J. E. Jordan | Space Shuttle | 1 | April 2nd 04 07:38 PM |
Natural Satellites Orbital Elements | Pasquale Tricarico | Astronomy Misc | 0 | November 29th 03 11:50 PM |
Three aerospace innovators Lockheed Martin, Northrop Grumman and Orbital Sciences Combine strengths to design and build NASA's Orbital Space Plane | Jacques van Oene | Space Shuttle | 1 | October 15th 03 12:21 AM |
Three aerospace innovators Lockheed Martin, Northrop Grumman and Orbital Sciences Combine strengths to design and build NASA's Orbital Space Plane | Jacques van Oene | Space Station | 0 | October 14th 03 03:31 PM |