[Gpredict-svn] SF.net SVN: gpredict:[955] trunk
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <aa...@us...> - 2011-11-21 01:18:15
|
Revision: 955 http://gpredict.svn.sourceforge.net/gpredict/?rev=955&view=rev Author: aa1vs Date: 2011-11-21 01:18:09 +0000 (Mon, 21 Nov 2011) Log Message: ----------- Apply consistent checking of pole to eliminate disagreements. (Bug 3437555: Graphical Glitch Plotting Footprints near pole) Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-sat-map.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2011-11-13 13:56:43 UTC (rev 954) +++ trunk/ChangeLog 2011-11-21 01:18:09 UTC (rev 955) @@ -1,3 +1,8 @@ +2011-11-21 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-sat-map.c + Apply consistent checking of pole to eliminate disagreements. (Bug 3437555: Graphical Glitch Plotting Footprints near pole) + 2011-11-13 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-sat-module-popup.c Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2011-11-13 13:56:43 UTC (rev 954) +++ trunk/NEWS 2011-11-21 01:18:09 UTC (rev 955) @@ -20,6 +20,7 @@ - Fixed bug 3417553: Gpredict crashes - Fixed bug 3419879: gpredict doesn't change the satellite names on world map. - Fixed bug 3292729: Show next pass shows the current pass. +- Fixed bug 3437555: Graphical Glitch Plotting Footprints near pole. Changes in version 1.3 (1 Mar 2011) Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2011-11-13 13:56:43 UTC (rev 954) +++ trunk/src/gtk-sat-map.c 2011-11-21 01:18:09 UTC (rev 955) @@ -96,6 +96,8 @@ static GooCanvasItemModel* create_canvas_model (GtkSatMap *satmap); static gdouble arccos (gdouble, gdouble); static gboolean pole_is_covered (sat_t *sat); +static gboolean north_pole_is_covered (sat_t *sat); +static gboolean south_pole_is_covered (sat_t *sat); static gboolean mirror_lon (sat_t *sat, gdouble rangelon, gdouble *mlon); static guint calculate_footprint (GtkSatMap *satmap, sat_t *sat); static void split_points (GtkSatMap *satmap, sat_t *sat, gdouble sspx); @@ -1268,26 +1270,47 @@ static gboolean pole_is_covered (sat_t *sat) { - int ret1,ret2; - gdouble qrb1, qrb2, az1, az2; + if (north_pole_is_covered(sat) ||south_pole_is_covered(sat)) + return TRUE; + else + return FALSE; +} +/** \brief Check whether the footprint covers the North pole. */ +static gboolean +north_pole_is_covered (sat_t *sat) +{ + int ret1; + gdouble qrb1, az1; + ret1 = qrb (sat->ssplon, sat->ssplat, 0.0, 90.0, &qrb1, &az1); if (ret1 != RIG_OK) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Bad data measuring distance to North Pole %f %f."), __FUNCTION__, sat->ssplon, sat->ssplat); } - ret2 = qrb (sat->ssplon, sat->ssplat, 0.0, -90.0, &qrb2, &az2); - if (ret2 != RIG_OK) { + if (qrb1 <= 0.5*sat->footprint) { + return TRUE; + } + return FALSE; +} + +/** \brief Check whether the footprint covers the South pole. */ +static gboolean +south_pole_is_covered (sat_t *sat) +{ + int ret1; + gdouble qrb1, az1; + + ret1 = qrb (sat->ssplon, sat->ssplat, 0.0, -90.0, &qrb1, &az1); + if (ret1 != RIG_OK) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Bad data measuring distance to South Pole %f %f."), __FUNCTION__, sat->ssplon, sat->ssplat); } - - - if ((qrb1 <= 0.5*sat->footprint) || (qrb2 <= 0.5*sat->footprint)) + if (qrb1 <= 0.5*sat->footprint) { return TRUE; - + } return FALSE; } @@ -1384,10 +1407,10 @@ num = cos (beta) - (sin (ssplat) * sin (rangelat)); dem = cos (ssplat) * cos (rangelat); - if (azi == 0 && (beta > pio2 - ssplat)) + if (azi == 0 && north_pole_is_covered(sat)) rangelon = ssplon + pi; - else if (azi == 180 && (beta > pio2 + ssplat)) + else if (azi == 180 && south_pole_is_covered(sat)) rangelon = ssplon + pi; else if (fabs (num / dem) > 1.0) @@ -1433,9 +1456,8 @@ sort_points_x (satmap, sat, points1, 360); numrc = 1; + } - } - /* pole not covered but range circle has been warped => split points */ else if (warped == TRUE) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |