protected Helicopter() { Wind = Vector <double> .Build.Zero3(); Gravity = new StaticForce(Vector <double> .Build.Dense3(0, 0, Mass * 9.81)); SetModel("Gravity", Gravity); Atmosphere = new Atmosphere(); }
public void TestAssembleForces() { // F=10 in x direction, displaced by 5 on the y-axis = moment of -50 around z-axis in right hand coordinate system ForceAssembly assembly = new ForceAssembly(); StaticForce force = new StaticForce(Vector <double> .Build.DenseOfArray(new double[] { 10, 0, 0 })); force.Translation = Vector <double> .Build.DenseOfArray(new double[] { 0, 5, 0 }); assembly.SetModel("Test", force); assembly.Update(1); Assert.AreEqual(-50, assembly.Torque [2]); }