[Gpredict-svn] SF.net SVN: gpredict:[599] trunk/src/gtk-sat-map-ground-track.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <cs...@us...> - 2010-02-01 16:10:12
|
Revision: 599
http://gpredict.svn.sourceforge.net/gpredict/?rev=599&view=rev
Author: csete
Date: 2010-02-01 16:10:05 +0000 (Mon, 01 Feb 2010)
Log Message:
-----------
Applied patch 2942658: Ground Tracks with Narrow Windows (Thanks to Charles Suprin AA1VS).
Modified Paths:
--------------
trunk/src/gtk-sat-map-ground-track.c
Modified: trunk/src/gtk-sat-map-ground-track.c
===================================================================
--- trunk/src/gtk-sat-map-ground-track.c 2010-02-01 15:40:19 UTC (rev 598)
+++ trunk/src/gtk-sat-map-ground-track.c 2010-02-01 16:10:05 UTC (rev 599)
@@ -285,7 +285,7 @@
create_polylines (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *obj)
{
ssp_t *ssp,*buff; /* map coordinates */
- double lastx;
+ double lastx,lasty;
GSList *points = NULL;
GooCanvasItemModel *root;
GooCanvasItemModel *line;
@@ -297,6 +297,7 @@
/* initialise parameters */
lastx = -50.0;
+ lasty = -50.0;
start = 0;
num_points = 0;
n = g_slist_length (obj->track_data.latlon);
@@ -316,6 +317,7 @@
if (i == start) {
points = g_slist_prepend (points, ssp);
lastx = ssp->lon;
+ lasty = ssp->lat;
}
else {
@@ -361,20 +363,23 @@
points = NULL;
start = i;
lastx = ssp->lon;
+ lasty = ssp->lat;
num_points = 0;
/* Add current SSP to the new list */
points = g_slist_prepend (points, ssp);
lastx = ssp->lon;
+ lasty = ssp->lat;
}
/* else if this SSP is separable from the previous */
- else if (fabs (lastx - ssp->lon) > 1.0 ) {
+ else if ((fabs (lastx - ssp->lon) > 1.0 ) || (fabs(lasty - ssp->lat)>1.0)){
/* add SSP to list */
points = g_slist_prepend (points, ssp);
lastx = ssp->lon;
+ lasty = ssp->lon;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|