Example #1
0
        public static bool GetMeas(OSat sat, out double p1, out double p2, out double l1, out double l2, out double dp1)
        {
            dp1 = Common.DELTA_P1;
            p1  = p2 = l1 = l2 = 0d;
            if (sat is null || sat.SatData.Count <= 0)
            {
                return(false);
            }

            p1 = sat["P1"];
            p2 = sat["P2"];
            l1 = sat["L1"];
            l2 = sat["L2"];
            if (p1 == 0d)
            {
                p1  = sat["C1"];
                dp1 = Common.DELTA_C1;
            }

            if (Math.Abs(l1) < 1e-3 ||
                Math.Abs(l2) < 1e-3 ||
                Math.Abs(p1) < 1e-3 ||
                Math.Abs(p2) < 1e-3)
            {
                return(false);
            }
            return(true);
        }
Example #2
0
        public void DetectOutlier()
        {
            if (Epoches is null)
            {
                return;
            }

            double c1 = 0d, p1 = 0d, p2 = 0d;

            for (int i = 0; i < Epoches.Count; i++)
            {
                var epoch = Epoches[i];
                foreach (var prn in epoch.AllSat.Keys)
                {
                    OSat sat = epoch.AllSat[prn];
                    p2 = sat["P2"];
                    p1 = sat["P1"];
                    c1 = sat["C1"];

                    //// 检查P1P2
                    if (p1 != 0d && p2 != 0d)
                    {
                        if (Math.Abs(p1 - p2) > Options.OUTLIER_P1P2)
                        {
                            sat.Outlier = true;
                        }
                    }

                    //// 检查P1C1
                    else if (p1 != 0 && c1 != 0)
                    {
                        if (Math.Abs(p1 - c1) > Options.OUTLIER_P1C1)
                        {
                            sat.Outlier = true;
                        }
                    }
                }
            }
        }