[Gpredict-svn] SF.net SVN: gpredict:[936] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-10-23 16:43:29
|
Revision: 936
http://gpredict.svn.sourceforge.net/gpredict/?rev=936&view=rev
Author: aa1vs
Date: 2011-10-23 16:43:23 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
Replace part of satellite update with call to predict_calc.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-module.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-23 13:58:57 UTC (rev 935)
+++ trunk/ChangeLog 2011-10-23 16:43:23 UTC (rev 936)
@@ -21,6 +21,10 @@
* data/trsp/5580.trsp
Add transponder data for Prospero and SRMVU satellites.
+ * src/gtk-sat-module.c
+ Replace part of satellite update with call to predict_calc.
+
+
2011-10-13 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-10-23 13:58:57 UTC (rev 935)
+++ trunk/src/gtk-sat-module.c 2011-10-23 16:43:23 UTC (rev 936)
@@ -1035,63 +1035,8 @@
sat->los = find_los (sat, module->qth, daynum, maxdt);
}
- /*data may have been updated by gpsd*/
- obs_geodetic.lon = module->qth->lon * de2ra;
- obs_geodetic.lat = module->qth->lat * de2ra;
- obs_geodetic.alt = module->qth->alt / 1000.0;
- obs_geodetic.theta = 0;
+ predict_calc( sat, module->qth, daynum);
-
- sat->jul_utc = daynum;
- sat->tsince = (sat->jul_utc - sat->jul_epoch) * xmnpda;
-
-
-
- /* call the norad routines according to the deep-space flag */
- if (sat->flags & DEEP_SPACE_EPHEM_FLAG)
- SDP4 (sat, sat->tsince);
- else
- SGP4 (sat, sat->tsince);
-
- /* scale position and velocity to km and km/sec */
- Convert_Sat_State (&sat->pos, &sat->vel);
-
- /* get the velocity of the satellite */
- Magnitude (&sat->vel);
- sat->velo = sat->vel.w;
- Calculate_Obs (sat->jul_utc, &sat->pos, &sat->vel, &obs_geodetic, &obs_set);
- Calculate_LatLonAlt (sat->jul_utc, &sat->pos, &sat_geodetic);
-
- /*** FIXME: should we ensure sat_geodetic.lon stays between -pi and pi? */
- while (sat_geodetic.lon < -pi)
- sat_geodetic.lon += twopi;
-
- while (sat_geodetic.lon > (pi))
- sat_geodetic.lon -= twopi;
-
- sat->az = Degrees (obs_set.az);
- sat->el = Degrees (obs_set.el);
- sat->range = obs_set.range;
- sat->range_rate = obs_set.range_rate;
- sat->ssplat = Degrees (sat_geodetic.lat);
- sat->ssplon = Degrees (sat_geodetic.lon);
- sat->alt = sat_geodetic.alt;
- sat->ma = Degrees (sat->phase);
- sat->ma *= 256.0/360.0;
- sat->phase = Degrees (sat->phase);
-
- /* same formulas, but the one from predict is nicer */
- //sat->footprint = 2.0 * xkmper * acos (xkmper/sat->pos.w);
- sat->footprint = 12756.33 * acos (xkmper / (xkmper+sat->alt));
- age = sat->jul_utc - sat->jul_epoch;
- sat->orbit = (long) floor((sat->tle.xno * xmnpda/twopi +
- age * sat->tle.bstar * ae) * age +
- sat->tle.xmo/twopi) + sat->tle.revnum - 1;
-
-
- /*** FIXME: Squint + AOS / LOS code */
-
-
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|