I need to simulate this for my physics class, no idea about coding - vpython

Use characteristics similar to the Falcon 9 rocket for the following:
Total Mass 433,100 kg
First Stage Propellant Mass 321,600 kg
Thrust 7,607 kN
Exhaust Velocity 2,766 m/s
GlowScript Simulation:
i. Use GlowScript to simulate the motion of the rocket. Your simulation should
calculate the following for each time step: position, velocity, acceleration,
rocket mass.
ii. Plot the position, velocity, acceleration, rocket mass as functions of time.

Related

Generate audio signal from piston movement

I'm creating a procedural engine sound generator heavily inspired by AngeTheGreat's engine simulator, but using some trigonometry functions to calculate the piston and crankshaft movement instead of rigidbodies.
I'm starting with the most basic piston movement sound generation, by taking some educated guesses (I have zero experience with audio signal processing) I assumed I could generate the audio signal by using the piston velocity, which is calculated as derivative of piston position ((piston_position - previous_piston_position) / dt), the piston position is modulated by a bit of noise, to simulate the piston sliding along the cylinder walls.
So far so good, it seens to have a expected result, considering I haven't added any kind of audio processing steps, it's really simple and sounds like a piston movement. But it gets really loud as the engine speed increases, here is a demonstration of a simple v2 engine, I reduced the output signal to 10%, to avoid hearing damage. As you can see in the video, in the soundwave representation in the bottom-left, the signal goes beyond the [-1, 1] range.
So some question about piston movement audio signal generation:
Is velocity input a good way to generate the piston movement audio signal?
Is amplitude of the sound related by the piston frequency in real life? Shouldn't it have a constant amplitude, but with higher frequency?
How I tweak the signal generation to have less amplitude at higher rpms? I should take sound propagation speed in the air into consideration?
I've tried using the piston position itself, but it sounds way more like a sine wave, the value oscilates between [0, top position] range, not [-1, 1] range, and it generates a constant non-zero signal when the piston isn't moving.
Another way to think of my problem: If I wanted to simulate the audio signal coming from a oscilating speaker, how I would generate the audio signal, taking into consideration only the speaker position? I would need to use the speaker velocity too?

Predicting Future Location of Soccer Ball Rolling on ground

the question might seem simple, but I am unable to find the best reference for it. Using ODE force function, I am able to apply force to a ball's COM and the ball starts rolling. It stops after a few seconds. The distance travelled depends upon the force. However, I am looking for algorithms that can help to predict the actual ball location after specified time 'x'. Note that the ball moves in 2D and I need to figure out the x and y coordinates of ball after lets say 1 second. Velocity and initial coordinates are given.
Please suggest algorithms that can do it precisely. the newton velocity acceleration relation only works for shorter prediction time as they depend on linear velocity component.
Please help

Camera calibration algorithm evaluation

Recently, I am developing algorithm to improvement the camera calibration algorithm in my research group. I would like to ask are there any method to evaluation the camera calibration algorithm so that I can compare the result among difference algorithm?
The most easiest way I can think of is taking the mean square average of different between the calibrated one and the original one pixel-wise. Are there any other suggestions?
Are you talking about geometric camera calibration (focal length, optical center, etc.), or color calibration?
For geometric camera calibration, the main criterion is reprojection errors. Presumably, you are using some sort of calibration pattern, like a checkerboard, where you can detect a set of points. To evaluate calibration accuracy, you look at the distances between the detected points and the reprojected points.
This is what a calibration algorithm typically tries to minimize. Depending on the calibration software you use, you may also be able to look at the uncertainty of the estimated camera parameters.
See this example in MATLAB.
Alternatively, you can use your calibrated camera to measure an object of a known size, and see how precise your measurement is.

PWM Current calculation and dependency on frequency

I am using a PIC16F877a to drive a solid state realy connected to a 300W starter motor (R=50. millohms, L=50mH);
I tried varying The frequency and duty cycle to reduce the inrush current. it worked my current reduced to almost half.
I know that the average voltage for a pwm is V*duty cycle. But i am not driving the motor directly but through a relay. can anyone tell me a formula on how to calculate the current to the motor for validation.
Regs,
cj
I think you would need a datasheet of the motor with its electrical and mechanical characteristcs to determine the current. But that would still be a theoretical value. In the real world you will have the wires, contacts and so on, that add additional resistance and will "help" to limit the start current. But don't choose the wires to small and use a fuse for safety reasons. This should help you to choose the right wires: American Wire Gauge
If it's a DC motor there is a better and quiet simple solution.
Because of mechanical wearing and the limited switching frequency you should better not use a relay. The better solution would be an application fitting field effect transistor (FET)switching at a pwm frequency of about 20kHz so it would not produce any annoying humming or whimpering sounds in the motor. Depending on the transistor you will need a driver circuit for the FET to operate fine, dropping just a small ammount of power (passive cooling might still be needed).
For a smooth start of the motor with a minimum of peak current you should apply a linear duty cycle sweep from 0 to 100%. The optimum duration of the sweep depends on the motor and the mechanical load. Discover your optimum by trying different sweep durations.

Projected travelled distance from gyroscope / accelerometer measurements

I want to build an app that calculates project distance traveled by a kicked ball (ball is kicked into a training net) based on the initial readings from accelerometer/gyroscope and some assumptions about weight, air resistance, etc. The ball contains Triple Axis Accelerometer and Gyro. The measurements can either be raw accel/gyro x/y/z values or one of the following:
Actual quaternion components in a [w, x, y, z] format
Euler angles (in degrees) calculated from the quaternions
yaw/pitch/roll angles (in degrees) calculated from the quaternions acceleration components with gravity removed. This acceleration reference frame is not compensated for orientation, so +X is always +X according to the sensor, just without the effects of gravity.
acceleration components with gravity removed and adjusted for the world frame of reference (yaw is relative to initial orientation)
I actually don't know what any of the above means.
Could someone suggest a formula to use in this scenario with this kind of data available? I went through this question, but it doesn't exactly have what I'm looking for.

Resources