FACT++  1.0
template<class T , class S >
string StateMachineDrive< T, S >::AngleToStr ( double  angle)
inlineprivate

Definition at line 822 of file cosyctrl.cc.

References str.

823  {
824  /* Handle sign */
825  const char sgn = angle<0?'-':'+';
826 
827  /* Round interval and express in smallest units required */
828  double a = round(3600. * fabs(angle)); // deg to seconds
829 
830  /* Separate into fields */
831  const double ad = trunc(a/3600.);
832  a -= ad * 3600.;
833  const double am = trunc(a/60.);
834  a -= am * 60.;
835  const double as = trunc(a);
836 
837  /* Return results */
838  ostringstream str;
839  str << sgn << " " << uint16_t(ad) << " " << uint16_t(am) << " " << as;
840  return str.str();
841  }
char str[80]
Definition: test_client.c:7