the first thing you need to determine is the period of up and down motion for the nail.

period,

at , the nail is on the ground and rises to a height of 63 cm at

since the cycle starts at a low point (h = 0) , goes up to a height of h = 63 cm and back down, a negative cosine curve is probably the best model to simulate the motion of the nail up and down over time.

where h is height above the ground in cm and t is time in seconds.