Thread: [Gpredict-svn] SF.net SVN: gpredict:[885] trunk (Page 5)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-08-09 23:35:50
|
Revision: 885
http://gpredict.svn.sourceforge.net/gpredict/?rev=885&view=rev
Author: aa1vs
Date: 2011-08-09 23:35:43 +0000 (Tue, 09 Aug 2011)
Log Message:
-----------
Refactors code that stores per satellite show track and highlight coverage.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-map.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-09 23:30:00 UTC (rev 884)
+++ trunk/ChangeLog 2011-08-09 23:35:43 UTC (rev 885)
@@ -13,7 +13,11 @@
* src/Makefile.am
Eliminates DATADIR from defines to avoid mingw32 problem with winsock.
+ * ChangeLog
+ * src/gtk-sat-map.c
+ Refactors code that stores per satellite show track and highlight coverage.
+
2011-08-04 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-08-09 23:30:00 UTC (rev 884)
+++ trunk/src/gtk-sat-map.c 2011-08-09 23:35:43 UTC (rev 885)
@@ -108,10 +108,13 @@
static void redraw_grid_lines (GtkSatMap *satmap);
static gchar *aoslos_time_to_str (GtkSatMap *satmap, sat_t *sat);
static void gtk_sat_map_load_showtracks (GtkSatMap *map);
+static void gtk_sat_map_store_showtracks (GtkSatMap *satmap);
static void gtk_sat_map_load_hide_coverages (GtkSatMap *map);
+static void gtk_sat_map_store_hidecovs (GtkSatMap *satmap);
static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest);
static void store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey);
+
static GtkVBoxClass *parent_class = NULL;
static GooCanvasPoints *points1;
static GooCanvasPoints *points2;
@@ -199,18 +202,10 @@
static void
gtk_sat_map_destroy (GtkObject *object)
{
- gint *showtrack;
- gint *something;
- gint i,length;
- store_binary_hash_cfgdata(GTK_SAT_MAP(object)->cfgdata,
- GTK_SAT_MAP(object)->showtracks,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_SHOWTRACKS);
- store_binary_hash_cfgdata(GTK_SAT_MAP(object)->cfgdata,
- GTK_SAT_MAP(object)->hidecovs,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_HIDECOVS);
-
+ gtk_sat_map_store_showtracks (GTK_SAT_MAP(object));
+
+ gtk_sat_map_store_hidecovs (GTK_SAT_MAP(object));
+
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
@@ -1829,13 +1824,13 @@
obj->selected = FALSE;
- if (g_hash_table_lookup(satmap->showtracks,catnum)==NULL) {
+ if (!g_hash_table_lookup_extended(satmap->showtracks,catnum,NULL,NULL)) {
obj->showtrack = FALSE;
} else {
obj->showtrack = TRUE;
}
- if (g_hash_table_lookup(satmap->hidecovs,catnum)==NULL) {
+ if (!g_hash_table_lookup_extended(satmap->hidecovs,catnum,NULL,NULL)) {
obj->showcov = TRUE;
} else {
obj->showcov = FALSE;
@@ -2604,8 +2599,24 @@
MOD_CFG_MAP_SECTION,
MOD_CFG_MAP_SHOWTRACKS,
satmap->showtracks);
+
}
+static void
+gtk_sat_map_store_showtracks (GtkSatMap *satmap) {
+ store_binary_hash_cfgdata(satmap->cfgdata,
+ satmap->showtracks,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_SHOWTRACKS);
+}
+static void
+gtk_sat_map_store_hidecovs (GtkSatMap *satmap) {
+ store_binary_hash_cfgdata(satmap->cfgdata,
+ satmap->hidecovs,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_HIDECOVS);
+}
+
/** \brief Load the satellites that we should not highlight coverage */
static void
gtk_sat_map_load_hide_coverages (GtkSatMap *satmap)
@@ -2617,7 +2628,8 @@
}
/** \brief Load an integer list into a hash table that uses the
- data in the hash as a boolean
+ existinence of datain the hash as a boolean.
+ It loads NULL's into the hash table.
*/
static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest) {
gint *sats = NULL;
@@ -2651,17 +2663,18 @@
tkey = g_new0 (guint, 1);
*tkey = sats[i];
//printf("loading sat %d\n",sats[i]);
- if (g_hash_table_lookup (dest, tkey) == NULL) {
+ if (!(g_hash_table_lookup_extended (dest, tkey, NULL, NULL))) {
/* just add a one to the value so there is presence indicator */
g_hash_table_insert (dest,
tkey,
- (gpointer)0x1);
+ NULL);
}
}
g_free(sats);
}
-/** \brief Convert the "boolean" hash back into an integer list and save it. */
+/** \brief Convert the "boolean" hash back into an integer list and
+ save it to the cfgdata. */
static void
store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey)
{
@@ -2691,4 +2704,6 @@
cfgkey,
NULL);
}
+
+ g_list_free (keys);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-20 21:24:56
|
Revision: 886
http://gpredict.svn.sourceforge.net/gpredict/?rev=886&view=rev
Author: aa1vs
Date: 2011-08-20 21:24:50 +0000 (Sat, 20 Aug 2011)
Log Message:
-----------
Updates satellite name and nickname if of form YYYY-NNNAAA indicating first TLE downloaded before celestrak used given name and improves error reporting.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-09 23:35:43 UTC (rev 885)
+++ trunk/ChangeLog 2011-08-20 21:24:50 UTC (rev 886)
@@ -1,3 +1,10 @@
+2011-08-20 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Updates satellite name and nickname if of form YYYY-NNNAAA indicating first TLE downloaded before celestrak used given name and improves error reporting.
+
+
2011-08-09 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-09 23:35:43 UTC (rev 885)
+++ trunk/src/tle-update.c 2011-08-20 21:24:50 UTC (rev 886)
@@ -636,6 +636,10 @@
}
fclose (outfile);
+ } else {
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Failed to open %s preventing update"),
+ __FUNCTION__, locfile);
}
/* update progress indicator */
if (!silent && (progress != NULL)) {
@@ -981,10 +985,11 @@
new_tle_t *ntle;
GError *error = NULL;
GKeyFile *satdata;
- gchar *tlestr1, *tlestr2, *rawtle;
+ gchar *tlestr1, *tlestr2, *rawtle, *satname, *satnickname;
gchar *cfgstr;
GIOChannel *cfgfile;
gsize length, written;
+ gboolean updateddata;
/* open input file (file containing old tle) */
@@ -1029,6 +1034,8 @@
/* get TLE data */
tlestr1 = g_key_file_get_string (satdata, "Satellite", "TLE1", NULL);
tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL);
+ satname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
+ satnickname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
if (!Good_Elements (rawtle)) {
@@ -1041,13 +1048,37 @@
g_free (tlestr1);
g_free (tlestr2);
g_free (rawtle);
-
+ updateddata = FALSE;
+ if (ntle->satname != NULL) {
+ /* when a satellite first appears in the elements it is sometimes refered to by the
+ international designator which is awkward after it is given a name */
+ if (!g_regex_match_simple ("\\d{4,}-\\d{3,}",ntle->satname,0,0)) {
+
+ if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satname,0,0)) {
+ g_key_file_set_string (satdata, "Satellite", "NAME", ntle->satname);
+ updateddata = TRUE;
+ }
+
+ /* FIXME what to do about nickname Possibilities: */
+ /* clobber with name */
+ /* clobber if nickname and name were same before */
+ /* clobber if international designator */
+ if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satnickname,0,0)) {
+ g_key_file_set_string (satdata, "Satellite", "NICKNAME", ntle->satname);
+ updateddata = TRUE;
+ }
+ }
+ }
if (tle.epoch < ntle->epoch) {
/* new data is newer than what we already have */
/* store new data */
g_key_file_set_string (satdata, "Satellite", "TLE1", ntle->line1);
g_key_file_set_string (satdata, "Satellite", "TLE2", ntle->line2);
+ updated = TRUE;
+ }
+
+ if (updateddata ==TRUE) {
/* convert configuration data struct to charachter string */
cfgstr = g_key_file_to_data (satdata, &length, NULL); /* this function never reports error */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-21 13:40:29
|
Revision: 887
http://gpredict.svn.sourceforge.net/gpredict/?rev=887&view=rev
Author: aa1vs
Date: 2011-08-21 13:40:23 +0000 (Sun, 21 Aug 2011)
Log Message:
-----------
Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-20 21:24:50 UTC (rev 886)
+++ trunk/ChangeLog 2011-08-21 13:40:23 UTC (rev 887)
@@ -1,3 +1,10 @@
+2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
+
+
2011-08-20 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-20 21:24:50 UTC (rev 886)
+++ trunk/src/tle-update.c 2011-08-21 13:40:23 UTC (rev 887)
@@ -852,6 +852,11 @@
b = fgets (tle_str[1], 80, fp);
b = fgets (tle_str[2], 80, fp);
+ /* remove leading and trailing whitespace to be more forgiving */
+ g_strstrip(tle_str[0]);
+ g_strstrip(tle_str[1]);
+ g_strstrip(tle_str[2]);
+
tle_str[1][69] = '\0';
tle_str[2][69] = '\0';
@@ -1035,7 +1040,7 @@
tlestr1 = g_key_file_get_string (satdata, "Satellite", "TLE1", NULL);
tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL);
satname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
- satnickname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
+ satnickname = g_key_file_get_string (satdata, "Satellite", "NICKNAME", NULL);
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
if (!Good_Elements (rawtle)) {
@@ -1048,7 +1053,10 @@
g_free (tlestr1);
g_free (tlestr2);
g_free (rawtle);
+
+ /* Initialize flag for update */
updateddata = FALSE;
+
if (ntle->satname != NULL) {
/* when a satellite first appears in the elements it is sometimes refered to by the
international designator which is awkward after it is given a name */
@@ -1069,6 +1077,10 @@
}
}
}
+
+ g_free(satname);
+ g_free(satnickname);
+
if (tle.epoch < ntle->epoch) {
/* new data is newer than what we already have */
/* store new data */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-23 10:19:29
|
Revision: 891
http://gpredict.svn.sourceforge.net/gpredict/?rev=891&view=rev
Author: aa1vs
Date: 2011-08-23 10:19:23 +0000 (Tue, 23 Aug 2011)
Log Message:
-----------
Adds Event list to modules support in satellite reload and corrects some error messages.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-module.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-21 14:00:19 UTC (rev 890)
+++ trunk/ChangeLog 2011-08-23 10:19:23 UTC (rev 891)
@@ -1,6 +1,12 @@
2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
+ * src/gtk-sat-module.c
+ Adds Event list to modules support in satellite reload and corrects some error messages.
+
+2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
* src/tle-update.c
Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-08-21 14:00:19 UTC (rev 890)
+++ trunk/src/gtk-sat-module.c 2011-08-23 10:19:23 UTC (rev 891)
@@ -934,7 +934,7 @@
else {
sat_log_log (SAT_LOG_LEVEL_BUG,
- _("%f:%d: Unknown child type"),
+ _("%s:%d: Unknown child type"),
__FILE__, __LINE__);
}
}
@@ -1514,11 +1514,13 @@
else if (IS_GTK_SAT_LIST (widget)) {
}
+ else if (IS_GTK_EVENT_LIST (widget)) {
+ }
else {
sat_log_log (SAT_LOG_LEVEL_BUG,
- _("%f:%d: Unknown child type"),
+ _("%s:%d: Unknown child type"),
__FILE__, __LINE__);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-08-26 15:32:12
|
Revision: 892
http://gpredict.svn.sourceforge.net/gpredict/?rev=892&view=rev
Author: aa1vs
Date: 2011-08-26 15:32:06 +0000 (Fri, 26 Aug 2011)
Log Message:
-----------
Add hashes to support storing polar view sky track on and off.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-polar-view.c
trunk/src/gtk-polar-view.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-23 10:19:23 UTC (rev 891)
+++ trunk/ChangeLog 2011-08-26 15:32:06 UTC (rev 892)
@@ -1,6 +1,14 @@
-2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
+2011-08-26 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
+ * src/gtk-polar-view.h
+ * src/gtk-polar-view.c
+ Add hashes to support storing polar view sky track on and off.
+
+
+2011-08-23 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
* src/gtk-sat-module.c
Adds Event list to modules support in satellite reload and corrects some error messages.
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-08-23 10:19:23 UTC (rev 891)
+++ trunk/src/gtk-polar-view.c 2011-08-26 15:32:06 UTC (rev 892)
@@ -201,6 +201,16 @@
g_free,
NULL);
+ GTK_POLAR_VIEW (polv)->showtracks_on = g_hash_table_new_full (g_int_hash,
+ g_int_equal,
+ g_free,
+ NULL);
+
+ GTK_POLAR_VIEW (polv)->showtracks_off = g_hash_table_new_full (g_int_hash,
+ g_int_equal,
+ g_free,
+ NULL);
+
/* get settings */
GTK_POLAR_VIEW (polv)->refresh = mod_cfg_get_int (cfgdata,
MOD_CFG_POLAR_SECTION,
@@ -832,7 +842,7 @@
}
/* free pass info */
- free_pass (obj->pass);
+ //free_pass (obj->pass);
obj->pass=NULL;
/* if this was the selected satellite we need to
@@ -842,7 +852,7 @@
g_object_set (polv->sel, "text", "", NULL);
}
- g_free (obj);
+ // g_free (obj);
/* remove sat object from hash table */
g_hash_table_remove (polv->obj, catnum);
@@ -946,7 +956,15 @@
if ( obj != NULL) {
/* space was allocated now use it */
obj->selected = FALSE;
- obj->showtrack = polv->showtrack;
+
+ if (g_hash_table_lookup_extended(polv->showtracks_on,catnum,NULL,NULL)){
+ obj->showtrack = TRUE;
+ }
+ else if (g_hash_table_lookup_extended(polv->showtracks_off,catnum,NULL,NULL)){
+ obj->showtrack = FALSE;
+ } else {
+ obj->showtrack = polv->showtrack;
+ }
obj->istarget = FALSE;
root = goo_canvas_get_root_item_model (GOO_CANVAS (polv->canvas));
Modified: trunk/src/gtk-polar-view.h
===================================================================
--- trunk/src/gtk-polar-view.h 2011-08-23 10:19:23 UTC (rev 891)
+++ trunk/src/gtk-polar-view.h 2011-08-26 15:32:06 UTC (rev 892)
@@ -104,6 +104,9 @@
GooCanvasItemModel *next; /*!< next event text */
GooCanvasItemModel *sel; /*!< Text showing info about selected satellite. */
+ GHashTable *showtracks_on;
+ GHashTable *showtracks_off;
+
gdouble naos; /*!< Next event time */
gint ncat; /*!< Next event catnum */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-09-01 11:39:27
|
Revision: 893
http://gpredict.svn.sourceforge.net/gpredict/?rev=893&view=rev
Author: aa1vs
Date: 2011-09-01 11:39:20 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Tracks operational status through tle-update and stores it in .sat files when available.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-data.c
trunk/src/tle-update.c
trunk/src/tle-update.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-08-26 15:32:06 UTC (rev 892)
+++ trunk/ChangeLog 2011-09-01 11:39:20 UTC (rev 893)
@@ -1,3 +1,14 @@
+2011-09-01 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * NEWS
+ * src/tle-update.c
+ * src/tle-update.h
+ * src/gtk-sat-data.c
+ Tracks operational status through tle-update and stores it in .sat files when available.
+ Fixes Bug 3400534: Operational Status
+
+
2011-08-26 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-08-26 15:32:06 UTC (rev 892)
+++ trunk/NEWS 2011-09-01 11:39:20 UTC (rev 893)
@@ -12,6 +12,7 @@
- Fixed bug 3272993: Issue controlling Yaesu FT-847.
- Fixed bug 3334657: Old log files not being saved.
- Fixed bug 3271573: Track button in rotator controller has no effect.
+- Fixed bug 3400534: Operational Status.
Changes in version 1.3 (1 Mar 2011)
Modified: trunk/src/gtk-sat-data.c
===================================================================
--- trunk/src/gtk-sat-data.c 2011-08-26 15:32:06 UTC (rev 892)
+++ trunk/src/gtk-sat-data.c 2011-09-01 11:39:20 UTC (rev 893)
@@ -100,6 +100,7 @@
/* get TLE data */
tlestr1 = g_key_file_get_string (data, "Satellite", "TLE1", NULL);
tlestr2 = g_key_file_get_string (data, "Satellite", "TLE2", NULL);
+
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
if (!Good_Elements (rawtle)) {
@@ -109,6 +110,9 @@
errorcode = 2;
}
Convert_Satellite_Data (rawtle, &sat->tle);
+
+ if (g_key_file_has_key(data, "Satellite", "STATUS",NULL))
+ sat->tle.status = g_key_file_get_integer (data, "Satellite", "STATUS", NULL);
g_free (tlestr1);
g_free (tlestr2);
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-08-26 15:32:06 UTC (rev 892)
+++ trunk/src/tle-update.c 2011-09-01 11:39:20 UTC (rev 893)
@@ -532,7 +532,6 @@
gchar *userconfdir;
CURL *curl;
CURLcode res;
- gboolean error = FALSE;
gdouble fraction,start=0;
FILE *outfile;
GDir *dir;
@@ -626,7 +625,6 @@
sat_log_log (SAT_LOG_LEVEL_ERROR,
_("%s: Error fetching %s (%s)"),
__FUNCTION__, curfile, curl_easy_strerror (res));
- error = TRUE;
}
else {
sat_log_log (SAT_LOG_LEVEL_MSG,
@@ -818,6 +816,11 @@
catfile = g_fopen (catpath, "r");
if (catfile!=NULL) {
b = fgets (category, 80, catfile);
+ if (b == NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s:%s: There is no category in %s"),
+ __FILE__, __FUNCTION__, catpath);
+ }
fclose (catfile);
catsync = TRUE;
}
@@ -894,6 +897,7 @@
ntle = g_try_new (new_tle_t, 1);
ntle->catnum = catnr;
ntle->epoch = tle.epoch;
+ ntle->status = tle.status;
ntle->satname = g_strdup (g_strchomp(tle_str[0]));
ntle->line1 = g_strdup (tle_str[1]);
ntle->line2 = g_strdup (tle_str[2]);
@@ -907,10 +911,23 @@
/* if the satellite in the hash is older than
the one just loaded, copy the values over. */
ntle = g_hash_table_lookup (data, key);
-
- if (ntle->epoch <tle.epoch) {
+ if (ntle->epoch == tle.epoch) {
+ if (ntle->status!=tle.status) {
+ if (tle.status != OP_STAT_UNKNOWN) {
+ if (ntle->status!= OP_STAT_UNKNOWN) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s:%s: Two different statuses for the same satellite at the same time."),
+ __FILE__, __FUNCTION__);
+
+ }
+ ntle->status = tle.status;
+ }
+ }
+ }
+ else if (ntle->epoch <tle.epoch) {
ntle->catnum = catnr;
ntle->epoch = tle.epoch;
+ ntle->status = tle.status;
g_free (ntle->satname);
ntle->satname = g_strdup (g_strchomp(tle_str[0]));
g_free (ntle->line1);
@@ -988,6 +1005,7 @@
guint *key = NULL;
tle_t tle;
new_tle_t *ntle;
+ op_stat_t status;
GError *error = NULL;
GKeyFile *satdata;
gchar *tlestr1, *tlestr2, *rawtle, *satname, *satnickname;
@@ -1041,6 +1059,13 @@
tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL);
satname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
satnickname = g_key_file_get_string (satdata, "Satellite", "NICKNAME", NULL);
+ if (g_key_file_has_key(satdata,"Satellite","STATUS", NULL)) {
+ status = g_key_file_get_integer (satdata, "Satellite", "STATUS", NULL);
+ }
+ else {
+ status = OP_STAT_UNKNOWN;
+ }
+
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
if (!Good_Elements (rawtle)) {
@@ -1086,7 +1111,16 @@
g_free(satname);
g_free(satnickname);
-
+
+ if ( status != ntle->status ){
+
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Data for %d updated for operational status."),
+ __FUNCTION__, catnr);
+ g_key_file_set_integer (satdata, "Satellite", "STATUS", ntle->status);
+ updateddata = TRUE;
+ }
+
if (tle.epoch < ntle->epoch) {
/* new data is newer than what we already have */
/* store new data */
Modified: trunk/src/tle-update.h
===================================================================
--- trunk/src/tle-update.h 2011-08-26 15:32:06 UTC (rev 892)
+++ trunk/src/tle-update.h 2011-09-01 11:39:20 UTC (rev 893)
@@ -65,6 +65,7 @@
gchar *line2; /*!< Line 2. */
gchar *srcfile; /*!< The file where TLE comes from (needed for cat) */
gboolean isnew; /*!< Flag indicating whether sat is new. */
+ op_stat_t status; /*!< Enum indicating current satellite status. */
} new_tle_t;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-09-21 02:35:10
|
Revision: 900
http://gpredict.svn.sourceforge.net/gpredict/?rev=900&view=rev
Author: aa1vs
Date: 2011-09-21 02:35:04 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Eliminate segfaults for some .sat file corruption.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-data.c
trunk/src/sgpsdp/sgp_in.c
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-19 21:24:02 UTC (rev 899)
+++ trunk/ChangeLog 2011-09-21 02:35:04 UTC (rev 900)
@@ -1,3 +1,12 @@
+2011-09-20 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/sgpsdp/sgp_in.c
+ * src/tle-update.c
+ * src/gtk-sat-data.c
+ Eliminate segfaults for some .sat file corruption.
+
+
2011-09-19 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-data.c
===================================================================
--- trunk/src/gtk-sat-data.c 2011-09-19 21:24:02 UTC (rev 899)
+++ trunk/src/gtk-sat-data.c 2011-09-21 02:35:04 UTC (rev 900)
@@ -99,7 +99,19 @@
/* get TLE data */
tlestr1 = g_key_file_get_string (data, "Satellite", "TLE1", NULL);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Error reading TLE line 1 from %s (%s)"),
+ __FUNCTION__, path, error->message);
+ g_clear_error (&error);
+ }
tlestr2 = g_key_file_get_string (data, "Satellite", "TLE2", NULL);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Error reading TLE line 2 from %s (%s)"),
+ __FUNCTION__, path, error->message);
+ g_clear_error (&error);
+ }
rawtle = g_strconcat (tlestr1, tlestr2, NULL);
@@ -108,9 +120,9 @@
_("%s: TLE data for %d appears to be bad"),
__FUNCTION__, catnum);
errorcode = 2;
+ } else {
+ Convert_Satellite_Data (rawtle, &sat->tle);
}
- Convert_Satellite_Data (rawtle, &sat->tle);
-
if (g_key_file_has_key(data, "Satellite", "STATUS",NULL))
sat->tle.status = g_key_file_get_integer (data, "Satellite", "STATUS", NULL);
Modified: trunk/src/sgpsdp/sgp_in.c
===================================================================
--- trunk/src/sgpsdp/sgp_in.c 2011-09-19 21:24:02 UTC (rev 899)
+++ trunk/src/sgpsdp/sgp_in.c 2011-09-21 02:35:04 UTC (rev 900)
@@ -54,7 +54,11 @@
Checksum_Good (char *tle_set)
{
int i, check_digit, value, checksum = 0;
-
+
+ if ( tle_set == NULL ) {
+ return 0;
+ }
+
for (i = 0; i < 68; i++) {
if ( (tle_set[i] >= '0') && (tle_set[i] <= '9') )
value = tle_set[i] - '0';
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-09-19 21:24:02 UTC (rev 899)
+++ trunk/src/tle-update.c 2011-09-21 02:35:04 UTC (rev 900)
@@ -880,7 +880,7 @@
}
- /* read 3 lines at a time */
+ /* read lines from tle file */
while (fgets (linetmp, 80, fp)) {
/*read in the number of lines needed to potentially get to a new tle*/
switch (linesneeded) {
@@ -1166,9 +1166,25 @@
/* get TLE data */
tlestr1 = g_key_file_get_string (satdata, "Satellite", "TLE1", NULL);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Error reading TLE line 2 from %s (%s)"),
+ __FUNCTION__, path, error->message);
+ g_clear_error (&error);
+ }
tlestr2 = g_key_file_get_string (satdata, "Satellite", "TLE2", NULL);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Error reading TLE line 2 from %s (%s)"),
+ __FUNCTION__, path, error->message);
+ g_clear_error (&error);
+ }
+
+ /* get name data */
satname = g_key_file_get_string (satdata, "Satellite", "NAME", NULL);
satnickname = g_key_file_get_string (satdata, "Satellite", "NICKNAME", NULL);
+
+ /* get status data */
if (g_key_file_has_key(satdata,"Satellite","STATUS", NULL)) {
status = g_key_file_get_integer (satdata, "Satellite", "STATUS", NULL);
}
@@ -1182,9 +1198,11 @@
sat_log_log (SAT_LOG_LEVEL_WARN,
_("%s: Current TLE data for %d appears to be bad"),
__FUNCTION__, catnr);
+ /* set epoch to zero so it gets overwritten */
+ tle.epoch = 0;
+ } else {
+ Convert_Satellite_Data (rawtle, &tle);
}
- Convert_Satellite_Data (rawtle, &tle);
-
g_free (tlestr1);
g_free (tlestr2);
g_free (rawtle);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-09-23 00:37:34
|
Revision: 905
http://gpredict.svn.sourceforge.net/gpredict/?rev=905&view=rev
Author: aa1vs
Date: 2011-09-23 00:37:27 +0000 (Fri, 23 Sep 2011)
Log Message:
-----------
Unifies saving glib key file routine into one place instead of eight.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/first-time.c
trunk/src/gpredict-utils.c
trunk/src/gpredict-utils.h
trunk/src/mod-cfg.c
trunk/src/qth-data.c
trunk/src/radio-conf.c
trunk/src/rotor-conf.c
trunk/src/sat-cfg.c
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/ChangeLog 2011-09-23 00:37:27 UTC (rev 905)
@@ -5,6 +5,17 @@
* src/gtk-polar-view-popup.c
Saves polarview showtrack information from one session to another.
+ * ChangeLog
+ * src/first-time.c
+ * src/gpredict-utils.c
+ * src/gpredict-utils.h
+ * src/mod-cfg.c
+ * src/qth-data.c
+ * src/radio-conf.c
+ * src/rotor-conf.c
+ * src/sat-cfg.c
+ * src/tle-update.c
+ Unifies saving glib key file routine into one place instead of eight.
2011-09-21 Charles Suprin <hamaa1vs at gmail.com>
Modified: trunk/src/first-time.c
===================================================================
--- trunk/src/first-time.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/first-time.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -453,10 +453,7 @@
gchar *satfilename,*targetfilename;
gchar *datadir;
gchar **satellites;
- gchar *cfgstr;
GKeyFile *satfile,*target;
- gsize length;
- gsize written;
gsize num;
GError *err = NULL;
guint i;
@@ -464,7 +461,6 @@
//gdouble cfgver;
gchar *name, *nickname, *website, *tle1, *tle2, *cfgver;
- GIOChannel *cfgfile;
GDir *srcdir;
gchar *srcdirname;
@@ -521,52 +517,14 @@
g_key_file_set_string (target, "Satellite", "TLE1", tle1);
g_key_file_set_string (target, "Satellite", "TLE2", tle2);
- /* convert configuration data struct to charachter string */
- cfgstr = g_key_file_to_data (target, &length, NULL); /* this function never reports error */
-
- /* create and open a file for writing */
- cfgfile = g_io_channel_new_file (targetfilename, "w", &err);
-
- if (err != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create satellite file (%s)."),
- __FUNCTION__, err->message);
- g_clear_error (&err);
+ if (gpredict_save_key_file ( target, targetfilename)) {
*error |= FTC_ERROR_STEP_05;
+ } else {
+ newsats++;
}
- else {
- g_io_channel_write_chars (cfgfile,
- cfgstr,
- length,
- &written,
- &err);
-
- g_io_channel_shutdown (cfgfile, TRUE, NULL);
- g_io_channel_unref (cfgfile);
-
- if (err != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error writing satellite data (%s)."),
- __FUNCTION__, err->message);
- g_clear_error (&err);
- *error |= FTC_ERROR_STEP_05;
- }
- else if (length != written) {
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Wrote only %d out of %d chars for satellite data."),
- __FUNCTION__, written, length);
- }
- else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: Satellite data written for %s."),
- __FUNCTION__, satellites[i]);
- newsats++;
- }
- }
-
+
g_key_file_free (target);
- g_free (cfgstr);
g_free (cfgver);
g_free (name);
g_free (nickname);
Modified: trunk/src/gpredict-utils.c
===================================================================
--- trunk/src/gpredict-utils.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/gpredict-utils.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -458,6 +458,11 @@
return col;
}
+/** \brief String comparison function
+ * \param s1 first string
+ * \param s2 second string
+ */
+
int gpredict_strcmp (const char *s1, const char *s2) {
#if 0
@@ -475,6 +480,16 @@
#endif
}
+
+/** \brief substring finding function
+ * \param s1 the larger string
+ * \param s2 the substring that we are searching for.
+ * \return pointer to the substring location
+ *
+ * this is a substitute for strcasestr which is a gnu c extension and not available everywhere.
+ */
+
+
char * gpredict_strcasestr(const char *s1, const char *s2)
{
size_t s1_len = strlen(s1);
@@ -489,3 +504,83 @@
return NULL;
}
+
+/** \brief Save a GKeyFile structure to a file
+ * \param cfgdata is a pointer to the GKeyFile.
+ * \param filename is a pointer the filename string.
+ * \return 1 on error and zero on success.
+ * This might one day be in glib but for now it is not a standard function.
+ * Variants of this were throughout the code and it is now consilidated here.
+ */
+
+gboolean gpredict_save_key_file (GKeyFile *cfgdata, const char *filename) {
+ gchar *datastream; /* cfgdata string */
+ gsize length; /* length of the data stream */
+ gsize written; /* number of bytes actually written */
+ gboolean err = 0; /* the error value */
+ GIOChannel *cfgfile; /* file */
+ GError *error = NULL; /* Error handler */
+
+ /* ok, go on and convert the data */
+ datastream = g_key_file_to_data (cfgdata, &length, &error);
+
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Could not create config data (%s)."),
+ __FUNCTION__, error->message);
+
+ g_clear_error (&error);
+
+ err = 1;
+ } else {
+ cfgfile = g_io_channel_new_file (filename, "w", &error);
+
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Could not create config file (%s)."),
+ __FUNCTION__, error->message);
+
+ g_clear_error (&error);
+
+ err = 1;
+ }
+ else {
+ g_io_channel_write_chars (cfgfile,
+ datastream,
+ length,
+ &written,
+ &error);
+
+ g_io_channel_shutdown (cfgfile, TRUE, NULL);
+ g_io_channel_unref (cfgfile);
+
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Error writing config data (%s)."),
+ __FUNCTION__, error->message);
+
+ g_clear_error (&error);
+
+ err = 1;
+ }
+ else if (length != written) {
+ sat_log_log (SAT_LOG_LEVEL_WARN,
+ _("%s: Wrote only %d out of %d chars."),
+ __FUNCTION__, written, length);
+
+ err = 1;
+ }
+ else {
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Configuration saved for %s."),
+ __FUNCTION__, filename);
+
+ err = 0;
+ }
+ }
+ }
+ g_free (datastream);
+
+ return err;
+
+}
Modified: trunk/src/gpredict-utils.h
===================================================================
--- trunk/src/gpredict-utils.h 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/gpredict-utils.h 2011-09-23 00:37:27 UTC (rev 905)
@@ -64,4 +64,5 @@
gchar *rgba2html (guint rgba);
int gpredict_strcmp (const char *s1, const char *s2);
char *gpredict_strcasestr(const char *s1, const char *s2);
+gboolean gpredict_save_key_file (GKeyFile *cfgdata, const char *filename);
#endif
Modified: trunk/src/mod-cfg.c
===================================================================
--- trunk/src/mod-cfg.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/mod-cfg.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -310,13 +310,8 @@
*/
mod_cfg_status_t mod_cfg_save (gchar *modname, GKeyFile *cfgdata)
{
- GError *error = NULL; /* Error handler */
- gchar *datastream; /* cfgdata string */
- GIOChannel *cfgfile; /* .mod file */
gchar *filename; /* file name */
gchar *confdir;
- gsize length; /* length of the data stream */
- gsize written; /* number of bytes actually written */
gboolean err;
@@ -335,71 +330,14 @@
return MOD_CFG_ERROR;
}
- /* ok, go on and convert the data */
- datastream = g_key_file_to_data (cfgdata, &length, &error);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create config data (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- return MOD_CFG_ERROR;
- }
-
+
/* create file and write data stream */
confdir = get_modules_dir ();
filename = g_strconcat (confdir, G_DIR_SEPARATOR_S, modname, ".mod", NULL);
g_free (confdir);
- cfgfile = g_io_channel_new_file (filename, "w", &error);
+ err = gpredict_save_key_file (cfgdata, filename);
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create config file (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- err = 1;
- }
- else {
- g_io_channel_write_chars (cfgfile,
- datastream,
- length,
- &written,
- &error);
-
- g_io_channel_shutdown (cfgfile, TRUE, NULL);
- g_io_channel_unref (cfgfile);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error writing config data (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- err = 1;
- }
- else if (length != written) {
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Wrote only %d out of %d chars."),
- __FUNCTION__, written, length);
-
- err = 1;
- }
- else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: Configuration saved for module %s."),
- __FUNCTION__, modname);
-
- err = 0;
- }
- }
-
- g_free (datastream);
g_free (filename);
if (err)
Modified: trunk/src/qth-data.c
===================================================================
--- trunk/src/qth-data.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/qth-data.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -40,6 +40,7 @@
#include "orbit-tools.h"
#include "time-tools.h"
#include "locator.h"
+#include "gpredict-utils.h"
#ifdef HAS_LIBGPS
# include <gps.h>
#endif
@@ -279,12 +280,7 @@
gint
qth_data_save (const gchar *filename, qth_t *qth)
{
- GError *error = NULL;
gchar *buff;
- GIOChannel *cfgfile;
- gsize length;
- gsize written;
- gchar *cfgstr;
gint ok = 1;
qth->data = g_key_file_new ();
@@ -369,69 +365,8 @@
/* saving code */
- /* convert configuration data struct to charachter string */
- cfgstr = g_key_file_to_data (qth->data, &length, &error);
+ ok = !(gpredict_save_key_file (qth->data, filename));
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create QTH data (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- ok = 0;
- }
- else {
-
- cfgfile = g_io_channel_new_file (filename, "w", &error);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create QTH file %s\n%s."),
- __FUNCTION__, filename, error->message);
-
- g_clear_error (&error);
-
- ok = 0;
- }
- else {
- g_io_channel_write_chars (cfgfile,
- cfgstr,
- length,
- &written,
- &error);
-
- g_io_channel_shutdown (cfgfile, TRUE, NULL);
- g_io_channel_unref (cfgfile);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error writing QTH data (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- ok = 0;
- }
- else if (length != written) {
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Wrote only %d out of %d chars."),
- __FUNCTION__, written, length);
-
- ok = 0;
- }
- else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: QTH data saved."),
- __FUNCTION__);
-
- ok = 1;
- }
- }
-
- g_free (cfgstr);
- }
-
return ok;
}
Modified: trunk/src/radio-conf.c
===================================================================
--- trunk/src/radio-conf.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/radio-conf.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -31,6 +31,7 @@
#include <glib/gi18n.h>
#include "sat-log.h"
#include "compat.h"
+#include "gpredict-utils.h"
#include "radio-conf.h"
@@ -216,8 +217,6 @@
GKeyFile *cfg = NULL;
gchar *confdir;
gchar *fname;
- gchar *data;
- gsize len;
if (conf->name == NULL) {
sat_log_log (SAT_LOG_LEVEL_ERROR,
@@ -240,22 +239,14 @@
g_key_file_set_integer (cfg, GROUP, KEY_VFO_UP, conf->vfoUp);
g_key_file_set_integer (cfg, GROUP, KEY_VFO_DOWN, conf->vfoDown);
}
-
- /* convert to text sdata */
- data = g_key_file_to_data (cfg, &len, NULL);
-
+
confdir = get_hwconf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
conf->name, ".rig", NULL);
g_free (confdir);
-
- g_file_set_contents (fname, data, len, NULL);
+
+ gpredict_save_key_file (cfg, fname);
g_free (fname);
- g_free (data);
g_key_file_free (cfg);
-
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: Saved radio configuration %s"),
- __FUNCTION__, conf->name);
}
Modified: trunk/src/rotor-conf.c
===================================================================
--- trunk/src/rotor-conf.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/rotor-conf.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -33,6 +33,7 @@
#include "compat.h"
#include "rotor-conf.h"
+#include "gpredict-utils.h"
#define GROUP "Rotator"
#define KEY_HOST "Host"
@@ -172,8 +173,6 @@
GKeyFile *cfg = NULL;
gchar *confdir;
gchar *fname;
- gchar *data;
- gsize len;
if (conf->name == NULL)
return;
@@ -189,17 +188,16 @@
g_key_file_set_double (cfg, GROUP, KEY_MINEL, conf->minel);
g_key_file_set_double (cfg, GROUP, KEY_MAXEL, conf->maxel);
- /* convert to text sdata */
- data = g_key_file_to_data (cfg, &len, NULL);
-
+ /* build filename */
confdir = get_hwconf_dir();
fname = g_strconcat (confdir, G_DIR_SEPARATOR_S,
conf->name, ".rot", NULL);
g_free (confdir);
- g_file_set_contents (fname, data, len, NULL);
-
+ /* save information */
+ gpredict_save_key_file (cfg, fname);
+
+ /* cleanup */
g_free (fname);
- g_free (data);
g_key_file_free (cfg);
}
Modified: trunk/src/sat-cfg.c
===================================================================
--- trunk/src/sat-cfg.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/sat-cfg.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -45,8 +45,8 @@
#include "sat-pass-dialogs.h"
#include "compat.h"
#include "sat-cfg.h"
+#include "gpredict-utils.h"
-
#define LIST_COLUMNS_DEFAULTS (SAT_LIST_FLAG_NAME |\
SAT_LIST_FLAG_AZ |\
SAT_LIST_FLAG_EL |\
@@ -311,82 +311,17 @@
*/
guint sat_cfg_save ()
{
- gsize length;
- gsize written;
- GError *error = NULL;
- gchar *cfgstr;
gchar *keyfile;
gchar *confdir;
- GIOChannel *cfgfile;
guint err = 0;
+
+ confdir = get_user_conf_dir ();
+ keyfile = g_strconcat (confdir, G_DIR_SEPARATOR_S, "gpredict.cfg", NULL);
+
+ err = gpredict_save_key_file( config , keyfile);
- /* convert configuration data struct to charachter string */
- cfgstr = g_key_file_to_data (config, &length, &error);
+ g_free (confdir);
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create config data (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- err = 1;
- }
- else {
- /* create and open a file for writing */
- confdir = get_user_conf_dir ();
- keyfile = g_strconcat (confdir, G_DIR_SEPARATOR_S, "gpredict.cfg", NULL);
- g_free (confdir);
- cfgfile = g_io_channel_new_file (keyfile, "w", &error);
- g_free (keyfile);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create config file (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- err = 1;
- }
- else {
- g_io_channel_write_chars (cfgfile,
- cfgstr,
- length,
- &written,
- &error);
-
- g_io_channel_shutdown (cfgfile, TRUE, NULL);
- g_io_channel_unref (cfgfile);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error writing config data (%s)."),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- err = 1;
- }
- else if (length != written) {
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Wrote only %d out of %d chars."),
- __FUNCTION__, written, length);
-
- err = 1;
- }
- else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: Configuration saved."),
- __FUNCTION__);
-
- err = 0;
- }
- }
-
- g_free (cfgstr);
- }
-
return err;
}
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-09-23 00:33:36 UTC (rev 904)
+++ trunk/src/tle-update.c 2011-09-23 00:37:27 UTC (rev 905)
@@ -39,8 +39,8 @@
#include "sat-cfg.h"
#include "compat.h"
#include "tle-update.h"
+#include "gpredict-utils.h"
-
/* Flag indicating whether TLE update is in progress.
This should avoid multiple attempts to update TLE,
e.g. user starts update from menubar while automatic
@@ -165,7 +165,6 @@
/* scan directory for tle files */
while ((fnam = g_dir_read_name (cache_dir)) != NULL) {
-
/* check that we got a TLE file */
if (is_tle_file(dir, fnam)) {
@@ -188,6 +187,8 @@
/* now, do read the fresh data */
num = read_fresh_tle (dir, fnam, data);
+ } else {
+ num = 0;
}
if (num < 1) {
@@ -405,7 +406,6 @@
GKeyFile *satdata;
GIOChannel *satfile;
gchar *cfgstr, *cfgfile;
- gsize length, written;
GError *err = NULL;
(void) key; /* avoid unused parameter compiler warning */
@@ -423,45 +423,13 @@
g_key_file_set_string (satdata, "Satellite", "TLE2", ntle->line2);
g_key_file_set_integer (satdata, "Satellite", "STATUS", ntle->status);
- /* convert data to text */
- cfgstr = g_key_file_to_data (satdata, &length, NULL);
-
/* create an I/O channel and store data */
cfgfile = sat_file_name_from_catnum (ntle->catnum);
- satfile = g_io_channel_new_file (cfgfile, "w", &err);
-
- if (err != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create satellite file (%s)."),
- __FUNCTION__, err->message);
- g_clear_error (&err);
+ if (!gpredict_save_key_file (satdata, cfgfile)){
+ *num += 1;
}
- else {
- g_io_channel_write_chars (satfile, cfgstr, length, &written, &err);
- g_io_channel_shutdown (satfile, TRUE, NULL);
- g_io_channel_unref (satfile);
- if (err != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error writing satellite data for %d (%s)."),
- __FUNCTION__, ntle->catnum, err->message);
- g_clear_error (&err);
- }
- else if (length != written) {
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Wrote only %d out of %d chars for satellite data %d."),
- __FUNCTION__, written, length, ntle->catnum);
- }
- else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: Data for new sat %d successfully added."),
- __FUNCTION__, ntle->catnum);
- *num += 1;
- }
- }
-
/* clean up memory */
- g_free (cfgstr);
g_free (cfgfile);
g_key_file_free (satdata);
@@ -1129,9 +1097,6 @@
GError *error = NULL;
GKeyFile *satdata;
gchar *tlestr1, *tlestr2, *rawtle, *satname, *satnickname;
- gchar *cfgstr;
- GIOChannel *cfgfile;
- gsize length, written;
gboolean updateddata;
@@ -1272,46 +1237,12 @@
}
if (updateddata ==TRUE) {
- /* convert configuration data struct to charachter string */
- cfgstr = g_key_file_to_data (satdata, &length, NULL); /* this function never reports error */
-
- /* create and open a file for writing */
- cfgfile = g_io_channel_new_file (path, "w", &error);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Could not create satellite data file (%s)."),
- __FUNCTION__, error->message);
- g_clear_error (&error);
+ if (gpredict_save_key_file(satdata, path)) {
skipped++;
+ } else {
+ updated++;
}
- else {
- g_io_channel_write_chars (cfgfile, cfgstr, length, &written, &error);
-
- g_io_channel_shutdown (cfgfile, TRUE, NULL);
- g_io_channel_unref (cfgfile);
-
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error writing satellite data (%s)."),
- __FUNCTION__, error->message);
- g_clear_error (&error);
- skipped++;
- }
- else if (length != written) {
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Wrote only %d out of %d chars for satellite data."),
- __FUNCTION__, written, length);
- skipped++;
- }
- else {
- sat_log_log (SAT_LOG_LEVEL_MSG,
- _("%s: Satellite data written for %d."),
- __FUNCTION__, catnr);
- updated++;
- }
- }
- g_free (cfgstr);
+
}
else {
skipped++;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-09-25 13:04:59
|
Revision: 907
http://gpredict.svn.sourceforge.net/gpredict/?rev=907&view=rev
Author: aa1vs
Date: 2011-09-25 13:04:53 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Fix bugs in tle-update for two line tle's at end of the file.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-24 12:02:30 UTC (rev 906)
+++ trunk/ChangeLog 2011-09-25 13:04:53 UTC (rev 907)
@@ -1,3 +1,10 @@
+2011-09-25 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/tle-update.c
+ Fix bugs in tle-update for two line tle's at end of file.
+
+
2011-09-22 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-09-24 12:02:30 UTC (rev 906)
+++ trunk/src/tle-update.c 2011-09-25 13:04:53 UTC (rev 907)
@@ -796,8 +796,20 @@
gchar category[80];
gboolean catsync = FALSE; /* whether .cat file should be synced */
+ /*
+ Normal cases to check
+ 1. 3 line tle file as in amatuer.txt from celestrak
+ 2. 2 line tle file as in .... from celestrak
+ corner cases to check
+ 1. 3 line tle with something at the end. (nasa.all from amsat)
+ 2. 2 line tle with only one in the file
+ 3. 2 line tle file reading the last one.
+ */
+
+
+
path = g_strconcat (dir, G_DIR_SEPARATOR_S, fnam, NULL);
fp = g_fopen (path, "r");
@@ -847,6 +859,8 @@
satellite catnums will be added during update in the while loop */
}
+ /* set b to non-null as a flag */
+ b = 1;
/* read lines from tle file */
while (fgets (linetmp, 80, fp)) {
@@ -854,13 +868,31 @@
switch (linesneeded) {
case 3:
strncpy(tle_working[0],linetmp,80);
+ /* b is being used a flag here
+ if b==NULL then we only have one line read in
+ and there is no way we have a full tle as there
+ is only one line in the buffer.
+ A TLE must be two or three lines.
+ */
b = fgets (tle_working[1], 80, fp);
- b = fgets (tle_working[2], 80, fp);
+ if (b==NULL) {
+ /* make sure there is no junk in tle_working[1] */
+ tle_working[1][0]='\0';
+ break;
+ }
+ /* make sure there is no junk in tle_working[2] */
+ if (fgets (tle_working[2], 80, fp)==NULL) {
+ tle_working[2][0]='\0';
+ }
+
break;
case 2:
strncpy(tle_working[0],tle_working[2],80);
strncpy(tle_working[1],linetmp,80);
- b = fgets (tle_working[2], 80, fp);
+ /* make sure there is no junk in tle_working[2] */
+ if (fgets (tle_working[2], 80, fp)==NULL) {
+ tle_working[2][0]='\0';
+ }
break;
case 1:
strncpy(tle_working[0],tle_working[1],80);
@@ -873,6 +905,11 @@
__FILE__, __FUNCTION__, linesneeded);
break;
}
+ /* b can only be null if there is only one line in the buffer*/
+ /* a tle must be two or three */
+ if (b == NULL) {
+ break;
+ }
/* remove leading and trailing whitespace to be more forgiving */
g_strstrip(tle_working[0]);
g_strstrip(tle_working[1]);
@@ -929,6 +966,7 @@
/* we appear to have junk
read another line in and do nothing else */
linesneeded = 1;
+ /* skip back to beginning of loop */
continue;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-09-25 13:27:25
|
Revision: 908
http://gpredict.svn.sourceforge.net/gpredict/?rev=908&view=rev
Author: aa1vs
Date: 2011-09-25 13:27:19 +0000 (Sun, 25 Sep 2011)
Log Message:
-----------
Update sort routines to include catalog number to handle ties in name.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-selector.c
trunk/src/mod-cfg.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-25 13:04:53 UTC (rev 907)
+++ trunk/ChangeLog 2011-09-25 13:27:19 UTC (rev 908)
@@ -4,7 +4,12 @@
* src/tle-update.c
Fix bugs in tle-update for two line tle's at end of file.
+ * ChangeLog
+ * src/gtk-sat-selector.c
+ * src/mod-cfg.c
+ Update sort routines to include catalog number to handle ties in name.
+
2011-09-22 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2011-09-25 13:04:53 UTC (rev 907)
+++ trunk/src/gtk-sat-selector.c 2011-09-25 13:27:19 UTC (rev 908)
@@ -612,6 +612,7 @@
gpointer userdata)
{
gchar *sat1,*sat2;
+ gint catnr1, catnr2;
gint ret = 0;
(void) userdata; /* avoid unused parameter compiler warning */
@@ -620,6 +621,19 @@
gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_NAME, &sat2, -1);
ret = gpredict_strcmp (sat1, sat2);
+
+ if (ret == 0){
+ gtk_tree_model_get(model, a, GTK_SAT_SELECTOR_COL_CATNUM, &catnr1, -1);
+ gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_CATNUM, &catnr2, -1);
+ if (catnr1 < catnr2)
+ ret = -1;
+ else if (catnr1 > catnr2)
+ ret = 1;
+ else
+ /* never supposed to happen */
+ ret=0;
+ }
+
g_free (sat1);
g_free (sat2);
Modified: trunk/src/mod-cfg.c
===================================================================
--- trunk/src/mod-cfg.c 2011-09-25 13:04:53 UTC (rev 907)
+++ trunk/src/mod-cfg.c 2011-09-25 13:27:19 UTC (rev 908)
@@ -1100,6 +1100,7 @@
gpointer userdata)
{
gchar *sat1,*sat2;
+ gint catnr1,catnr2;
gint ret = 0;
(void) userdata; /* avoid unused parameter compiler warning */
@@ -1108,7 +1109,20 @@
gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_NAME, &sat2, -1);
ret = gpredict_strcmp (sat1, sat2);
+
+ if (ret == 0){
+ gtk_tree_model_get(model, a, GTK_SAT_SELECTOR_COL_CATNUM, &catnr1, -1);
+ gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_CATNUM, &catnr2, -1);
+ if (catnr1 < catnr2)
+ ret = -1;
+ else if (catnr1 > catnr2)
+ ret = 1;
+ else
+ /* never supposed to happen */
+ ret=0;
+ }
+
g_free (sat1);
g_free (sat2);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2011-10-01 10:02:36
|
Revision: 911
http://gpredict.svn.sourceforge.net/gpredict/?rev=911&view=rev
Author: csete
Date: 2011-10-01 10:02:29 +0000 (Sat, 01 Oct 2011)
Log Message:
-----------
Use GTK_STOCK_MEDIA_FORWARD and REWIND (bug 3309111).
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-module-tmg.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-09-28 22:39:39 UTC (rev 910)
+++ trunk/ChangeLog 2011-10-01 10:02:29 UTC (rev 911)
@@ -1,3 +1,10 @@
+2011-10-01 Alexandru Csete <oz9aec at gmail.com>
+
+ * src/gtk-sat-moduile-tmg.c:
+ Use GTK_STOCK_MEDIA_FORWARD and REWIND (bug 3309111: Wrong icon in time
+ controller).
+
+
2011-09-28 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
@@ -44,15 +51,18 @@
* src/tle-update.c
Unifies saving glib key file routine into one place instead of eight.
+
2011-09-21 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
* src/tle-update.c
- Corrects satellite name not being updated correctly when a satellite occurs with international ID and name in same update.
+ Corrects satellite name not being updated correctly when a satellite occurs
+ with international ID and name in same update.
* ChangeLog
* src/tle-update.c
- Corrects satellite status not being updated correctly when a .sat and update data have different status.
+ Corrects satellite status not being updated correctly when a .sat and update
+ data have different status.
2011-09-20 Charles Suprin <hamaa1vs at gmail.com>
@@ -113,8 +123,8 @@
* src/tle-update.c
* src/tle-update.h
* src/gtk-sat-data.c
- Tracks operational status through tle-update and stores it in .sat files when available.
- Fixes Bug 3400534: Operational Status
+ Tracks operational status through tle-update and stores it in .sat files
+ when available. Fixes Bug 3400534: Operational Status
2011-08-26 Charles Suprin <hamaa1vs at gmail.com>
@@ -129,13 +139,15 @@
* ChangeLog
* src/gtk-sat-module.c
- Adds Event list to modules support in satellite reload and corrects some error messages.
+ Adds Event list to modules support in satellite reload and corrects some
+ error messages.
2011-08-21 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
* src/tle-update.c
- Eliminates memory leak and cut and paste error and removes whitespace around tle before importing.
+ Eliminates memory leak and cut and paste error and removes whitespace around
+ tle before importing.
* ChangeLog
* src/gtk-sat-tree.c
@@ -149,7 +161,8 @@
* ChangeLog
* src/tle-update.c
- Updates satellite name and nickname if of form YYYY-NNNAAA indicating first TLE downloaded before celestrak used given name and improves error reporting.
+ Updates satellite name and nickname if of form YYYY-NNNAAA indicating first
+ TLE downloaded before celestrak used given name and improves error reporting.
2011-08-09 Charles Suprin <hamaa1vs at gmail.com>
@@ -208,7 +221,9 @@
* src/gtk-polar-view.c
* src/gtk-sat-tree.h
* src/gtk-polar-view.h
- Remove deprecated calls and functions to allow make CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" to work per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+ Remove deprecated calls and functions to allow make
+ CFLAGS+="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED" to work per
+ <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
2011-07-30 Charles Suprin <hamaa1vs at gmail.com>
@@ -222,7 +237,8 @@
* src/gtk-sat-module.h
* src/gtk-sat-module-tmg.h
* src/gtk-sky-glance.h
- Change gtk headers to only include from short list at <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+ Change gtk headers to only include from short list at
+ <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
* src/gpredict-help.c
* src/gpredict-utils.c
@@ -247,7 +263,8 @@
* src/sat-pref-rig-editor.c
* src/sat-pref-rot-editor.c
* src/save-pass.c
- Use access functions instead of private elements per <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
+ Use access functions instead of private elements per
+ <http://developer.gnome.org/gtk3/3.0/gtk-migrating-2-to-3.html>.
* src/gtk-sat-module-popup.c
* src/sat-pref-single-sat.c
@@ -268,7 +285,8 @@
* src/sat-pref-single-pass.c
* src/gtk-sat-tree.c
* src/sat-pref-refresh.c
- Eliminate use of deprecated GtkTooltips for GtkTooltip per <http://developer.gnome.org/gtk/2.22/gtk-migrating-tooltips.html>.
+ Eliminate use of deprecated GtkTooltips for GtkTooltip per
+ <http://developer.gnome.org/gtk/2.22/gtk-migrating-tooltips.html>.
2011-07-23 Charles Suprin <hamaa1vs at gmail.com>
@@ -310,7 +328,8 @@
2011-06-29 Charles Suprin <hamaa1vs at gmail.com>
* src/tle-update.c
- Fix SEGFAULT in tle-update.c when unable to open file for writing in network updates.
+ Fix SEGFAULT in tle-update.c when unable to open file for writing in network
+ updates.
2011-06-26 Charles Suprin <hamaa1vs at gmail.com>
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-09-28 22:39:39 UTC (rev 910)
+++ trunk/NEWS 2011-10-01 10:02:29 UTC (rev 911)
@@ -14,6 +14,7 @@
- Fixed bug 3334657: Old log files not being saved.
- Fixed bug 3271573: Track button in rotator controller has no effect.
- Fixed bug 3400534: Operational Status.
+- Fixed bug 3309111: Wrong icon in time controller.
Changes in version 1.3 (1 Mar 2011)
Modified: trunk/src/gtk-sat-module-tmg.c
===================================================================
--- trunk/src/gtk-sat-module-tmg.c 2011-09-28 22:39:39 UTC (rev 910)
+++ trunk/src/gtk-sat-module-tmg.c 2011-10-01 10:02:29 UTC (rev 911)
@@ -92,7 +92,7 @@
mod->tmgFwd = gtk_radio_button_new (NULL);
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (mod->tmgFwd), FALSE);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mod->tmgFwd), TRUE);
- image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_FORWARD, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (mod->tmgFwd), image);
gtk_widget_set_tooltip_text (mod->tmgFwd, _("Play forward"));
g_signal_connect (mod->tmgFwd, "toggled", G_CALLBACK (tmg_fwd), mod);
@@ -110,8 +110,7 @@
/* BWD */
mod->tmgBwd = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (mod->tmgFwd));
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (mod->tmgBwd), FALSE);
- image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_BUTTON);
- gtk_widget_set_direction (image, GTK_TEXT_DIR_RTL);
+ image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_REWIND, GTK_ICON_SIZE_BUTTON);
gtk_container_add (GTK_CONTAINER (mod->tmgBwd), image);
gtk_widget_set_tooltip_text (mod->tmgBwd, _("Play backwards"));
g_signal_connect (mod->tmgBwd, "toggled", G_CALLBACK (tmg_bwd), mod);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-02 23:48:31
|
Revision: 912
http://gpredict.svn.sourceforge.net/gpredict/?rev=912&view=rev
Author: aa1vs
Date: 2011-10-02 23:48:25 +0000 (Sun, 02 Oct 2011)
Log Message:
-----------
Delete ground track of decayed satellite.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-map-ground-track.c
trunk/src/gtk-sat-map.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-01 10:02:29 UTC (rev 911)
+++ trunk/ChangeLog 2011-10-02 23:48:25 UTC (rev 912)
@@ -1,3 +1,9 @@
+2011-09-28 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-map.c
+ * src/gtk-sat-map-ground-track.c
+
+
2011-10-01 Alexandru Csete <oz9aec at gmail.com>
* src/gtk-sat-moduile-tmg.c:
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-10-01 10:02:29 UTC (rev 911)
+++ trunk/NEWS 2011-10-02 23:48:25 UTC (rev 912)
@@ -15,6 +15,7 @@
- Fixed bug 3271573: Track button in rotator controller has no effect.
- Fixed bug 3400534: Operational Status.
- Fixed bug 3309111: Wrong icon in time controller.
+- Fixed bug 3413571: UARS Ground Track not Updated on TLE update.
Changes in version 1.3 (1 Mar 2011)
Modified: trunk/src/gtk-sat-map-ground-track.c
===================================================================
--- trunk/src/gtk-sat-map-ground-track.c 2011-10-01 10:02:29 UTC (rev 911)
+++ trunk/src/gtk-sat-map-ground-track.c 2011-10-02 23:48:25 UTC (rev 912)
@@ -191,6 +191,11 @@
_("%s: Updating ground track for %s"),
__FUNCTION__, sat->nickname);
+ if (decayed(sat)) {
+ ground_track_delete (satmap, sat, qth, obj, TRUE);
+ return;
+ }
+
if (recalc == TRUE) {
ground_track_delete (satmap, sat, qth, obj, TRUE);
ground_track_create (satmap, sat, qth, obj);
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-10-01 10:02:29 UTC (rev 911)
+++ trunk/src/gtk-sat-map.c 2011-10-02 23:48:25 UTC (rev 912)
@@ -2033,7 +2033,11 @@
if (idx !=-1)
goo_canvas_item_model_remove_child (root, idx);
g_hash_table_remove (satmap->obj, catnum);
- g_free (obj);
+ if (obj->showtrack)
+ ground_track_update (satmap, sat, satmap->qth, obj, TRUE);
+ g_free (obj);
+ /* remove obj from hash */
+ g_hash_table_remove (satmap->obj, catnum);
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-03 00:56:21
|
Revision: 914
http://gpredict.svn.sourceforge.net/gpredict/?rev=914&view=rev
Author: aa1vs
Date: 2011-10-03 00:56:15 +0000 (Mon, 03 Oct 2011)
Log Message:
-----------
Make groundtrack show on orbit zero.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-map-ground-track.c
trunk/src/sgpsdp/sgp4sdp4.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-02 23:53:19 UTC (rev 913)
+++ trunk/ChangeLog 2011-10-03 00:56:15 UTC (rev 914)
@@ -1,5 +1,11 @@
-2011-09-28 Charles Suprin <hamaa1vs at gmail.com>
+2011-10-02 Charles Suprin <hamaa1vs at gmail.com>
+ * src/sgpsdp/sgp4sdp4.h
+ * src/gtk-sat-map-ground-track.c
+ Make groundtrack show on orbit zero. (bug 3416451: No ground track for new satellites)
+
+2011-10-02 Charles Suprin <hamaa1vs at gmail.com>
+
* src/gtk-sat-map.c
* src/gtk-sat-map-ground-track.c
Delete ground track of decayed satellite.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-10-02 23:53:19 UTC (rev 913)
+++ trunk/NEWS 2011-10-03 00:56:15 UTC (rev 914)
@@ -16,8 +16,8 @@
- Fixed bug 3400534: Operational Status.
- Fixed bug 3309111: Wrong icon in time controller.
- Fixed bug 3413571: UARS Ground Track not Updated on TLE update.
+- Fixed bug 3416451: No ground track for new satellites.
-
Changes in version 1.3 (1 Mar 2011)
- Feature request 2873824: Flip Passes.
Modified: trunk/src/gtk-sat-map-ground-track.c
===================================================================
--- trunk/src/gtk-sat-map-ground-track.c 2011-10-02 23:53:19 UTC (rev 913)
+++ trunk/src/gtk-sat-map-ground-track.c 2011-10-03 00:56:15 UTC (rev 914)
@@ -71,8 +71,8 @@
void
ground_track_create (GtkSatMap *satmap, sat_t *sat, qth_t *qth, sat_map_obj_t *obj)
{
- unsigned long this_orbit; /* current orbit number */
- unsigned long max_orbit; /* target orbit number, ie. this + num - 1 */
+ long this_orbit; /* current orbit number */
+ long max_orbit; /* target orbit number, ie. this + num - 1 */
double t0; /* time when this_orbit starts */
double t;
ssp_t *this_ssp;
Modified: trunk/src/sgpsdp/sgp4sdp4.h
===================================================================
--- trunk/src/sgpsdp/sgp4sdp4.h 2011-10-02 23:53:19 UTC (rev 913)
+++ trunk/src/sgpsdp/sgp4sdp4.h 2011-10-03 00:56:15 UTC (rev 914)
@@ -191,7 +191,7 @@
double footprint; /*!< footprint */
double phase; /*!< orbit phase */
double meanmo; /*!< mean motion kept in rev/day */
- unsigned long orbit; /*!< orbit number */
+ long orbit; /*!< orbit number */
orbit_type_t otype; /*!< orbit type. */
} sat_t;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-08 02:05:05
|
Revision: 919
http://gpredict.svn.sourceforge.net/gpredict/?rev=919&view=rev
Author: aa1vs
Date: 2011-10-08 02:04:58 +0000 (Sat, 08 Oct 2011)
Log Message:
-----------
Update label as part of satellite update.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-polar-view.c
trunk/src/gtk-sat-map.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-05 00:46:02 UTC (rev 918)
+++ trunk/ChangeLog 2011-10-08 02:04:58 UTC (rev 919)
@@ -1,3 +1,10 @@
+2011-10-07 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-polar-view.c
+ * src/gtk-sat-map.c
+ Update label as part of satellite update.
+
+
2011-10-05 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-rot-ctrl.c
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-10-05 00:46:02 UTC (rev 918)
+++ trunk/NEWS 2011-10-08 02:04:58 UTC (rev 919)
@@ -18,6 +18,7 @@
- Fixed bug 3413571: UARS Ground Track not Updated on TLE update.
- Fixed bug 3416451: No ground track for new satellites.
- Fixed bug 3417553: Gpredict crashes
+- Fixed bug 3419879: gpredict doesn't change the satellite names on world map.
Changes in version 1.3 (1 Mar 2011)
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-10-05 00:46:02 UTC (rev 918)
+++ trunk/src/gtk-polar-view.c 2011-10-08 02:04:58 UTC (rev 919)
@@ -886,6 +886,9 @@
losstr = g_strdup_printf (_("%s\nAlways in range"), sat->nickname);
}
+ /* update label */
+ g_object_set (obj->label,"text",sat->nickname,NULL);
+
/* update tooltip */
tooltip = g_strdup_printf("<big><b>%s</b>\n</big>"\
"<tt>Az: %5.1f\302\260\n" \
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-10-05 00:46:02 UTC (rev 918)
+++ trunk/src/gtk-sat-map.c 2011-10-08 02:04:58 UTC (rev 919)
@@ -2061,6 +2061,10 @@
//sat->ssplon = ssplo;
//sat->ssplat = sspla;
+ /* update the label */
+ g_object_set (obj->label,"text",sat->nickname,NULL);
+ g_object_set (obj->shadowl,"text",sat->nickname,NULL);
+
/* we update tooltips every time */
aosstr = aoslos_time_to_str(satmap, sat);
tooltip = g_strdup_printf("<big><b>%s</b>\n</big>"\
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-13 10:46:36
|
Revision: 929
http://gpredict.svn.sourceforge.net/gpredict/?rev=929&view=rev
Author: aa1vs
Date: 2011-10-13 10:46:24 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
Eliminate unused variables to clean compiler output.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-polar-view-popup.c
trunk/src/qth-data.c
trunk/src/save-pass.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-12 23:20:21 UTC (rev 928)
+++ trunk/ChangeLog 2011-10-13 10:46:24 UTC (rev 929)
@@ -1,3 +1,11 @@
+2011-10-13 Charles Suprin <hamaa1vs at gmail.com>
+
+ * ChangeLog
+ * src/qth-data.c
+ * src/save-pass.c
+ * src/gtk-polar-view-popup.c
+ Eliminate unused variables to clean compiler output.
+
2011-10-12 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-polar-view-popup.c
===================================================================
--- trunk/src/gtk-polar-view-popup.c 2011-10-12 23:20:21 UTC (rev 928)
+++ trunk/src/gtk-polar-view-popup.c 2011-10-13 10:46:24 UTC (rev 929)
@@ -176,7 +176,7 @@
GtkPolarView *pv = GTK_POLAR_VIEW (data);
sat_obj_t *obj = NULL;
sat_t *sat;
- qth_t *qth;
+ /* qth_t *qth; Unused */
gint idx;
guint i;
GooCanvasItemModel *root;
@@ -192,7 +192,7 @@
/* get satellite object */
obj = SAT_OBJ(g_object_get_data (G_OBJECT (item), "obj"));
sat = SAT(g_object_get_data (G_OBJECT (item), "sat"));
- qth = (qth_t *)(g_object_get_data (G_OBJECT (item), "qth"));
+ /*qth = (qth_t *)(g_object_get_data (G_OBJECT (item), "qth"));*/
if (obj == NULL) {
sat_log_log (SAT_LOG_LEVEL_BUG,
Modified: trunk/src/qth-data.c
===================================================================
--- trunk/src/qth-data.c 2011-10-12 23:20:21 UTC (rev 928)
+++ trunk/src/qth-data.c 2011-10-13 10:46:24 UTC (rev 929)
@@ -549,7 +549,9 @@
*and other like services to update the qth position.
*/
gboolean qth_data_update_init(qth_t * qth) {
+#ifdef HAS_LIBGPS
char *port;
+#endif
gboolean retval=FALSE;
switch (qth->type){
Modified: trunk/src/save-pass.c
===================================================================
--- trunk/src/save-pass.c 2011-10-12 23:20:21 UTC (rev 928)
+++ trunk/src/save-pass.c 2011-10-13 10:46:24 UTC (rev 929)
@@ -95,7 +95,7 @@
GtkWidget *label;
gint response;
pass_t *pass;
- gchar *sat;
+ //gchar *sat;
qth_t *qth;
gchar *savedir = NULL;
gchar *savefile;
@@ -104,7 +104,7 @@
/* get data attached to parent */
- sat = (gchar *) g_object_get_data (G_OBJECT (parent), "sat");
+ //sat = (gchar *) g_object_get_data (G_OBJECT (parent), "sat");
qth = (qth_t *) g_object_get_data (G_OBJECT (parent), "qth");
pass = (pass_t *) g_object_get_data (G_OBJECT (parent), "pass");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-13 11:01:55
|
Revision: 930
http://gpredict.svn.sourceforge.net/gpredict/?rev=930&view=rev
Author: aa1vs
Date: 2011-10-13 11:01:45 +0000 (Thu, 13 Oct 2011)
Log Message:
-----------
Add currently shown file name in title.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/sat-log-browser.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-13 10:46:24 UTC (rev 929)
+++ trunk/ChangeLog 2011-10-13 11:01:45 UTC (rev 930)
@@ -6,6 +6,10 @@
* src/gtk-polar-view-popup.c
Eliminate unused variables to clean compiler output.
+ * ChangeLog
+ * src/sat-log-browser.c
+ Add currently shown file name in title.
+
2011-10-12 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/sat-log-browser.c
===================================================================
--- trunk/src/sat-log-browser.c 2011-10-13 10:46:24 UTC (rev 929)
+++ trunk/src/sat-log-browser.c 2011-10-13 11:01:45 UTC (rev 930)
@@ -134,6 +134,8 @@
GtkWidget *hbox;
gchar *fname;
gchar *confdir;
+ gchar *title;
+ gint error; /* error code returned by by read_debug_file */
if (!initialised) {
@@ -185,12 +187,22 @@
"logs", G_DIR_SEPARATOR_S,
"gpredict.log", NULL);
- read_debug_file (fname);
+ error = read_debug_file (fname);
+
+ if (error == 0) {
+ /* update window title if file read cleanly */
+ title = g_strdup_printf ( _("Log Browser: %s"), fname);
+ gtk_window_set_title (GTK_WINDOW(window), title);
+
+ g_free(title);
+ } else {
+ /* Remove filename if file not read */
+ gtk_window_set_title (GTK_WINDOW(window), _("Log Browser"));
+ }
+
g_free (fname);
g_free (confdir);
- /*** FIXME: add currently shown file name in title; chech read_debug_file status */
-
initialised = TRUE;
}
}
@@ -376,6 +388,7 @@
{
gchar *confdir;
gchar *filename;
+ gchar *title;
gint error; /* error code returned by by read_debug_file */
@@ -404,9 +417,16 @@
/* sanity check of filename will be performed
in read_debug_file */
error = read_debug_file (filename);
+ if (error == 0){
+ /* Update title with filename */
+ title = g_strdup_printf ( _("Log Browser: %s"), filename);
+ gtk_window_set_title (GTK_WINDOW(window), title);
+ g_free(title);
+ } else {
+ /* clear filename from title if unable to read file */
+ gtk_window_set_title (GTK_WINDOW(window), _("Log Browser"));
+ }
- /*** FIXME: add currently shown file name in title; chech read_debug_file status */
-
g_free (filename);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-23 11:32:18
|
Revision: 931
http://gpredict.svn.sourceforge.net/gpredict/?rev=931&view=rev
Author: aa1vs
Date: 2011-10-23 11:32:12 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
Use more robust check on orbit change time.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-map-ground-track.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-13 11:01:45 UTC (rev 930)
+++ trunk/ChangeLog 2011-10-23 11:32:12 UTC (rev 931)
@@ -1,3 +1,9 @@
+2011-10-23 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-map-groundtrack.c
+ Use more robust check on orbit change time.
+
+
2011-10-13 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-sat-map-ground-track.c
===================================================================
--- trunk/src/gtk-sat-map-ground-track.c 2011-10-13 11:01:45 UTC (rev 930)
+++ trunk/src/gtk-sat-map-ground-track.c 2011-10-23 11:32:12 UTC (rev 931)
@@ -106,17 +106,21 @@
/* Iterate backwards in time until we reach sat->orbit < this_orbit.
Use predict_calc from predict-tools.c as SGP/SDP driver.
As a built-in safety, we stop iteration if the orbit crossing is
- more than 12 hours back in time.
+ more than 24 hours back in time.
*/
t0 = satmap->tstamp;//get_current_daynum ();
/* use == instead of >= as it is more robust */
- for (t = t0; (sat->orbit == this_orbit) && ((t+0.5) > t0); t -= 0.0007) {
+ for (t = t0; (sat->orbit == this_orbit) && ((t + 1.0) > t0); t -= 0.0007) {
predict_calc (sat, qth, t);
}
- t0 = t;
+ /* set it so that we are in the same orbit as this_orbit
+ and not a different one */
+ t += 0.0007;
+ t0 = t;
+ predict_calc (sat, qth, t0);
sat_log_log (SAT_LOG_LEVEL_DEBUG,
_("%s: T0: %f (%d)"),
@@ -124,7 +128,9 @@
/* calculate (lat,lon) for the required orbits */
- while (sat->orbit <= max_orbit && !decayed(sat)) {
+ while ((sat->orbit <= max_orbit) &&
+ (sat->orbit >= this_orbit) &&
+ (!decayed(sat))) {
/* We use 30 sec time steps. If resolution is too fine, the
line drawing routine will filter out unnecessary points
@@ -152,9 +158,17 @@
obj->track_data.latlon = g_slist_prepend (obj->track_data.latlon, this_ssp);
}
+ /* log if there is a problem with the orbit calculation */
+ if (sat->orbit != (max_orbit+1)) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Problem computing ground track for %s"),
+ __FUNCTION__, sat->nickname);
+ return;
+ }
+
- /* Reset satellite structure to eliminate glitches in single sat view and other places
- when new ground track is layed out */
+ /* Reset satellite structure to eliminate glitches in single sat
+ view and other places when new ground track is layed out */
predict_calc(sat, qth, satmap->tstamp);
/* reverse GSList */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-23 12:33:40
|
Revision: 934
http://gpredict.svn.sourceforge.net/gpredict/?rev=934&view=rev
Author: aa1vs
Date: 2011-10-23 12:33:34 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
Migrate satellite map and polar view to single mod-cfg functions for getting lists of integers.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-polar-view.c
trunk/src/gtk-sat-map.c
trunk/src/mod-cfg-get-param.c
trunk/src/mod-cfg-get-param.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-23 12:25:13 UTC (rev 933)
+++ trunk/ChangeLog 2011-10-23 12:33:34 UTC (rev 934)
@@ -11,7 +11,13 @@
* src/loc-tree.c
Eliminate calls to deprecated gtk_box_pack_start_defaults.
+ * src/mod-cfg-get-param.c
+ * src/mod-cfg-get-param.h
+ * src/gtk-sat-map.c
+ * src/gtk-polar-view.c
+ Migrate satellite map and polar view to single mod-cfg functions for getting lists of integers.
+
2011-10-13 Charles Suprin <hamaa1vs at gmail.com>
* ChangeLog
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-10-23 12:25:13 UTC (rev 933)
+++ trunk/src/gtk-polar-view.c 2011-10-23 12:33:34 UTC (rev 934)
@@ -94,8 +94,6 @@
static gchar *los_time_to_str (GtkPolarView *polv, sat_t *sat);
static void gtk_polar_view_store_showtracks (GtkPolarView *pv);
static void gtk_polar_view_load_showtracks (GtkPolarView *pv);
-static void store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey) ;
-static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest);
static GtkVBoxClass *parent_class = NULL;
@@ -1766,11 +1764,11 @@
static void
gtk_polar_view_store_showtracks (GtkPolarView *pv) {
- store_binary_hash_cfgdata(pv->cfgdata,
+ mod_cfg_set_integer_list_boolean(pv->cfgdata,
pv->showtracks_on,
MOD_CFG_POLAR_SECTION,
MOD_CFG_POLAR_SHOWTRACKS);
- store_binary_hash_cfgdata(pv->cfgdata,
+ mod_cfg_set_integer_list_boolean(pv->cfgdata,
pv->showtracks_off,
MOD_CFG_POLAR_SECTION,
MOD_CFG_POLAR_HIDETRACKS);
@@ -1780,95 +1778,15 @@
static void
gtk_polar_view_load_showtracks (GtkPolarView *pv)
{
- load_integer_list_boolean(pv->cfgdata,
+ mod_cfg_get_integer_list_boolean(pv->cfgdata,
MOD_CFG_POLAR_SECTION,
MOD_CFG_POLAR_HIDETRACKS,
pv->showtracks_off);
- load_integer_list_boolean(pv->cfgdata,
+ mod_cfg_get_integer_list_boolean(pv->cfgdata,
MOD_CFG_POLAR_SECTION,
MOD_CFG_POLAR_SHOWTRACKS,
pv->showtracks_on);
}
-/** \brief Load an integer list into a hash table that uses the
- existinence of datain the hash as a boolean.
- It loads NULL's into the hash table.
-*/
-static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest) {
- gint *sats = NULL;
- gsize length;
- GError *error = NULL;
- guint i;
- guint *tkey;
-
- sats = g_key_file_get_integer_list (cfgdata,
- section,
- key,
- &length,
- &error);
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Failed to get list of satellites (%s)"),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- /* GLib API says nothing about the contents in case of error */
- if (sats) {
- g_free (sats);
- }
-
- return;
- }
-
- /* read each satellite into hash table */
- for (i = 0; i < length; i++) {
- tkey = g_new0 (guint, 1);
- *tkey = sats[i];
- //printf("loading sat %d\n",sats[i]);
- if (!(g_hash_table_lookup_extended (dest, tkey, NULL, NULL))) {
- /* just add a one to the value so there is presence indicator */
- g_hash_table_insert (dest,
- tkey,
- NULL);
- }
- }
- g_free(sats);
-}
-
-/** \brief Convert the "boolean" hash back into an integer list and
- save it to the cfgdata. */
-static void
-store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey)
-{
- gint *showtrack;
- gint *something;
- gint i,length;
- GList *keys = g_hash_table_get_keys(hash);
-
- length = g_list_length(keys);
- if (g_list_length(keys)>0) {
-
- showtrack = g_try_new0(gint,g_list_length(keys));
- for (i=0;i<length;i++) {
- something=g_list_nth_data(keys,i);
- showtrack[i]=*something;
- }
- g_key_file_set_integer_list (cfgdata,
- cfgsection,
- cfgkey,
- showtrack,
- g_list_length(keys)
- );
-
- } else {
- g_key_file_remove_key(cfgdata,
- cfgsection,
- cfgkey,
- NULL);
- }
-
- g_list_free (keys);
-}
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-10-23 12:25:13 UTC (rev 933)
+++ trunk/src/gtk-sat-map.c 2011-10-23 12:33:34 UTC (rev 934)
@@ -111,8 +111,6 @@
static void gtk_sat_map_store_showtracks (GtkSatMap *satmap);
static void gtk_sat_map_load_hide_coverages (GtkSatMap *map);
static void gtk_sat_map_store_hidecovs (GtkSatMap *satmap);
-static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest);
-static void store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey);
static GtkVBoxClass *parent_class = NULL;
@@ -2603,115 +2601,34 @@
static void
gtk_sat_map_load_showtracks (GtkSatMap *satmap)
{
- load_integer_list_boolean(satmap->cfgdata,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_SHOWTRACKS,
- satmap->showtracks);
+ mod_cfg_get_integer_list_boolean(satmap->cfgdata,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_SHOWTRACKS,
+ satmap->showtracks);
}
static void
gtk_sat_map_store_showtracks (GtkSatMap *satmap) {
- store_binary_hash_cfgdata(satmap->cfgdata,
- satmap->showtracks,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_SHOWTRACKS);
+ mod_cfg_set_integer_list_boolean(satmap->cfgdata,
+ satmap->showtracks,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_SHOWTRACKS);
}
static void
gtk_sat_map_store_hidecovs (GtkSatMap *satmap) {
- store_binary_hash_cfgdata(satmap->cfgdata,
- satmap->hidecovs,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_HIDECOVS);
+ mod_cfg_set_integer_list_boolean(satmap->cfgdata,
+ satmap->hidecovs,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_HIDECOVS);
}
/** \brief Load the satellites that we should not highlight coverage */
static void
gtk_sat_map_load_hide_coverages (GtkSatMap *satmap)
{
- load_integer_list_boolean(satmap->cfgdata,
- MOD_CFG_MAP_SECTION,
- MOD_CFG_MAP_HIDECOVS,
- satmap->hidecovs);
+ mod_cfg_get_integer_list_boolean(satmap->cfgdata,
+ MOD_CFG_MAP_SECTION,
+ MOD_CFG_MAP_HIDECOVS,
+ satmap->hidecovs);
}
-
-/** \brief Load an integer list into a hash table that uses the
- existinence of datain the hash as a boolean.
- It loads NULL's into the hash table.
-*/
-static void load_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest) {
- gint *sats = NULL;
- gsize length;
- GError *error = NULL;
- guint i;
- guint *tkey;
-
- sats = g_key_file_get_integer_list (cfgdata,
- section,
- key,
- &length,
- &error);
- if (error != NULL) {
- sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Failed to get list of satellites (%s)"),
- __FUNCTION__, error->message);
-
- g_clear_error (&error);
-
- /* GLib API says nothing about the contents in case of error */
- if (sats) {
- g_free (sats);
- }
-
- return;
- }
-
- /* read each satellite into hash table */
- for (i = 0; i < length; i++) {
- tkey = g_new0 (guint, 1);
- *tkey = sats[i];
- //printf("loading sat %d\n",sats[i]);
- if (!(g_hash_table_lookup_extended (dest, tkey, NULL, NULL))) {
- /* just add a one to the value so there is presence indicator */
- g_hash_table_insert (dest,
- tkey,
- NULL);
- }
- }
- g_free(sats);
-}
-
-/** \brief Convert the "boolean" hash back into an integer list and
- save it to the cfgdata. */
-static void
-store_binary_hash_cfgdata (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey)
-{
- gint *showtrack;
- gint *something;
- gint i,length;
- GList *keys = g_hash_table_get_keys(hash);
-
- length = g_list_length(keys);
- if (g_list_length(keys)>0) {
-
- showtrack = g_try_new0(gint,g_list_length(keys));
- for (i=0;i<length;i++) {
- something=g_list_nth_data(keys,i);
- showtrack[i]=*something;
- }
- g_key_file_set_integer_list (cfgdata,
- cfgsection,
- cfgkey,
- showtrack,
- g_list_length(keys)
- );
-
- } else {
- g_key_file_remove_key(cfgdata,
- cfgsection,
- cfgkey,
- NULL);
- }
-
- g_list_free (keys);
-}
Modified: trunk/src/mod-cfg-get-param.c
===================================================================
--- trunk/src/mod-cfg-get-param.c 2011-10-23 12:25:13 UTC (rev 933)
+++ trunk/src/mod-cfg-get-param.c 2011-10-23 12:33:34 UTC (rev 934)
@@ -161,3 +161,83 @@
return param;
}
+
+/** \brief Load an integer list into a hash table that uses the
+ existinence of datain the hash as a boolean.
+ It loads NULL's into the hash table.
+*/
+void mod_cfg_get_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest) {
+ gint *sats = NULL;
+ gsize length;
+ GError *error = NULL;
+ guint i;
+ guint *tkey;
+
+ sats = g_key_file_get_integer_list (cfgdata,
+ section,
+ key,
+ &length,
+ &error);
+ if (error != NULL) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Failed to get list of satellites (%s)"),
+ __FUNCTION__, error->message);
+
+ g_clear_error (&error);
+
+ /* GLib API says nothing about the contents in case of error */
+ if (sats) {
+ g_free (sats);
+ }
+
+ return;
+ }
+
+ /* read each satellite into hash table */
+ for (i = 0; i < length; i++) {
+ tkey = g_new0 (guint, 1);
+ *tkey = sats[i];
+ //printf("loading sat %d\n",sats[i]);
+ if (!(g_hash_table_lookup_extended (dest, tkey, NULL, NULL))) {
+ /* just add a one to the value so there is presence indicator */
+ g_hash_table_insert (dest,
+ tkey,
+ NULL);
+ }
+ }
+ g_free(sats);
+}
+
+/** \brief Convert the "boolean" hash back into an integer list and
+ save it to the cfgdata. */
+void mod_cfg_set_integer_list_boolean (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey)
+{
+ gint *showtrack;
+ gint *something;
+ gint i,length;
+ GList *keys = g_hash_table_get_keys(hash);
+
+ length = g_list_length(keys);
+ if (g_list_length(keys)>0) {
+
+ showtrack = g_try_new0(gint,g_list_length(keys));
+ for (i=0;i<length;i++) {
+ something=g_list_nth_data(keys,i);
+ showtrack[i]=*something;
+ }
+ g_key_file_set_integer_list (cfgdata,
+ cfgsection,
+ cfgkey,
+ showtrack,
+ g_list_length(keys)
+ );
+
+ } else {
+ g_key_file_remove_key(cfgdata,
+ cfgsection,
+ cfgkey,
+ NULL);
+ }
+
+ g_list_free (keys);
+}
Modified: trunk/src/mod-cfg-get-param.h
===================================================================
--- trunk/src/mod-cfg-get-param.h 2011-10-23 12:25:13 UTC (rev 933)
+++ trunk/src/mod-cfg-get-param.h 2011-10-23 12:33:34 UTC (rev 934)
@@ -33,6 +33,9 @@
gboolean mod_cfg_get_bool (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_bool_e p);
gint mod_cfg_get_int (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_int_e p);
gchar *mod_cfg_get_str (GKeyFile *f, const gchar *sec, const gchar *key, sat_cfg_str_e p);
+void mod_cfg_get_integer_list_boolean (GKeyFile *cfgdata,const gchar* section,const gchar *key,GHashTable *dest);
+void mod_cfg_set_integer_list_boolean (GKeyFile *cfgdata, GHashTable *hash, const gchar *cfgsection, const gchar *cfgkey);
+
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-23 13:59:03
|
Revision: 935
http://gpredict.svn.sourceforge.net/gpredict/?rev=935&view=rev
Author: aa1vs
Date: 2011-10-23 13:58:57 +0000 (Sun, 23 Oct 2011)
Log Message:
-----------
Add transponder data for Prospero and SRMVU satellites.
Modified Paths:
--------------
trunk/ChangeLog
Added Paths:
-----------
trunk/data/trsp/37839.trsp
trunk/data/trsp/5580.trsp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-23 12:33:34 UTC (rev 934)
+++ trunk/ChangeLog 2011-10-23 13:58:57 UTC (rev 935)
@@ -17,6 +17,9 @@
* src/gtk-polar-view.c
Migrate satellite map and polar view to single mod-cfg functions for getting lists of integers.
+ * data/trsp/37839.trsp
+ * data/trsp/5580.trsp
+ Add transponder data for Prospero and SRMVU satellites.
2011-10-13 Charles Suprin <hamaa1vs at gmail.com>
Added: trunk/data/trsp/37839.trsp
===================================================================
--- trunk/data/trsp/37839.trsp (rev 0)
+++ trunk/data/trsp/37839.trsp 2011-10-23 13:58:57 UTC (rev 935)
@@ -0,0 +1,2 @@
+[CW Beacon]
+DOWN_LOW = 437425000
Added: trunk/data/trsp/5580.trsp
===================================================================
--- trunk/data/trsp/5580.trsp (rev 0)
+++ trunk/data/trsp/5580.trsp 2011-10-23 13:58:57 UTC (rev 935)
@@ -0,0 +1,2 @@
+[PCM Transponder]
+DOWN_LOW=137560000
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-26 18:25:37
|
Revision: 937
http://gpredict.svn.sourceforge.net/gpredict/?rev=937&view=rev
Author: aa1vs
Date: 2011-10-26 18:25:30 +0000 (Wed, 26 Oct 2011)
Log Message:
-----------
Read .sat files only when there is data to compare.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-23 16:43:23 UTC (rev 936)
+++ trunk/ChangeLog 2011-10-26 18:25:30 UTC (rev 937)
@@ -1,3 +1,9 @@
+2011-10-26 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/tle-update.c
+ Read .sat files only when there is data to compare.
+
+
2011-10-23 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-sat-map-groundtrack.c
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-10-23 16:43:23 UTC (rev 936)
+++ trunk/src/tle-update.c 2011-10-26 18:25:30 UTC (rev 937)
@@ -1136,44 +1136,42 @@
GKeyFile *satdata;
gchar *tlestr1, *tlestr2, *rawtle, *satname, *satnickname;
gboolean updateddata;
+
+ /* get catalog number for this satellite */
+ catstr = g_strsplit (fname, ".sat", 0);
+ catnr = (guint) g_ascii_strtod (catstr[0], NULL);
+
+ /* see if we have new data for this satellite */
+ key = g_try_new0 (guint, 1);
+ *key = catnr;
+ ntle = (new_tle_t *) g_hash_table_lookup (data, key);
+ g_free (key);
- /* open input file (file containing old tle) */
- path = g_strconcat (ldname, G_DIR_SEPARATOR_S, fname, NULL);
- satdata = g_key_file_new ();
- if (!g_key_file_load_from_file (satdata, path, G_KEY_FILE_KEEP_COMMENTS, &error)) {
+ if (ntle == NULL) {
+ /* no new data found for this sat => obsolete */
+ nodata++;
+
+ /* check if obsolete sats should be deleted */
+ /**** FIXME: This is dangereous, so we omit it */
sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: Error loading %s (%s)"),
- __FUNCTION__, path, error->message);
- g_clear_error (&error);
-
- skipped++;
-
+ _("%s: No new TLE data found for %d. Satellite might be obsolete."),
+ __FUNCTION__, catnr);
}
-
- else {
-
- /* get catalog number for this satellite */
- catstr = g_strsplit (fname, ".sat", 0);
- catnr = (guint) g_ascii_strtod (catstr[0], NULL);
-
- /* see if we have new data for this satellite */
- key = g_try_new0 (guint, 1);
- *key = catnr;
- ntle = (new_tle_t *) g_hash_table_lookup (data, key);
- g_free (key);
-
- if (ntle == NULL) {
- /* no new data found for this sat => obsolete */
- nodata++;
-
- /* check if obsolete sats should be deleted */
- /**** FIXME: This is dangereous, so we omit it */
+ else {
+ /* open input file (file containing old tle) */
+ path = g_strconcat (ldname, G_DIR_SEPARATOR_S, fname, NULL);
+ satdata = g_key_file_new ();
+ if (!g_key_file_load_from_file (satdata, path, G_KEY_FILE_KEEP_COMMENTS, &error)) {
sat_log_log (SAT_LOG_LEVEL_ERROR,
- _("%s: No new TLE data found for %d. Satellite might be obsolete."),
- __FUNCTION__, catnr);
- }
- else {
+ _("%s: Error loading %s (%s)"),
+ __FUNCTION__, path, error->message);
+ g_clear_error (&error);
+
+ skipped++;
+
+ } else {
+
/* This satellite is not new */
ntle->isnew = FALSE;
@@ -1286,10 +1284,12 @@
skipped++;
}
}
- g_strfreev (catstr);
+
+ g_key_file_free (satdata);
+ g_free (path);
+
}
- g_key_file_free (satdata);
- g_free (path);
+ g_strfreev (catstr);
/* update out parameters */
*sat_upd = updated;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-10-26 18:30:22
|
Revision: 938
http://gpredict.svn.sourceforge.net/gpredict/?rev=938&view=rev
Author: aa1vs
Date: 2011-10-26 18:30:16 +0000 (Wed, 26 Oct 2011)
Log Message:
-----------
Restructure satellite name test and add "OBJECT A" name type to list for replacement.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-26 18:25:30 UTC (rev 937)
+++ trunk/ChangeLog 2011-10-26 18:30:16 UTC (rev 938)
@@ -3,7 +3,10 @@
* src/tle-update.c
Read .sat files only when there is data to compare.
+ * src/tle-update.c
+ Restructure satellite name test and add "OBJECT A" name type to list for replacement.
+
2011-10-23 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-sat-map-groundtrack.c
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-10-26 18:25:30 UTC (rev 937)
+++ trunk/src/tle-update.c 2011-10-26 18:30:16 UTC (rev 938)
@@ -67,9 +67,9 @@
guint *sat_tot);
static guint add_new_sats (GHashTable *data);
+static gboolean is_computer_generated_name (gchar *satname);
-
/** \bief Free a new_tle_t structure. */
static void free_new_tle (gpointer data)
{
@@ -1056,8 +1056,8 @@
}
/* merge based on name */
- if ((g_regex_match_simple ("\\d{4,}-\\d{3,}",ntle->satname,0,0)) &&
- (!g_regex_match_simple ("\\d{4,}-\\d{3,}",tle_str[0],0,0))) {
+ if (is_computer_generated_name (ntle->satname) &&
+ !is_computer_generated_name(tle_str[0])) {
g_free (ntle->satname);
ntle->satname = g_strdup (g_strchomp(tle_str[0]));
}
@@ -1224,9 +1224,9 @@
if (ntle->satname != NULL) {
/* when a satellite first appears in the elements it is sometimes refered to by the
international designator which is awkward after it is given a name */
- if (!g_regex_match_simple ("\\d{4,}-\\d{3,}",ntle->satname,0,0)) {
+ if (!is_computer_generated_name(ntle->satname)) {
- if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satname,0,0)) {
+ if (is_computer_generated_name (satname)) {
sat_log_log (SAT_LOG_LEVEL_MSG,
_("%s: Data for %d updated for name."),
__FUNCTION__, catnr);
@@ -1238,7 +1238,7 @@
/* clobber with name */
/* clobber if nickname and name were same before */
/* clobber if international designator */
- if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satnickname,0,0)) {
+ if ( is_computer_generated_name (satnickname) ) {
sat_log_log (SAT_LOG_LEVEL_MSG,
_("%s: Data for %d updated for nickname."),
__FUNCTION__, catnr);
@@ -1322,3 +1322,23 @@
return _(freq_to_str[freq]);
}
+
+/** \brief Determine if name is generic.
+ * \param satname The satellite name that might be old.
+ *
+ * This function determines if the satellite name is generic. Examples of this are the names YYYY-NNNAAA
+ * international ID names used by Celestrak. Also space-track.org will give items names of OBJECT A as
+ * well until the name is advertised.
+ *
+ */
+static gboolean is_computer_generated_name (gchar *satname) {
+ /* celestrak generic satellite name */
+ if (g_regex_match_simple ("\\d{4,}-\\d{3,}",satname,0,0)){
+ return (TRUE);
+ }
+ /* space-track generic satellite name */
+ if (g_regex_match_simple ("OBJECT",satname,0,0)){
+ return (TRUE);
+ }
+ return (FALSE);
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-11-03 12:27:27
|
Revision: 944
http://gpredict.svn.sourceforge.net/gpredict/?rev=944&view=rev
Author: aa1vs
Date: 2011-11-03 12:27:21 +0000 (Thu, 03 Nov 2011)
Log Message:
-----------
Maintain Maidenhead grid (length 4 characters) for qth in qra field.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/qth-data.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-10-29 21:46:55 UTC (rev 943)
+++ trunk/ChangeLog 2011-11-03 12:27:21 UTC (rev 944)
@@ -1,3 +1,9 @@
+2011-11-03 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/qth-data.c
+ Maintain Maidenhead grid (length 4 characters) for qth in qra field.
+
+
2011-10-29 Charles Suprin <hamaa1vs at gmail.com>
* data/trsp/37841.trsp
Modified: trunk/src/qth-data.c
===================================================================
--- trunk/src/qth-data.c 2011-10-29 21:46:55 UTC (rev 943)
+++ trunk/src/qth-data.c 2011-11-03 12:27:21 UTC (rev 944)
@@ -258,6 +258,13 @@
g_clear_error (&error);
}
+ /* set QRA based on data */
+ if (longlat2locator (qth->lon, qth->lat, qth->qra,2) != RIG_OK) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Could not set QRA for %s at %f, %f."),
+ __FUNCTION__, qth->name, qth->lon, qth->lat);
+ }
+
qth_validate(qth);
/* Now, send debug message and return */
@@ -539,6 +546,14 @@
}
/* check that data is valid */
qth_validate(qth);
+
+ /* update qra */
+ if (longlat2locator (qth->lon, qth->lat, qth->qra,2) != RIG_OK) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Could not set QRA for %s at %f, %f."),
+ __FUNCTION__, qth->name, qth->lon, qth->lat);
+ }
+
return retval;
}
@@ -671,6 +686,7 @@
qth->gpsd_server=NULL;
qth->gpsd_update=0.0;
qth->gpsd_connected=0.0;
+ qth->qra = g_strdup ("AA00");
}
/** \brief Load safe values into the qth_t data structure
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-11-12 18:15:09
|
Revision: 951
http://gpredict.svn.sourceforge.net/gpredict/?rev=951&view=rev
Author: aa1vs
Date: 2011-11-12 18:15:03 +0000 (Sat, 12 Nov 2011)
Log Message:
-----------
Sort satellite list in popup.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-module-popup.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-11-12 17:50:10 UTC (rev 950)
+++ trunk/ChangeLog 2011-11-12 18:15:03 UTC (rev 951)
@@ -3,7 +3,10 @@
* doc/um/gpredict-user-manual.odt
Update user manual for GPSD and other features.
+ * src/gtk-sat-module-popup.c
+ Sort satellite list in popup.
+
2011-11-06 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-sat-map.c
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2011-11-12 17:50:10 UTC (rev 950)
+++ trunk/src/gtk-sat-module-popup.c 2011-11-12 18:15:03 UTC (rev 951)
@@ -65,9 +65,9 @@
static void destroy_rigctrl (GtkWidget *window, gpointer data);
static void destroy_skg (GtkWidget *window, gpointer data);
static gint window_delete (GtkWidget *widget, GdkEvent *event, gpointer data);
+static sat_nickname_compare (sat_t *a, sat_t *b);
-
/** \brief Create and run GtkSatModule popup menu.
* \param module The module that should have the popup menu attached to it.
*
@@ -157,7 +157,9 @@
satsubmenu = gtk_menu_new();
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), satsubmenu);
- sats = g_hash_table_get_values(module->satellites); // FIXME: sort list
+ sats = g_hash_table_get_values(module->satellites);
+ sats = g_list_sort(sats , sat_nickname_compare );
+
n = g_list_length(sats);
for (i = 0; i < n; i++) {
sat = SAT(g_list_nth_data(sats, i));
@@ -1230,3 +1232,7 @@
/* continue to handle event normally */
return FALSE;
}
+
+static sat_nickname_compare (sat_t *a, sat_t *b) {
+ gpredict_strcmp(a->nickname, b->nickname);
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-11-12 19:49:34
|
Revision: 952
http://gpredict.svn.sourceforge.net/gpredict/?rev=952&view=rev
Author: aa1vs
Date: 2011-11-12 19:49:28 +0000 (Sat, 12 Nov 2011)
Log Message:
-----------
Change decision of two versus three line tle's to do simpler checks first.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-11-12 18:15:03 UTC (rev 951)
+++ trunk/ChangeLog 2011-11-12 19:49:28 UTC (rev 952)
@@ -6,7 +6,10 @@
* src/gtk-sat-module-popup.c
Sort satellite list in popup.
+ * src/tle-update.c
+ Change decision of two versus three line tle's to do simpler checks first.
+
2011-11-06 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-sat-map.c
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-11-12 18:15:03 UTC (rev 951)
+++ trunk/src/tle-update.c 2011-11-12 19:49:28 UTC (rev 952)
@@ -922,7 +922,10 @@
/* third is that neither of these is true and we are consuming either text at the top of the
file or a text file that happens to be in the update directory
*/
- if (Checksum_Good(tle_working[1]) && (tle_working[1][0]=='1')) {
+ if ((tle_working[1][0] == '1') &&
+ (tle_working[2][0] == '2') &&
+ Checksum_Good(tle_working[1]) &&
+ Checksum_Good(tle_working[2])) {
sat_log_log (SAT_LOG_LEVEL_DEBUG,
_("%s:%s: Processing a three line TLE"),
__FILE__, __FUNCTION__);
@@ -934,7 +937,10 @@
/* we consumed three lines so we need three lines */
linesneeded = 3;
- } else if (Checksum_Good(tle_working[0]) && (tle_working[0][0]=='1')) {
+ } else if ((tle_working[0][0] == '1') &&
+ (tle_working[1][0] == '2') &&
+ Checksum_Good(tle_working[0]) &&
+ Checksum_Good(tle_working[1])) {
sat_log_log (SAT_LOG_LEVEL_DEBUG,
_("%s:%s: Processing a bare two line TLE"),
__FILE__, __FUNCTION__);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-11-13 13:56:51
|
Revision: 954
http://gpredict.svn.sourceforge.net/gpredict/?rev=954&view=rev
Author: aa1vs
Date: 2011-11-13 13:56:43 +0000 (Sun, 13 Nov 2011)
Log Message:
-----------
Eliminate compiler warnings.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-azel-plot.c
trunk/src/gtk-event-list.c
trunk/src/gtk-freq-knob.c
trunk/src/gtk-polar-plot.c
trunk/src/gtk-polar-view.c
trunk/src/gtk-rig-ctrl.c
trunk/src/gtk-rot-ctrl.c
trunk/src/gtk-rot-knob.c
trunk/src/gtk-sat-list-col-sel.c
trunk/src/gtk-sat-list.c
trunk/src/gtk-sat-map.c
trunk/src/gtk-sat-module-popup.c
trunk/src/gtk-sat-module.c
trunk/src/gtk-sat-selector.c
trunk/src/gtk-single-sat.c
trunk/src/gtk-sky-glance.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/ChangeLog 2011-11-13 13:56:43 UTC (rev 954)
@@ -1,3 +1,24 @@
+2011-11-13 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-module-popup.c
+ * src/gtk-rot-knob.c
+ * src/gtk-sky-glance.c
+ * src/gtk-rig-ctrl.c
+ * src/gtk-sat-list.c
+ * src/gtk-sat-module.c
+ * src/gtk-sat-list-col-sel.c
+ * src/gtk-sat-selector.c
+ * src/gtk-single-sat.c
+ * src/gtk-polar-plot.c
+ * src/gtk-event-list.c
+ * src/gtk-sat-map.c
+ * src/gtk-freq-knob.c
+ * src/gtk-rot-ctrl.c
+ * src/gtk-azel-plot.c
+ * src/gtk-polar-view.c
+ Eliminate compiler warnings.
+
+
2011-11-12 Charles Suprin <hamaa1vs at gmail.com>
* doc/um/gpredict-user-manual.odt
Modified: trunk/src/gtk-azel-plot.c
===================================================================
--- trunk/src/gtk-azel-plot.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-azel-plot.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -114,18 +114,18 @@
static void
gtk_azel_plot_class_init (GtkAzelPlotClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GObjectClass *gobject_class;*/
+ GtkObjectClass *object_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
- object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*gobject_class = G_OBJECT_CLASS (class);*/
+ object_class = (GtkObjectClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
+
+ parent_class = g_type_class_peek_parent (class);
- parent_class = g_type_class_peek_parent (class);
-
object_class->destroy = gtk_azel_plot_destroy;
//widget_class->size_allocate = gtk_azel_plot_size_allocate;
}
Modified: trunk/src/gtk-event-list.c
===================================================================
--- trunk/src/gtk-event-list.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-event-list.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -187,15 +187,15 @@
static void gtk_event_list_class_init (GtkEventListClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
Modified: trunk/src/gtk-freq-knob.c
===================================================================
--- trunk/src/gtk-freq-knob.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-freq-knob.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -107,16 +107,16 @@
static void
gtk_freq_knob_class_init (GtkFreqKnobClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GObjectClass *gobject_class;*/
+ GtkObjectClass *object_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
+
+ /*gobject_class = G_OBJECT_CLASS (class);*/
+ object_class = (GtkObjectClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
- gobject_class = G_OBJECT_CLASS (class);
- object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
-
parent_class = g_type_class_peek_parent (class);
object_class->destroy = gtk_freq_knob_destroy;
Modified: trunk/src/gtk-polar-plot.c
===================================================================
--- trunk/src/gtk-polar-plot.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-polar-plot.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -125,15 +125,15 @@
static void
gtk_polar_plot_class_init (GtkPolarPlotClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-polar-view.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -134,15 +134,15 @@
static void
gtk_polar_view_class_init (GtkPolarViewClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
Modified: trunk/src/gtk-rig-ctrl.c
===================================================================
--- trunk/src/gtk-rig-ctrl.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-rig-ctrl.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -180,15 +180,15 @@
static void gtk_rig_ctrl_class_init (GtkRigCtrlClass *class)
{
- GObjectClass *gobject_class;
+ //GObjectClass *gobject_class;
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ //GtkWidgetClass *widget_class;
+ //GtkContainerClass *container_class;
- gobject_class = G_OBJECT_CLASS (class);
+ //gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ //widget_class = (GtkWidgetClass*) class;
+ //container_class = (GtkContainerClass*) class;
parent_class = g_type_class_peek_parent (class);
@@ -2871,7 +2871,11 @@
gint written;
/*shutdown the rigctld connect*/
written = send(*sock, "q\x0a", 2, 0);
-
+ if (written != 2) {
+ sat_log_log (SAT_LOG_LEVEL_BUG,
+ _("%s:%s: Sent 2 bytes but sent %d."),
+ __FILE__, __FUNCTION__, written);
+ }
#ifndef WIN32
shutdown (*sock, SHUT_RDWR);
close (*sock);
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-rot-ctrl.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -143,15 +143,15 @@
static void
gtk_rot_ctrl_class_init (GtkRotCtrlClass *class)
{
- GObjectClass *gobject_class;
+ //GObjectClass *gobject_class;
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ //GtkWidgetClass *widget_class;
+ //GtkContainerClass *container_class;
- gobject_class = G_OBJECT_CLASS (class);
+ //gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ //widget_class = (GtkWidgetClass*) class;
+ //container_class = (GtkContainerClass*) class;
parent_class = g_type_class_peek_parent (class);
@@ -1354,7 +1354,11 @@
gint written;
/*shutdown the rigctld connect*/
written = send(*sock, "q\x0a", 2, 0);
-
+ if (written != 2) {
+ sat_log_log (SAT_LOG_LEVEL_BUG,
+ _("%s:%s: Sent 2 bytes but sent %d."),
+ __FILE__, __FUNCTION__, written);
+ }
#ifndef WIN32
shutdown (*sock, SHUT_RDWR);
close (*sock);
Modified: trunk/src/gtk-rot-knob.c
===================================================================
--- trunk/src/gtk-rot-knob.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-rot-knob.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -95,16 +95,16 @@
static void
gtk_rot_knob_class_init (GtkRotKnobClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
-
- gobject_class = G_OBJECT_CLASS (class);
- object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
-
+ /*GObjectClass *gobject_class;*/
+ GtkObjectClass *object_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
+
+ /*gobject_class = G_OBJECT_CLASS (class);*/
+ object_class = (GtkObjectClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
+
parent_class = g_type_class_peek_parent (class);
object_class->destroy = gtk_rot_knob_destroy;
Modified: trunk/src/gtk-sat-list-col-sel.c
===================================================================
--- trunk/src/gtk-sat-list-col-sel.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sat-list-col-sel.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -93,16 +93,16 @@
static void
gtk_sat_list_col_sel_class_init (GtkSatListColSelClass *class)
{
- GObjectClass *gobject_class;
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GObjectClass *gobject_class;*/
+ GtkObjectClass *object_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
+
+ /*gobject_class = G_OBJECT_CLASS (class);*/
+ object_class = (GtkObjectClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
- gobject_class = G_OBJECT_CLASS (class);
- object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
-
parent_class = g_type_class_peek_parent (class);
object_class->destroy = gtk_sat_list_col_sel_destroy;
Modified: trunk/src/gtk-sat-list.c
===================================================================
--- trunk/src/gtk-sat-list.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sat-list.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -261,15 +261,15 @@
static void
gtk_sat_list_class_init (GtkSatListClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sat-map.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -152,15 +152,15 @@
static void
gtk_sat_map_class_init (GtkSatMapClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
@@ -1272,8 +1272,19 @@
gdouble qrb1, qrb2, az1, az2;
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) {
+ 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))
return TRUE;
Modified: trunk/src/gtk-sat-module-popup.c
===================================================================
--- trunk/src/gtk-sat-module-popup.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sat-module-popup.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -65,7 +65,7 @@
static void destroy_rigctrl (GtkWidget *window, gpointer data);
static void destroy_skg (GtkWidget *window, gpointer data);
static gint window_delete (GtkWidget *widget, GdkEvent *event, gpointer data);
-static sat_nickname_compare (sat_t *a, sat_t *b);
+static gint sat_nickname_compare (const sat_t *a, const sat_t *b);
/** \brief Create and run GtkSatModule popup menu.
@@ -158,7 +158,7 @@
gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), satsubmenu);
sats = g_hash_table_get_values(module->satellites);
- sats = g_list_sort(sats , sat_nickname_compare );
+ sats = g_list_sort(sats , (GCompareFunc) sat_nickname_compare );
n = g_list_length(sats);
for (i = 0; i < n; i++) {
@@ -1233,6 +1233,6 @@
return FALSE;
}
-static sat_nickname_compare (sat_t *a, sat_t *b) {
- gpredict_strcmp(a->nickname, b->nickname);
+static gint sat_nickname_compare (const sat_t *a, const sat_t *b) {
+ return gpredict_strcmp(a->nickname, b->nickname);
}
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sat-module.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -137,15 +137,15 @@
static void
gtk_sat_module_class_init (GtkSatModuleClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
@@ -842,9 +842,10 @@
qth_small_save(mod->qth,&(mod->qth_event));
}
/* update satellite data */
- g_hash_table_foreach (mod->satellites,
- gtk_sat_module_update_sat,
- module);
+ if (mod->satellites != NULL)
+ g_hash_table_foreach (mod->satellites,
+ gtk_sat_module_update_sat,
+ module);
/* update children */
for (i = 0; i < mod->nviews; i++) {
@@ -854,9 +855,10 @@
/* update satellite data (it may have got out of sync during child updates) */
- g_hash_table_foreach (mod->satellites,
- gtk_sat_module_update_sat,
- module);
+ if (mod->satellites != NULL)
+ g_hash_table_foreach (mod->satellites,
+ gtk_sat_module_update_sat,
+ module);
/* send notice to radio and rotator controller */
if (mod->rigctrl)
@@ -954,10 +956,6 @@
sat_t *sat;
GtkSatModule *module;
gdouble daynum;
- double age;
- obs_set_t obs_set = {0,0,0,0};
- geodetic_t sat_geodetic = {0,0,0,0};
- geodetic_t obs_geodetic = {0,0,0,0};
gdouble maxdt;
(void) key; /* prevent unused parameter compiler warning */
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sat-selector.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -156,15 +156,15 @@
static void gtk_sat_selector_class_init (GtkSatSelectorClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
Modified: trunk/src/gtk-single-sat.c
===================================================================
--- trunk/src/gtk-single-sat.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-single-sat.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -155,15 +155,15 @@
static void
gtk_single_sat_class_init (GtkSingleSatClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
Modified: trunk/src/gtk-sky-glance.c
===================================================================
--- trunk/src/gtk-sky-glance.c 2011-11-13 01:28:10 UTC (rev 953)
+++ trunk/src/gtk-sky-glance.c 2011-11-13 13:56:43 UTC (rev 954)
@@ -146,15 +146,15 @@
static void
gtk_sky_glance_class_init (GtkSkyGlanceClass *class)
{
- GObjectClass *gobject_class;
+ /*GObjectClass *gobject_class;*/
GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
- GtkContainerClass *container_class;
+ /*GtkWidgetClass *widget_class;*/
+ /*GtkContainerClass *container_class;*/
- gobject_class = G_OBJECT_CLASS (class);
+ /*gobject_class = G_OBJECT_CLASS (class);*/
object_class = (GtkObjectClass*) class;
- widget_class = (GtkWidgetClass*) class;
- container_class = (GtkContainerClass*) class;
+ /*widget_class = (GtkWidgetClass*) class;*/
+ /*container_class = (GtkContainerClass*) class;*/
parent_class = g_type_class_peek_parent (class);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|