Esempio n. 1
0
        internal List <LoadPosition> GetLoadPositions(SearchZone zone)
        {
            List <LoadPosition> searchPositions = new List <LoadPosition>();

            UCAC2BinIndexEntry lastEntry = null;

            for (int i = 0; i < ZoneIndex.Length; i++)
            {
                UCAC2BinIndexEntry entry = ZoneIndex[i];

                if (zone.DEFrom > entry.DEFrom)
                {
                    lastEntry = entry;
                    continue;
                }

                if (lastEntry != null)
                {
                    entry = lastEntry;
                }

                // Add one position
                LoadPosition pos = new LoadPosition(this, entry, zone);
                searchPositions.Add(pos);

                while (zone.DETo > entry.DETo)
                {
                    if (entry.ZoneId < ZoneIndex.Length)
                    {
                        entry = ZoneIndex[entry.ZoneId];
                        // Add another position
                        LoadPosition pos2 = new LoadPosition(this, entry, zone);
                        searchPositions.Add(pos2);
                    }
                }

                break;
            }

            lastEntry = null;
            for (int i = 0; i < BSSZoneIndex.Length; i++)
            {
                UCAC2BinIndexEntry entry = BSSZoneIndex[i];

                if (zone.DEFrom > entry.DEFrom)
                {
                    lastEntry = entry;
                    continue;
                }

                if (lastEntry != null)
                {
                    entry = lastEntry;
                }

                // Add one position
                LoadPosition pos = new LoadPosition(this, entry, zone, true);
                searchPositions.Add(pos);

                while (zone.DETo > entry.DETo)
                {
                    if (entry.ZoneId < BSSZoneIndex.Length)
                    {
                        entry = BSSZoneIndex[entry.ZoneId];
                        // Add another position
                        LoadPosition pos2 = new LoadPosition(this, entry, zone, true);
                        searchPositions.Add(pos2);
                    }
                }

                break;
            }

            return(searchPositions);
        }
Esempio n. 2
0
        internal List<LoadPosition> GetLoadPositions(SearchZone zone)
        {
            List<LoadPosition> searchPositions = new List<LoadPosition>();

            UCAC2BinIndexEntry lastEntry = null;

            for (int i = 0; i < ZoneIndex.Length; i++)
            {
                UCAC2BinIndexEntry entry = ZoneIndex[i];

                if (zone.DEFrom > entry.DEFrom)
                {
                    lastEntry = entry;
                    continue;
                }

                if (lastEntry != null) entry = lastEntry;

                // Add one position
                LoadPosition pos = new LoadPosition(this, entry, zone);
                searchPositions.Add(pos);

                while (zone.DETo > entry.DETo)
                {
                    if (entry.ZoneId < ZoneIndex.Length)
                    {
                        entry = ZoneIndex[entry.ZoneId];
                        // Add another position
                        LoadPosition pos2 = new LoadPosition(this, entry, zone);
                        searchPositions.Add(pos2);
                    }
                }

                break;
            }

            lastEntry = null;
            for (int i = 0; i < BSSZoneIndex.Length; i++)
            {
                UCAC2BinIndexEntry entry = BSSZoneIndex[i];

                if (zone.DEFrom > entry.DEFrom)
                {
                    lastEntry = entry;
                    continue;
                }

                if (lastEntry != null) entry = lastEntry;

                // Add one position
                LoadPosition pos = new LoadPosition(this, entry, zone, true);
                searchPositions.Add(pos);

                while (zone.DETo > entry.DETo)
                {
                    if (entry.ZoneId < BSSZoneIndex.Length)
                    {
                        entry = BSSZoneIndex[entry.ZoneId];
                        // Add another position
                        LoadPosition pos2 = new LoadPosition(this, entry, zone, true);
                        searchPositions.Add(pos2);
                    }
                }

                break;
            }

            return searchPositions;
        }