GPS technology was developed from a predecessor proposed during the cold war to provide Land-Based US ballistic missile launch sites with accurate position, because the process after moving the missiles around was so difficult (ie all day) by conventional means.. The idea was to move the missiles around by train.
Nuclear launch submarines stay underwater, and don't use GPS for positioning. GPS was developed (out of earlier ideas) to provide civilian navigation information, after the loss of an American airliner over Soviet Territory. Normally the US military is a bit pissed off at having such a huge chunk of "their" budget directed to political/civilian "research" projects, but it always been the case that the military is able to use civilian navigation aids. That approach was justified the first time the US military really wanted to use GPS, when they had to turn off jitter and supply civilian GPS receivers to the troops.