예제 #1
0
        //! Stations constructor.

        /*!
         *  \param string name of station
         *  \param GeoCoordinate position of the Station
         *  \param Antenna antenna available at the stations
         *  constructs a Groundstationat with a advanced antenna the given coordinates
         */
        public Station(string _name, Definition.GeoCoordinate _geoCord,
                       Antenna _antenna)
        {
            antennaList   = new List <Antenna>();
            geoCoordinate = _geoCord;
            name          = _name;
            antennaList.Add(_antenna);
        }
예제 #2
0
        //! Stations constructor.

        /*!
         *  \param string name of station
         *  \param GeoCoordinate position of the Station
         *  \param List<Antennas> list of available antennas
         *  constructs a Groundstation at the given coordinates
         */
        public Station(string _name, Definition.GeoCoordinate _geoCord,
                       List <Antenna> antennas)
        {
            antennaList   = new List <Antenna>();
            geoCoordinate = _geoCord;
            name          = _name;
            antennaList   = antennas;
        }
예제 #3
0
        //! Draw selected satellite path to image.

        /*!
         * \param One_Sgp4.Tle tle data from selected Satellite
         * \return Image bmp-Image
         */
        public static Image drawSatellite(One_Sgp4.Tle tleData)
        {
            Image imgSatellite = Properties.Resources.worldsmaller;

            try
            {
                One_Sgp4.Sgp4      task      = new One_Sgp4.Sgp4(tleData, Properties.Settings.Default.orbit_Wgs);
                One_Sgp4.EpochTime starttime = new One_Sgp4.EpochTime(DateTime.UtcNow);
                One_Sgp4.EpochTime stoptime  = new One_Sgp4.EpochTime(DateTime.UtcNow.AddHours(4));
                task.setStart(starttime, stoptime, 30.0 / 60.0);
                Task thread = new Task(task.starThread);
                thread.Start();
                Task.WaitAll(thread);
                List <One_Sgp4.Sgp4Data> calcPposData = null;
                calcPposData = task.getRestults();

                Pen penRest = new Pen(Color.Red, 1);
                Pen penSat  = new Pen(Color.Red, 10);
                using (var graphics = Graphics.FromImage(imgSatellite))
                {
                    for (int i = 0; i < calcPposData.Count; i++)
                    {
                        One_Sgp4.Coordinate oneSubPoint =
                            One_Sgp4.SatFunctions.calcSatSubPoint(starttime, calcPposData[i]);

                        Definition.GeoCoordinate subPoint = new Definition.GeoCoordinate(oneSubPoint.getLatetude(), oneSubPoint.getLongitude(), oneSubPoint.getHeight());

                        Point p = subPoint.toPoint(imgSatellite.Width, imgSatellite.Height);

                        graphics.DrawRectangle(penRest, p.X - 1, p.Y - 1, 2, 2);
                        if (i == 0)
                        {
                            graphics.DrawRectangle(penSat, p.X - 5, p.Y - 5, 2, 2);
                        }
                        starttime.addTick(30.0);
                    }
                }
            }
            catch
            {
                imgSatellite = Properties.Resources.worldsmaller;
            }
            return(imgSatellite);
        }
예제 #4
0
        //! Stations constructor.

        /*!
         *  \param string name of station
         *  \param double latetude of the station
         *  \param double longitude of the station
         *  \param double height of the stations
         *  constructs a Groundstationat with one antenna the given coordinates
         */
        public Station(string _name, double latetude, double longetude,
                       double height = 0.0)
        {
            geoCoordinate = new Definition.GeoCoordinate(latetude, longetude, height);
            name          = _name;
        }
예제 #5
0
        //! Set the Coordinates of the Stations

        /*!
         *  \param GeoCoordinate
         */
        public void setGeoCoordinate(Definition.GeoCoordinate _geoCoord)
        {
            geoCoordinate = _geoCoord;
        }