- Joined
- Feb 2, 2012
- Messages
- 1,667
- Reaction score
- 115
- Points
- 78
Hi all,
I am trying to predict the equatorial LAN of a launch.
I don't want to modify it during the ascent, I just want to launch at te exact time to have the correct LAN (with a given inclination).
I did a bit of research and I found that you can now the terrestrial longitude of the ascending node, knowing the current longitude, the current heading and the current latitude, with the formula:
Where delta Lambda is current terrestrial longitude minus lan terrestrial longitude, Delta is current latitude and Beta is current heading.
So if I suppose to launch with azimuth heading 90° delta lambda will be -90° from my current longitude.
So again if I launch from longitude +90° I will have that the terrestrial longitude of AN will be exactly on the position where there is the greenwich meridian in that moment. Then the earth will rotate etc etc, but if I am able to determine the direction of that point towards the vernal equinox I will have done my job, is that correct?
If so, I have tried a couple of things but never had luck.
Like getting the terrestrial longitude of the AN and constructing a vector
_V=(cos(long),0,sin(long))
and the multiplying this vector with the current complete earth rotation matrix (not only Ra, but the complete matrix) and then doing the dot product with _V(1,0,0) [vernal equinox in global coordinates], and then the arcocosine of this to get the number but still no luck...
Could someone help me a bit with that?
:tiphat:
---------- Post added at 12:42 PM ---------- Previous post was at 11:40 AM ----------
actually this code worked quite well for azimuth = 90° (just a test), but it's still off by a few centimals, that's what i don't understand:
I am trying to predict the equatorial LAN of a launch.
I don't want to modify it during the ascent, I just want to launch at te exact time to have the correct LAN (with a given inclination).
I did a bit of research and I found that you can now the terrestrial longitude of the ascending node, knowing the current longitude, the current heading and the current latitude, with the formula:
Where delta Lambda is current terrestrial longitude minus lan terrestrial longitude, Delta is current latitude and Beta is current heading.
So if I suppose to launch with azimuth heading 90° delta lambda will be -90° from my current longitude.
So again if I launch from longitude +90° I will have that the terrestrial longitude of AN will be exactly on the position where there is the greenwich meridian in that moment. Then the earth will rotate etc etc, but if I am able to determine the direction of that point towards the vernal equinox I will have done my job, is that correct?
If so, I have tried a couple of things but never had luck.
Like getting the terrestrial longitude of the AN and constructing a vector
_V=(cos(long),0,sin(long))
and the multiplying this vector with the current complete earth rotation matrix (not only Ra, but the complete matrix) and then doing the dot product with _V(1,0,0) [vernal equinox in global coordinates], and then the arcocosine of this to get the number but still no luck...
Could someone help me a bit with that?
:tiphat:
---------- Post added at 12:42 PM ---------- Previous post was at 11:40 AM ----------
actually this code worked quite well for azimuth = 90° (just a test), but it's still off by a few centimals, that's what i don't understand:
Code:
double lon,lat,rad;
GetEquPos(lon,lat,rad);
double lang=lon-0.5*PI;
VECTOR3 locdir=_V(cos(lang),0,sin(lang));
double w;
w=oapiGetPlanetCurrentRotation(GetSurfaceRef());
MATRIX3 mrot=_M(cos(w),0,-sin(w),0,1,0,sin(w),0,cos(w));
MATRIX3 ra;
oapiGetPlanetObliquityMatrix(GetSurfaceRef(),&ra);
MATRIX3 totrot=mul(ra,mrot);
VECTOR3 globdir=mul(totrot,locdir);
double lan=acos(dotp(globdir,_V(1,0,0)));
sprintf(oapiDebugString(),"lan %.3f",lan*DEG);
