/// <summary> /// Satellites in view /// </summary> /// <returns>Array of Satellites</returns> public IEnumerable <Satellite> GetSatellitesInView() { // if valid view if ((dwValidFields & GPS_VALID_SATELLITES_IN_VIEW) != 0 && dwSatellitesInView != 0) { for (int index = 0; index < dwSatellitesInView; index++) { Satellite ret = new Satellite(rgdwSatellitesInViewPRNs[index], rgdwSatellitesInViewElevation[index], rgdwSatellitesInViewAzimuth[index], rgdwSatellitesInViewSignalToNoiseRatio[index], false); // if valid solution if ((dwValidFields & GPS_VALID_SATELLITES_USED_PRNS) != 0) { for (int index2 = 0; index2 < dwSatelliteCount; index2++) { if (rgdwSatellitesUsedPRNs[index2] == ret.Id) { ret.InSolution = true; break; } } } yield return(ret); } } }
/// <summary> /// Satellites in view /// </summary> /// <returns>Array of Satellites</returns> public IEnumerable<Satellite> GetSatellitesInView() { // if valid view if((dwValidFields & GPS_VALID_SATELLITES_IN_VIEW) != 0 && dwSatellitesInView != 0) { for(int index = 0; index < dwSatellitesInView; index++) { Satellite ret = new Satellite(rgdwSatellitesInViewPRNs[index], rgdwSatellitesInViewElevation[index], rgdwSatellitesInViewAzimuth[index], rgdwSatellitesInViewSignalToNoiseRatio[index], false); // if valid solution if((dwValidFields & GPS_VALID_SATELLITES_USED_PRNS) != 0) { for(int index2 = 0; index2 < dwSatelliteCount; index2++) { if(rgdwSatellitesUsedPRNs[index2] == ret.Id) { ret.InSolution = true; break; } } } yield return ret; } } }