public Zoomer(Camera camera) { _smoothZoom = new SmoothValue(1f) { BasicSpeed = 0.00005f, Friction = 0.01f }; DefaultZoom = BasicZoom = 1f; }
public void Focus(GameObject go) { m_targetGO = go; if (m_camPositionX == null && m_camPositionY == null) { m_camPositionX = new SmoothValue(go.Position.X, 0.92f); m_camPositionY = new SmoothValue(go.Position.Y, 0.92f); } }
public override void Start() { m_speedFocus = 0.003f; m_targetZoom = 1.0f; m_currentZoom = new SmoothValue(m_targetZoom, 0.96f); Engine.Renderer.Cameras[(int)CameraId.Game].Position = Vector2.Zero; m_gameplayObjZoomBoundingBoxes = new List <Box2D>(); }
/// <summary> /// PPP 计算核心方法。 Kalmam滤波。 /// 观测量的顺序是先伪距观测量,后载波观测量,观测量的总数为卫星数量的两倍。 /// 参数数量为卫星数量加5,卫星数量对应各个模糊度,5为3个位置量xyz,1个接收机钟差量,1个对流程湿分量。 /// </summary> /// <param name="recInfo">接收信息</param> /// <param name="option">解算选项</param> /// <param name="lastPppResult">上次解算结果(用于 Kalman 滤波),若为null则使用初始值计算</param> /// <returns></returns> public override SingleSiteGnssResult CaculateKalmanFilter(EpochInformation recInfo, SingleSiteGnssResult lastPppResult = null) { PppResult last = null; if (lastPppResult != null) { last = (PppResult)lastPppResult; } // ISatWeightProvider SatWeightProvider = new SatElevateAndRangeWeightProvider(); //ISatWeightProvider SatWeightProvider = new SatElevateWeightProvider(); MatrixBuilder.SetMaterial(recInfo).SetPreviousProduct(lastPppResult); MatrixBuilder.Build(); if (this.MatrixBuilder.ObsCount > 0) { // this.Adjustment = new KalmanFilter( this.MatrixBuilder); this.Adjustment = this.RunAdjuster(BuildAdjustObsMatrix(this.CurrentMaterial)); ////尝试固定模糊度 cuiyang 2015.07 //int fixFlag = Ppp_AR.Process(recInfo, Adjustment); #region 具有条件的参数平差 // this.Adjustment.restrictadjust(); #endregion #region PPP模糊度固定 foreach (var sat in recInfo.EnabledPrns) { if (recInfo.SlipedPrns.Contains(sat)) //主要是针对 1.首次观测到某颗卫星 2.某颗卫星出现在第二个弧段,两个弧段的MW不相等 { if (MwInfoDic.ContainsKey(sat)) { MwInfoDic.Remove(sat); } continue; } if (!MwInfoDic.ContainsKey(sat)) //第一个没有周跳的历元 { MwInfoDic[sat] = new SmoothValue(100, true) { Name = sat.ToString() }; } MwInfoDic[sat].Regist(recInfo[sat].Combinations.MwRangeCombination.Value); } List <int> cyclesat = new List <int>(); //将有周跳的卫星挑出来 foreach (var sat in recInfo.SlipedPrns) { cyclesat.Add(sat.PRN); } if (MwInfoDic.Count > 0) { Dictionary <int, double> MWs = new Dictionary <int, double>(); foreach (var sat in recInfo.EnabledPrns) { if (!recInfo.SlipedPrns.Contains(sat)) { int num = sat.PRN; MWs.Add(num, MwInfoDic[sat].Value); //宽巷模糊度的历元平滑值 } } IMatrix new_estimated = this.Adjustment.PppArmbiResolve(MWs, cyclesat); } #endregion PppResult result = new PppResult(recInfo, Adjustment, this.MatrixBuilder.GnssParamNameBuilder); // result.PreviousResult = lastPppResult; //模糊度设置 IonoFreeAmbiguityMgr.SetIonoFreeCombination(result); return(result); } else { return(null); } }
public ScreenBumpText(Camera camera, SpriteFont font, string text, Vector2 position, float height, IWorldObject parent) : base(camera, font, text, position, height, parent) { _bumpValue = new SmoothValue(1); BumpPitch = 2.5f; }