         let accuracy = 1.0.seconds.inDays
         var jd_diff  = 10*accuracy
         
-        let UT_sun_crossing_meridian = find_time_Sun_at_South(forJulianDay: julianDay, coordinates: coordinates)
-        
         var security = 0
         while abs(jd_diff) > accuracy && security < 10 {
             security += 1
+            
+            let ut1 = find_time_Sun_at_South_Schylter(forJulianDay: jd_rise, coordinates: coordinates)
+            let ut2 = find_time_Sun_at_South_Schylter(forJulianDay: jd_set, coordinates: coordinates)
 
             let arc1 = Sun(julianDay: jd_rise).diurnalArcAngle(forObjectAltitude: sunAltitude, coordinates: coordinates)
             let arc2 = Sun(julianDay: jd_set).diurnalArcAngle(forObjectAltitude: sunAltitude, coordinates: coordinates)

    }
}

func find_time_Sun_at_South(forJulianDay jd: JulianDay, coordinates: GeographicCoordinates) -> Hour {
    // Somehow, there is a 0.5 day shift (midnight instead of noon) compared to explanations given by Paul Schylter.
    // See http://www.stjarnhimlen.se/comp/riset.html
    // But the values are correct like this.

                break
            }
            
            let new_jd_rise = Calendar.gregorianGMT.date(bySettingHour: ut1 - arc1.value!.inHours, of: jd_rise.date).julianDay
            jd_set = Calendar.gregorianGMT.date(bySettingHour: ut2 + arc2.value!.inHours, of: jd_set.date).julianDay

            jd_diff = new_jd_rise-jd_rise
            jd_rise = new_jd_rise
