public void setGyroNoiseStandardDeviation(GeometricVector data) { msclPINVOKE.InertialNode_setGyroNoiseStandardDeviation(swigCPtr, GeometricVector.getCPtr(data)); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } }
public void It_can_calculate_the_yAxis_for_vertical_beam() { this.CreateFiniteElement1D(-10, 0, 0, -10, 0, 10); GeometricVector axisY = SUT.LocalYAxis; Assert.AreNotEqual(0, axisY.SumMagnitudes()); }
public void setMagnetometerHardIronOffset(GeometricVector offsetVector) { msclPINVOKE.InertialNode_setMagnetometerHardIronOffset(swigCPtr, GeometricVector.getCPtr(offsetVector)); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } }
public void setHardIronOffsetProcessNoise(GeometricVector data) { msclPINVOKE.InertialNode_setHardIronOffsetProcessNoise(swigCPtr, GeometricVector.getCPtr(data)); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } }
public void setGyroBias(GeometricVector biasVector) { msclPINVOKE.InertialNode_setGyroBias(swigCPtr, GeometricVector.getCPtr(biasVector)); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } }
public void Can_be_constructed() { GeometricVector planeNormal = new GeometricVector(0, 0, 1); CartesianPoint pointOnPlane = new CartesianPoint(0, 0, 0); Plane SUT = new Plane(planeNormal, pointOnPlane); Assert.AreEqual(planeNormal, SUT.Normal); Assert.AreEqual(pointOnPlane, SUT.Point); }
public UnboundedLine(GeometricVector vectorOfLine, CartesianPoint pointOnLine) { Guard.AgainstNullArgument(vectorOfLine, "vectorOfLine"); Guard.AgainstNullArgument(pointOnLine, "pointOnLine"); this.Vector = vectorOfLine; this.PointOnLine = pointOnLine; }
public CartesianPoint ConvertGlobalCoordinatesToLocalCoordinates(CartesianPoint globalPoint) { GeometricVector localCoordRelativeToLocalOrigin = globalPoint.Subtract(this.LocalOrigin); KeyedSquareMatrix <DegreeOfFreedom> rotationMatrix = CalculateElementRotationMatrix(); CartesianPoint localCoord = new CartesianPoint(rotationMatrix.Multiply(localCoordRelativeToLocalOrigin)); return(new CartesianPoint(localCoord)); }
public CartesianPoint ConvertLocalCoordinatesToGlobalCoordinates(CartesianPoint localPoint) { KeyedSquareMatrix <DegreeOfFreedom> rotationMatrix = CalculateElementRotationMatrix().Transpose(); CartesianPoint globalCoordRelativeToLocalOrigin = new CartesianPoint(rotationMatrix.Multiply(localPoint)); GeometricVector globalCoord = globalCoordRelativeToLocalOrigin.Add(this.LocalOrigin); return(new CartesianPoint(globalCoord)); }
public void Can_determine_if_equal() { GeometricVector SUT = new GeometricVector(3, 4, 5); GeometricVector equal = new GeometricVector(3, 4, 5); GeometricVector unequal = new GeometricVector(4, 5, 6); Assert.IsTrue(SUT.Equals(equal)); Assert.IsFalse(SUT.Equals(unequal)); }
public void Can_determine_if_equal() { GeometricVector SUT = new GeometricVector(3, 4, 5); GeometricVector equal = new GeometricVector(3, 4, 5); GeometricVector unequal = new GeometricVector(4, 5, 6); Assert.IsTrue(SUT.Equals(equal)); Assert.IsFalse(SUT.Equals(unequal)); }
public void Can_be_constructed() { GeometricVector planeNormal = new GeometricVector(0, 0, 1); CartesianPoint pointOnPlane = new CartesianPoint(0, 0, 0); Plane SUT = new Plane(planeNormal, pointOnPlane); Assert.AreEqual(planeNormal, SUT.Normal); Assert.AreEqual(pointOnPlane, SUT.Point); }
public void It_can_calculate_the_xAxis() { GeometricVector result = SUT.LocalXAxis; Assert.AreEqual(3, result.Count); Assert.AreEqual(1, result[DegreeOfFreedom.X]); Assert.AreEqual(-1, result[DegreeOfFreedom.Y]); Assert.AreEqual(2, result[DegreeOfFreedom.Z]); }
public static GeometricVector VectorNED(float north, float east, float down) { GeometricVector ret = new GeometricVector(msclPINVOKE.GeometricVector_VectorNED(north, east, down), true); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GeometricVector captureGyroBias(ushort samplingTime) { GeometricVector ret = new GeometricVector(msclPINVOKE.InertialNode_captureGyroBias(swigCPtr, samplingTime), true); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static GeometricVector VectorECEF(float x_init, float y_init, float z_init) { GeometricVector ret = new GeometricVector(msclPINVOKE.GeometricVector_VectorECEF(x_init, y_init, z_init), true); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GeometricVector getGyroBias() { GeometricVector ret = new GeometricVector(msclPINVOKE.InertialNode_getGyroBias(swigCPtr), true); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void Can_add_a_vector() { CartesianPoint SUT = new CartesianPoint(3, 4, 5); GeometricVector other = new GeometricVector(5, 4, -3); CartesianPoint result = SUT.Add(other); Assert.AreEqual(8, result.X); Assert.AreEqual(8, result.Y); Assert.AreEqual(2, result.Z); }
public GeometricVector getMagnetometerHardIronOffset() { GeometricVector ret = new GeometricVector(msclPINVOKE.InertialNode_getMagnetometerHardIronOffset(swigCPtr), true); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public GeometricVector getAccelNoiseStandardDeviation() { GeometricVector ret = new GeometricVector(msclPINVOKE.InertialNode_getAccelNoiseStandardDeviation(swigCPtr), true); if (msclPINVOKE.SWIGPendingException.Pending) { throw msclPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void Can_be_constructed() { GeometricVector SUT = new GeometricVector(3, 4, 5); Assert.AreEqual(3, SUT.X); Assert.AreEqual(4, SUT.Y); Assert.AreEqual(5, SUT.Z); Assert.AreEqual(3, SUT[DegreeOfFreedom.X]); Assert.AreEqual(4, SUT[DegreeOfFreedom.Y]); Assert.AreEqual(5, SUT[DegreeOfFreedom.Z]); }
public void Can_add_a_vector() { CartesianPoint SUT = new CartesianPoint(3, 4, 5); GeometricVector other = new GeometricVector(5, 4, -3); CartesianPoint result = SUT.Add(other); Assert.AreEqual(8, result.X); Assert.AreEqual(8, result.Y); Assert.AreEqual(2, result.Z); }
public void Can_determine_if_point_is_in_plane() { GeometricVector planeNormal = new GeometricVector(0, 0, 1); CartesianPoint pointOnPlane = new CartesianPoint(0, 0, 0); Plane SUT = new Plane(planeNormal, pointOnPlane); CartesianPoint pointInPlane = new CartesianPoint(1, 1, 0); CartesianPoint pointOutOfPlane = new CartesianPoint(0, 0, 1); Assert.IsTrue(SUT.IsInPlane(pointInPlane)); Assert.IsFalse(SUT.IsInPlane(pointOutOfPlane)); }
public void Can_calculate_vector_to_another_point() { CartesianPoint SUT = new CartesianPoint(3, 4, 5); CartesianPoint other = new CartesianPoint(5, 4, 3); GeometricVector result = SUT.VectorTo(other); Assert.AreEqual(2, result.X); Assert.AreEqual(0, result.Y); Assert.AreEqual(-2, result.Z); }
public void Can_subtract_another_point() { CartesianPoint SUT = new CartesianPoint(3, 4, 5); CartesianPoint other = new CartesianPoint(5, 4, 3); GeometricVector result = SUT.Subtract(other); Assert.AreEqual(-2, result.X); Assert.AreEqual(0, result.Y); Assert.AreEqual(2, result.Z); }
public void Can_be_created() { GeometricVector vectorOfLine = new GeometricVector(1, 2, 3); CartesianPoint pointOnLine = new CartesianPoint(3, 4, 5); UnboundedLine SUT = new UnboundedLine(vectorOfLine, pointOnLine); Assert.AreEqual(vectorOfLine, SUT.Vector); Assert.AreEqual(pointOnLine, SUT.PointOnLine); Assert.AreEqual(vectorOfLine.X, SUT.X); Assert.AreEqual(vectorOfLine.Y, SUT.Y); Assert.AreEqual(vectorOfLine.Z, SUT.Z); }
public void Can_be_constructed() { GeometricVector SUT = new GeometricVector(3, 4, 5); Assert.AreEqual(3, SUT.X); Assert.AreEqual(4, SUT.Y); Assert.AreEqual(5, SUT.Z); Assert.AreEqual(3, SUT[DegreeOfFreedom.X]); Assert.AreEqual(4, SUT[DegreeOfFreedom.Y]); Assert.AreEqual(5, SUT[DegreeOfFreedom.Z]); }
public void Can_determine_if_point_is_in_plane() { GeometricVector planeNormal = new GeometricVector(0, 0, 1); CartesianPoint pointOnPlane = new CartesianPoint(0, 0, 0); Plane SUT = new Plane(planeNormal, pointOnPlane); CartesianPoint pointInPlane = new CartesianPoint(1, 1, 0); CartesianPoint pointOutOfPlane = new CartesianPoint(0, 0, 1); Assert.IsTrue(SUT.IsInPlane(pointInPlane)); Assert.IsFalse(SUT.IsInPlane(pointOutOfPlane)); }
public void Can_be_created() { GeometricVector vectorOfLine = new GeometricVector(1, 2, 3); CartesianPoint pointOnLine = new CartesianPoint(3, 4, 5); UnboundedLine SUT = new UnboundedLine(vectorOfLine, pointOnLine); Assert.AreEqual(vectorOfLine, SUT.Vector); Assert.AreEqual(pointOnLine, SUT.PointOnLine); Assert.AreEqual(vectorOfLine.X, SUT.X); Assert.AreEqual(vectorOfLine.Y, SUT.Y); Assert.AreEqual(vectorOfLine.Z, SUT.Z); }
public void Can_determine_if_point_is_on_line() { GeometricVector vectorOfLine = new GeometricVector(2, 2, 2); CartesianPoint pointOnLine = new CartesianPoint(3, 4, 5); UnboundedLine SUT = new UnboundedLine(vectorOfLine, pointOnLine); CartesianPoint aPointOnTheLine = new CartesianPoint(4, 5, 6); CartesianPoint aPointNotOnTheLine = new CartesianPoint(3, 5, 7); CartesianPoint aPointOnTheLineInNegativeDirectionFromDefinedPointOnLine = new CartesianPoint(2, 3, 4); Assert.IsTrue(SUT.IsOnLine(aPointOnTheLine)); Assert.IsFalse(SUT.IsOnLine(aPointNotOnTheLine)); Assert.IsTrue(SUT.IsOnLine(aPointOnTheLineInNegativeDirectionFromDefinedPointOnLine)); }
public void Can_determine_if_point_is_on_line() { GeometricVector vectorOfLine = new GeometricVector(2, 2, 2); CartesianPoint pointOnLine = new CartesianPoint(3, 4, 5); UnboundedLine SUT = new UnboundedLine(vectorOfLine, pointOnLine); CartesianPoint aPointOnTheLine = new CartesianPoint(4, 5, 6); CartesianPoint aPointNotOnTheLine = new CartesianPoint(3, 5, 7); CartesianPoint aPointOnTheLineInNegativeDirectionFromDefinedPointOnLine = new CartesianPoint(2, 3, 4); Assert.IsTrue(SUT.IsOnLine(aPointOnTheLine)); Assert.IsFalse(SUT.IsOnLine(aPointNotOnTheLine)); Assert.IsTrue(SUT.IsOnLine(aPointOnTheLineInNegativeDirectionFromDefinedPointOnLine)); }
public void Can_calculate_perpendicular_line_to_a_point() { GeometricVector vectorOfLine = new GeometricVector(2, 2, 0); CartesianPoint pointOnLine = new CartesianPoint(3, 4, 5); UnboundedLine SUT = new UnboundedLine(vectorOfLine, pointOnLine); CartesianPoint perpendicularPoint = new CartesianPoint(3, 6, 5); BoundedLine result = SUT.PerpendicularLineTo(perpendicularPoint); Assert.AreEqual(-1, result.X); Assert.AreEqual(1, result.Y); Assert.AreEqual(0, result.Z); Assert.AreEqual(4, result.Start.X); Assert.AreEqual(5, result.Start.Y); Assert.AreEqual(5, result.Start.Z); }
public void Can_calculate_perpendicular_line_to_a_point() { GeometricVector vectorOfLine = new GeometricVector(2, 2, 0); CartesianPoint pointOnLine = new CartesianPoint(3, 4, 5); UnboundedLine SUT = new UnboundedLine(vectorOfLine, pointOnLine); CartesianPoint perpendicularPoint = new CartesianPoint(3, 6, 5); BoundedLine result = SUT.PerpendicularLineTo(perpendicularPoint); Assert.AreEqual(-1, result.X); Assert.AreEqual(1, result.Y); Assert.AreEqual(0, result.Z); Assert.AreEqual(4, result.Start.X); Assert.AreEqual(5, result.Start.Y); Assert.AreEqual(5, result.Start.Z); }
public void Can_determine_if_point_is_on_the_line() { vectorOfLine = new GeometricVector(2, 2, 2); startPoint = new CartesianPoint(3, 4, 5); SUT = new BoundedLine(startPoint, vectorOfLine); CartesianPoint pointOnTheLine = new CartesianPoint(4, 5, 6); CartesianPoint pointAtEndOfLine = new CartesianPoint(5, 6, 7); CartesianPoint pointAtStartOfLine = new CartesianPoint(3, 4, 5); CartesianPoint pointBeyondEndOfLine = new CartesianPoint(6, 7, 8); CartesianPoint pointBeyondStartOfLine = new CartesianPoint(2, 3, 4); Assert.IsTrue(SUT.IsOnLine(pointOnTheLine)); Assert.IsTrue(SUT.IsOnLine(pointAtEndOfLine)); Assert.IsTrue(SUT.IsOnLine(pointAtStartOfLine)); Assert.IsFalse(SUT.IsOnLine(pointBeyondEndOfLine)); Assert.IsFalse(SUT.IsOnLine(pointBeyondStartOfLine)); }
public BoundedLine(CartesianPoint startOfLine, GeometricVector vectorOfLineFromStartToEnd) : base(vectorOfLineFromStartToEnd, startOfLine) { // empty }
public void SetUp() { vectorOfLine = new GeometricVector(2, 3, 4); startPoint = new CartesianPoint(3, 4, 5); SUT = new BoundedLine(startPoint, vectorOfLine); }
public void Can_determine_if_point_is_on_the_line() { vectorOfLine = new GeometricVector(2, 2, 2); startPoint = new CartesianPoint(3, 4, 5); SUT = new BoundedLine(startPoint, vectorOfLine); CartesianPoint pointOnTheLine = new CartesianPoint(4, 5, 6); CartesianPoint pointAtEndOfLine = new CartesianPoint(5, 6, 7); CartesianPoint pointAtStartOfLine = new CartesianPoint(3, 4, 5); CartesianPoint pointBeyondEndOfLine = new CartesianPoint(6, 7, 8); CartesianPoint pointBeyondStartOfLine = new CartesianPoint(2, 3, 4); Assert.IsTrue(SUT.IsOnLine(pointOnTheLine)); Assert.IsTrue(SUT.IsOnLine(pointAtEndOfLine)); Assert.IsTrue(SUT.IsOnLine(pointAtStartOfLine)); Assert.IsFalse(SUT.IsOnLine(pointBeyondEndOfLine)); Assert.IsFalse(SUT.IsOnLine(pointBeyondStartOfLine)); }
public void SetUp() { vectorOfLine = new GeometricVector(2, 3, 4); startPoint = new CartesianPoint(3, 4, 5); SUT = new BoundedLine(startPoint, vectorOfLine); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GeometricVector obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }
public Plane(GeometricVector planeNormal, CartesianPoint pointOnPlane) { this.Normal = planeNormal; this.Point = pointOnPlane; }