Using BMP280 sensor to control servos. Need some guidance with coding

Using Rocksim simulation result, the time to apogee is around 7.5 seconds.