With the development of the Global Navigation Satellite Systems (GNSS), GNSS-based localization techniques have become the vital source of location for many fundamental applications. However, GNSS localization performance can be affected by the environment on the propagation trajectory, which leads to varying degrees of accuracy degradation. The GNSS localization errors can vary from centimeters to meters level in different environments, an accurate position error estimation model is of great significance, which provides basic information for error correction. GNSS receivers work obeying the same principle, with differences in location algorithms. In this paper, parameters such as SNR (signal noise ratio), elevation angle, azimuth, and HDOP are extracted as the observed quantities, and the relationship between the total localization error and the observed quantities is studied using neural networks and localization data in different environmental scenarios. The localization error model is then validated using field collected data, and the mean square error of the loss function and the goodness-of-fit values illustrate that the training effect of the Long short-term memory (LSTM) network is better than that of deep neural network (DNN), and the generalizability of DNN model parameters is better than that of LSTM, both of which can be used to improve the accuracy of static localization and the smoothness of dynamic localization paths.