# 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.

-

Root mean square (RMS) deviation is similar to standard error. 67% confidence intervals are roughly the average +/- 1 standard error. Consult a Z score table in any entry level statistics book for exact values.

The use of RMS as it relates to confidence is confused by common use of the terms.

I'm not familiar with the formula you are using but it looks like it is estimating an RMS.

This article has a reasonable explanation of RMS and confidence intervals for GPS. http://ohioline.osu.edu/aex-fact/0560.html

This Wikipedia entry discusses the relationship to standard error http://en.m.wikipedia.org/wiki/Root-mean-square_error

-
Sorry; this is not a correct characterization of confidence interval. To see why not, consider that a confidence interval will shrink to zero width as larger amounts of data are collected. The objective here is to estimate the size of measurement error, which surely exists and is nonzero. Therefore a confidence interval cannot possibly be an appropriate way to assess that error. For more information, see (e.g.) the Wikipedia article. – whuber Jan 15 '12 at 17:00
I agree. The use of the terms are commonly confused. – tharen Jan 15 '12 at 19:12