# Calculating new satellite position given pseudorange measurements

I'm looking for a reference/text for an explicit formula to calculate a satellite position given pseudorange measurements from later epoch times. I've seen a lot of matlab code on the internet but I was hoping to have these formulas laid out nicely. If anyone could point me to the right direction that would be great! Thanks!

• An explicit formula (i.e. a closed form solution) isn't common because the formula isn't linear. Usually you take partial derivatives around a point estimate, and iterate until the residual is acceptable. Hence matlab... – BradHards Oct 1 '14 at 2:54

Algebraic solutions are not very common for GPS, however, several do exist. The most well-known one is probably Bancroft's. Others are Abel's and Kleusberg's.

If you look for some libraries and test environment in c++ or python you could have a look at the piksi swift software tools. It is open source (LGPL) and the code is well documented in terms of function description + literature sources.

The source code documentation of the function `gnss_analysis/solution.py/singe_point_position` addresses the literature Kaplan, E.. Understanding GPS - Principles and applications. 2nd edition Section 2.4.2 for example and implements the procedure.

``````def single_point_position(obs, max_iterations=15, tol=1e-4):
"""
Computes the single point position by iteratively solving linearized
least squares solutions

Parameters
----------
obs : pd.DataFrame
A DataFrame that holds `pseudorange` observations (corrected for satellite
clock errors), satellite position (`sat_x`, `sat_y`, `sat_z`) all in ECEF
coordinates at the time of transmission and `tow` variable which corresponds
to the time of arrival.
All observations are assumed to have been propagated to a common time of
arrival.
max_iterations : int (optional)
The maximum number of iterations, defaults to 15.
tol : float (optional)
Tolerance for convergence (same is used for both position and time),
defaults to 1e-4.
Returns
--------
spp : dict
A dictionary holding the single point position.  Keys included:
pos_ecef : a length three array representing the position in ECEF coords.
time : the gps system time at the solution
clock_offset : the receiver clock error
converged : a boolean indicating convergence.

Reference:
Kaplan, E.. Understanding GPS - Principles and applications. 2nd edition Section 2.4.2
"""
....
``````
{"ft_lang_label":"__label__en","ft_lang_prob":0.84308803,"math_prob":0.87855965,"size":2348,"snap":"2019-51-2020-05","text_gpt3_token_len":522,"char_repetition_ratio":0.10366894,"word_repetition_ratio":0.045454547,"special_character_ratio":0.22444634,"punctuation_ratio":0.15274464,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9840571,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-12-07T21:11:03Z\",\"WARC-Record-ID\":\"<urn:uuid:a280073d-33af-43a5-95cc-5a96d450db9b>\",\"Content-Length\":\"136781\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:75d0276c-afea-4c9a-be03-e2cdc43f9377>\",\"WARC-Concurrent-To\":\"<urn:uuid:d91dde8f-94b1-40b6-bb6f-a3bd2229f6e0>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://gis.stackexchange.com/questions/115760/calculating-new-satellite-position-given-pseudorange-measurements\",\"WARC-Payload-Digest\":\"sha1:B33HIGLNOBOVSGBN2HZOLIOEBBTWX4SS\",\"WARC-Block-Digest\":\"sha1:HWJ4DXND6NG4CRFVIKXXZUAOY3FKQ4OU\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-51/CC-MAIN-2019-51_segments_1575540502120.37_warc_CC-MAIN-20191207210620-20191207234620-00045.warc.gz\"}"}