Note
Click here to download the full example code
Profiling OrekitΒΆ
Out:
Orekit instance @ -9223363308923203335:
-------------------------
Integrator : DormandPrince853
Minimum step : 0.001 s
Maximum step : 120.0 s
Position Tolerance : 10.0 m
Input frame : ITRS
Output frame : GCRS
Gravity model : HolmesFeatherstone
- Harmonic expansion order (10, 10)
Atmosphere model : DTM2000
Solar model : Marshall
Constants : WGS84
Included forces:
- earth gravity
- perturbation Moon
- perturbation Sun
Third body perturbations:
- Moon
- Sun
---------------------------------- Performance analysis ---------------------------------
Name | Executions | Mean time | Total time
----------------------------------------------+--------------+---------------+---------------
Orekit:init | 1 | 1.56885e-01 s | 1.56885e-01 s
Orekit:get_frame | 2 | 5.84126e-06 s | 1.16825e-05 s
Propagator:convert_time | 1 | 4.69446e-04 s | 4.69446e-04 s
frames:convert:ITRS->GCRS | 1 | 2.15673e-02 s | 2.15673e-02 s
Orekit:propagate:construct_propagator | 1 | 8.29697e-05 s | 8.29697e-05 s
Orekit:propagate:set_forces | 1 | 1.31130e-05 s | 1.31130e-05 s
Orekit:propagate:steps:step-handler:getState | 5000 | 1.53140e-05 s | 7.65698e-02 s
Orekit:propagate:steps:step-handler | 1443 | 9.52364e-05 s | 1.37426e-01 s
Orekit:propagate:steps | 1 | 4.45901e-01 s | 4.45901e-01 s
Orekit:propagate | 1 | 4.71702e-01 s | 4.71702e-01 s
total | 1 | 6.29327e-01 s | 6.29327e-01 s
-----------------------------------------------------------------------------------------
---------------------------------- Performance analysis ----------------------------------
Name | Executions | Mean time | Total time
----------------------------------------------+--------------+----------------+----------------
Orekit:init | 1 | 0:00:00.156885 | 0:00:00.156885
Orekit:get_frame | 2 | 0:00:00.000006 | 0:00:00.000012
Propagator:convert_time | 1 | 0:00:00.000469 | 0:00:00.000469
frames:convert:ITRS->GCRS | 1 | 0:00:00.021567 | 0:00:00.021567
Orekit:propagate:construct_propagator | 1 | 0:00:00.000083 | 0:00:00.000083
Orekit:propagate:set_forces | 1 | 0:00:00.000013 | 0:00:00.000013
Orekit:propagate:steps:step-handler:getState | 5000 | 0:00:00.000015 | 0:00:00.076570
Orekit:propagate:steps:step-handler | 1443 | 0:00:00.000095 | 0:00:00.137426
Orekit:propagate:steps | 1 | 0:00:00.445901 | 0:00:00.445901
Orekit:propagate | 1 | 0:00:00.471702 | 0:00:00.471702
total | 1 | 0:00:00.629327 | 0:00:00.629327
------------------------------------------------------------------------------------------
---------------------------------- Performance analysis ---------------------------------
Name | Executions | Mean time | Total time
----------------------------------------------+--------------+---------------+--------------
Orekit:init | 1 | 1.56885e-01 s | 24.93 %
Orekit:get_frame | 2 | 5.84126e-06 s | 0.00 %
Propagator:convert_time | 1 | 4.69446e-04 s | 0.07 %
frames:convert:ITRS->GCRS | 1 | 2.15673e-02 s | 3.43 %
Orekit:propagate:construct_propagator | 1 | 8.29697e-05 s | 0.01 %
Orekit:propagate:set_forces | 1 | 1.31130e-05 s | 0.00 %
Orekit:propagate:steps:step-handler:getState | 5000 | 1.53140e-05 s | 12.17 %
Orekit:propagate:steps:step-handler | 1443 | 9.52364e-05 s | 21.84 %
Orekit:propagate:steps | 1 | 4.45901e-01 s | 70.85 %
Orekit:propagate | 1 | 4.71702e-01 s | 74.95 %
total | 1 | 6.29327e-01 s | 100.00 %
-----------------------------------------------------------------------------------------
Enable Drag Force
---------------------------------- Performance analysis ---------------------------------
Name | Executions | Mean time | Total time
----------------------------------------------+--------------+---------------+--------------
Orekit:init | 1 | 1.45763e-01 s | 7.92 %
Orekit:get_frame | 2 | 3.33786e-06 s | 0.00 %
Propagator:convert_time | 1 | 5.09501e-04 s | 0.03 %
frames:convert:ITRS->GCRS | 1 | 2.14245e-02 s | 1.16 %
Orekit:propagate:construct_propagator | 1 | 8.36849e-05 s | 0.00 %
Orekit:propagate:set_forces | 1 | 9.52442e-01 s | 51.74 %
Orekit:propagate:steps:step-handler:getState | 5000 | 1.61016e-05 s | 4.37 %
Orekit:propagate:steps:step-handler | 1443 | 1.00431e-04 s | 7.87 %
Orekit:propagate:steps | 1 | 7.16795e-01 s | 38.94 %
Orekit:propagate | 1 | 1.69497e+00 s | 92.07 %
total | 1 | 1.84089e+00 s | 100.00 %
-----------------------------------------------------------------------------------------
import numpy as np
from sorts.profiling import Profiler
from sorts.propagator import Orekit
p = Profiler()
p.start('total')
orekit_data = '/home/danielk/IRF/IRF_GITLAB/orekit_build/orekit-data-master.zip'
prop = Orekit(
orekit_data = orekit_data,
settings=dict(
in_frame='ITRS',
out_frame='GCRS',
drag_force = False,
radiation_pressure = False,
),
profiler = p,
)
print(prop)
state0 = np.array([-7100297.113,-3897715.442,18568433.707,86.771,-3407.231,2961.571])
t = np.linspace(0,3600*24.0*2,num=5000)
mjd0 = 53005
states = prop.propagate(t, state0, mjd0, A=1.0, C_R = 1.0, C_D = 1.0)
p.stop('total')
print(p)
print(p.fmt(timedelta=True))
print(p.fmt(normalize='total'))
print('\n Enable Drag Force \n')
p2 = Profiler()
p2.start('total')
prop = Orekit(
orekit_data = orekit_data,
settings=dict(
in_frame='ITRS',
out_frame='GCRS',
drag_force = True,
radiation_pressure = False,
),
profiler = p2,
)
states = prop.propagate(t, state0, mjd0, A=1.0, C_R = 1.0, C_D = 1.0)
p2.stop('total')
print(p2.fmt(normalize='total'))
Total running time of the script: ( 0 minutes 2.479 seconds)