This assignment is inspired by the mail delivery system of Niuafo'ou, the northernmost island of the Kingdom
Question:
This assignment is inspired by the mail delivery system of Niuafo'ou, the northernmost island of the Kingdom of Tonga. Niuafo'ou is actually a volcano, which descends steeply into the sea and has a crater lake in its middle. Due to its steep slopes into the sea, it has no proper port or harbour, and even landing by boat on one of the few stony beaches can be dangerous.
Sea breeze
Figure 1: Trajectory of tin can airmail In the 1880s, the Tin Can Mail mail delivery system was developed: Incoming mail was put into a tin can and thrown overboard close to the island from a mail boat, and
outgoing mail in a tin can was shot out to sea by means of a cannon to be picked up by the mail boat.
Tin Can Mail became famous beyond Tonga, with special stamps that have become collector items all over the world. This system lasted for a hundred years until 1983, when an airfield was built, and mail could be delivered by plane. In this assignment you are asked to determine the trajectory of the outgoing tin cans, given launch speed (muzzle speed of the cannon), launch angle and wind speed by means of Euler's integration formula as shown in Figure 1. Your program is to simulate the trajectory and estimate the landing position of the tin can. It must take into account the air resistance and wind, since there will be usually a sea breeze blowing towards the coast. The simulation is based on classical equations for projectiles and air resistance.
1.1.1 Equations
The position of the tin can over time is modeled by the functions x(t) and y(t), and the speed of the tin can over time is modelled by the functions vx(t) and vy(t), where x is the horizontal direction and y is the vertical direction, as shown in Figure 1. The drag forces Fx (t) and Fy(t) slow the projectile down in x and y direction, respectively. For low speeds, this force can be approximated as growing linearly with the relative speed of the projectile with respect to the breeze. Assuming a sea breeze with constant (negative) wind speed vwx, the drag forces are:
Fx(t) = -Ca(Vx(t) - Vwx) and
Fy(t) = -CaVy(t) - g
where ca is the drag coefficient and g is the acceleration due to gravity.
Our approximation uses Euler's integration method, which assumes that from the launch at time t=0, the projectile's movement is simulated in many very small time steps where during each time step the projectile moves a very small distance and its speed is diminished by a very small amount as well.
During one time interval At, the tin's position changes as x(t + At) = x(t) + Ux(t)At
y(t + At) = y(t) + vy(t)At
and during the same time interval, the speed of the tin is slowed down by the drag as
Ux (t + At) = Vx(t) + Fx(t)At
vy (t + At) = vy (t) + Fy(t)At