An efficient GPS library suitable for embedded systems