add trip calculator method

Please review.