Extend the altitude output data and plot to 80 hours (the original only goes to 48 hours).
After the initial 2 days, the polynomial model predicts the balloon crashing to earth, but actually the balloon altitude will follow a periodic cycle.
Assume that, starting at the peak altitude (at time τ), the balloon altitude is represented by the following model:
alt(t) = A0 + A cos((2π/24)(t-τ))Modify your program to use that model for t ≥ τ.
A0, A and τ should ideally
be determined by your
program at run-time from the generated data, but alternatively they can
be estimated by hand and hard-coded into the program.
If ymin and ymax represent the min and max values of altitude
in the periodic region, then A0=(ymax+ymin)/2; A=(ymax-ymin)/2.