The drill bit is equipped with a GPS tracker that shows the length of the lateral.
Almost correct. GPS is used for precise location of the well Entrance point. But, GPS signals won't penetrate far into the earth.
There is a component attached to a directional drilling Head that incorporates "inertial guidance". (Remember gyroscopes?) These are very similar to the inertial guidance systems used in missles and spacecraft. This unit then communicates with the surface and its movement relative to the Entrance Point can be charted in three dimensions with great accuracy.
That's a much better explanation than mine. Good info, Larry.