示例#1
0
        //! EpochTime constructor.

        /*!
         * \param EpochTime
         * Contructs EpochTime from EpochTime Object
         */
        public EpochTime(EpochTime _EpochTime)
        {
            hour    = _EpochTime.getHour();
            minutes = _EpochTime.getMin();
            seconds = _EpochTime.getSec();

            year  = _EpochTime.getYear();
            month = _EpochTime.getMonth();
            day   = _EpochTime.getDay();

            epoch = _EpochTime.getEpoch();
        }
示例#2
0
        //! EpochTime constructor.
        /*!
        \param EpochTime
        Contructs EpochTime from EpochTime Object
        */
        public EpochTime(EpochTime _EpochTime)
        {
            hour = _EpochTime.getHour();
            minutes = _EpochTime.getMin();
            seconds = _EpochTime.getSec();

            year = _EpochTime.getYear();
            month = _EpochTime.getMonth();
            day = _EpochTime.getDay();

            epoch = _EpochTime.getEpoch();
        }
示例#3
0
        //! Run the sgp4 calculations
        /*!
        \param EpochTime starttime
        \param EpochTime stoptime
        \param double step in minutes
        calculates the orbit of the satellite starting from start to stoptime
        */
        public void runSgp4Cal(EpochTime starttime, EpochTime stoptime, double step)
        {
            EpochTime time = starttime;
            int startY = starttime.getYear();
            int stopY = stoptime.getYear();
            if (startY < 1900)
            {
                if (startY < 50)
                    startY = startY + 2000;
                else
                    startY = startY + 1900;
            }
            if (stopY < 1900)
            {
                if (stopY < 50)
                    stopY = stopY + 2000;
                else
                    stopY = stopY + 1900;
            }
            double starD = starttime.getEpoch();
            double stopD = stoptime.getEpoch();

            satCalcData.rec_srtime = (startY - 1950) * 365 + (startY - 1949) / 4 + starD;
            satCalcData.rec_sptime = (stopY - 1950) * 365 + (stopY - 1949) / 4 + stopD;
            satCalcData.rec_deltamin = step;

            double temp_t = (satCalcData.rec_srtime - satCalcData.rec_eptime) * 1440.0;
            satCalcData.neo.neo_t = temp_t;

            double stopTime = (satCalcData.rec_sptime - satCalcData.rec_eptime) * 1440.0 +
                satCalcData.rec_deltamin;

            while (temp_t < stopTime)
            {
                resultOrbitData.Add(calcSgp4());
                temp_t = temp_t + satCalcData.rec_deltamin;
                satCalcData.neo.neo_t = temp_t;
            }
        }