Ejemplo n.º 1
0
        public void LoadAntennaData(SphericAntennaArgs args, string file = "PCB_868_tot.csv")
        {
            var setup  = new CsvStorageSetup(new FileInfo(Path.Combine(APP_LOCATION, file)), 1);
            var parser = new CsvToAntennaGainParser(24);
            var csv    = new CsvStorage <DataRow>(setup, parser, new AntennaGainToCsvParser());

            csv.Read();
            args.GainMatrix = parser.GetGainMatrix();
        }
Ejemplo n.º 2
0
        private ArgumentsBase ReadSphericAntenna(string file)
        {
            var spa = ReadJson <SphericAntennaArgs>(file);

            // TODO: remove magic numer that is used to read csv table
            var columns         = 24;
            var antennaDataFile = Path.Combine(_pipe.Options.Workspace, spa.DataSource);
            var setup           = new CsvStorageSetup(new FileInfo(antennaDataFile), 1);
            var parser          = new CsvToAntennaGainParser(columns);
            var csv             = new CsvStorage <DataRow>(setup, parser, new AntennaGainToCsvParser());

            csv.Read();
            spa.GainMatrix = parser.GetGainMatrix();

            return(spa);
        }