Пример #1
0
        /// <summary>
        /// Satellites in view
        /// </summary>
        /// <returns>Array of Satellites</returns>
        public Satellite[] GetSatellitesInView()
        {
            Satellite[] satellites = null;
            if (dwSatellitesInView != 0)
            {
                satellites = new Satellite[dwSatellitesInView];
                for (int index = 0; index < satellites.Length; index++)
                {
                    satellites[index]                = new Satellite();
                    satellites[index].Azimuth        = rgdwSatellitesInViewAzimuth[index];
                    satellites[index].Elevation      = rgdwSatellitesInViewElevation[index];
                    satellites[index].Id             = rgdwSatellitesInViewPRNs[index];
                    satellites[index].SignalStrength = rgdwSatellitesInViewSignalToNoiseRatio[index];
                }
            }

            return(satellites);
        }
Пример #2
0
        /// <summary>
        /// Satellites used in the solution
        /// </summary>
        /// <returns>Array of Satellites</returns>
        public Satellite[] GetSatellitesInSolution()
        {
            Satellite[] inViewSatellites = GetSatellitesInView();
            ArrayList   list             = new ArrayList();

            for (int index = 0; index < dwSatelliteCount; index++)
            {
                Satellite found = null;
                for (int viewIndex = 0; viewIndex < inViewSatellites.Length && found == null; viewIndex++)
                {
                    if (rgdwSatellitesUsedPRNs[index] == inViewSatellites[viewIndex].Id)
                    {
                        found = inViewSatellites[viewIndex];
                        list.Add(found);
                    }
                }
            }

            return((Satellite[])list.ToArray(typeof(Satellite)));
        }