# how to calculate RMS 2D and RMS 1D, using python?

I would like to calculate:

RMS 2D: standard deviation for the two coordinates of flat (67% confidence level) and
RMS 1D: standard deviation for height (67% confidence level)
What is the formula and what parameters do I need for dual frquency survey grade receiver?
At the moment I haves something like:

``````import math
spaceSegment = 0.4
controlSegment = 3.5
tropo = 0.2
iono = 0.4
multipath = 0.6

hdop = float(raw_input("Enter hdop "))

vdop = float(raw_input("Enter vdop "))

ure = math.sqrt(spaceSegment**2 + controlSegment**2)
uee = math.sqrt(tropo**2 + iono**2 + multipath**2 + receiver_error**2)
uere = math.sqrt(ure**2 + uee**2)

horizontal_error = 2. * hdop * uere    #2D horizontal position error
vertical_error = 2. * vdop * uere    ##Vertical Position Error
``````

...but I cannot find gps error budget for survey grade receivers nor formulas for 67 and 68 percentage calculation.
Is any simple way for my computation?

Above computation is taken from matlab gps toolkit I rewrited in python but it refers to gps budget for single frequency receiver.
I also have two formulas: and and their decription:
Compute the rms of the radial errors, i.e. the linear distances between the measure and known (or mean) positions. It can be predicted by using covariance analysis by multiplying the HDOP, a measure of the satellite geometry, by the standard deviation of the observed pseudoranges. This predictability makes it a much more convenient measure in practice.
...so then I am completely confused and any help will be appreciated.