From 6fa2b1cbe682f171b3c7895b37705b459e59f7f6 Mon Sep 17 00:00:00 2001 From: Durk Talsma Date: Mon, 14 Nov 2011 17:22:02 +0100 Subject: [PATCH 1/2] Equate sun angle for morning and afternoon. This is a temporary solution, but should give more consistent results for locations that are relatively close to the poles. --- src/Time/TimeManager.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Time/TimeManager.cxx b/src/Time/TimeManager.cxx index f19761ef5..eb3bb25a1 100644 --- a/src/Time/TimeManager.cxx +++ b/src/Time/TimeManager.cxx @@ -331,7 +331,7 @@ void TimeManager::setTimeOffset(const std::string& offset_type, long int offset) } else if ( offset_type == "noon" ) { warp = fgTimeSecondsUntilSunAngle( cur_time, lon, lat, 0.0, true ); } else if ( offset_type == "afternoon" ) { - warp = fgTimeSecondsUntilSunAngle( cur_time, lon, lat, 60.0, false ); + warp = fgTimeSecondsUntilSunAngle( cur_time, lon, lat, 75.0, false ); } else if ( offset_type == "dusk" ) { warp = fgTimeSecondsUntilSunAngle( cur_time, lon, lat, 90.0, false ); } else if ( offset_type == "evening" ) { From 1e184bb0f49b9d6aed6c927091ab3559d23c4cf2 Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Mon, 14 Nov 2011 20:38:50 +0100 Subject: [PATCH 2/2] Avoid segfault on shutdown Fixes double-delete of old ATC manager. --- src/ATCDCL/ATCmgr.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ATCDCL/ATCmgr.cxx b/src/ATCDCL/ATCmgr.cxx index bbb7d3c50..69a0b1179 100644 --- a/src/ATCDCL/ATCmgr.cxx +++ b/src/ATCDCL/ATCmgr.cxx @@ -52,6 +52,7 @@ FGATCMgr::FGATCMgr() : } FGATCMgr::~FGATCMgr() { + globals->set_ATC_mgr(NULL); delete v1; }