[Gpredict-svn] SF.net SVN: gpredict:[795] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-03-26 17:38:23
|
Revision: 795
http://gpredict.svn.sourceforge.net/gpredict/?rev=795&view=rev
Author: aa1vs
Date: 2011-03-26 17:38:17 +0000 (Sat, 26 Mar 2011)
Log Message:
-----------
Change get current pass to log error if non-current pass returned.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/predict-tools.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-03-26 17:13:33 UTC (rev 794)
+++ trunk/ChangeLog 2011-03-26 17:38:17 UTC (rev 795)
@@ -1,3 +1,8 @@
+2011-03-26 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/predict-tools.c
+ Change get_current_pass to log error if returned pass is not current.
+
2011-03-25 Charles Suprin <hamaa1vs at gmail.com>
* AUTHORS
Modified: trunk/src/predict-tools.c
===================================================================
--- trunk/src/predict-tools.c 2011-03-26 17:13:33 UTC (rev 794)
+++ trunk/src/predict-tools.c 2011-03-26 17:38:17 UTC (rev 795)
@@ -913,9 +913,11 @@
pass_t *
get_current_pass (sat_t *sat_in, qth_t *qth, gdouble start)
{
- gdouble t;
+ gdouble t,t0;
+ gdouble el0;
sat_t *sat,sat_working;
-
+ pass_t *pass;
+
/*copy sat_in to a working structure*/
sat = memcpy(&sat_working,sat_in,sizeof(sat_t));
@@ -925,6 +927,10 @@
t = get_current_daynum ();
predict_calc (sat, qth, t);
+ /*save initial conditions for later comparison*/
+ t0 = t;
+ el0 = sat->el;
+
/* check whether satellite has aos */
if (!has_aos (sat, qth)) {
@@ -933,10 +939,26 @@
}
/* find a time before AOS */
- while (sat->el > -2.0) {
+ while (sat->el > 0.0) {
predict_calc (sat, qth, t);
t -= 0.007; // +10 min
}
- return get_pass_no_min_el (sat, qth, t, 0.0);
+ pass = get_pass_no_min_el (sat, qth, t, 0.0);
+ if (el0 > 0.0) {
+ /* this function is only specified if the elevation
+ is greater than zero at the time it is called*/
+ if (pass){
+ if (pass->aos > t0)
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Returning a pass for %s that starts after the seeded time."),
+ __FUNCTION__,sat->nickname);
+
+ if (pass->los < t0)
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Returning a pass for %s that ends before the seeded time."),
+ __FUNCTION__,sat->nickname);
+ }
+ }
+ return pass;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|