part 4
print *,"calculates trajectory and save to file"
open (unit=2,file="trajec.dat",action="write",status="replace")
Utime=int((Time*100)+0.5)
do Itime=0,Utime,1
Time=Itime/100.0
Sx=Init_vel*Ang_cos*Time
Sy=-0.5*Grav*Time**2+Init_vel*Ang_sin*Time
write (unit=2,fmt="(3f10.2)") Time,Sx,Sy
end do
stop
end program trajec
Previous slide
Next slide
Back to first slide
View graphic version