[Gpredict-svn] SF.net SVN: gpredict:[826] trunk/src/gtk-sat-module.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-05-26 21:54:19
|
Revision: 826
http://gpredict.svn.sourceforge.net/gpredict/?rev=826&view=rev
Author: aa1vs
Date: 2011-05-26 21:54:12 +0000 (Thu, 26 May 2011)
Log Message:
-----------
Clarify comment.
Modified Paths:
--------------
trunk/src/gtk-sat-module.c
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-05-26 13:00:50 UTC (rev 825)
+++ trunk/src/gtk-sat-module.c 2011-05-26 21:54:12 UTC (rev 826)
@@ -980,12 +980,47 @@
sat->los = find_los (sat, module->qth, daynum, maxdt);
}
- /*update aos if it was known and is stale*/
+ /*
+ Update AOS and LOS for this satellite if it was known and is before
+ the current time.
+
+ daynum is the current time in the module.
+
+ The conditional aos < daynum is merely saying that aos occured
+ in the past. Therefore it cannot be the next event or aos/los
+ for that satellite.
+
+ The conditional aos > 0.0 is a short hand for saying that the
+ aos was successfully computed before. find_aos returns 0.0 when it
+ cannot find an AOS.
+
+ This code should not execute find_aos(los) if the conditional before
+ is triggered as the newly computed aos(los) should either be in
+ the future (aos > daynum) or (aos == 0 ).
+
+ Single sat/list/event/map views all use these values and they
+ should be up to date.
+
+ The above code is still required for dealing with circumstances
+ where the qth moves from someplace where the qth can have an AOS and
+ where qth does not and for satellites in parking orbits where the
+ AOS may be further than maxdt out results in aos==0.0 until the
+ next aos is closer than maxdt. It also prevents the aos from
+ being computed every pass through the module for the parking orbits.
+
+ To be completely correct, when time can move forward and backwards
+ as it can with the time controller, the time the aos/los was
+ computed should be stored and associated with aos/los. That way
+ if daynum <time_computed, the aos can be recomputed as there is
+ no assurance that the current stored aos is the next aos. As a
+ practical matter the above code handles time reversing acceptably
+ for most circumstances.
+
+ */
if (sat->aos > 0 && sat->aos < daynum) {
maxdt = (gdouble) sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD);
sat->aos = find_aos (sat, module->qth, daynum, maxdt);
}
- /*update los if it was known is stale*/
if (sat->los > 0 && sat->los < daynum) {
maxdt = (gdouble) sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD);
sat->los = find_los (sat, module->qth, daynum, maxdt);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|