Esempio n. 1
0
        public override void OnPhysicsUpdate()
        {
            if (_dv != _newtonMoveDB.DeltaVForManuver_m.Length())
            {
                CreatePointArray();
            }


            Vector3 pos         = myPosDB.RelativePosition_AU;
            var     ralitivePos = new PointD()
            {
                X = pos.X, Y = pos.Y
            };

            double minDist = PointDFunctions.Length(PointDFunctions.Sub(ralitivePos, _points[_index]));

            for (int i = 0; i < _points.Count(); i++)
            {
                double dist = PointDFunctions.Length(PointDFunctions.Sub(ralitivePos, _points[i]));
                if (dist < minDist)
                {
                    minDist = dist;
                    _index  = i;
                }
            }
        }
Esempio n. 2
0
        public override void OnPhysicsUpdate()
        {
            Vector3 pos         = myPosDB.RelativePosition_AU;
            var     ralitivePos = new PointD()
            {
                X = pos.X, Y = pos.Y
            };

            double minDist = PointDFunctions.Length(PointDFunctions.Sub(ralitivePos, _points[_index]));

            for (int i = 0; i < _points.Count(); i++)
            {
                double dist = PointDFunctions.Length(PointDFunctions.Sub(ralitivePos, _points[i]));
                if (dist < minDist)
                {
                    minDist = dist;
                    _index  = i;
                }
            }
        }
Esempio n. 3
0
 double CalcDistance(PointD p1, PointD p2)
 {
     return(PointDFunctions.Length(PointDFunctions.Sub(p1, p2)));
 }
Esempio n. 4
0
 void ActionAddDB()
 {
     _uiState.SpaceMasterVM.SMSetOrbitToEntity(OrderingEntityState.Entity, TargetEntity.Entity, PointDFunctions.Length(_orbitWidget.Periapsis), _uiState.PrimarySystemDateTime);
     CloseWindow();
 }