Exemplo n.º 1
0
    # Data
    svlist = gr.load(fnc).sv.values
    navdata = gr.load(fnav)
    if irxnumber is not None:
        fnc = obsfnlist[irxnumber]
#    if irx > 3:
#        break
    for isv, sv in enumerate(svlist):
        if isvnumber is not None:
            sv = svlist[isvnumber]
        try:
            el_mask_in = el_mask - 10 if (el_mask - 10) >= 8 else 8
            D = pyGnss.dataFromNC(fnc,
                                  fnav,
                                  sv=sv,
                                  fsp3=fsp3,
                                  tlim=tlim,
                                  el_mask=el_mask_in,
                                  satpos=satpos)
            # Remove inital recovery at time 00:00
            mask0 = np.ones(D.time.values.size, dtype=bool)
            mask0[:3] = False

            # Merge with the elevation mask
            idel = np.logical_and(D['idel'].values, mask0)
            #            sb = satbias[sv]

            dt = D.time.values
            tsps = np.diff(dt.astype('datetime64[s]'))[0].astype(int)
            eps = 1 * np.sqrt(30 / tsps)
            elv = D.el.values
Exemplo n.º 2
0
svlist = gr.load(NCF).sv.values
navdata = gr.load(NF)
navdatatime = navdata.time.values
D = gr.load(NCF)
time = D.time.values
satbias = pyGnss.getSatBias(SBF)

fig1 = plt.figure(figsize = [8,6])
fig2 = plt.figure(figsize = [8,6])
ax1 = fig1.add_subplot(111)
ax2 = fig2.add_subplot(111)

stec = np.nan * np.ones((svlist.shape[0], D.time.values.shape[0]))
F = np.nan * np.ones((svlist.shape[0], D.time.values.shape[0]))
for i, sv in enumerate(svlist):
    D = pyGnss.dataFromNC(NCF, NF, sv=sv, tlim=tlim, el_mask=el_mask, satpos=True, 
                          ipp=True, ipp_alt = H)
    idel = D['idel'].values
    sb = satbias[sv]
    
    dt = D.time.values
    tsps = np.diff(dt.astype('datetime64[s]'))[0].astype(int)
    el = D.el.values
    C1 = D['C1'].values
    C1[~idel] = np.nan
    C2 = D['P2'].values
    C2[~idel] = np.nan
    L1 = D['L1'].values
    L1[~idel] = np.nan
    L2 = D['L2'].values
    L2[~idel] = np.nan
    
Exemplo n.º 3
0
                with open(logfn, 'a') as LOG:
                    LOG.write('Processing {}/{}\n'.format(irx + 1, rxl))
                    LOG.close()
            else:
                print('{}/{}'.format(irx + 1, rxl))
            for isv, sv in enumerate(svlist):
                try:
                    if isv > 32:
                        continue
                    if not 'G' in sv:
                        continue
                    el_mask_in = el_mask - 10 if (el_mask - 10) >= 8 else 8
                    D = pyGnss.dataFromNC(
                        fnc,
                        fnav,
                        sv=sv,
                        fsp3=fsp3,
                        tlim=tlim,
                        el_mask=el_mask - 10,
                        satpos=True)  #, ipp=True, ipp_alt = ipp_alt)
                    # Remove inital recovery at time 00:00
                    mask0 = np.ones(D.time.values.size, dtype=bool)
                    mask0[:3] = False
                    # Merge with the elevation mask
                    idel = np.logical_and(D['idel'].values, mask0)

                    dt = D.time.values
                    tsps = np.diff(dt.astype('datetime64[s]'))[0].astype(int)
                    eps = 1 * np.sqrt(30 / tsps)
                    elv = D.el.values.astype(np.float16)
                    ixmask = (np.nan_to_num(elv) >= el_mask)
Exemplo n.º 4
0
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 27 17:08:05 2019

@author: smrak
"""
from pyGnss import pyGnss
from datetime import datetime
import matplotlib.pyplot as plt
sv = 'G12'
fnav = '/media/smrak/gnss/nav/brdc0460.13n'
fnc = '/media/smrak/gnss/obs/2013/046/ztl40460.13d.nc'
el_mask = 30

tlim = [datetime(2013, 2, 15, 11, 0, 0), datetime(2013, 2, 15, 13, 0, 0)]
#tlim = None

D = pyGnss.dataFromNC(fnc,
                      fnav,
                      sv=sv,
                      tlim=tlim,
                      el_mask=el_mask,
                      satpos=True,
                      ipp=True,
                      ipp_alt=110)

plt.plot(D.time.values, D['S1'].values)
Exemplo n.º 5
0
        return np.array([ecefxi, ecefyi, ecefzi])
    else:
        AER = ecef2aer(x=ecefxi,
                       y=ecefyi,
                       z=ecefzi,
                       lon0=rx_position[1],
                       lat0=rx_position[0],
                       h0=rx_position[2])
        return AER


fnc = 'morm2440.17d.nc'
fnav = 'brdc2440.17n'
DOBS = pyGnss.dataFromNC(fnc,
                         fnav,
                         sv='G07',
                         tlim=None,
                         el_mask=30,
                         satpos=True)
obstimes = DOBS.time.values.astype('datetime64[s]')
RX = DOBS.position_geodetic

fsp3 = glob(os.getcwd() + '/*.sp3')[0]
D = grx.load(fsp3).sel(sv='G07')
navtimes = D.time.values.astype('datetime64[s]')
AER = ecef2aer(x=D.ecef.values[:, 0],
               y=D.ecef.values[:, 1],
               z=D.ecef.values[:, 2],
               lon0=RX[1],
               lat0=RX[0],
               h0=RX[2])