Thread: [Gpredict-svn] SF.net SVN: gpredict:[187] trunk/src/gtk-sat-map.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
From: <cs...@us...> - 2008-12-28 14:46:44
|
Revision: 187 http://gpredict.svn.sourceforge.net/gpredict/?rev=187&view=rev Author: csete Date: 2008-12-28 14:46:41 +0000 (Sun, 28 Dec 2008) Log Message: ----------- Don't set canvas bounds when creating canvas because that will limit the visible area to the bound size, i.e. we cannot make the canvas larger. Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2008-12-28 14:39:16 UTC (rev 186) +++ trunk/src/gtk-sat-map.c 2008-12-28 14:46:41 UTC (rev 187) @@ -267,7 +267,8 @@ goo_canvas_set_bounds (GOO_CANVAS (GTK_SAT_MAP (satmap)->canvas), 0, 0, gdk_pixbuf_get_width (GTK_SAT_MAP (satmap)->origmap), gdk_pixbuf_get_height (GTK_SAT_MAP (satmap)->origmap)); - + + /* connect size-request signal */ g_signal_connect (GTK_SAT_MAP (satmap)->canvas, "size-allocate", G_CALLBACK (size_allocate_cb), satmap); @@ -512,6 +513,11 @@ GDK_INTERP_BILINEAR); } + /* set canvas bounds to match new size */ + goo_canvas_set_bounds (GOO_CANVAS (GTK_SAT_MAP (satmap)->canvas), 0, 0, + satmap->width, satmap->height); + + /* redraw static elements */ g_object_set (satmap->map, "pixbuf", pbuf, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-01-07 11:25:52
|
Revision: 585 http://gpredict.svn.sourceforge.net/gpredict/?rev=585&view=rev Author: csete Date: 2010-01-07 11:25:44 +0000 (Thu, 07 Jan 2010) Log Message: ----------- Fixed X coordinate of satellite label when satellite is close to the right edge of the map. Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2010-01-07 10:43:56 UTC (rev 584) +++ trunk/src/gtk-sat-map.c 2010-01-07 11:25:44 UTC (rev 585) @@ -1842,12 +1842,12 @@ NULL); } else if ((satmap->width - x ) < 50) { g_object_set (obj->label, - "x", (gdouble) (x+3), + "x", (gdouble) (x-3), "y", (gdouble) (y), "anchor", GTK_ANCHOR_EAST, NULL); g_object_set (obj->shadowl, - "x", (gdouble) (x+3+1), + "x", (gdouble) (x-3+1), "y", (gdouble) (y+1), "anchor", GTK_ANCHOR_EAST, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-02-05 13:35:30
|
Revision: 601 http://gpredict.svn.sourceforge.net/gpredict/?rev=601&view=rev Author: csete Date: 2010-02-05 13:35:24 +0000 (Fri, 05 Feb 2010) Log Message: ----------- Applied patch 2943024: Eliminate Segfault in gtk-sat-map.c Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2010-02-01 16:16:30 UTC (rev 600) +++ trunk/src/gtk-sat-map.c 2010-02-05 13:35:24 UTC (rev 601) @@ -1796,6 +1796,15 @@ obj = SAT_MAP_OBJ (g_hash_table_lookup (satmap->obj, catnum)); + if (obj == NULL) { + /* FIXME: protection against this should be implemented in the module. */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: NULL object for %d (yes, this is a bug)"), + __FILE__, __LINE__, sat->tle.catnr); + + return; + } + if (obj->selected) { /* update satmap->sel */ update_selected (satmap, sat); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-03-23 00:53:08
|
Revision: 790 http://gpredict.svn.sourceforge.net/gpredict/?rev=790&view=rev Author: aa1vs Date: 2011-03-23 00:53:02 +0000 (Wed, 23 Mar 2011) Log Message: ----------- Remove decayed satellites from map view. Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2011-03-21 11:45:37 UTC (rev 789) +++ trunk/src/gtk-sat-map.c 2011-03-23 00:53:02 UTC (rev 790) @@ -56,6 +56,7 @@ #include "locator.h" #include "sat-debugger.h" #include "sat-info.h" +#include "predict-tools.h" #ifdef HAVE_CONFIG_H # include <build-config.h> #endif @@ -1708,7 +1709,10 @@ guint32 col,covcol,shadowcol; gfloat x,y; gchar *tooltip; - + + if (decayed(sat)) { + return; + } /* get satellite and SSP */ catnum = g_new0 (gint, 1); *catnum = sat->tle.catnr; @@ -1883,14 +1887,41 @@ } obj = SAT_MAP_OBJ (g_hash_table_lookup (satmap->obj, catnum)); + + /*get rid of a decayed satellite*/ + if (decayed(sat) && obj!=NULL) { + SAT_MAP_OBJ (g_hash_table_remove (satmap->obj, catnum)); + /*remove items*/ + idx = goo_canvas_item_model_find_child (root,obj->marker); + if (idx !=-1) + goo_canvas_item_model_remove_child (root, idx);; + idx = goo_canvas_item_model_find_child (root,obj->shadowm); + if (idx !=-1) + goo_canvas_item_model_remove_child (root, idx);; + idx = goo_canvas_item_model_find_child (root,obj->label); + if (idx !=-1) + goo_canvas_item_model_remove_child (root, idx); + idx = goo_canvas_item_model_find_child (root,obj->shadowl); + if (idx !=-1) + goo_canvas_item_model_remove_child (root, idx); + idx = goo_canvas_item_model_find_child (root,obj->range1); + if (idx !=-1) + goo_canvas_item_model_remove_child (root, idx); + idx = goo_canvas_item_model_find_child (root,obj->range2); + if (idx !=-1) + goo_canvas_item_model_remove_child (root, idx); + return; + } if (obj == NULL) { - /* FIXME: protection against this should be implemented in the module. */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: NULL object for %d (yes, this is a bug)"), - __FILE__, __LINE__, sat->tle.catnr); - - return; + if (decayed(sat)) { + return; + } else { + /*satellite was decayed now is visible*/ + /*time controller backed up time*/ + plot_sat(key,value,data); + return; + } } if (obj->selected) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-11-05 20:39:36
|
Revision: 946 http://gpredict.svn.sourceforge.net/gpredict/?rev=946&view=rev Author: aa1vs Date: 2011-11-05 20:39:30 +0000 (Sat, 05 Nov 2011) Log Message: ----------- Add QRA to satmap display and clear up compiler warnings. Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2011-11-05 20:35:09 UTC (rev 945) +++ trunk/src/gtk-sat-map.c 2011-11-05 20:39:30 UTC (rev 946) @@ -401,9 +401,10 @@ Note: I used pango markup to set the background color, I didn't find any other obvious ways to get the text height in pixels to draw rectangle. */ - buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s </span>", + buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s %s</span>", satmap->infobgd, satmap->qth->name, + satmap->qth->qra, satmap->qth->loc); g_object_set (satmap->locnam, "text", buff, NULL); g_free (buff); @@ -640,6 +641,15 @@ if (satmap->resize) update_map_size (satmap); + /* update the location name */ + /* mainly for qra field */ + buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s %s</span>", + satmap->infobgd, + satmap->qth->name, + satmap->qth->qra, + satmap->qth->loc); + g_object_set (satmap->locnam, "text", buff, NULL); + g_free (buff); /* check if qth has moved significantly if so move it*/ lonlat_to_xy (satmap, satmap->qth->lon, satmap->qth->lat, &x, &y); g_object_get (satmap->qthmark, @@ -1273,7 +1283,18 @@ ret1 = qrb (sat->ssplon, sat->ssplat, 0.0, 90.0, &qrb1, &az1); ret2 = qrb (sat->ssplon, sat->ssplat, 0.0, -90.0, &qrb2, &az2); - + + if (ret1 !=RIG_OK){ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Invalid lat lon pair for %d."), + __FUNCTION__, sat->tle.catnr); + } + if (ret2 !=RIG_OK){ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Invalid lat lon pair for %d."), + __FUNCTION__, sat->tle.catnr); + } + if ((qrb1 <= 0.5*sat->footprint) || (qrb2 <= 0.5*sat->footprint)) return TRUE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2011-11-05 22:25:31
|
Revision: 947 http://gpredict.svn.sourceforge.net/gpredict/?rev=947&view=rev Author: csete Date: 2011-11-05 22:25:25 +0000 (Sat, 05 Nov 2011) Log Message: ----------- Revert rev. 946: QRA is not generally useful. Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2011-11-05 20:39:30 UTC (rev 946) +++ trunk/src/gtk-sat-map.c 2011-11-05 22:25:25 UTC (rev 947) @@ -401,10 +401,9 @@ Note: I used pango markup to set the background color, I didn't find any other obvious ways to get the text height in pixels to draw rectangle. */ - buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s %s</span>", + buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s </span>", satmap->infobgd, satmap->qth->name, - satmap->qth->qra, satmap->qth->loc); g_object_set (satmap->locnam, "text", buff, NULL); g_free (buff); @@ -641,15 +640,6 @@ if (satmap->resize) update_map_size (satmap); - /* update the location name */ - /* mainly for qra field */ - buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s %s</span>", - satmap->infobgd, - satmap->qth->name, - satmap->qth->qra, - satmap->qth->loc); - g_object_set (satmap->locnam, "text", buff, NULL); - g_free (buff); /* check if qth has moved significantly if so move it*/ lonlat_to_xy (satmap, satmap->qth->lon, satmap->qth->lat, &x, &y); g_object_get (satmap->qthmark, @@ -1283,18 +1273,7 @@ ret1 = qrb (sat->ssplon, sat->ssplat, 0.0, 90.0, &qrb1, &az1); ret2 = qrb (sat->ssplon, sat->ssplat, 0.0, -90.0, &qrb2, &az2); - - if (ret1 !=RIG_OK){ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Invalid lat lon pair for %d."), - __FUNCTION__, sat->tle.catnr); - } - if (ret2 !=RIG_OK){ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Invalid lat lon pair for %d."), - __FUNCTION__, sat->tle.catnr); - } - + if ((qrb1 <= 0.5*sat->footprint) || (qrb2 <= 0.5*sat->footprint)) return TRUE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2011-11-06 13:40:03
|
Revision: 948 http://gpredict.svn.sourceforge.net/gpredict/?rev=948&view=rev Author: aa1vs Date: 2011-11-06 13:39:57 +0000 (Sun, 06 Nov 2011) Log Message: ----------- Add comments. Modified Paths: -------------- trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2011-11-05 22:25:25 UTC (rev 947) +++ trunk/src/gtk-sat-map.c 2011-11-06 13:39:57 UTC (rev 948) @@ -2607,6 +2607,7 @@ satmap->showtracks); } +/** \brief save the satellites that we should not show ground tracks */ static void gtk_sat_map_store_showtracks (GtkSatMap *satmap) { mod_cfg_set_integer_list_boolean(satmap->cfgdata, @@ -2614,7 +2615,7 @@ MOD_CFG_MAP_SECTION, MOD_CFG_MAP_SHOWTRACKS); } - +/** \brief save the satellites that we should not highlight coverage */ static void gtk_sat_map_store_hidecovs (GtkSatMap *satmap) { mod_cfg_set_integer_list_boolean(satmap->cfgdata, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |