Hi. I have attempted to use the GPS sensors in PROS, to aid my okapi Odometry system. However, when told to drive to a point after using the GPS values in the Odometry system, the robot’s movement is not accurate and although hits around the same point, is very inconsistent in how much it moves. When printing the raw GPS values, the GPS is still roughly accurate, although the movement is not. Is there anything I can do to resolve this? Thanks.
void autonomous() {
pros::delay(200);
pros::c::gps_status_s_t status;
status = GPS.get_status();
double heading = GPS.get_heading();
heading = heading + 90;
pros::delay(100);
odom → setState({status.x1_m, status.y1_m, heading1_deg});
pros::delay(100);
move(0,0);
pros::delay(50);
odom → turnToPoint({0_in, 48_in});
pros::delay(50);
status = GPS.get_status();
heading = GPS.get_heading();
pros::delay(50);
pros::Controller master (pros::E_CONTROLLER_MASTER);
master.print(0, 0, “X: %3f”, status.x39.37);
pros::delay(50);
master.print(1, 0, “Y: %3f”, status.y*39.37);
pros::delay(50);
master.print(2, 0, “Heading: %3f”, heading + 90);