[Gpredict-svn] SF.net SVN: gpredict:[712] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2010-11-07 13:57:47
|
Revision: 712
http://gpredict.svn.sourceforge.net/gpredict/?rev=712&view=rev
Author: aa1vs
Date: 2010-11-07 13:57:41 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
Updated pass regeneration logic in rotator controller.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-rot-ctrl.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-07 08:56:11 UTC (rev 711)
+++ trunk/ChangeLog 2010-11-07 13:57:41 UTC (rev 712)
@@ -1,6 +1,12 @@
+2010-11-07 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-rot-ctrl.c
+ Updated pass regeneration logic in rotator controller.
+ Fixes bug 2167508: problems in rotator controller.
+
2010-11-07 Alexandru Csete <oz9aec at gmail.com>
- * configura.ac:
+ * configure.ac:
Added implicit check for libm (required on Fedora core 13 and later).
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-11-07 08:56:11 UTC (rev 711)
+++ trunk/NEWS 2010-11-07 13:57:41 UTC (rev 712)
@@ -5,8 +5,8 @@
- Added more checks with hamlib communications.
- Fixed bug 2116691: Leave network connection open.
- Fixed bug 3099314: Rotator Thrashing.
+- Fixed bug 2167508: problems in rotator controller.
-
Changes in version 1.2 (12 Oct 2010)
- New layout engine that allows any combination of views to be created in a NxM grid.
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2010-11-07 08:56:11 UTC (rev 711)
+++ trunk/src/gtk-rot-ctrl.c 2010-11-07 13:57:41 UTC (rev 712)
@@ -298,16 +298,46 @@
update_count_down (ctrl, t);
+
/* update next pass if necessary */
if (ctrl->pass != NULL) {
- if ((ctrl->target->aos > ctrl->pass->aos) && (ctrl->target->el <= 0.0)) {
- /* we need to update the pass */
- free_pass (ctrl->pass);
- ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0);
- set_flipped_pass(ctrl);
-
- /* update polar plot */
- gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass);
+ /*if we are not in the current pass*/
+ if ((ctrl->pass->aos>t)||(ctrl->pass->los<t)){
+ /* the pass may not have met the minimum
+ elevation, calculate the pass and plot it*/
+ if (ctrl->target->el >= 0.0) {
+ /*inside an unexpected/unpredicted pass*/
+ free_pass (ctrl->pass);
+ ctrl->pass=NULL;
+ ctrl->pass = get_current_pass (ctrl->target, ctrl->qth, t);
+ set_flipped_pass(ctrl);
+ gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass);
+ } else if ((ctrl->target->aos-ctrl->pass->aos)>(ctrl->delay/secday/1000/4.0)) {
+ /*the target is expected to appear in a new pass
+ sufficiently later after the current pass says*/
+
+ /*converted milliseconds to gpredict time and took a
+ fraction of it as a threshold for deciding a new pass*/
+
+ /*if the next pass is not the one for the target*/
+ free_pass (ctrl->pass);
+ ctrl->pass=NULL;
+ ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0);
+ set_flipped_pass(ctrl);
+ /* update polar plot */
+ gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass);
+ }
+ } else {
+ /* inside a pass and target dropped below the
+ horizon so look for a new pass */
+ if (ctrl->target->el < 0.0) {
+ free_pass (ctrl->pass);
+ ctrl->pass=NULL;
+ ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0);
+ set_flipped_pass(ctrl);
+ /* update polar plot */
+ gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass);
+ }
}
}
else {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|