Ejemplo n.º 1
0
# TODO: Need to calculate my own position
name   = 'YAR2'
lat    = -29. #0465520472
lon    = 115. #3469787567
h      = 0.
eleAng = 0.

sit1 = { 'name'           : name ,
         'latitude'       : lat,
         'longitude'      : lon,
         'height'         : h,
         'ElCutOff'       : eleAng
         }

[a,b,e2] = geod.refell('GRS80')
sit1['XYZ'] = np.matrix(geod.ell2xyz(sit1['latitude'],sit1['longitude'],0.,a,e2))

# TODO: should be obtained from RINEX obs file
# start time
YYYY = 2012
MM = 01
DD = 01

startymdhms = dt.datetime(YYYY,MM,DD)

# Create an elevation plot for S1
fig = plt.figure()#figsize=(3.62, 2.76))
ax = fig.add_subplot(111)

# create a polar plot of S1
Ejemplo n.º 2
0
    ndata = get_binary_eph('test_data/brdc0010.12n.nav')
    # should be 407,22 size 8954
    #    print(np.shape(ndata))
    #    print(ndata[0,:])

    # Decode 1 set of values for 1 satellite as a test...
    # should return 377
    #icol = find_eph(ndata,1,0)
    #print "ICOL",icol

    # calculate the range
    #satp = satpos(icol,ndata)
    #print satp

    import geodetic as geod
    sit1 = {}
    [a, b, e2] = geod.refell('GRS80')
    sit1['XYZ'] = np.matrix(geod.ell2xyz(-45.0, 140.0, 0., a, e2))
    #dx1 = satp - sit1['XYZ']

    #(Az,El,Dist) = topocent(sit1['XYZ'],dx1)

    #pos_rot1 = earth_rot_corr( Dist/vel_c, satp )

    # Now try again for sat 6, which is meant to be at elevation 48.17
    icol = find_eph(ndata, 10, 0)
    satp = satpos(icol, ndata, 0)
    dx1 = satp - sit1['XYZ']
    (Az, El, Dist) = topocent(sit1['XYZ'], dx1)
Ejemplo n.º 3
0
    parser.add_argument('--apr',
                        dest='apr_file',
                        help="Location of coordinate file - GAMIT .apr format")
    parser.add_argument('-s',
                        '--sites',
                        dest='sites',
                        nargs='+',
                        help="Sites to plot (4 charcater ID)")

    args = parser.parse_args()

    lons = []
    lats = []
    # get the reference frame parameters
    a, b, e2, finv = geodetic.refell('WGS84')

    for siteID in args.sites:
        sitepos = gapr.getStationPos(args.apr_file, siteID)
        dphi, dlambda, h = gcoord.togeod(a, finv, sitepos[0], sitepos[1],
                                         sitepos[2])
        lats.append(dphi)
        lons.append(dlambda)

    # set up orthographic map projection with
    # perspective of satellite looking down at 50N, 100W.
    # use low resolution coastlines.
    #map = Basemap(projection='ortho',lat_0=-45,lon_0=140,resolution='l')
    #map = Basemap(projection='hammer',lat_0=-45,lon_0=10,resolution='l')
    map = Basemap(projection='robin',
                  area_thresh=1000.0,
Ejemplo n.º 4
0
import geodetic

if __name__ == "__main__":
    import argparse

    parser = argparse.ArgumentParser(prog='plotNetwork',description='Create a plot of the network')

    parser.add_argument('--apr',dest='apr_file',help="Location of coordinate file - GAMIT .apr format" )
    parser.add_argument('-s','--sites',dest='sites',nargs='+',help="Sites to plot (4 charcater ID)")

    args = parser.parse_args()

    lons = []
    lats = []
    # get the reference frame parameters
    a,b,e2,finv = geodetic.refell('WGS84')

    for siteID in args.sites:
        sitepos = gapr.getStationPos(args.apr_file,siteID)
        dphi,dlambda,h = gcoord.togeod(a,finv,sitepos[0],sitepos[1],sitepos[2] )
        lats.append(dphi)
        lons.append(dlambda)

    # set up orthographic map projection with
    # perspective of satellite looking down at 50N, 100W.
    # use low resolution coastlines.
    #map = Basemap(projection='ortho',lat_0=-45,lon_0=140,resolution='l')
    #map = Basemap(projection='hammer',lat_0=-45,lon_0=10,resolution='l')
    map = Basemap(projection='robin',area_thresh = 1000.0,lat_0=-45,lon_0=10,resolution='l')

    # draw coastlines, country boundaries, fill continents.