Hello, I am using a GPS sensor for auton this year and I was testing the GPS’ position but it kept returning 0 for both x and y positions. The GPS Sensor is called GPSSensor and I calibrated the sensor in the pre_auton function. Here is the code:
void Calibrate() {
GPSSensor.setOrigin(0,0, inches);
while (true) {
double xPos = GPSSensor.xPosition(inches);
double yPos = GPSSensor.yPosition(inches);
Brain.Screen.print(xPos);
Brain.Screen.print(", ");
Brain.Screen.print(yPos);
wait(5, sec);
Brain.Screen.newLine();
}
}
*Sorry the code isn’t formatted nicely, I don’t know how to do that
edit: code tags added by mods
Also, I checked the GPS Sensor on the brain and it is seeing everything correctly and even displays the position correctly but for some reason it is just not returning the values correctly.