[Gpredict-svn] SF.net SVN: gpredict:[750] trunk/src/gtk-rot-ctrl.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <aa...@us...> - 2011-01-27 17:21:17
|
Revision: 750 http://gpredict.svn.sourceforge.net/gpredict/?rev=750&view=rev Author: aa1vs Date: 2011-01-27 17:21:11 +0000 (Thu, 27 Jan 2011) Log Message: ----------- Cleanup code. Ensure satellite position refined. Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2011-01-27 02:50:50 UTC (rev 749) +++ trunk/src/gtk-rot-ctrl.c 2011-01-27 17:21:11 UTC (rev 750) @@ -867,10 +867,9 @@ { GtkRotCtrl *ctrl = GTK_ROT_CTRL (data); gdouble rotaz=0.0, rotel=0.0; - gdouble setaz=0.0, setel=0.0; + gdouble setaz=0.0, setel=45.0; gchar *text; gboolean error = FALSE; - gboolean update_flag=FALSE; sat_t sat_working, *sat; /*parameters for path predictions*/ gdouble time_delta; @@ -894,18 +893,15 @@ if (ctrl->t < ctrl->pass->aos) { setaz=ctrl->pass->aos_az; setel=0; - update_flag=TRUE; } else if (ctrl->t > ctrl->pass->los) { setaz=ctrl->pass->los_az; setel=0; - update_flag=TRUE; } } } else { setaz=ctrl->target->az; setel=ctrl->target->el; - update_flag=TRUE; } /* if this is a flipped pass and the rotor supports it*/ if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){ @@ -981,7 +977,12 @@ /* otherwise look 20 minutes into the future*/ time_delta=1.0/72.0; } - + /* have a minimum time delta*/ + if (time_delta<(ctrl->delay/1000.0/secday)){ + time_delta=ctrl->delay/1000.0/secday; + } + + step_size = time_delta / 2.0; /* This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |