using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper;
using skyscraper5.Skyscraper.Gps;
using skyscraper5.Skyscraper.IO;
using skyscraper5.Skyscraper.Scraper;
using skyscraper8.Skyscraper.Scraper.Storage;

namespace skyscraper8.Skyscraper.FrequencyListGenerator
{
	public class BlindscanJobConfiguration
	{
		public IStreamReader StreamReader { get; set; }
		public TunerMetadata TunerMetadata { get; set; }
		public int DiseqcIndex { get; set; }
		public IGpsReceiver Gps { get; set; }
		public double SatellitePosition { get; set; }

		public bool DoHorizontalHigh { get; set; }
		public bool DoHorizontalLow { get; set; }
		public bool DoVerticalHigh { get; set; }
		public bool DoVerticalLow { get; set; }

		public DataStorage DataStorage { get; set; }
		public ObjectStorage ObjectStorage { get; set; }
		public ISkyscraperUiJunction Ui { get; set; }
		public bool DoCollectRfSpectrum { get; set; }
		public bool DoCollectIqGraphs { get; set; }
		public bool DoRecordTs { get; set; }
		public Ini Ini { get; set; }
        public int Lof1 { get; internal set; }
        public int Lof2 { get; internal set; }
        public int LofSw { get; internal set; }
        public int MinimumFrequency { get; internal set; }
        public int MaximumFrequency { get; internal set; }

        internal string GetFiveLetterSattelitePosition()
        {
			if (SatellitePosition >= 0)
			{
				return String.Format("{0:D4}E", (int)(SatellitePosition * 10));
			}
			else
			{
				int westerner = (int)(SatellitePosition * 10);
				westerner /= -1;
				return String.Format("{0:D4}W", westerner);
			}
        }
    }
}
