-2
$\begingroup$

I am trying to develop the code from this source , this research paper and from this too as same as bibliography of that aforementioned source.

So, here as you can see at page 14, they have defined the SGP4 model and from page 87 to 90, they have discussed about the constant values and parameters. At Page, 88 the value of $XKE = k_e *(er/min)^{3/2}$ where, $er = Earth Radii$ and min is $minute?$ Even if I put those values (er = $6378.135km,$ min = what should I put?) I did with $60*24$ I am not getting the exact same value of $XKE$ ? What are those values it could take?

I got the reference code from MATLAB because I am also working on MATLAB environment, so at there when they are exequting 'xke' (xke = sqrt((3600.0 * ge) / (xkmper^3))) how did they are getting this 3600? where ge is gravitational constant, xkmpr is Earth radii.

Problem is I have 2 different TLE and I have to propagate my spacecraft at least for a day with one second time step, but the code I got from MATLAB which only gives us one value at a time, I can't put loop at the whole model but I need data of Position, Velocity vector of each point in one second time steps for at least a day.

How can I solve this problem? Any short of leads would be helpful.

$\endgroup$
9
  • $\begingroup$ What value of XKE are you getting? What value do you expect to get? $\endgroup$ – Organic Marble Oct 10 '19 at 1:01
  • $\begingroup$ According that source what I have said on the question, I should get 0.0743669161331734, but I am getting 5885.26341335192. But at the MATLAB code which is already there they have used , xke = sqrt((3600.0 * ge) / (xkmper^3)) and I am not getting how and what is 3600 here? If I use the same formula I will get exact same number. But this MATLAB code give me only one point's Position, velocities vectors. If I need to get all points, with each second time step, I need to understand where they have use minutes/seconds/hours and then I have process the whole loop and I got stuck at xke. $\endgroup$ – JOY Oct 10 '19 at 1:09
  • $\begingroup$ 3600 is likely the number of seconds in a hour. $\endgroup$ – Organic Marble Oct 10 '19 at 1:23
  • 1
    $\begingroup$ There are six question marks in your question post and so it's too much work trying to figure out what your main question is from this. Can you try to focus on one single question that can have a correct answer by editing your question (not adding furhter explanations in comments)? Otherwise your question may be flagged as "unclear what you're asking" and eventually closed. Thanks! $\endgroup$ – uhoh Oct 10 '19 at 7:24
  • 1
    $\begingroup$ @OrganicMarble - 3600 is most likely the number of seconds in a minute, squared. $\endgroup$ – David Hammen Oct 12 '19 at 3:51
3
$\begingroup$

You seem well aware that there is a reference implementation for SGP4 in Matlab. Yet you choose to make your own. I've sadly been there, and done that.

Your first problem is to compute XKE, but from the reference you've posted on page 88:

XKE value

And on page 89:

enter image description here

Since G = 6.67408 × 10-11 m3 kg-1 s-2, GM has units of length³/time². Convert these units to Earth radii and minutes and you should reach the value given.

Regarding the Matlab issue, you should create a separate function for your SGP4 propagation and call it in a loop. I'm having a hard time wondering why you wouldn't be able to to that. But, if that is somehow a restraint you must respect, you can define a time vector since the TLE epoch with t = 0:1/60:24*60, which corresponds to a series starting at zero and going up to a day (in minutes) with one second interval. By rewriting the operations on SGP4 such as t^2 to be element wise such as in t.^2, you should be able to create a vectorized version of the code that runs all propagations at once without a loop. But this would be very memory demanding, and I would still suggest the loop approach.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.