calculate speed first 6 seconds and from there speed is a constant