How do you determine sunrise and sunset times for the airports?

Our sunrise and sunset calculations are automatically performed for each airport using an algorithm within our app.  Sunrise and sunset times are applied to airports according to latitude/longitude proximity and are presented as actual sunrise/sunset times (Time is not in civil twilight).