27 int main(
int argc,
char** argv) {
36 CmdLine cmd(
"Calculator for yaw to quaternion.",
' ',
"0.1");
47 std::cerr <<
"error: " << e.
error() <<
" for arg " << e.
argId() << std::endl;
49 if ( ( x != 0.0 ) && ( y != 0.0 ) ) {
50 std::cout <<
"This quaternion has non-yaw components, aborting." << std::endl;
55 double degrees = rads * 360.0 / (2 *
ecl::pi);
56 std::cout <<
"Quaternion {x: " << x <<
" y: " << y <<
" z: " << z <<
" w: " << w <<
"} -> ";
57 std::cout << rads <<
" radians -> " << degrees <<
" degrees." << std::endl;
int main(int argc, char **argv)
int sign(const Scalar &x)
std::string argId() const
std::string error() const
void parse(int argc, char **argv)