[Gpredict-svn] SF.net SVN: gpredict:[946] trunk/src/gtk-sat-map.c
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <aa...@us...> - 2011-11-05 20:39:36
|
Revision: 946
http://gpredict.svn.sourceforge.net/gpredict/?rev=946&view=rev
Author: aa1vs
Date: 2011-11-05 20:39:30 +0000 (Sat, 05 Nov 2011)
Log Message:
-----------
Add QRA to satmap display and clear up compiler warnings.
Modified Paths:
--------------
trunk/src/gtk-sat-map.c
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-11-05 20:35:09 UTC (rev 945)
+++ trunk/src/gtk-sat-map.c 2011-11-05 20:39:30 UTC (rev 946)
@@ -401,9 +401,10 @@
Note: I used pango markup to set the background color, I didn't find any
other obvious ways to get the text height in pixels to draw rectangle.
*/
- buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s </span>",
+ buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s %s</span>",
satmap->infobgd,
satmap->qth->name,
+ satmap->qth->qra,
satmap->qth->loc);
g_object_set (satmap->locnam, "text", buff, NULL);
g_free (buff);
@@ -640,6 +641,15 @@
if (satmap->resize)
update_map_size (satmap);
+ /* update the location name */
+ /* mainly for qra field */
+ buff = g_strdup_printf ("<span background=\"#%s\"> %s \302\267 %s %s</span>",
+ satmap->infobgd,
+ satmap->qth->name,
+ satmap->qth->qra,
+ satmap->qth->loc);
+ g_object_set (satmap->locnam, "text", buff, NULL);
+ g_free (buff);
/* check if qth has moved significantly if so move it*/
lonlat_to_xy (satmap, satmap->qth->lon, satmap->qth->lat, &x, &y);
g_object_get (satmap->qthmark,
@@ -1273,7 +1283,18 @@
ret1 = qrb (sat->ssplon, sat->ssplat, 0.0, 90.0, &qrb1, &az1);
ret2 = qrb (sat->ssplon, sat->ssplat, 0.0, -90.0, &qrb2, &az2);
-
+
+ if (ret1 !=RIG_OK){
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Invalid lat lon pair for %d."),
+ __FUNCTION__, sat->tle.catnr);
+ }
+ if (ret2 !=RIG_OK){
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Invalid lat lon pair for %d."),
+ __FUNCTION__, sat->tle.catnr);
+ }
+
if ((qrb1 <= 0.5*sat->footprint) || (qrb2 <= 0.5*sat->footprint))
return TRUE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|