This thread has some gear tooth sensor code posted by one of the mentors of my team.
Using a switch of some sort to set the initial position of the robot, it would be possible to use the sensors to determine the x y position of the robot. There may be some trig involved, but I mostly see a need for extreme usage of the pythagorean theorum. Please remember that the sqaure root function takes a long time to execute on the PIC processor, so use it sparingly.