Satellite look angles from receiver and satellite positions
returns the look angles and visibilities of satellite positions for a given receiver
position. The azimuth
vis] = lookangles(
az and elevation
el are the
look angles in degrees in the Earth-centered Earth-fixed (ECEF) coordinate system. The
visibility of the satellites
vis is a logical array that the function
calculates using the default receiver mask angle of 10 degrees.
lookangles function to get the azimuth and elevation angles of satellites for given satellite and receiver positions. Specify a mask angle of 5 degrees. Get the satellite positions using the
Specify a receiver position in geodetic coordinates (latitude, longitude, altitude).
recPos = [42 -71 50];
Get the satellite positions for the current time.
t = datetime('now'); gpsSatPos = gnssconstellation(t);
Specify a mask angle of 5 degrees.
maskAngle = 5;
Get the azimuth and elevation look angles for the satellite positions. The
vis output indicates which satellites are visible. Get the total using
[az,el,vis] = lookangles(recPos,gpsSatPos,maskAngle); fprintf('%d satellites visible at %s.\n',nnz(vis),t);
9 satellites visible at 01-Sep-2021 14:09:24.
recPos— Receiver position
[lat lon alt]
Receiver position in geodetic coordinates, specified as a three-element vector of the form [latitude longitude altitude]
satPos— Satellite positions
Satellite positions in the Earth-centered Earth-fixed (ECEF) coordinate system in meters, specified as an N-by-3 matrix of scalars. N is the number of satellites in the constellation.
maskAngle— Elevation mask angle
Elevation mask angle of the receiver, specified as a positive scalar in degrees.
az— Azimuth angles for visible satellite positions
Azimuth angles for visible satellite positions, returned as an n-element vector of angles. n is the number of visible satellite positions in the plot. Azimuth angles are measured in degrees, clockwise-positive from the north direction looking down.
[25 45 182 356]
el— Elevation angles for visible satellite positions
Elevation angles for visible satellite positions, returned as an n-element vector of angles. n is the number of visible satellite positions in the plot. Elevation angles are measured from the horizon line with 90 degrees being directly up.
[45 90 27 74]