AGPS support
credits to FXP