3 void transform(
const gsl_vector*
p,
const gsl_vector* x, gsl_vector*res) {
4 double theta =
gvg(x,2);
5 double c = cos(theta);
double s = sin(theta);
6 gsl_vector_set(res, 0, c *
gvg(p,0) -s*
gvg(p,1) +
gvg(x,0));
7 gsl_vector_set(res, 1, s *
gvg(p,0) +c*
gvg(p,1) +
gvg(x,1));
15 double norm(
const gsl_vector*a){
22 gsl_vector * v = gsl_vector_alloc(n);
32 for(i=0;i<v->size;i++)
33 gsl_vector_set(v,i, x[i]);
38 for(i=0;i<v->size;i++)
42 void oplus(
const gsl_vector*x1,
const gsl_vector*x2, gsl_vector*res) {
43 double c = cos(
gvg(x1,2));
44 double s = sin(
gvg(x1,2));
50 void ominus(
const gsl_vector*x, gsl_vector*res) {
51 double c = cos(
gvg(x,2));
52 double s = sin(
gvg(x,2));
58 void pose_diff(
const gsl_vector*pose2,
const gsl_vector*pose1,gsl_vector*res) {
59 gsl_vector* temp = gsl_vector_alloc(3);
61 oplus(temp, pose2, res);
62 gsl_vector_free(temp);
80 double limit_x = 2 * sqrt(
egsl_atm(cov, 0, 0));
81 double limit_y = 2 * sqrt(
egsl_atm(cov, 1, 1));
82 double limit_th = 2 * sqrt(
egsl_atm(cov, 2, 2));
84 sprintf(
egsl_tmp_buf,
"(+- %4.2f mm,+- %4.2f mm,+- %4.4f deg)",
gsl_vector * vector_from_array(unsigned int n, double *x)
void gsl_vector_set_nan(gsl_vector *v)
const char * egsl_friendly_cov(val cov)
void ominus(const gsl_vector *x, gsl_vector *res)
const char * friendly_pose(const double *pose)
void copy_from_array(gsl_vector *v, double *x)
double norm(const gsl_vector *a)
void oplus(const gsl_vector *x1, const gsl_vector *x2, gsl_vector *res)
double egsl_atm(val v1, size_t i, size_t j)
void pose_diff(const gsl_vector *pose2, const gsl_vector *pose1, gsl_vector *res)
const char * gsl_friendly_pose(gsl_vector *v)
double egsl_atv(val v1, size_t i)
void transform(const gsl_vector *p, const gsl_vector *x, gsl_vector *res)
static char egsl_tmp_buf[1024]
double rad2deg(double rad)
const char * egsl_friendly_pose(val v)
void vector_to_array(const gsl_vector *v, double *x)