Esempio n. 1
0
    /** Return the satellite health at the given time.
     * @param SatID sat satellite of interest
     * @param CommonTime t time of interest
     * @return true if the satellite is healthy */
 bool getSatHealth(const SatID& sat, const CommonTime& t) const
 {
       // get the appropriate OrbitEph
    const OrbitEph *eph = findOrbitEph(sat,t);
    if (eph == NULL)
       return false;
    return eph->isHealthy();
 }
Esempio n. 2
0
      /// Find a GalEphemeris for the indicated satellite at time t, using the
      /// OrbitEphStore::find() routine, which considers the current search method.
      /// @param sat the satellite of interest
      /// @param t the time of interest
      /// @return a pointer to the desired OrbitEph, or NULL if no OrbitEph found.
      /// @throw InvalidRequest if the satellite system is not BeiDou, or if
      /// ephemeris is not found.
      const GalEphemeris& findEphemeris(const SatID& sat, const CommonTime& t) const
      {
         if(sat.system != SatID::systemGalileo) {
            InvalidRequest e("Invalid satellite system");
            GPSTK_THROW(e);
         }

         const OrbitEph *eph = findOrbitEph(sat,t);
         if(!eph) {
            InvalidRequest e("Ephemeris not found");
            GPSTK_THROW(e);
         }

         // gynmastics...
         const GalEphemeris* geph = dynamic_cast<const GalEphemeris*>(eph);
         const GalEphemeris& galeph(*geph);

         return galeph;
      }