Ejemplo n.º 1
0
 def get_states(self, index, item, **kw):
     t = sorts.equidistant_sampling(
         orbit=item.state,
         start_t=self.scheduler.controllers[0].t.min(),
         end_t=self.scheduler.controllers[0].t.max(),
         max_dpos=1e3,
     )
     state = item.get_state(t)
     return state, t
Ejemplo n.º 2
0
 def get_states(self, index, item):
     obj = self.population.get_object(item)
     t = sorts.equidistant_sampling(
         orbit=obj.orbit,
         start_t=self.scheduler.controllers[0].t.min(),
         end_t=self.scheduler.controllers[0].t.max(),
         max_dpos=1e3,
     )
     state = obj.get_state(t)
     return state, t
def run_scanning_simulation(radar_ctrl):

    p = Profiler()
    radar_ctrl.profiler = p

    p.start('total')
    scheduler = ObservedScanning(
        radar=eiscat3d,
        controllers=[radar_ctrl],
        logger=logger,
        profiler=p,
    )

    p.start('equidistant_sampling')
    t = sorts.equidistant_sampling(
        orbit=obj.state,
        start_t=0,
        end_t=end_t,
        max_dpos=1e3,
    )
    p.stop('equidistant_sampling')

    print(f'Temporal points obj: {len(t)}')

    p.start('get_state')
    states = obj.get_state(t)
    p.stop('get_state')

    p.start('find_passes')
    #rename cache_data to something more descriptive
    passes = eiscat3d.find_passes(t, states, cache_data=True)
    p.stop('find_passes')

    p.start('observe_passes')
    data = scheduler.observe_passes(passes, space_object=obj, snr_limit=False)
    p.stop('observe_passes')

    for psi in data:
        for txps in psi:
            for rxtxps in txps:
                print(f'Max SNR={10*np.log10(rxtxps["snr"].max())} dB')

    p.stop('total')
    print(f'\n {radar_ctrl.__class__}: len(t) = {len(radar_ctrl.t)} \n')
    print(p.fmt(normalize='total'))
Ejemplo n.º 4
0
from sorts.propagator import SGP4
Prop_cls = SGP4
Prop_opts = dict(
    settings = dict(
        out_frame='ITRS',
    ),
)
prop = Prop_cls(**Prop_opts)

orb = pyorb.Orbit(M0 = pyorb.M_earth, direct_update=True, auto_update=True, degrees=True, a=7200e3, e=0.05, i=75, omega=0, Omega=79, anom=72, epoch=53005.0)
print(orb)

t = sorts.equidistant_sampling(
    orbit = orb, 
    start_t = 0, 
    end_t = 3600*24*1, 
    max_dpos=1e3,
)

print(f'Temporal points: {len(t)}')
states = prop.propagate(t, orb.cartesian[:,0], orb.epoch, A=1.0, C_R = 1.0, C_D = 1.0)

passes = eiscat3d.find_passes(t, states)

fig = plt.figure(figsize=(15,15))
ax = fig.add_subplot(111, projection='3d')
ax.plot(states[0,:], states[1,:], states[2,:])

fig = plt.figure(figsize=(15,15))
axes = [
    [
Ejemplo n.º 5
0
        e=0.1,
        i=75,
        raan=79,
        aop=0,
        mu0=mu0,
        epoch=53005.0,
        parameters=dict(d=1.0, ),
    ) for mu0 in [62.0, 61.9]
]

for obj in objs:
    print(obj)

t = sorts.equidistant_sampling(
    orbit=objs[0].state,
    start_t=0,
    end_t=3600 * 6,
    max_dpos=1e3,
)

print(f'Temporal points: {len(t)}')
states0 = objs[0].get_state(t)
states1 = objs[1].get_state(t)

#set cache_data = True to save the data in local coordinates
#for each pass inside the Pass instance, setting to false saves RAM
passes0 = eiscat3d.find_passes(t, states0, cache_data=False)
passes1 = eiscat3d.find_passes(t, states1, cache_data=False)

#just create a controller for observing 10 points of the first pass
ps = passes0[0][0][0]
use_inds = np.arange(0, len(ps.inds), len(ps.inds) // 10)
Ejemplo n.º 6
0
p.start('total')
scheduler = ObservedScanning(
    radar=eiscat3d,
    controllers=[scanner_ctrl],
    logger=logger,
    profiler=p,
)

datas = []
passes = []
states = []
for ind in range(len(objs)):
    p.start('equidistant_sampling')
    t = sorts.equidistant_sampling(
        orbit=objs[ind].state,
        start_t=0,
        end_t=end_t,
        max_dpos=1e3,
    )
    p.stop('equidistant_sampling')

    print(f'Temporal points obj {ind}: {len(t)}')

    p.start('get_state')
    states += [objs[ind].get_state(t)]
    p.stop('get_state')

    p.start('find_passes')
    #rename cache_data to something more descriptive
    passes += [eiscat3d.find_passes(t, states[ind], cache_data=True)]
    p.stop('find_passes')