Esempio n. 1
0
        public static Tuple3 TransformVelocity(Tuple3 position, Tuple3 velocity, ReferenceFrame from, ReferenceFrame to)
        {
            var worldPosition = from.PositionToWorldSpace(position.ToVector());
            var worldVelocity = from.VelocityToWorldSpace(position.ToVector(), velocity.ToVector());

            return(to.VelocityFromWorldSpace(worldPosition, worldVelocity).ToTuple());
        }
Esempio n. 2
0
 public Tuple3 Velocity(ReferenceFrame referenceFrame)
 {
     if (ReferenceEquals(referenceFrame, null))
     {
         throw new ArgumentNullException(nameof(referenceFrame));
     }
     return(referenceFrame.VelocityFromWorldSpace(InternalBody.position, InternalBody.GetWorldVelocity()).ToTuple());
 }
Esempio n. 3
0
        public Tuple3 Velocity(ReferenceFrame referenceFrame)
        {
            if (ReferenceEquals(referenceFrame, null))
            {
                throw new ArgumentNullException(nameof(referenceFrame));
            }
            var vessel        = InternalVessel;
            var worldCoM      = vessel.CoM;
            var worldVelocity = vessel.GetOrbit().GetVel();

            return(referenceFrame.VelocityFromWorldSpace(worldCoM, worldVelocity).ToTuple());
        }
Esempio n. 4
0
 public Tuple3 Velocity(ReferenceFrame referenceFrame)
 {
     return(referenceFrame.VelocityFromWorldSpace(InternalBody.position, InternalBody.GetWorldVelocity()).ToTuple());
 }
Esempio n. 5
0
 public Tuple3 Velocity(ReferenceFrame referenceFrame)
 {
     return(referenceFrame.VelocityFromWorldSpace(InternalVessel.CoM, InternalVessel.GetOrbit().GetVel()).ToTuple());
 }