pymgp.satorb.satlookangle#

pymgp.satorb.satlookangle(t, xsat, xobj, verbose=0, swathdef=['VIS', 0, 80, ''], ellips=[True, False])[source]#

Compute table with satellite look angles.

Compute a table with lookangles

  • zenith and azimuth angles to satellite for an object on the Earth or in space,

  • off-nadir and azimuth angle from satellite to object, the lookangle to the object with resepect to the direction of flight of the satellite, and the heading of angle of the satellite

  • range and range-rate between object and satellite

and flags for visibility, ascending/descending orbit, right/left looking, etc.

Parameters:
tarray_like with shape (n,) or scalar, of type datetime64, str or float

Universal time as datetime64 object, ISO date string or sequential date number (days since 1970-01-01).

xsatarray_like with shape (…,n,6)

Array with satellite state vector with positions (m) and velocities (m/s) in ECEF or ECI reference frame.

xobjarray_like with shape (3,), (…,n,3) or (…,n,6)

Array with the position of the object for which the lookangles are to be computed. xobj is either an array of shape (3,) or (…,n,3) with position(s) in the ECEF reference frame, or an array with shape (…,n,6) for statevectors with position and velocity in an ECEF or ECI referenence frame. xobj and xsat must always be in the same reference frame.

ellipslist of bool, optional

Choice between ellipsoidal or spherical angles for viewing from respectively object and satellite. True means using ellipsoidal angles. Default is [true, false]

swathdeflist, optional

Swathdef is a list with four items defining when a satellite is visible. The list consists of a label, the incidence angle range, and the look direction (right look’RL’, left look ‘LL’ or both ‘’). Example for SENTINEL-1, with swath names, minimum and maximum incidence angle, right looking

>>> swathdef=[['IW1', 29.16, 36.59, 'RL' ],  
...            'IW2', 34.77, 41.85, 'RL' ],  
...            'IW3', 40.04, 46.00, 'RL' ]]

Default is a 10 deg elevation mask

>>> swathdef= ['VIS', 0.00, 80.00, '']
verboseint, optional

Verbosity level, possible values are 0 or 1 (default is 0)

Returns:
lookanglesndarray of floats with shape (…,n,8)

Array with the angles (rad), range (m) and range-rate (m/s):

0  incidence angle at the object, which is identical to the zenith angle,
1  azimuth angle from object to the satellite,
2  off-nadir angle at the satellite to the direction of the object,
3  azimuth angle at the satellite in the direction of the object,
4  look angle in the direction of the object with respect to the flight 
   direction of the satellite, 
5  azimuth angle of the flight direction of the satellite 
6  range between satellite and object
7  range rate in the line of sight
flagsndarray of str with shape (…,n,3)

Array with in the first column a ascending/descending flag ['ASC'|'DSC'], in the 2nd column the left- or right-looking flag ['LL'|'RL'], and in the third column the visibility flag ['VIS|''|<swath>], whereby the swath name can be set by the optional swathdef parameter.

Notes

xsat and xobj must be in the same reference frame: so if xobj is a shape (…,3) array in ECEF, then also xsat must be in the ECEF reference frame. If xobj is a shape (..,6) array then both ECI and ECEF are possible, but the reference frame for xsat must be the same as for xobj.

Examples

>>> t = np.array(['2012-01-04 15:00:00', '2012-01-04 16:00:00', '2012-01-04 17:00:00', '2012-01-04 18:00:00'], dtype='datetime64[ns]')
>>> xsat = [[-3312531.1007, -5646883.8176, 2737195.4374,  5670.7751, -3969.9994, -1280.2560 ],
...         [ 1413410.4872, -7049655.8712,   16233.9739, -1633.0415,  -309.5460,  7358.7436 ],
...         [-2450115.4006,  6613647.9795,  968353.5303, -6085.7029, -1802.9846, -2992.6557 ],
...         [ -649857.9621,  7022897.5289,  968353.5303, -6345.1020,  -161.9056, -2992.6557 ]]
>>> xobj = [ 3924687.7018, 301132.7660, 5001910.7746]
>>> lookangles, flags = satlookangle(t, xsat, xobj, verbose=1)

                        Incidence Satellite  Off-Nadir LookAngle LookAngle
         Satellite Pass     Angle   Azimuth      Angle   Azimuth FlightDir   Heading     Range Rangerate   Flags
                            (deg)     (deg)      (deg)     (deg)     (deg)     (deg)      (km)    (km/s)
2012-01-04T15:00:00.000   132.479   310.847     41.320    30.533   289.102   101.432  9637.695    -1.507   DSC LL 
2012-01-04T16:00:00.000   129.061   264.759     43.437    38.002    50.729   347.273  9230.254    -3.284   ASC RL 
2012-01-04T17:00:00.000   133.693    72.462     40.230   323.433   207.920   115.513  9836.440     4.014   DSC LL 
2012-01-04T18:00:00.000   128.662    84.296     44.263   321.590   206.077   115.513  9076.242     4.408   DSC LL