Beispiel #1
0
 public PhysicsObject(PointF location, Mass mass, double diameter)
 {
     Location     = location;
     Mass         = mass;
     OwnForce     = new Force(Angle.Zero, 0);
     Acceleration = new Acceleration(Angle.Zero, 0);
     Speed        = new Speed(Angle.Zero, 0);
     Drag         = new DragProperties(0, 0, 0, 0);
     Diameter     = diameter;
 }
Beispiel #2
0
        public PhysicsObject(PointF location, Mass mass, Force ownForce, Acceleration acceleration, Speed speed, DragProperties drag)
        {
            Location       = location;
            Mass           = mass;
            OwnForce       = ownForce;
            ResutlingForce = ownForce;
            Acceleration   = acceleration;
            Speed          = speed;
            GravityForces  = new List <Force>();
            DragForces     = new List <Force>();
            Drag           = drag;
            Diameter       = 0;

            _lastRecalculation = TimeKeeper.Now();
        }
Beispiel #3
0
 public RocketInformation(string model, string variant, string manufacturer, List <string> names, float height, float width,
                          float thrust, float weight, float fuelWeight, float burnTime, DragProperties dragProperties, List <RocketSpritePiece> sprite, List <ThrustArea> thrustAreas)
 {
     Model          = model;
     Variant        = variant;
     Manufacturer   = manufacturer;
     Names          = names;
     Height         = height;
     Width          = width;
     Thrust         = thrust;
     Weight         = weight;
     FuelWeight     = fuelWeight;
     Sprite         = sprite;
     ThrustAreas    = thrustAreas;
     BurnTime       = burnTime;
     DragProperties = dragProperties;
 }
Beispiel #4
0
        public void DragCoefficientIsCorrectly3()
        {
            var p = new DragProperties(0.25, 0.41, 10, 100);

            Assert.AreEqual(0.33, p.GetDragCoefficient(Angle.FromDegrees(315)), 0.001);
        }
Beispiel #5
0
        public void AreaIsCalculatedCorrectly7()
        {
            var p = new DragProperties(0.25, 0.41, 10, 100);

            Assert.AreEqual(55, p.GetArea(Angle.FromDegrees(315)), 0.001);
        }
Beispiel #6
0
        public void AreaIsCalculatedCorrectly4()
        {
            var p = new DragProperties(0.25, 0.41, 10, 100);

            Assert.AreEqual(100, p.GetArea(Angle.FromDegrees(270)));
        }