54 tid = readSSM_time(
odm_gl_sid, (
char *)&odm1, time, &time1);
55 tid2 = readSSM(
odm_gl_sid, (
char *)&odm2, &time2, tid + 1);
60 tid = readSSM(
odm_gl_sid, (
char *)&odm1, &time1, tid - 1);
62 if (fabs(time2 - time1) < 0.000001)
64 if (fabs(time2 - time1) > 0.03)
69 rate = (time - time1) / (time2 - time1);
70 *x = odm1.
x + (odm2.
x - odm1.
x) * rate;
71 *y = odm1.
y + (odm2.
y - odm1.
y) * rate;
73 odm2.
theta += 2.0 * M_PI;
75 odm2.
theta -= 2.0 * M_PI;
78 odm2.
theta += 2.0 * M_PI;
80 odm2.
theta -= 2.0 * M_PI;
93 tid = readSSM_time(
odm_bs_sid, (
char *)&odm1, time, &time1);
94 tid2 = readSSM(
odm_bs_sid, (
char *)&odm2, &time2, tid + 1);
99 tid = readSSM(
odm_bs_sid, (
char *)&odm1, &time1, tid - 1);
101 if (fabs(time2 - time1) < 0.000001)
103 if (fabs(time2 - time1) > 0.03)
108 rate = (time - time1) / (time2 - time1);
109 *x = odm1.
x + (odm2.
x - odm1.
x) * rate;
110 *y = odm1.
y + (odm2.
y - odm1.
y) * rate;
112 odm2.
theta += 2.0 * M_PI;
114 odm2.
theta -= 2.0 * M_PI;
117 odm2.
theta += 2.0 * M_PI;
119 odm2.
theta -= 2.0 * M_PI;
131 tid = readSSM(
odm_gl_sid, (
char *)&odm1, &time1, -1);
148 tid = readSSM(
odm_bs_sid, (
char *)&odm1, &time1, -1);
166 tid = readSSM(
odm_bs_sid, (
char *)&odm1, &time1, -1);
175 double cx, cy, ctheta;
179 dist = sqrt((cx - x) * (cx - x) + (cy - y) * (cy - y));
188 double cx, cy, ctheta;
int SSM_near_ang(double th, double d)
static SSM_sid odm_gl_sid
double SSM_get_pos_GL(double *x, double *y, double *theta)
double SSM_get_vel(double *v, double *w)
int SSM_get_pos_BS_time(double time, double *x, double *y, double *theta)
double SSM_get_pos_BS(double *x, double *y, double *theta)
static SSM_sid odm_bs_sid
int SSM_get_pos_GL_time(double time, double *x, double *y, double *theta)
int SSM_near_pos_GL(double x, double y, double r)
int SSM_over_line(double x, double y, double theta)
int OdometrySSM_init(void)