The usual way of us doing it is by trial and error, based on the LAT and LONG along our flight path and cross reference to the sunrise and sunset tables provided
This sounds familiar although an iterative process sounds better whereby you estimate the position at sunrise/set and then calculate the predicted time before then refinining your postion according to the time so found (i.e trial and error!). My own experience was a bit easier as the moving platform was doing maximum 15kts but basically we used Nautical Almanac figures in the above process so as to be ready for star sights. Correction for altitude was not a factor.