J2 Perturbation Part 2 | Orbital Mechanics with Python 11

preview_player
Показать описание
In this video I go over a few extra details about the J2 perturbation. I address a small mistake I made in the previous video, regarding the plotting of the semi-major axis. I believe the error in the previous video is due to the 'lsoda' differential equation solver that I have found has certain issues in certain perturbations, but need to look further into it. I also talk more about the Variation of Parameters method for the J2 perturbation and how it is dependent on inclination. I finish by showing some examples of special inclinations where some keplerian orbital elements are not affected by the J2 perturbation.

Here is the J2 perturbation in the ODE implementation:
# J2 perturbation
z2 = r[ 2 ] ** 2
r2 = norm_r ** 2
tx = r[ 0 ] / norm_r * ( 5 * z2 / r2 - 1 )
ty = r[ 1 ] / norm_r * ( 5 * z2 / r2 - 1 )
tz = r[ 2 ] / norm_r * ( 5 * z2 / r2 - 3 )

Pre-req videos:

Optional videos:

Also I think I fixed the mic issue, sorry about that.

Link to video explaining J2:
Рекомендации по теме
Комментарии
Автор

I used the j2 that was negative from the previous video 8, which gave me incorrect stuff. So make sure y'all change it to positive if you haven't. Good video as always.

Volumed
Автор

Slowly returning to the track, I decided to repeat the material with the great help of Colin. I'm starting V12. but I have an impression that I had different errors, problems in my old files than Colins's. It looks like we all have different versions :)

mariuszmilewski
Автор

Hello Alfonso,

I have a big difference for the Keplerian Elements, between switching J2 pertubation on and off. While it is on, my results seem to be similar to yours, but they are completely off for J2 pertubation swiched off. You have never shown the graphs for these. I was expecting some flat lines. Are those graphs not working without J2 pertubation? I mean that is the reason behind the calculation: the RAAN driftc aused by J2 pertubation that equals the earth mean orbital rate around the sun. But why put in a switch, if you can not use it?

I use a positive J2 value.
I fixed the radians /degree problems with the op= .... call in the main routine.
I fixed e = float('0.'+e_string)*d2r to radians.
I use for ISS file:
ISS (ZARYA)
1 25544U 98067A 20361.59488712 .00001332 32068-4 0 9998
2 25544 51.6450 116.4339 0001295 158.4270 330.5330 15.49228663261848

I am not sure I am thinking straight at this point, and would really appreciate your input.

Thanks for the work you put into the video series. It was a real help, since I am quite new to python.

kapitanblaubar
Автор

Hi Alfonso, thank you very much for your videos, they're amazing and I'm learning so much.

I noticed that your 3d plotting of the orbits are more visible and now I can see them through the sphere(earth). How did you do that?

Also, it seems that you made some changes from video 10 to 11 in the code. The 'oblateness' for perts threw me an error, so I changed it back to J2. And my orbit for the book example, looks like flower (goes from the center of earth to outer area numerous times).
Then it says that it expected more arguments rv2coes, I think that is because of 'date'
It also says that tle2coes does not have any 'deg' argument, but you added that here.
I don't know what I'm doing wrong here, but I suspect there's something new in the this code that I'm missing.

Could you please tell me what new things you added to this stage of the code?
I'd really appreciate it.

PD: I know you did this more than a year ago, but I just discovered your channel.

eddpalenciavanegas
Автор

Hi,

Firstly, many thanks for all of you efforts in putting this together: appreciated.

Another code question .. in the iss example you are passing in has deg=True to t.tle2coes, but this function, written in video7 has only.. def tle2coes(tle_filename, mu=pd.earth[‘mu’]): has this function had a mod made to it similar to the change in having date added to the state?

Hope you can clarify

Colin

colinthomas
Автор

hello, when I use v10 files I have errors and when I try to correct them I have different results. Do you use video10 files?

mariuszmilewski