Improved dive rate calculation

Use a five-point least squares fit instead of a two-point derivative to calculate dive rate.