gnssSatellitesInView (Function) |
Top Previous Next |
Retrieves information about the satellites in view. This can be used to help with determining the local signal conditions and position accuracy. Input: type : SINT (Default: 0) 0 = GPS 1 = GLONASS 2 = GALILEO.
tracked : BOOL Default TRUE Retrieve satellites that are being tracked.
untracked : BOOL Default FALSE Retrieve untracked satellites.
gnss : BOOL Default TRUE Retrieve normal positioning satellites.
sbas : BOOL Default FALSE Retrieve SBAS satellites.
Output: satellites : gnssSatellites STRUCT_BLOCK with space for information about 30 satellites: id[n]: SINT Satellite ID.
elevation[n]: SINT Elevation angle for satellite n.
azimuth[n]: INT Azimuth angle for satellite n.
SNR[n]: SINT Signal to noise ratio for satellite n. If the satellite is untracked, the SNR will be 120.
Returns: INT Number of found satellites matching the filter
Declaration:
STRUCT_BLOCK ALIGN gnssSatellites; id : ARRAY [1..30] OF SINT; elevation : ARRAY [1..30] OF SINT; azimuth : ARRAY [1..30] OF INT; SNR : ARRAY [1..30] OF SINT; END_STRUCT_BLOCK;
FUNCTION ALIGN gnssSatellitesInView: INT; VAR_INPUT type : SINT := 0; tracked : BOOL := TRUE; untracked : BOOL := FALSE; gnss : BOOL := TRUE; sbas : BOOL := FALSE; satellites : ACCESS gnssSatellites; END_VAR; END_FUNCTION;
Example: INCLUDE rtcu.inc |