Exemplo n.º 1
0
 /** 
  * Constructs a iTime object and initializes it to the time from the argument.
  * 
  * @param time An ephemeris time (ET).
  */
  iTime::iTime (const double time) {
    LoadLeapSecondKernel ();
    p_et = time;
    Extract ();
    p_original = EtString();
    UnloadLeapSecondKernel ();
  }
Exemplo n.º 2
0
  /**
   * Changes the value of the iTime object.
   *
   * @param time A time string formatted in standard UTC or similar format.
   *             Example:"2000/12/31 23:59:01.6789" or "2000-12-31T23:59:01.6789"
   */
  void iTime::operator=(const QString &time) {
    LoadLeapSecondKernel();

    // Convert the time string to a double ephemeris time
    SpiceDouble et;
    str2et_c(time.toAscii().data(), &et);

    p_et = et;

    UnloadLeapSecondKernel();
  }
Exemplo n.º 3
0
  // Overload of "=" with a c string
  void iTime::operator=(const char *time) {

    LoadLeapSecondKernel();

    // Convert the time string to a double ephemeris time
    SpiceDouble et;
    str2et_c(time, &et);

    p_et = et;

    UnloadLeapSecondKernel();
  }
Exemplo n.º 4
0
 /** 
  * Constructs a iTime object and initializes it to the time from the argument.
  * 
  * @param time A time string formatted in standard UTC or similar format. 
  *             Example:"2000/12/31 23:59:01.6789" or "2000-12-31T23:59:01.6789"
  */
  iTime::iTime (const std::string &time) {
    LoadLeapSecondKernel ();
  
    // Convert the time string to a double ephemeris time
    SpiceDouble et;
    str2et_c (time.c_str(), &et);
  
    p_et = et;
    p_original = time;
  
    Extract ();
    UnloadLeapSecondKernel ();
  }
Exemplo n.º 5
0
 // Overload of "=" with a double
 void iTime::operator=(const double time) {
   LoadLeapSecondKernel();
   p_et = time;
   UnloadLeapSecondKernel();
 }