예제 #1
0
        public EphGps findEph(long unixTime, int satID, char satType, Location initialLocation)
        {
            long   requestedTime = unixTime;
            EphGps eph           = null;
            int    maxBack       = 12;

            while (eph == null && (maxBack--) > 0)
            {
                RinexNavigationParserGps rnp = getRNPByTimestamp(requestedTime, initialLocation);

                if (rnp != null)
                {
                    if (rnp.isTimestampInEpocsRange(unixTime))
                    {
                        eph = rnp.findEph(unixTime, satID, satType);
                    }
                }
                if (eph == null)
                {
                    requestedTime -= (1L * 3600L * 1000L);
                }
            }

            return(eph);
        }
예제 #2
0
        /** Compute the GPS satellite coordinates
         *
         * INPUT:
         * @param unixTime       = time of measurement reception - UNIX        [milliseconds]
         * @param range          = pseudorange measuremnent                          [meters]
         * @param satID          = satellite ID
         * @param satType        = satellite type indicating the constellation (E: Galileo,
         *                      G: GPS)
         * @param receiverClockError = 0.0
         */
        public SatellitePosition getSatPositionAndVelocities(long unixTime, double range, int satID, char satType, double receiverClockError, Location initialLocation)
        {
            //long unixTime = obs.getRefTime().getMsec();
            //double range = obs.getSatByIDType(satID, satType).getPseudorange(0);

            RinexNavigationParserGps rnp = getRNPByTimestamp(unixTime, initialLocation);

            if (rnp != null)
            {
                if (rnp.isTimestampInEpocsRange(unixTime))
                {
                    return(rnp.getSatPositionAndVelocities(unixTime, range, satID, satType, receiverClockError));
                }
                else
                {
                    return(null);
                }
            }

            return(null);
        }