LEO to GEO orbit design project report.
Nasser Abbasi
May 23, 2003
Inject spacecraft directly into circular parking orbit of altitude 100km. At
burnout flight path angle is zero and velocity is
.
Even though launch at equator (line of nodes), Orbit has an undesired
inclination in the geocentric frame and longitude of ascending node
.
Need to correct this inclination so that you may rendezvous with a satellite
in the GEO (35,860 km) on the equatorial plane with zero inclination.
This target satellite was
behind you at the time you entered your parking orbit of 100 km.
After you rendezvous with the first satellite, you need to transfer to a
second satellite in GEO which was
ahead of you at time you entered your parking orbit.
Finally after making one complete orbit with this second satellite you need to
take your final position in GEO which is another
ahead of the second satellite.
Design the above sequence. You may opt to minimize the time to complete or the
fuel needed
.
Specify your design criteria.
No drag while in LEO orbit. This allows the spacecraft to orbit as many times as needed to improve rendezvous conditions with the first target in GEO.
All impulses applied are assumed to have infinitely small time durations.
In addition, all assumptions used to derived Kepler equation apply as well.
Launch site latitude effect on
are ignored. In practice,
requirement need to be modified by small magnitude depending on the launch
site location on the surface of the earth.
The geometry of the problem is illustrated in the figure below, which depicts
the state of the system at
.
The time the space vehicle enters its parking orbit at burn out
.

The analysis part will show an outline of the maneuvers to achieve the goal of the project.
The criteria for selecting the manoeuvring sequence is:
which directly relates to the minimization of the
Now, we will show each phase of the manoeuvre, with different scenarios to achieve each phase. Before starting, there are common calculations that will be done now that will be shared by many scenarios, so that we do not have to re-calculate these each time.
For the Hohmann transfer from LEO to GEO:
Let
be the speed on the Hohmann orbit at the perigee point.
Let
be the speed on the Hohmann orbit at the apogee point.
Let
be the semimajor axis for the Hohmann orbit.
Let
be the period of the Hohmann orbit.
For the LEO and GEO orbits:
Let
be the speed on the LEO orbit.
Let
be the speed on the GEO orbit.
Let
be the radius of the LEO orbit.
Let
be the radius of the GEO orbit.
Let
be the period of the LEO orbit
let
be the period of the GEO orbit
Then
km
km
km
but
so,
km/sec
km/hr
but
so,
km/sec
km/hr
km/sec
km/hr
km/
km/hr
km. Hence
km.
sec = 1 hr 26 minutes and 28 seconds.
sec = 23 hrs and 59 minutes and 50 seconds.
sec
hr
30 min 22 seconds
The problem is that we are given two non-coplanar circular orbits of different radices. A LEO orbit that is inclined at an angle to the plane of another, and larger circular GEO orbit.
We wish to transfer from the inclined
(
LEO
orbit to the equatorial
(
GEO orbit.
We must correct the plane inclination to be able to transfer to the desired GEO orbit.
There are 3 possible ways to achieve this Note_1 :
Correct all of the plane inclination before performing a Hohmann transfer from LEO to GEO. In other words, all of the inclination correction is made at the perigee of the Hohmann ellipse where the Hohmann transfer speed is largest. This will turn out to be the most fuel costly maneuver.
First perform a Hohmann transfer to transfer from the inclined LEO orbit to an
inclined GEO orbit, and then apply all of the plane inclination correction at
the apogee of the Hohmann elliptical orbit where the ellipse speed will be
smallest. This is less costly in
than
the above sequence, and is a common maneuver.
Apply a small and partial plane inclination correction (say an angle
at the perigee of the Hohmann orbit, then apply the remaining inclination
correction (angle
)
at the apogee. Notice that for
,
this case becomes the same as case (2) above.
Now, we will analyze each case above in details and find the
for each case and select the maneuver with the smallest
Move from the initial circular parking orbit (which has
degrees inclination) to a new circular orbit of the same radius but on the
equatorial
(
degrees inclination). This requires one impulse to adjust the inclination.
This impulse applied at the point where the parking orbit intersects the
equator (line of nodes).
Next, and immediately, apply a coplanar Hohmann transfer (2 impulses) to transfer from the LEO orbit to the outer GEO orbit. (We Can combine the inclination correction velocity impulse vector with the first Hohmann velocity impulse vector using vector additions.)
This is illustrated in figure below.

To find impulse 1:
hence,

To
find impulse 2:
(speed up).
To find impulse 3:
(speed up).
Hence, total impulses is found by summing the above
Transfer from the initial LEO orbit (which has
degrees inclination) to a GEO orbit at
km altitude (which still has a
degrees inclination). This is achieved using a normal Hohmann transfer (2
impulses). Next, perform an orbit plane inclination correction (one impulse)
to move into the equatorial
(
degrees inclination) GEO circular orbit on which the first target is currently
orbiting.
This is illustrated in figure below.

To find impulse 1:

To
find impulse 2:
(speed
up).
To find impulse 3:

Hence,
total impulses is founding by summing the above Total
In this scenario, we will apply a partial orbit plane correction at the perigee and the remaining correction at the apogee. See figure below.

At the perigee of the Hohmann transfer, apply the law of the cosines to obtain
To find the minimum
for a given
,
take
as the independent variable, and minimize
as a function of
Hence solve
Let
Hence for minimum
Hence
Then
let
This is a non-linear equation in
.
I Solved for
using Newton root finding method. Hence need to find
To solve for
I wrote a MATLAB function that uses Newton root finding method to find the
root of
for a given
where
is the total angle (in degrees) of the inclination of the first circular orbit
relative to the second circular orbit, and
is the gravitational constant.
The function returns back the angle
for which
is minimum.
For an initial guess for
,
and since
is expected to be small compared to
,
I selected
.
Apply Newton iterative root finding:
The tricky part in this problem was finding a good initial guess for the root (common problem with using Newton roots finding method).
I had to try different values for an initial guess before the root was
converged to. For example, when I selected
to be
of
,
Newton method did not converge to the root. Selecting
to be close to where one expects it to be (which is a small value compared to
)
did work and a root was found.
For this design project, we are given that
Using this matlab function Note_2
I found that
is the solution. Hence, this is the angle I will use for the correction to apply at the perigee.
So, at the perigee, Apply a correction of
angle, and at the apogee, apply a correction of
.
To find the impulse needed to correct inclination at the perigee and transfer
from LEO to a Hohmann orbit with a correction of
so,
km/sec
km/hr
To find impulse needed to correct inclination at the apogee and transfer from
Hohmann to the GEO orbit for an angle
so,
km/sec
km/hr
So, for this scenario, total
is given
by
Comparing the
from the above 3 scenarios, we see this:
scenario 1:
km/sec
scenario 2:
km/sec
scenario 3:
km/sec
So, we can see that splitting the plane correction between the perigee and the apogee points leads to a more economical maneuver.
The vehicle was at the lines of node at
,
hence the time to reach GEO orbit is half the period of the Hohmann transfer
orbit.
The above time is the same regardless if we inject at one end of the lines of nodes or at the other end. Also, this time is independent of what inclination the Hohmann transfer orbit was at the time of injection.
and
rendezvous with first satelliteIn the previous step, the time it takes to move from LEO to GEO over a hohmann orbit was found.
Now, find when to make this transfer. That is, we need to find the time to
inject into the transfer orbit such that the overall
is minimized.
The injection must occur when the space vehicle is on the line of nodes. Since this line is where the LEO and the desired GEO plane intersects at.
Hence, there are only 2 points on the LEO orbit that we can use to launch to GEO. (Both ends of the lines of nodes, at both sides of earth). Let me call one end of the lines of nodes, the top end, and the other end, the bottom end. Where the top end is that end which the spacecraft was at when it first reached LEO, i.e. at time=0.
In addition to the above restriction, if we want to eliminate the need to make
any phasing loops when we arrive at the desired GEO orbit in order to
rendezvous with the first target, then injection must occur only when the
correct lead angle
is
encountered. This additional synchronization requirement will turn out to be
costly in time to achieve. If LEO and GEO orbits had been coplanar, then we
can inject from any point on the LEO orbit as long as the lead angle
requirement is met. There will not be an additional requirement of the
injection having to be from only two points in the LEO orbit.
We know that the synodic period between LEO and GEO is
seconds, or 92 minutes. This means the LEO and the GEO objects will be aligned
along a radial vector originating from the center of the earth once every 92
minutes.
But due to the restriction that this radial vector be only the lines of nodes of the space vehicle, using this synodic period is not too much help for me here.
So, what options do we have?
These are the options to investigate:
Inject from the top end of the lines of nodes. Reach GEO orbit and then phase-wait in that orbit to rendezvous with the target.
phase-wait in the LEO orbit until the correct lead angle
with
the target is reached. Calculate this for when the spacecraft is on the top
end of the lines of nodes.
The same as above, but for the case when the spacecraft is on the bottom end of the lines of nodes.
phase-wait in the LEO orbit until the lead angle is closest to
the
first time this happens. (i.e. within the first
)
At the end, select the option which gives the smallest
as long as the time cost is reasonable.

we know that at t=0 we have this state as shown in figure below

From previous calculations, we found the time needed for space vehicle to
reach GEO orbit is
sec. Hence, angle that the GEO satellite will travel in this time is found
from
Hence When Vehicle reaches GEO, the first satellite will be (see diagram)
behind the space vehicle.
Hence
The reason a minus sign is used, is because
is measured positive if the change in longitude desired is eastwards, and
since our target is behind us (westwards relative to the spacecraft), this
change is negative.
radians.
For
,
days.
Hence
radians/day
deg/day.
Hence
m/sec
km/sec.
For
,
days.
rad/day
deg/day
Hence
m/sec
km/sec.
Continuing the above process, I obtain this table.
![]() |
(Km/s) |
Period of phase orbit (in days) | Total time in phasing period in days |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Any one of the above choices for
will achieve rendezvous with the first satellite.
Plotting
against the total time in the phasing orbit results in the plot shown in
figure below

Figure above shows that most saving in fuel is made by staying in the phasing orbit for less than 20 days. For more than 20 days, the additional saving in fuel is not justified by the time wasted in the phasing orbit.
Zooming in the region of interest in the plot shown in above figure results in figure below

From the above, it is clear that the slope after 6 days in the phasing orbit
is less steep than earlier. The two options I see is to choose
and save some fuel, or choose
(the smallest possible value) and save time.
For
For

Since the fuel saved is so small compared to the initial fuel needed to send the vehicle into GEO orbit, I decided to use the smaller time here.
reached at one end of lines of nodes.

Looking at above figure, the problem can be seen as the following: we need to
find the time it takes for the spacecraft to be at the top end of the lines of
nodes when the target is at the correct lead angle
.
Because in this case, the spacecraft can injects into the Hohmann orbit and
will meet the target at the apogee. This would result in the spacecraft not
having to do any phase-waiting loops in the GEO orbit. Hence saving
.
A trade is made between time and
How do we find this time value?
First, find
.
To do this, equate travel time for target and spacecraft.
Travel time for spacecraft is half the Hohmann orbit period =
sec
(see common calculations section for derivation)
Travel time
for target is found from
Where
period
seconds
Hence, and since
,
when equating times of travel, we get this relation
Solve for
rad

So, now that we know
,
we need to find when will the spacecraft be at the top end of the lines of
nodes when the target has this
with it.
The angle that the target will move by for each one full period that the
spacecraft makes in the LEO orbit is
,
where
is the
LEO
period
found in the common calculations section to be
seconds, and
is the average angular speed of the GEO target in radians per second which is
each
hrs (since GEO).
Exactly,
rad per second.
Hence, target will travel
rad
for each one full LEO period.
Now that we know the angle the target will travel for each one full
LEO period, we need to find how many times we have to do this so that target
will end at the correct
location
starting from t=0.
This becomes a simple counting problem. If we imagine a straight line,
starting at t=0, and then we move a stick from its left end to its right end
at an equal increments of 21.68 units, we just need to find when this stick
will land at the correct point (or close enough) on the line where the point
is located.
When the stick reaches the right end of the line, we carry the reminder back to the start of the line and continue the process.
Figure below shows how to do this counting. Notice that the point I am
interested in finding, which is the angle
needs to be compensated for by adding the initial
to
it (since the counting is starting from the epoch). In other words, this is
the degrees the spacecraft was ahead of the target when counting starts.

So, the point on the line we are looking for is
,
measured from t=0.
Figure below shows how the counting is actually done.

I wrote a small MATLAB Note_3 function called nma_findPointOnLine.m to do the counting. This function accepts as input the step size, the length of the line, and the distance we are looking for (60.344 in the above example), and how close to the target we want to be (the tolerance).
It returns the number of steps needed to achieve the synchronization.
This is an example call
>> stepSize=21.68; lineLength=360; target=60.344; tol=0.1;
>> nSteps=nma_findPointOnLine(stepSize,lineLength,target,tol)
nSteps =
3274
This is the result of the MATLAB function
| tolerance (in degrees) | number of LEO periods needed | time to achieve (seconds) | time in hrs |
| 1 | 36 | 186804 |
51.89 |
| 0.1 | 3274 | ![]() |
4719 |
It is clear that to achieve synchronization to 0.1 degree is too costly in time.
For the case of 1 degree tolerance, it will take 36 LEO loops to achieve the
optimal situation with the target at the correct
This means, if we spend this time in LEO, we can inject and will meet the
target at the same time when we reach GEO. Hence no additional
would be needed in GEO to phase-wait. We have traded time for fuel.
reached at the other end of lines of nodes.
This case is the same as above, except now we want the spacecraft to be at the
other end of the lines of nodes at injection. The only difference is that now
t=0 have been shifted to become time after making one half LEO period. We can
find this shift since we know the angle the target will travel in one half LEO
period. We found from above that target will travel
for one full LEO period, hence it will travel
per half that period.
So, the only thing we need to do is determine where the point is located that we need to synchronize with, as illustrated by the figure below.

So, use the same MATLAB function to find the number of full LEO rotations needed.
>> stepSize=21.68; lineLength=360; target= 231.544; tol=0.1;
>> nSteps=nma_findPointOnLine(stepSize,lineLength,target,tol)
nSteps =
3614
>> nSteps=nma_findPointOnLine(stepSize,lineLength,target,1)
nSteps =
293
Hence, we see that for a tolerance of 1 degree, we have to wait 293 full LEO loops.
Compare this with the earlier case where we looked for the other end of the lines of nodes, which achieved the same synchronization for only 36 LEO loops. Hence this maneuver will not be accepted.
reached
first time.
To solve this problem, I will calculate the lead angle
with
the first target for a number of time increments of
each, where
is the LEO period, and for each such time increment, will calculate where the
first target will be at the end of a Hohmann transfer. Then will calculate the
needed to phase-wait in GEO to close this final angle gap.
At
Figure below illustrates this case.

Total time from epoch to reach GEO
Hence, angle that the GEO satellite will travel in this time is found
from
Hence When Vehicle reaches GEO, the first satellite will be
ahead.
At
Total time from epoch to reach GEO
Hence, angle that the GEO satellite will travel in this time is found
from
Hence When Vehicle reaches GEO, the first satellite will
be
behind
At
Total time from epoch to reach GEO
Hence, angle that the GEO satellite will travel in this time is found
from
Hence When Vehicle reaches GEO, the first satellite will be
ahead.
Continue this process. The result is illustrated in this table
| time | total time to reach GEO (sec) |
target travelled angle |
lead
angle |
sense
relative to spacecraft |
| 0 | ![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
![]() |
![]() |
![]() |
![]() |
ahead |
![]() |
![]() |
![]() |
![]() |
behind |
So, from the above table, we see that the closest the target gets to the lines
of nodes (within the first
)
at the same time as the vehicle is
and is achieved after
periods in the LEO orbit.
So, what is left to do is to determine is the
needed in the GEO orbit to wait-phase so as to close this final remaining
Now, for the
case
calculate the cost
for phase-waiting in the GEO orbit:
Let
be the period of the phasing orbit while in the GEO orbit.
Let
be the angular rate of axial rotation of the earth, which is
deg/day
radians/day.
Let
be the period of the geosynchronous orbit, which is
min or
days.
Let
be the change in longitude desired. Which we found it to be
radians.
Let
be the number of revolutions spent in the phasing orbit.
Let
be the drift rate, positive eastwards.
First, find the period of the phasing orbit
using the equation
for a specific
Then solve for
from the equation
Then find
corresponding to this
from figure 7.14, Orbital Mechanics book or by using the relation
Where 5.8 is the slope of the line relating
to
.
(The above slope is not exact, but it is close enough).
Try the above for a number of different values for
.
For
,
days.
Hence
radians/day
deg/day.
Hence
I do not need to look for n=2 and higher for this case, since the saving in
is
clearly not worth spending an extra day for each additional increment in
.
We see that the
is very small already (0.0598 km/sec), and for larger n, it will only get
smaller and smaller.
scenarios
For first option, move to GEO without phase-waiting in LEO, and instead
phase-wait in GEO, results in
with time spend
seconds, or 14 hrs, 33 minutes.
For the second and third options, the time spend is all in LEO, and zero
needed to phase-wait in GEO.
For 4th option, part of time spend is in LEO, and some part of time spend is
in GEO.
is not zero, but smaller than first option.
Notice that in this table, the
cost refers only to the cost of phase wait in GEO to rendezvous with the first
target.
| scenario |
cost |
LEO loop | total time cost to rendezvous |
| first. Inject at t=0 |
km/sec |
0 | 52,426 (sec) =
14 hrs 33 minutes |
second. optimal
at
top end |
0 km/sec | 36 | 186,804 (sec) = 51.89 hrs = 2 days 3 hrs 53 minutes |
third. optimal
at
bottom end |
0 km/sec | 293 | 1,520,377 (sec) |
fourth. smallest
at
apogee |
km/sec |
6 | 133,820 (sec) = 1 day, 13 hrs, 10 minutes, 20 seconds. |
Clearly option 3 is bad. With option 2, we get the same saving for much less time.
Between options 1 and 4, I prefer option 4, since for the cost of about 1.5
days, we reduced
from
to
km/sec.
So, the final choice is between option 4 and option 2.
With option 2, we have zero
but we have to spend about 15 more hours in LEO to save
km/sec.
Is this good or not?
Compared to the
needed to inject from LEO to GEO which is
km/sec, this amount is 1.5% of that. It takes about 5 hrs to go from LEO to
GEO. So, should I spend about 3 times as many hours to save 1.5% as many in
fuel? (This is interesting that spending more time flying ends up saving fuel!
only in space this is possible).
I will not consider option 2 as the time needed is not worth the saving in fuel.
So, Select option 4.
Simply perform an in-orbit repositioning using a phasing orbit to rendezvous
with the second satellite. The second satellite is
ahead of the first satellite (this is given), hence
rad. Apply the same process of in-orbit repositioning to decide on the
procedure to select. This table was generated:
![]() |
(Km/s) |
Period of phase orbit (in days) | Total time in phasing period in days |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Plotting
against the total time in the orbit, I get the following plot

Similarly, at
,
the fuel saving is best for the time spend in the phasing orbit. This gives
days in the phasing orbit, and
However, since the fuel saved as a percentage of initial fuel is small, it
does not seem that spending extra 6 days in orbit is worth it. I will use

Also, since from the specifications, it seems that it says that the second
satellite needs to be reached quickly, so I choose
,
the smallest possible value.
Stay in orbit for one complete orbit revolution. This adds one day to the
total time in flight. No additional
needed.
Perform an in-orbit repositioning using a phasing orbit to reposition
rad ahead.
Apply the same process of in-orbit repositioning to decide on the procedure to select. This table was generated:
![]() |
(Km/s) |
Period of phase orbit (in days) | Total time in phasing period in days |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
As before, choose
with
This
adds little over one day to the total flight time.
This completes the required sequence.
See figure below for the final decision tree.

This is a summary, in table format, of the entire orbiting sequences using the
most
optimal manoeuvres selected out of the different scenarios shown above. This
table below is the final result of selecting the best option out of each
phase. This table only shows the
needed starting from LEO orbit. It does not include the
needed to reach LEO which I will add next.
sequence: Inject to LEO. wait in LEO for 6 full orbits. Perform Hohmann transfer with partial plane correction at each end. phase-wait in GEO to rendezvous with first target. Phase-wait in GEO to rendezvous with second target. Lock into second target. Reposition to final location in GEO.
| sequence | (km/sec) |
duration |
| wait in LEO | 0 | 50,050 (sec) |
| Hohmann transfer | 4.0716 | 18,916 (sec) |
| Rendezvous with 1st target | 0.0598 | 83,770 (sec) |
| Rendezvous with 2nd target | 0.255 | 98,131 (sec) |
| lock with 2nd target | 0 | 86,400 (sec) |
| position to final destination | 0.02868 | 87,360 (sec) |
| TOTAL | 4.41508 | 424,627 (sec)=117.95 hrs = 4 days 21hrs 57 min |
To reach LEO, we have found that
km/sec. To be more realistic, we need to account for the gravitational loss
and drag. Typical time to reach LEO is about 2 minutes or 120 seconds. Hence
additional
to account for gravity loss is
m/sec
km/sec.
For the drag effect, it of course depends on the rocket cross sectional area,
the drag coefficient and air density. A typical value I have seen in the
literature for rockets is to use
of the LEO velocity to account for drag. Hence an additional
for drag will be
of
km/sec or
km/sec.
Hence total
to reach LEO =
km/sec
Hence the total
to achieve final position of spacecraft is
see figure below for a graphical display of the deltaV used at each stage.

This is the MATLAB function that solves for
to find what partial correction in inclination angle can be done at the
perigee for the Hohmann transfer.
Caller script:
function nma_testfindAlphaForMinDeltaV
r0=6378.145;
r1=100+r0;
r2=35860+r0;
beta=15;
mu=3.986012*10^5;
alpha=nma_findAlphaForMinDeltaV(r1,r2,beta,mu)
This is the function that solves for alpha.
function alpha=nma_findAlphaForMinDeltaV(r1,r2,beta,mu)
%function alpha=nma_findAlphaForMinDeltaV(r1,r2,beta,mu)
%
% Finds the minumum alpha (initial inclincatin correction)
% for an orbit relative to a larger circular orbit.
% see design note for more detailes.
%
%INPUT:
% r1: The radius of the smaller circular orbit
% r2: the radius of the larger circular orbit
% beta: the angle, in degrees, in which the two
% circular orbits are non co-planers to
% each others.
% mu: gavitional constant
%
% OUTPUT:
% alpha: The angle in degrees to use for initial
% correction such that minumum delta V is
% obtained to move from the smaller circular
% orbit to the larger circular orbit
%
% Author: Nasser Abbasi
% May 19,2003
TRUE=1;
FALSE=0;
a= (r1+r2)/2;
rp=r1;
ra=r2;
Va=sqrt( mu*(2/ra - 1/a ));
Vp=sqrt( mu*(2/rp - 1/a ));
Vc1=sqrt( mu/r1 );
Vc2=sqrt( mu/r2 );
beta=beta*pi/180;
root(1)=0.1*beta;
keepLooking=TRUE;
i=0;
while(keepLooking)
i=i+1;
root(i+1)=root(i)- ( F(Vc1,Vc2,Vp,Va,root(i),beta)/dF(Vc1,Vc2,Vp,Va,root(i),beta) );
root(i+1)
if( abs ( (root(i+1) - root(i)) / root(i+1) ) * 100 < 0.001 )
keepLooking=FALSE;
else
if( ( root(i+1) * root(i) )<0.0)
error('jumped out of root');
end
end
if(i>100)
error('Failed to converge');
end
end
alpha=root(end);
alpha=alpha*180/pi;
%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%
function v=F(Vc1,Vc2,Vp,Va,alpha,beta)
v=Vc1*Vp*sin(alpha)*sqrt(Vc2^2+Va^2-2*Vc2*Va*cos(beta-alpha)) ...
- Vc2*Va*sin(beta-alpha)*sqrt(Vc1^2+Vp^2-2*Vc1*Vp*cos(alpha));
%%%%%%%%%%%%%%%
%
%
%%%%%%%%%%%%%%%%
function v=dF(Vc1,Vc2,Vp,Va,alpha,beta)
v=Vc1*Vp*cos(alpha)*sqrt(Vc2^2+Va^2-2*Vc2*Va*cos(beta-alpha)) ...
+Vc1*Vp*sin(alpha)* ...
( -Vc2*Va*sin(beta-alpha)/sqrt(Vc2^2+Va^2-2*Vc2*Va*cos(beta-alpha))) ...
- (Vc2*Va*cos(beta-alpha)*sqrt(Vc1^2+Vp^2-2*Vc1*Vp*cos(alpha)) ...
+ Vc2*Va*sin(beta-alpha)*...
( Vc1*Vp*sin(alpha) / sqrt(Vc1^2+Vp^2-2*Vc1*Vp*cos(alpha))));
function nSteps=nma_findPointOnLine(stepSize,lineLength,target,tol)
%function nSteps=nma_findPointOnLine(stepSize,lineLength,target,tol)
%
% Function to find how many steps needed to reach withing tolearance
% close to a point on a line by taking fixed number of steps. Line wrapes
% around.
%
%INPUT:
% stepSize: the step size
% lineLength: The line length
% target: The distance from leftend of line that we want to reach
% tol: tolerance in abs. value
%
%OUTPUT:
% nSteps: number of steps needed
%
%Author Nasser Abbasi. May 22, 2003
%
TRUE=1;
FALSE=0;
currentDist=0;
nSteps=0;
while(1)
currentDist=currentDist+stepSize;
nSteps=1;
while(currentDist <= lineLength)
if( abs (currentDist-target) < tol )
return;
end
rem=lineLength-currentDist;
if(rem < stepSize)
currentDist=stepSize-rem;
else
currentDist=currentDist+stepSize;
end
nSteps=nSteps+1;
end
end