PROS not printing accurate GPS values

When using the GPS through the v5 brain, the coordinates are accurate. However, when I use PROS to print the coordinates on the v5 brain, the coordinates are not only inaccurate but also drifting everytime I refresh it. I have attached the code below for reference. Also, the odom setState function does not seem to accept variables. Am I doing something wrong or is there a workaround?
If anyone can help me with this issue, it would be greaty appreciated. Thanks

void getGPS(double n) {
pros::c::gps_status_s_t status;
status = GPS.get_status();
double heading = GPS.get_heading();
double x = status.x;
double y = status.y;
odom → setState({1x1_m, 1y1_m, 1heading1_deg});
pros::screen::print(TEXT_MEDIUM, (n-1)*3+1, “X Position: %3f”, (x/0.0254));
pros::screen::print(TEXT_MEDIUM, (n-1)*3+2, “Y Position: %3f”, (y/0.0254));
pros::screen::print(TEXT_MEDIUM, (n-1)*3+3, “Heading: %3f”, heading);
}