gpredict-svn Mailing List for Gpredict (Page 35)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
You can subscribe to this list here.
2008 |
Jan
(24) |
Feb
|
Mar
(6) |
Apr
(14) |
May
(9) |
Jun
|
Jul
|
Aug
(25) |
Sep
(60) |
Oct
(26) |
Nov
|
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(2) |
Mar
(22) |
Apr
(61) |
May
(57) |
Jun
|
Jul
(3) |
Aug
(83) |
Sep
(35) |
Oct
(50) |
Nov
(28) |
Dec
(34) |
2010 |
Jan
(29) |
Feb
(15) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(2) |
Jul
(24) |
Aug
(2) |
Sep
(9) |
Oct
(43) |
Nov
(22) |
Dec
(6) |
2011 |
Jan
(24) |
Feb
(22) |
Mar
(31) |
Apr
(13) |
May
(10) |
Jun
(10) |
Jul
(43) |
Aug
(12) |
Sep
(18) |
Oct
(33) |
Nov
(18) |
Dec
(4) |
From: <cs...@us...> - 2008-09-15 23:19:20
|
Revision: 108 http://gpredict.svn.sourceforge.net/gpredict/?rev=108&view=rev Author: csete Date: 2008-09-15 23:19:31 +0000 (Mon, 15 Sep 2008) Log Message: ----------- Implemented correct management of next pass taking into account that we may run in simulated time mode. Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c trunk/src/gtk-rot-ctrl.h Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2008-09-13 10:13:20 UTC (rev 107) +++ trunk/src/gtk-rot-ctrl.c 2008-09-15 23:19:31 UTC (rev 108) @@ -160,7 +160,14 @@ if (ctrl->timerid > 0) g_source_remove (ctrl->timerid); - + /* free configuration */ + if (ctrl->conf != NULL) { + g_free (ctrl->conf->name); + g_free (ctrl->conf->host); + g_free (ctrl->conf); + ctrl->conf = NULL; + } + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -183,15 +190,26 @@ GTK_ROT_CTRL (widget)->target = SAT (g_slist_nth_data (GTK_ROT_CTRL (widget)->sats, 0)); + /* store current time (don't know if real or simulated) */ + GTK_ROT_CTRL (widget)->t = module->tmgCdnum; + /* store QTH */ GTK_ROT_CTRL (widget)->qth = module->qth; /* get next pass for target satellite */ - GTK_ROT_CTRL (widget)->pass = get_next_pass (GTK_ROT_CTRL (widget)->target, - GTK_ROT_CTRL (widget)->qth, - 3.0); - - /* initialise custom colors */ + if (GTK_ROT_CTRL (widget)->target->el > 0.0) { + GTK_ROT_CTRL (widget)->pass = get_current_pass (GTK_ROT_CTRL (widget)->target, + GTK_ROT_CTRL (widget)->qth, + 0.0); + } + else { + GTK_ROT_CTRL (widget)->pass = get_next_pass (GTK_ROT_CTRL (widget)->target, + GTK_ROT_CTRL (widget)->qth, + 3.0); + } + + + /* initialise custom colors */ gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColBlack); gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColWhite); gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColRed); @@ -210,9 +228,9 @@ 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, 0, 0); gtk_table_attach (GTK_TABLE (table), create_conf_widgets (GTK_ROT_CTRL (widget)), 1, 2, 1, 2, GTK_FILL, GTK_SHRINK, 0, 0); -/* gtk_table_attach (GTK_TABLE (table), create_plot_widget (GTK_ROT_CTRL (widget)), + gtk_table_attach (GTK_TABLE (table), create_plot_widget (GTK_ROT_CTRL (widget)), 2, 3, 0, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); -*/ + gtk_container_add (GTK_CONTAINER (widget), table); GTK_ROT_CTRL (widget)->timerid = g_timeout_add (GTK_ROT_CTRL (widget)->delay, @@ -235,6 +253,8 @@ { gchar *buff; + ctrl->t = t; + if (ctrl->target) { /* update target displays */ buff = g_strdup_printf (FMTSTR, ctrl->target->az); @@ -248,17 +268,26 @@ /* update next pass if necessary */ if (ctrl->pass != NULL) { - if (ctrl->target->aos > ctrl->pass->aos) { - /* update pass */ + if ((ctrl->target->aos > ctrl->pass->aos) && (ctrl->target->el <= 0.0)) { + /* we need to update the pass */ free_pass (ctrl->pass); - ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); - /* TODO: update polar plot */ + ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); + + /* update polar plot */ + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); } } else { /* we don't have any current pass; store the current one */ - ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); - /* TODO: update polar plot */ + if (ctrl->target->el > 0.0) { + ctrl->pass = get_current_pass (ctrl->target, ctrl->qth, t); + } + else { + ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); + } + + /* update polar plot */ + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); } } } @@ -570,7 +599,11 @@ /* update next pass */ if (ctrl->pass != NULL) free_pass (ctrl->pass); - ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); + + if (ctrl->target->el > 0.0) + ctrl->pass = get_current_pass (ctrl->target, ctrl->qth, ctrl->t); + else + ctrl->pass = get_pass (ctrl->target, ctrl->qth, ctrl->t, 3.0); } else { sat_log_log (SAT_LOG_LEVEL_ERROR, Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2008-09-13 10:13:20 UTC (rev 107) +++ trunk/src/gtk-rot-ctrl.h 2008-09-15 23:19:31 UTC (rev 108) @@ -33,6 +33,7 @@ #include <gtk/gtk.h> #include "sgpsdp/sgp4sdp4.h" #include "gtk-sat-module.h" +#include "rotor-conf.h" #ifdef __cplusplus extern "C" { @@ -72,6 +73,9 @@ GtkWidget *SatCnt; GtkWidget *DevSel; GtkWidget *plot; /*!< Polar plot widget */ + + rotor_conf_t *conf; + gdouble t; /*!< Time when sat data last has been updated. */ /* satellites */ GSList *sats; /*!< List of sats in parent module */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-13 10:13:11
|
Revision: 107 http://gpredict.svn.sourceforge.net/gpredict/?rev=107&view=rev Author: csete Date: 2008-09-13 10:13:20 +0000 (Sat, 13 Sep 2008) Log Message: ----------- Added user manual to repository. Added Paths: ----------- trunk/doc/um/gpredict-user-manual.odt Property changes on: trunk/doc/um/gpredict-user-manual.odt ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-10 23:52:50
|
Revision: 106 http://gpredict.svn.sourceforge.net/gpredict/?rev=106&view=rev Author: csete Date: 2008-09-10 23:53:00 +0000 (Wed, 10 Sep 2008) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-polar-plot.c trunk/src/gtk-rot-ctrl.c trunk/src/gtk-rot-ctrl.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-10 23:24:10 UTC (rev 105) +++ trunk/ChangeLog 2008-09-10 23:53:00 UTC (rev 106) @@ -1,3 +1,14 @@ +2008-09-10; Alexandru Csete <oz...@gm...> + + * src/gtk-polar-plot.[ch]: + Added API to add/modify/delete the pass. + Changed to create local copy of the pass data. + + * src/gtk-rot-ctrl.c: + Use new polar plot widget for showing status of target satellite + and rotator. However, this part has been disabled for now. + + 2008-09-09; Alexandru Csete <oz...@gm...> * src/sat-pref-conditions.c: Modified: trunk/src/gtk-polar-plot.c =================================================================== --- trunk/src/gtk-polar-plot.c 2008-09-10 23:24:10 UTC (rev 105) +++ trunk/src/gtk-polar-plot.c 2008-09-10 23:53:00 UTC (rev 106) @@ -241,8 +241,8 @@ { GooCanvasItemModel *root; gint idx,i; - -#if 0 + + /* remove sky track, time ticks and the pass itself */ if (plot->pass != NULL) { /* remove sat from canvas */ @@ -263,9 +263,10 @@ } if (pass != NULL) { - create_track (GTK_POLAR_PLOT (plot)); + plot->pass = copy_pass (pass); + create_track (plot); } -#endif + } Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2008-09-10 23:24:10 UTC (rev 105) +++ trunk/src/gtk-rot-ctrl.c 2008-09-10 23:53:00 UTC (rev 106) @@ -41,6 +41,7 @@ #include "compat.h" #include "sat-log.h" #include "predict-tools.h" +#include "gtk-polar-plot.h" #include "gtk-rot-knob.h" #include "gtk-rot-ctrl.h" #ifdef HAVE_CONFIG_H @@ -139,6 +140,7 @@ ctrl->target = NULL; ctrl->pass = NULL; ctrl->qth = NULL; + ctrl->plot = NULL; ctrl->tracking = FALSE; ctrl->busy = FALSE; @@ -196,21 +198,21 @@ gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColGreen); /* create contents */ - table = gtk_table_new (3, 2, TRUE); - gtk_table_set_row_spacings (GTK_TABLE (table), 5); - gtk_table_set_col_spacings (GTK_TABLE (table), 5); + table = gtk_table_new (2, 3, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 0); + gtk_table_set_col_spacings (GTK_TABLE (table), 0); gtk_container_set_border_width (GTK_CONTAINER (table), 10); gtk_table_attach (GTK_TABLE (table), create_az_widgets (GTK_ROT_CTRL (widget)), - 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + 0, 1, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0); gtk_table_attach (GTK_TABLE (table), create_el_widgets (GTK_ROT_CTRL (widget)), - 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + 1, 2, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0); gtk_table_attach (GTK_TABLE (table), create_target_widgets (GTK_ROT_CTRL (widget)), - 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); + 0, 1, 1, 2, GTK_FILL, GTK_SHRINK, 0, 0); gtk_table_attach (GTK_TABLE (table), create_conf_widgets (GTK_ROT_CTRL (widget)), - 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); - gtk_table_attach (GTK_TABLE (table), create_plot_widget (GTK_ROT_CTRL (widget)), - 1, 2, 1, 3, GTK_FILL, GTK_FILL, 0, 0); - + 1, 2, 1, 2, GTK_FILL, GTK_SHRINK, 0, 0); +/* gtk_table_attach (GTK_TABLE (table), create_plot_widget (GTK_ROT_CTRL (widget)), + 2, 3, 0, 2, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); +*/ gtk_container_add (GTK_CONTAINER (widget), table); GTK_ROT_CTRL (widget)->timerid = g_timeout_add (GTK_ROT_CTRL (widget)->delay, @@ -528,7 +530,10 @@ { GtkWidget *frame; + ctrl->plot = gtk_polar_plot_new (ctrl->qth, ctrl->pass); + frame = gtk_frame_new (NULL); + gtk_container_add (GTK_CONTAINER (frame), ctrl->plot); return frame; } @@ -579,6 +584,10 @@ } } + + /* in either case, we set the new pass (even if NULL) on the polar plot */ + if (ctrl->plot != NULL) + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); } Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2008-09-10 23:24:10 UTC (rev 105) +++ trunk/src/gtk-rot-ctrl.h 2008-09-10 23:53:00 UTC (rev 106) @@ -71,6 +71,7 @@ /* other widgets */ GtkWidget *SatCnt; GtkWidget *DevSel; + GtkWidget *plot; /*!< Polar plot widget */ /* satellites */ GSList *sats; /*!< List of sats in parent module */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-10 23:23:59
|
Revision: 105 http://gpredict.svn.sourceforge.net/gpredict/?rev=105&view=rev Author: csete Date: 2008-09-10 23:24:10 +0000 (Wed, 10 Sep 2008) Log Message: ----------- Changed to create local copy of the pass data. Modified Paths: -------------- trunk/src/gtk-polar-plot.c trunk/src/gtk-polar-plot.h Modified: trunk/src/gtk-polar-plot.c =================================================================== --- trunk/src/gtk-polar-plot.c 2008-09-10 21:04:10 UTC (rev 104) +++ trunk/src/gtk-polar-plot.c 2008-09-10 23:24:10 UTC (rev 105) @@ -162,6 +162,11 @@ gtk_polar_plot_destroy (GtkObject *object) { + if (GTK_POLAR_PLOT (object)->pass != NULL) { + free_pass (GTK_POLAR_PLOT (object)->pass); + GTK_POLAR_PLOT (object)->pass = NULL; + } + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -182,7 +187,9 @@ polv = g_object_new (GTK_TYPE_POLAR_PLOT, NULL); GTK_POLAR_PLOT (polv)->qth = qth; - GTK_POLAR_PLOT (polv)->pass = pass; + + if (pass != NULL) + GTK_POLAR_PLOT (polv)->pass = copy_pass (pass); /* get settings */ GTK_POLAR_PLOT (polv)->swap = sat_cfg_get_int (SAT_CFG_INT_POLAR_ORIENTATION); @@ -235,7 +242,7 @@ GooCanvasItemModel *root; gint idx,i; - +#if 0 /* remove sky track, time ticks and the pass itself */ if (plot->pass != NULL) { /* remove sat from canvas */ @@ -258,9 +265,22 @@ if (pass != NULL) { create_track (GTK_POLAR_PLOT (plot)); } +#endif } +/** \brief Show/hide time tick + * \param plot Pointer to the GtkPolarPlot widget + * \param show TRUE => show tick. FALSE => don't show + * + */ +void gtk_polar_plot_show_time_ticks (GtkPolarPlot *plot, gboolean show) +{ + g_print ("NOT IMPLEMENTED %s\n",__FUNCTION__); +} + + + static GooCanvasItemModel * create_canvas_model (GtkPolarPlot *polv) { Modified: trunk/src/gtk-polar-plot.h =================================================================== --- trunk/src/gtk-polar-plot.h 2008-09-10 21:04:10 UTC (rev 104) +++ trunk/src/gtk-polar-plot.h 2008-09-10 23:24:10 UTC (rev 105) @@ -122,6 +122,7 @@ void gtk_polar_plot_set_pass (GtkPolarPlot *plot, pass_t *pass); +void gtk_polar_plot_show_time_ticks (GtkPolarPlot *plot, gboolean show); #ifdef __cplusplus This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-10 21:04:03
|
Revision: 104 http://gpredict.svn.sourceforge.net/gpredict/?rev=104&view=rev Author: csete Date: 2008-09-10 21:04:10 +0000 (Wed, 10 Sep 2008) Log Message: ----------- Adjusted font and margin sizes to make polar plot suitable for small areas too. Modified Paths: -------------- trunk/src/gtk-polar-plot.c Modified: trunk/src/gtk-polar-plot.c =================================================================== --- trunk/src/gtk-polar-plot.c 2008-09-10 20:47:47 UTC (rev 103) +++ trunk/src/gtk-polar-plot.c 2008-09-10 21:04:10 UTC (rev 104) @@ -56,8 +56,8 @@ -#define POLV_DEFAULT_SIZE 300 -#define POLV_DEFAULT_MARGIN 25 +#define POLV_DEFAULT_SIZE 200 +#define POLV_DEFAULT_MARGIN 20 /* extra size for line outside 0 deg circle (inside margin) */ #define POLV_LINE_EXTRA 5 @@ -328,7 +328,7 @@ y, -1, anch, - "font", "Sans 10", + "font", "Sans 8", "fill-color-rgba", col, NULL); @@ -339,7 +339,7 @@ y, -1, anch, - "font", "Sans 10", + "font", "Sans 8", "fill-color-rgba", col, NULL); @@ -350,7 +350,7 @@ y, -1, anch, - "font", "Sans 10", + "font", "Sans 8", "fill-color-rgba", col, NULL); @@ -361,7 +361,7 @@ y, -1, anch, - "font", "Sans 10", + "font", "Sans 8", "fill-color-rgba", col, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-10 20:47:37
|
Revision: 103 http://gpredict.svn.sourceforge.net/gpredict/?rev=103&view=rev Author: csete Date: 2008-09-10 20:47:47 +0000 (Wed, 10 Sep 2008) Log Message: ----------- Added function to change the current track. Modified Paths: -------------- trunk/src/gtk-polar-plot.c trunk/src/gtk-polar-plot.h Modified: trunk/src/gtk-polar-plot.c =================================================================== --- trunk/src/gtk-polar-plot.c 2008-09-09 17:58:31 UTC (rev 102) +++ trunk/src/gtk-polar-plot.c 2008-09-10 20:47:47 UTC (rev 103) @@ -26,8 +26,17 @@ along with this program; if not, visit http://www.fsf.org/ */ /** \brief Polar Plot Widget. + * \ingroup widgets * - * More info... + * GtkPolarPlot is a graphical widget that can display a satellite pass + * in an Az/El polar plot. The widget was originally created to display + * a single satellite pass in the detailed pass predicition dialog. + * + * Later, a few utility functions were added in order to make the GtkPolarPlot + * more dynamic and useful in other contexts too. In addition to a satellite + * pass, GtkPolarPlot can show a target object (small square), a target + * position marker (thread), and a current position marker (small circle). + * These three objects are very useful in the rotator control window. */ #include <gtk/gtk.h> #include <glib/gi18n.h> @@ -137,6 +146,7 @@ gtk_polar_plot_init (GtkPolarPlot *polview) { polview->qth = NULL; + polview->pass = NULL; polview->size = 0; polview->r = 0; polview->cx = 0; @@ -157,9 +167,10 @@ /** \brief Create a new GtkPolarPlot widget. - * \param cfgdata The configuration data of the parent module. - * \param sats Pointer to the hash table containing the asociated satellites. - * \param qth Pointer to the ground station data. + * \param qth Pointer to the QTH. + * \param pass Pointer to the satellite pass to display. If NULL no + * pass will be displayed. + * */ GtkWidget* gtk_polar_plot_new (qth_t *qth, pass_t *pass) @@ -203,7 +214,10 @@ goo_canvas_set_root_item_model (GOO_CANVAS (GTK_POLAR_PLOT (polv)->canvas), root); g_object_unref (root); - create_track (GTK_POLAR_PLOT (polv)); + + if (GTK_POLAR_PLOT (polv)->pass != NULL) { + create_track (GTK_POLAR_PLOT (polv)); + } gtk_container_add (GTK_CONTAINER (polv), GTK_POLAR_PLOT (polv)->canvas); @@ -211,6 +225,42 @@ } +/** \brief Set new pass + * \param[in] plot Pointer to the GtkPolarPlot widget. + * \param[in] pass Pointer to the new pass data. Use NULL to disable + * display of pass. + */ +void gtk_polar_plot_set_pass (GtkPolarPlot *plot, pass_t *pass) +{ + GooCanvasItemModel *root; + gint idx,i; + + + /* remove sky track, time ticks and the pass itself */ + if (plot->pass != NULL) { + /* remove sat from canvas */ + root = goo_canvas_get_root_item_model (GOO_CANVAS (plot->canvas)); + idx = goo_canvas_item_model_find_child (root, plot->track); + + if (idx != -1) + goo_canvas_item_model_remove_child (root, idx); + + for (i = 0; i < TRACK_TICK_NUM; i++) { + idx = goo_canvas_item_model_find_child (root, plot->trtick[i]); + if (idx != -1) + goo_canvas_item_model_remove_child (root, idx); + } + + free_pass (plot->pass); + plot->pass = NULL; + } + + if (pass != NULL) { + create_track (GTK_POLAR_PLOT (plot)); + } +} + + static GooCanvasItemModel * create_canvas_model (GtkPolarPlot *polv) { @@ -408,7 +458,9 @@ break; default: - /* FIXME: bug */ + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Incorrect polar plot orientation."), + __FILE__, __LINE__); break; } } @@ -524,7 +576,8 @@ /* sky track */ - update_track (polv); + if (polv->pass != NULL) + update_track (polv); } } Modified: trunk/src/gtk-polar-plot.h =================================================================== --- trunk/src/gtk-polar-plot.h 2008-09-09 17:58:31 UTC (rev 102) +++ trunk/src/gtk-polar-plot.h 2008-09-10 20:47:47 UTC (rev 103) @@ -44,7 +44,7 @@ /** \brief Number of time ticks. */ -#define TRACK_TICK_NUM 4 +#define TRACK_TICK_NUM 5 #define GTK_POLAR_PLOT(obj) GTK_CHECK_CAST (obj, gtk_polar_plot_get_type (), GtkPolarPlot) @@ -120,6 +120,7 @@ GtkWidget* gtk_polar_plot_new (qth_t *qth, pass_t *pass); +void gtk_polar_plot_set_pass (GtkPolarPlot *plot, pass_t *pass); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-09 17:58:20
|
Revision: 102 http://gpredict.svn.sourceforge.net/gpredict/?rev=102&view=rev Author: csete Date: 2008-09-09 17:58:31 +0000 (Tue, 09 Sep 2008) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-09 17:57:54 UTC (rev 101) +++ trunk/ChangeLog 2008-09-09 17:58:31 UTC (rev 102) @@ -1,3 +1,12 @@ +2008-09-09; Alexandru Csete <oz...@gm...> + + * src/sat-pref-conditions.c: + * src/sat-cfg.[ch]: + * src/sat-vis.c: + Added support for variable twilight threshold in prediction of + satellite visibility. + + 2008-09-07; Alexandru Csete <oz...@gm...> * src/gtk-rig-ctrl.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-09-09 17:57:54 UTC (rev 101) +++ trunk/NEWS 2008-09-09 17:58:31 UTC (rev 102) @@ -10,6 +10,7 @@ the selected satellite. x The satellite map can show day/night side of Earh. x Track the Sun and the Moon as if they were satellites. +- User defined twilight threshold for predicting satellite visibility. x Define obstacles for ground stations. x Feature request 1613758: Command Line Interface to Gpredict. - Feature request 1705375: Restore main window position and size. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-09 17:57:44
|
Revision: 101 http://gpredict.svn.sourceforge.net/gpredict/?rev=101&view=rev Author: csete Date: 2008-09-09 17:57:54 +0000 (Tue, 09 Sep 2008) Log Message: ----------- Added support for variable twilight threshold in prediction of satellite visibility. Modified Paths: -------------- trunk/src/sat-cfg.c trunk/src/sat-cfg.h trunk/src/sat-pref-conditions.c trunk/src/sat-vis.c Modified: trunk/src/sat-cfg.c =================================================================== --- trunk/src/sat-cfg.c 2008-09-07 11:07:03 UTC (rev 100) +++ trunk/src/sat-cfg.c 2008-09-09 17:57:54 UTC (rev 101) @@ -177,6 +177,7 @@ { "PREDICT", "MULTI_PASS_COL", MULTI_PASS_COL_DEFAULTS}, { "PREDICT", "SAVE_FORMAT", 0}, { "PREDICT", "SAVE_CONTENTS", 0}, + { "PREDICT", "TWILIGHT_THRESHOLD", -6}, { "SKY_AT_GLANCE", "TIME_SPAN_HOURS", 8}, { "SKY_AT_GLANCE", "COLOUR_01", 0x3c46c8}, { "SKY_AT_GLANCE", "COLOUR_02", 0x00500a}, Modified: trunk/src/sat-cfg.h =================================================================== --- trunk/src/sat-cfg.h 2008-09-07 11:07:03 UTC (rev 100) +++ trunk/src/sat-cfg.h 2008-09-09 17:57:54 UTC (rev 101) @@ -100,6 +100,7 @@ SAT_CFG_INT_PRED_MULTI_COL, /*!< Visible columns in multi-pass dialog */ SAT_CFG_INT_PRED_SAVE_FORMAT, /*!< Last used save format for predictions */ SAT_CFG_INT_PRED_SAVE_CONTENTS, /*!< Last selection for save file contents */ + SAT_CFG_INT_PRED_TWILIGHT_THLD, /*!< Twilight zone threshold */ SAT_CFG_INT_SKYATGL_TIME, /*!< Time span for sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_01, /*!< Colour 1 in sky at a glance predictions */ SAT_CFG_INT_SKYATGL_COL_02, /*!< Colour 2 in sky at a glance predictions */ Modified: trunk/src/sat-pref-conditions.c =================================================================== --- trunk/src/sat-pref-conditions.c 2008-09-07 11:07:03 UTC (rev 100) +++ trunk/src/sat-pref-conditions.c 2008-09-09 17:57:54 UTC (rev 101) @@ -40,6 +40,7 @@ static GtkWidget *lookahead; static GtkWidget *res; static GtkWidget *nument; +static GtkWidget *twspin; static gboolean dirty = FALSE; /* used to check whether any changes have occurred */ static gboolean reset = FALSE; @@ -66,7 +67,7 @@ dirty = FALSE; reset = FALSE; - table = gtk_table_new (9, 3, FALSE); + table = gtk_table_new (12, 3, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 10); gtk_table_set_col_spacings (GTK_TABLE (table), 5); @@ -261,7 +262,60 @@ GTK_SHRINK, 0, 0); + /* separator */ + gtk_table_attach (GTK_TABLE (table), + gtk_hseparator_new (), + 0, 3, 9, 10, + GTK_FILL | GTK_EXPAND, + GTK_SHRINK, + 0, 0); + /* satellite visibility */ + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), _("<b>Satellite Visibility:</b>")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, + 0, 1, 10, 11, + GTK_FILL, + GTK_SHRINK, + 0, 0); + + /* twilight threshold */ + label = gtk_label_new (_("Twilight threshold")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, + 0, 1, 11, 12, + GTK_FILL, + GTK_SHRINK, + 0, 0); + twspin = gtk_spin_button_new_with_range (-18, 0, 1); + gtk_widget_set_tooltip_text (twspin, + _("Satellites are only considered visible if the elevation "\ + "of the Sun is below the specified threshold.\n"\ + " \342\200\242 Astronomical: -18\302\260 to -12\302\260\n"\ + " \342\200\242 Nautical: -12\302\260 to -6\302\260\n"\ + " \342\200\242 Civil: -6\302\260 to 0\302\260")); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON (twspin), 0); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (twspin), TRUE); + gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (twspin), FALSE); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (twspin), + sat_cfg_get_int (SAT_CFG_INT_PRED_TWILIGHT_THLD)); + g_signal_connect (G_OBJECT (twspin), "value-changed", + G_CALLBACK (spin_changed_cb), NULL); + gtk_table_attach (GTK_TABLE (table), twspin, + 1, 2, 11, 12, + GTK_FILL, + GTK_SHRINK, + 0, 0); + label = gtk_label_new (_("[deg]")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, + 2, 3, 11, 12, + GTK_FILL | GTK_EXPAND, + GTK_SHRINK, + 0, 0); + + /* create vertical box */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_set_border_width (GTK_CONTAINER (vbox), 20); @@ -301,6 +355,8 @@ gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (res))); sat_cfg_set_int (SAT_CFG_INT_PRED_NUM_ENTRIES, gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (nument))); + sat_cfg_set_int (SAT_CFG_INT_PRED_TWILIGHT_THLD, + gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (twspin))); dirty = FALSE; } @@ -310,6 +366,7 @@ sat_cfg_reset_int (SAT_CFG_INT_PRED_LOOK_AHEAD); sat_cfg_reset_int (SAT_CFG_INT_PRED_RESOLUTION); sat_cfg_reset_int (SAT_CFG_INT_PRED_NUM_ENTRIES); + sat_cfg_reset_int (SAT_CFG_INT_PRED_TWILIGHT_THLD); reset = FALSE; } @@ -380,6 +437,8 @@ sat_cfg_get_int_def (SAT_CFG_INT_PRED_RESOLUTION)); gtk_spin_button_set_value (GTK_SPIN_BUTTON (nument), sat_cfg_get_int_def (SAT_CFG_INT_PRED_NUM_ENTRIES)); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (twspin), + sat_cfg_get_int_def (SAT_CFG_INT_PRED_TWILIGHT_THLD)); /* reset flags */ Modified: trunk/src/sat-vis.c =================================================================== --- trunk/src/sat-vis.c 2008-09-07 11:07:03 UTC (rev 100) +++ trunk/src/sat-vis.c 2008-09-09 17:57:54 UTC (rev 101) @@ -31,6 +31,7 @@ #include "sgpsdp/sgp4sdp4.h" #include "gtk-sat-data.h" #include "sat-vis.h" +#include "sat-cfg.h" static gchar VIS2CHR[SAT_VIS_NUM] = { '-', 'V', 'D', 'E'}; @@ -56,6 +57,7 @@ { gboolean sat_sun_status; gdouble sun_el; + gdouble threshold; gdouble eclipse_depth; sat_vis_t vis = SAT_VIS_NONE; vector_t zero_vector = {0,0,0,0}; @@ -86,10 +88,12 @@ sat_sun_status = TRUE; } - sun_el = Degrees (solar_set.el); if (sat_sun_status) { - if (sun_el <= -12.0 && sat->el >= 0.0) + sun_el = Degrees (solar_set.el); + threshold = (gdouble) sat_cfg_get_int (SAT_CFG_INT_PRED_TWILIGHT_THLD); + + if (sun_el <= threshold && sat->el >= 0.0) vis = SAT_VIS_VISIBLE; else vis = SAT_VIS_DAYLIGHT; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-07 11:06:53
|
Revision: 100 http://gpredict.svn.sourceforge.net/gpredict/?rev=100&view=rev Author: csete Date: 2008-09-07 11:07:03 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Updated website URL. Modified Paths: -------------- trunk/src/about.c Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2008-09-07 10:49:56 UTC (rev 99) +++ trunk/src/about.c 2008-09-07 11:07:03 UTC (rev 100) @@ -92,7 +92,7 @@ "Gpredict is available free of charge from:")); gtk_about_dialog_set_url_hook (gpredict_url_hook_cb, NULL, NULL); gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog), - "http://gpredict.sourceforge.net/"); + "http://gpredict.oz9aec.net/"); /* gtk_about_dialog_set_website_label (GTK_ABOUT_DIALOG (dialog), */ /* _("Gpredict Website")); */ gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (dialog), license); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-07 10:49:52
|
Revision: 99 http://gpredict.svn.sourceforge.net/gpredict/?rev=99&view=rev Author: csete Date: 2008-09-07 10:49:56 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Updated project URLs. Modified Paths: -------------- trunk/README trunk/src/about.c trunk/src/about.h trunk/src/compat.c trunk/src/compat.h trunk/src/config-keys.h trunk/src/defaults.h trunk/src/first-time.c trunk/src/first-time.h trunk/src/gpredict-help.c trunk/src/gpredict-help.h trunk/src/gpredict-url-hook.c trunk/src/gpredict-url-hook.h trunk/src/gpredict-utils.c trunk/src/gpredict-utils.h trunk/src/gtk-azel-plot.c trunk/src/gtk-azel-plot.h trunk/src/gtk-freq-knob.c trunk/src/gtk-freq-knob.h trunk/src/gtk-met.c trunk/src/gtk-met.h trunk/src/gtk-polar-plot.c trunk/src/gtk-polar-plot.h trunk/src/gtk-polar-view-popup.c trunk/src/gtk-polar-view-popup.h trunk/src/gtk-polar-view.c trunk/src/gtk-polar-view.h trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h trunk/src/gtk-rot-ctrl.c trunk/src/gtk-rot-ctrl.h trunk/src/gtk-rot-knob.c trunk/src/gtk-rot-knob.h trunk/src/gtk-sat-data.c trunk/src/gtk-sat-data.h trunk/src/gtk-sat-list-col-sel.c trunk/src/gtk-sat-list-col-sel.h trunk/src/gtk-sat-list.c trunk/src/gtk-sat-list.h trunk/src/gtk-sat-map-ground-track.c trunk/src/gtk-sat-map-ground-track.h trunk/src/gtk-sat-map-popup.c trunk/src/gtk-sat-map-popup.h trunk/src/gtk-sat-map.c trunk/src/gtk-sat-map.h trunk/src/gtk-sat-module-popup.c trunk/src/gtk-sat-module-popup.h trunk/src/gtk-sat-module-tmg.c trunk/src/gtk-sat-module-tmg.h trunk/src/gtk-sat-module.c trunk/src/gtk-sat-module.h trunk/src/gtk-sat-tree.c trunk/src/gtk-sat-tree.h trunk/src/gtk-single-sat.c trunk/src/gtk-single-sat.h trunk/src/gtk-sky-glance.c trunk/src/gtk-sky-glance.h trunk/src/gui.c trunk/src/gui.h trunk/src/loc-tree.c trunk/src/loc-tree.h trunk/src/locator.h trunk/src/main.c trunk/src/map-selector.c trunk/src/map-selector.h trunk/src/menubar.c trunk/src/menubar.h trunk/src/mod-cfg-get-param.c trunk/src/mod-cfg-get-param.h trunk/src/mod-cfg.c trunk/src/mod-cfg.h trunk/src/mod-mgr.c trunk/src/mod-mgr.h trunk/src/orbit-tools.c trunk/src/orbit-tools.h trunk/src/pass-popup-menu.c trunk/src/pass-popup-menu.h trunk/src/pass-to-txt.c trunk/src/pass-to-txt.h trunk/src/predict-tools.c trunk/src/predict-tools.h trunk/src/qth-editor.c trunk/src/qth-editor.h trunk/src/radio-conf.c trunk/src/radio-conf.h trunk/src/rdv.c trunk/src/rdv.h trunk/src/rig-io.c trunk/src/rig-io.h trunk/src/rotor-conf.c trunk/src/rotor-conf.h trunk/src/sat-cfg.c trunk/src/sat-cfg.h trunk/src/sat-log-browser.c trunk/src/sat-log-browser.h trunk/src/sat-log.c trunk/src/sat-log.h trunk/src/sat-monitor.c trunk/src/sat-monitor.h trunk/src/sat-pass-dialogs.c trunk/src/sat-pass-dialogs.h trunk/src/sat-popup-menu.c trunk/src/sat-popup-menu.h trunk/src/sat-pref-conditions.c trunk/src/sat-pref-conditions.h trunk/src/sat-pref-debug.c trunk/src/sat-pref-debug.h trunk/src/sat-pref-formats.c trunk/src/sat-pref-formats.h trunk/src/sat-pref-general.c trunk/src/sat-pref-general.h trunk/src/sat-pref-help.c trunk/src/sat-pref-help.h trunk/src/sat-pref-interfaces.c trunk/src/sat-pref-interfaces.h trunk/src/sat-pref-layout.c trunk/src/sat-pref-layout.h trunk/src/sat-pref-list-view.c trunk/src/sat-pref-list-view.h trunk/src/sat-pref-map-view.c trunk/src/sat-pref-map-view.h trunk/src/sat-pref-modules.c trunk/src/sat-pref-modules.h trunk/src/sat-pref-multi-pass.c trunk/src/sat-pref-multi-pass.h trunk/src/sat-pref-polar-view.c trunk/src/sat-pref-polar-view.h trunk/src/sat-pref-predict.c trunk/src/sat-pref-predict.h trunk/src/sat-pref-qth-data.h trunk/src/sat-pref-qth-editor.c trunk/src/sat-pref-qth-editor.h trunk/src/sat-pref-qth.c trunk/src/sat-pref-qth.h trunk/src/sat-pref-refresh.c trunk/src/sat-pref-refresh.h trunk/src/sat-pref-rig-data.h trunk/src/sat-pref-rig-editor.c trunk/src/sat-pref-rig-editor.h trunk/src/sat-pref-rig.c trunk/src/sat-pref-rig.h trunk/src/sat-pref-rot-data.h trunk/src/sat-pref-rot-editor.c trunk/src/sat-pref-rot-editor.h trunk/src/sat-pref-rot.c trunk/src/sat-pref-rot.h trunk/src/sat-pref-single-pass.c trunk/src/sat-pref-single-pass.h trunk/src/sat-pref-single-sat.c trunk/src/sat-pref-single-sat.h trunk/src/sat-pref-sky-at-glance.c trunk/src/sat-pref-sky-at-glance.h trunk/src/sat-pref-tle.c trunk/src/sat-pref-tle.h trunk/src/sat-pref.c trunk/src/sat-pref.h trunk/src/sat-vis.c trunk/src/sat-vis.h trunk/src/save-pass.c trunk/src/save-pass.h trunk/src/sgpsdp/sgp_in.c trunk/src/sgpsdp/test-001.c trunk/src/sgpsdp/test-002.c trunk/src/time-tools.c trunk/src/time-tools.h trunk/src/tle-lookup.c trunk/src/tle-lookup.h trunk/src/tle-tools.c trunk/src/tle-tools.h trunk/src/tle-update.c trunk/src/tle-update.h Modified: trunk/README =================================================================== --- trunk/README 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/README 2008-09-07 10:49:56 UTC (rev 99) @@ -49,8 +49,7 @@ * Very detailed information about both the real time data and the predicted passes. -Visit the gpredict homepage at http://groundstation.sourceforge.net/gpredict/ -for more info. +Visit the gpredict homepage at http://gpredcit.oz9aec.net/ for more info. @@ -93,7 +92,7 @@ a new module (Menubar->File->New Module). You are highly encouraged to have a look at the user manual available at -http://groundstation.sourceforge.net/gpredict/documents.php +http://gpredict.oz9aec.net/documents.php @@ -115,9 +114,11 @@ Gpredict is released under the GNU General Public License and comes with NO WARRANTY whatsoever (well, maybe except that it works for us). See the COPYING file for details. If you have problems installing or using Gpredict, -feel free to ask for support. Comments and bugreports are also welcome. Please -refer to the project page at SourceForge: -http://sourceforge.net/projects/groundstation +feel free to ask for support. There is a web based forum at +http://forum.oz9aec.net/ +Bug trackers, mailing lists, etc, can be accessed at the project page +at sourceforge: +http://sourceforge.net/projects/gpredict Happy Tracking! Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/about.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/about.h =================================================================== --- trunk/src/about.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/about.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/compat.c =================================================================== --- trunk/src/compat.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/compat.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/compat.h =================================================================== --- trunk/src/compat.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/compat.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/config-keys.h =================================================================== --- trunk/src/config-keys.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/config-keys.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/defaults.h =================================================================== --- trunk/src/defaults.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/defaults.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/first-time.c =================================================================== --- trunk/src/first-time.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/first-time.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/first-time.h =================================================================== --- trunk/src/first-time.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/first-time.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gpredict-help.c =================================================================== --- trunk/src/gpredict-help.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gpredict-help.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gpredict-help.h =================================================================== --- trunk/src/gpredict-help.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gpredict-help.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gpredict-url-hook.c =================================================================== --- trunk/src/gpredict-url-hook.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gpredict-url-hook.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gpredict-url-hook.h =================================================================== --- trunk/src/gpredict-url-hook.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gpredict-url-hook.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gpredict-utils.c =================================================================== --- trunk/src/gpredict-utils.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gpredict-utils.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gpredict-utils.h =================================================================== --- trunk/src/gpredict-utils.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gpredict-utils.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-azel-plot.c =================================================================== --- trunk/src/gtk-azel-plot.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-azel-plot.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-azel-plot.h =================================================================== --- trunk/src/gtk-azel-plot.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-azel-plot.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-freq-knob.c =================================================================== --- trunk/src/gtk-freq-knob.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-freq-knob.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-freq-knob.h =================================================================== --- trunk/src/gtk-freq-knob.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-freq-knob.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-met.c =================================================================== --- trunk/src/gtk-met.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-met.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-met.h =================================================================== --- trunk/src/gtk-met.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-met.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-polar-plot.c =================================================================== --- trunk/src/gtk-polar-plot.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-polar-plot.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-polar-plot.h =================================================================== --- trunk/src/gtk-polar-plot.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-polar-plot.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-polar-view-popup.c =================================================================== --- trunk/src/gtk-polar-view-popup.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-polar-view-popup.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-polar-view-popup.h =================================================================== --- trunk/src/gtk-polar-view-popup.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-polar-view-popup.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-polar-view.c =================================================================== --- trunk/src/gtk-polar-view.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-polar-view.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-polar-view.h =================================================================== --- trunk/src/gtk-polar-view.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-polar-view.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-rig-ctrl.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-rig-ctrl.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-rot-ctrl.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-rot-ctrl.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-rot-knob.c =================================================================== --- trunk/src/gtk-rot-knob.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-rot-knob.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-rot-knob.h =================================================================== --- trunk/src/gtk-rot-knob.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-rot-knob.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-data.c =================================================================== --- trunk/src/gtk-sat-data.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-data.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-data.h =================================================================== --- trunk/src/gtk-sat-data.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-data.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-list-col-sel.c =================================================================== --- trunk/src/gtk-sat-list-col-sel.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-list-col-sel.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-list-col-sel.h =================================================================== --- trunk/src/gtk-sat-list-col-sel.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-list-col-sel.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-list.c =================================================================== --- trunk/src/gtk-sat-list.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-list.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-list.h =================================================================== --- trunk/src/gtk-sat-list.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-list.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-map-ground-track.c =================================================================== --- trunk/src/gtk-sat-map-ground-track.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-map-ground-track.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-map-ground-track.h =================================================================== --- trunk/src/gtk-sat-map-ground-track.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-map-ground-track.h 2008-09-07 10:49:56 UTC (rev 99) @@ -8,10 +8,10 @@ Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-map-popup.c =================================================================== --- trunk/src/gtk-sat-map-popup.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-map-popup.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-map-popup.h =================================================================== --- trunk/src/gtk-sat-map-popup.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-map-popup.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-map.c 2008-09-07 10:49:56 UTC (rev 99) @@ -9,10 +9,10 @@ William J Beksi <wj...@us...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-map.h =================================================================== --- trunk/src/gtk-sat-map.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-map.h 2008-09-07 10:49:56 UTC (rev 99) @@ -9,10 +9,10 @@ William J Beksi <wj...@us...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-module-popup.c =================================================================== --- trunk/src/gtk-sat-module-popup.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-module-popup.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-module-popup.h =================================================================== --- trunk/src/gtk-sat-module-popup.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-module-popup.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-module-tmg.c =================================================================== --- trunk/src/gtk-sat-module-tmg.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-module-tmg.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-module-tmg.h =================================================================== --- trunk/src/gtk-sat-module-tmg.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-module-tmg.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-module.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-module.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-tree.c =================================================================== --- trunk/src/gtk-sat-tree.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-tree.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sat-tree.h =================================================================== --- trunk/src/gtk-sat-tree.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sat-tree.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-single-sat.c =================================================================== --- trunk/src/gtk-single-sat.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-single-sat.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-single-sat.h =================================================================== --- trunk/src/gtk-single-sat.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-single-sat.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sky-glance.c =================================================================== --- trunk/src/gtk-sky-glance.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sky-glance.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gtk-sky-glance.h =================================================================== --- trunk/src/gtk-sky-glance.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gtk-sky-glance.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gui.c =================================================================== --- trunk/src/gui.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gui.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/gui.h =================================================================== --- trunk/src/gui.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/gui.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/loc-tree.c =================================================================== --- trunk/src/loc-tree.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/loc-tree.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/loc-tree.h =================================================================== --- trunk/src/loc-tree.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/loc-tree.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/locator.h =================================================================== --- trunk/src/locator.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/locator.h 2008-09-07 10:49:56 UTC (rev 99) @@ -8,10 +8,10 @@ Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/main.c =================================================================== --- trunk/src/main.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/main.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/map-selector.c =================================================================== --- trunk/src/map-selector.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/map-selector.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/map-selector.h =================================================================== --- trunk/src/map-selector.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/map-selector.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/menubar.c =================================================================== --- trunk/src/menubar.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/menubar.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/menubar.h =================================================================== --- trunk/src/menubar.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/menubar.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mod-cfg-get-param.c =================================================================== --- trunk/src/mod-cfg-get-param.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/mod-cfg-get-param.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mod-cfg-get-param.h =================================================================== --- trunk/src/mod-cfg-get-param.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/mod-cfg-get-param.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/mod-cfg.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mod-cfg.h =================================================================== --- trunk/src/mod-cfg.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/mod-cfg.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mod-mgr.c =================================================================== --- trunk/src/mod-mgr.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/mod-mgr.c 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/mod-mgr.h =================================================================== --- trunk/src/mod-mgr.h 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/mod-mgr.h 2008-09-07 10:49:56 UTC (rev 99) @@ -7,10 +7,10 @@ Authors: Alexandru Csete <oz...@gm...> Comments, questions and bugreports should be submitted via - http://sourceforge.net/projects/groundstation/ + http://sourceforge.net/projects/gpredict/ More details can be found at the project home page: - http://groundstation.sourceforge.net/ + http://gpredict.oz9aec.net/ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by Modified: trunk/src/orbit-tools.c =================================================================== --- trunk/src/orbit-tools.c 2008-09-07 10:17:50 UTC (rev 98) +++ trunk/src/orb... [truncated message content] |
From: <cs...@us...> - 2008-09-07 10:17:40
|
Revision: 98 http://gpredict.svn.sourceforge.net/gpredict/?rev=98&view=rev Author: csete Date: 2008-09-07 10:17:50 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-07 10:16:41 UTC (rev 97) +++ trunk/ChangeLog 2008-09-07 10:17:50 UTC (rev 98) @@ -1,3 +1,10 @@ +2008-09-07; Alexandru Csete <oz...@gm...> + + * src/gtk-rig-ctrl.c: + * src/gtk-rot-ctrl.[ch]: + Implemented AOS/LOS count down. + + 2008-09-06; Alexandru Csete <oz...@gm...> * src/gtk-freq-knob.[ch]: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2008-09-07 10:16:41 UTC (rev 97) +++ trunk/NEWS 2008-09-07 10:17:50 UTC (rev 98) @@ -1,7 +1,7 @@ Changes in version 1.0 (TBD): -x Radio doppler tuning via hamlibs rigctld. +- Radio doppler tuning via hamlibs rigctld. x Antenna rotator control via hamlibs rotctld. x New layout engine allowing any number of views per module. x SpaceView: New view show the satellites using a movable camera in space. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-07 10:16:30
|
Revision: 97 http://gpredict.svn.sourceforge.net/gpredict/?rev=97&view=rev Author: csete Date: 2008-09-07 10:16:41 +0000 (Sun, 07 Sep 2008) Log Message: ----------- Implemented AOS/LOS count down. Modified Paths: -------------- trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rot-ctrl.c trunk/src/gtk-rot-ctrl.h Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2008-09-06 23:58:53 UTC (rev 96) +++ trunk/src/gtk-rig-ctrl.c 2008-09-07 10:16:41 UTC (rev 97) @@ -81,7 +81,9 @@ static void rig_locked_cb (GtkToggleButton *button, gpointer data); static gboolean rig_ctrl_timeout_cb (gpointer data); static void set_freq (GtkRigCtrl *ctrl, gdouble freq); +static void update_count_down (GtkRigCtrl *ctrl, gdouble t); + static GtkVBoxClass *parent_class = NULL; static GdkColor ColBlack = { 0, 0, 0, 0}; @@ -255,6 +257,8 @@ gtk_label_set_text (GTK_LABEL (ctrl->SatEl), buff); g_free (buff); + update_count_down (ctrl, t); + /* update range */ if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { buff = g_strdup_printf ("%.0f mi", KM_TO_MI (ctrl->target->range)); @@ -404,7 +408,7 @@ gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatEl, 1, 2, 2, 3); /* count down */ - label = gtk_label_new (_("Time:")); + label = gtk_label_new (_("\316\224T:")); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4); ctrl->SatCnt = gtk_label_new ("00:00:00"); @@ -723,21 +727,6 @@ gtk_widget_set_sensitive (ctrl->DevSel, FALSE); ctrl->engaged = TRUE; - - -/* status = connect(ctrl->sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)); - if (status < 0) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to connect to %s:%d"), - __FUNCTION__, ctrl->conf->host, ctrl->conf->port); - return; - } - else { - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Connection opened to %s:%d"), - __FUNCTION__, ctrl->conf->host, ctrl->conf->port); - } - */ } } @@ -858,3 +847,71 @@ close (sock); } + + +/** \brief Update count down label. + * \param[in] ctrl Pointer to the RigCtrl widget. + * \param[in] t The current time. + * + * This function calculates the new time to AOS/LOS of the currently + * selected target and updates the ctrl->SatCnt label widget. + */ +static void update_count_down (GtkRigCtrl *ctrl, gdouble t) +{ + gdouble targettime; + gdouble delta; + gchar *buff; + guint h,m,s; + gchar *ch,*cm,*cs; + + + /* select AOS or LOS time depending on target elevation */ + if (ctrl->target->el < 0.0) + targettime = ctrl->target->aos; + else + targettime = ctrl->target->los; + + delta = targettime - t; + + /* convert julian date to seconds */ + s = (guint) (delta * 86400); + + /* extract hours */ + h = (guint) floor (s/3600); + s -= 3600*h; + + /* leading zero */ + if ((h > 0) && (h < 10)) + ch = g_strdup ("0"); + else + ch = g_strdup (""); + + /* extract minutes */ + m = (guint) floor (s/60); + s -= 60*m; + + /* leading zero */ + if (m < 10) + cm = g_strdup ("0"); + else + cm = g_strdup (""); + + /* leading zero */ + if (s < 10) + cs = g_strdup (":0"); + else + cs = g_strdup (":"); + + if (h > 0) + buff = g_strdup_printf ("%s%d:%s%d%s%d", ch, h, cm, m, cs, s); + else + buff = g_strdup_printf ("%s%d%s%d", cm, m, cs, s); + + gtk_label_set_text (GTK_LABEL (ctrl->SatCnt), buff); + + g_free (buff); + g_free (ch); + g_free (cm); + g_free (cs); + +} Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2008-09-06 23:58:53 UTC (rev 96) +++ trunk/src/gtk-rot-ctrl.c 2008-09-07 10:16:41 UTC (rev 97) @@ -71,6 +71,7 @@ static void rot_selected_cb (GtkComboBox *box, gpointer data); static void rot_locked_cb (GtkToggleButton *button, gpointer data); static gboolean rot_ctrl_timeout_cb (gpointer data); +static void update_count_down (GtkRotCtrl *ctrl, gdouble t); static GtkVBoxClass *parent_class = NULL; @@ -241,6 +242,8 @@ gtk_label_set_text (GTK_LABEL (ctrl->ElSat), buff); g_free (buff); + update_count_down (ctrl, t); + /* update next pass if necessary */ if (ctrl->pass != NULL) { if (ctrl->target->aos > ctrl->pass->aos) { @@ -386,12 +389,14 @@ gtk_table_attach_defaults (GTK_TABLE (table), ctrl->ElSat, 1, 2, 2, 3); /* count down */ - label = gtk_label_new (_("Time:")); + label = gtk_label_new (_("\316\224T:")); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4); + ctrl->SatCnt = gtk_label_new ("00:00:00"); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatCnt), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatCnt, 1, 2, 3, 4); frame = gtk_frame_new (_("Target")); - //gtk_container_set_border_width (GTK_CONTAINER (frame), 5); gtk_container_add (GTK_CONTAINER (frame), table); g_free (buff); @@ -723,3 +728,70 @@ } + +/** \brief Update count down label. + * \param[in] ctrl Pointer to the RotCtrl widget. + * \param[in] t The current time. + * + * This function calculates the new time to AOS/LOS of the currently + * selected target and updates the ctrl->SatCnt label widget. + */ +static void update_count_down (GtkRotCtrl *ctrl, gdouble t) +{ + gdouble targettime; + gdouble delta; + gchar *buff; + guint h,m,s; + gchar *ch,*cm,*cs; + + + /* select AOS or LOS time depending on target elevation */ + if (ctrl->target->el < 0.0) + targettime = ctrl->target->aos; + else + targettime = ctrl->target->los; + + delta = targettime - t; + + /* convert julian date to seconds */ + s = (guint) (delta * 86400); + + /* extract hours */ + h = (guint) floor (s/3600); + s -= 3600*h; + + /* leading zero */ + if ((h > 0) && (h < 10)) + ch = g_strdup ("0"); + else + ch = g_strdup (""); + + /* extract minutes */ + m = (guint) floor (s/60); + s -= 60*m; + + /* leading zero */ + if (m < 10) + cm = g_strdup ("0"); + else + cm = g_strdup (""); + + /* leading zero */ + if (s < 10) + cs = g_strdup (":0"); + else + cs = g_strdup (":"); + + if (h > 0) + buff = g_strdup_printf ("%s%d:%s%d%s%d", ch, h, cm, m, cs, s); + else + buff = g_strdup_printf ("%s%d%s%d", cm, m, cs, s); + + gtk_label_set_text (GTK_LABEL (ctrl->SatCnt), buff); + + g_free (buff); + g_free (ch); + g_free (cm); + g_free (cs); + +} Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2008-09-06 23:58:53 UTC (rev 96) +++ trunk/src/gtk-rot-ctrl.h 2008-09-07 10:16:41 UTC (rev 97) @@ -69,6 +69,7 @@ GtkWidget *ElSat,*ElSet,*ElRead,*ElDevSel,*ElDev; /* other widgets */ + GtkWidget *SatCnt; GtkWidget *DevSel; /* satellites */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 23:58:45
|
Revision: 96 http://gpredict.svn.sourceforge.net/gpredict/?rev=96&view=rev Author: csete Date: 2008-09-06 23:58:53 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-09-06 23:21:32 UTC (rev 95) +++ trunk/ChangeLog 2008-09-06 23:58:53 UTC (rev 96) @@ -1,3 +1,28 @@ +2008-09-06; Alexandru Csete <oz...@gm...> + + * src/gtk-freq-knob.[ch]: + Finished implementation of frequency control knob. + + * src/gtk-sat-module.c: + Include radio controller into module cycle. + + * src/gtk-rig-ctrl.c: + Finished implementation. + + +2008-09-05; Alexandru Csete <oz...@gm...> + + * src/gtk.rig.ctrl.[ch]: + Added files implementing user interface for doppler tuning. + + * src/gtk-sat-module-popup.c: + * src/gtk-sat-module.h: + Use new doppler tuning UI widget. + + * src/gtk-rot-knob.c: + Don't show minus when value is 0. + + 2008-09-03; Alexandru Csete <oz...@gm...> * src/gtk-rot-knob.[ch]: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 23:21:21
|
Revision: 95 http://gpredict.svn.sourceforge.net/gpredict/?rev=95&view=rev Author: csete Date: 2008-09-06 23:21:32 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Don't keep TCP connection open between session. Set frequency in a separate function. Modified Paths: -------------- trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2008-09-06 21:48:12 UTC (rev 94) +++ trunk/src/gtk-rig-ctrl.c 2008-09-06 23:21:32 UTC (rev 95) @@ -44,7 +44,6 @@ #include "gpredict-utils.h" #include "sat-cfg.h" #include "gtk-freq-knob.h" -#include "gtk-rig-ctrl.h" #include "radio-conf.h" #ifdef HAVE_CONFIG_H # include <build-config.h> @@ -57,7 +56,9 @@ #include <arpa/inet.h> /* htons() */ #include <netdb.h> /* gethostbyname() */ /* END */ +#include "gtk-rig-ctrl.h" + #define AZEL_FMTSTR "%7.2f\302\260" @@ -79,8 +80,8 @@ static void rig_selected_cb (GtkComboBox *box, gpointer data); static void rig_locked_cb (GtkToggleButton *button, gpointer data); static gboolean rig_ctrl_timeout_cb (gpointer data); +static void set_freq (GtkRigCtrl *ctrl, gdouble freq); - static GtkVBoxClass *parent_class = NULL; static GdkColor ColBlack = { 0, 0, 0, 0}; @@ -147,7 +148,6 @@ ctrl->pass = NULL; ctrl->qth = NULL; ctrl->conf = NULL; - ctrl->sock = -10; ctrl->tracking = FALSE; ctrl->busy = FALSE; ctrl->engaged = FALSE; @@ -164,11 +164,6 @@ if (ctrl->timerid > 0) g_source_remove (ctrl->timerid); - /* close network socket */ - if (ctrl->sock >= 0) { - close (ctrl->sock); - } - /* free configuration */ if (ctrl->conf != NULL) { g_free (ctrl->conf->name); @@ -702,6 +697,7 @@ } + /** \brief Rig locked. * \param button Pointer to the "Engage" button. * \param data Pointer to the GtkRigCtrl widget. @@ -718,11 +714,6 @@ /* close socket */ gtk_widget_set_sensitive (ctrl->DevSel, TRUE); ctrl->engaged = FALSE; - - if (ctrl->sock >= 0) { - close (ctrl->sock); - ctrl->sock = -10; - } } else { if (ctrl->conf == NULL) { @@ -733,30 +724,8 @@ gtk_widget_set_sensitive (ctrl->DevSel, FALSE); ctrl->engaged = TRUE; - gint status; - struct sockaddr_in ServAddr; - struct hostent *h; - - ctrl->sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); - if (ctrl->sock < 0) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to create socket"), - __FUNCTION__); - return; - } - else { - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Network socket created successfully"), - __FUNCTION__); - } - - memset(&ServAddr, 0, sizeof(ServAddr)); /* Zero out structure */ - ServAddr.sin_family = AF_INET; /* Internet address family */ - h = gethostbyname(ctrl->conf->host); - memcpy((char *) &ServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length); - ServAddr.sin_port = htons(ctrl->conf->port); /* Server port */ - status = connect(ctrl->sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)); +/* status = connect(ctrl->sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)); if (status < 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to connect to %s:%d"), @@ -768,6 +737,7 @@ _("%s: Connection opened to %s:%d"), __FUNCTION__, ctrl->conf->host, ctrl->conf->port); } + */ } } @@ -807,24 +777,8 @@ } /* if device is engaged, send freq command to radio */ - if ((ctrl->engaged) && (ctrl->sock >= 0)) { - gchar *buff; - gint written,size; - - buff = g_strdup_printf ("F %10.0f\n", - gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->RigFreq))); - - /* number of bytes to write depends on platform (EOL) */ -#ifdef G_OS_WIN32 - size = 14; -#else - size = 13; -#endif - written = send(ctrl->sock, buff, size, 0); - if (written != size) { - g_print ("SIZE ERR: %d\n", written); - } - g_free (buff); + if ((ctrl->engaged) && (ctrl->conf != NULL)) { + set_freq (ctrl, gtk_freq_knob_get_value (GTK_FREQ_KNOB(ctrl->RigFreq))); } @@ -834,3 +788,73 @@ } +/** \brief Set frequency + * \param[in] ctrl Pointer to the GtkRigCtrl structure. + * \param[in] freq The new frequency. + * + * \note freq is not strictly necessary for normal use since we could have + * gotten the current frequency from the ctrl; however, the param + * might become useful in the future. + */ +static void set_freq (GtkRigCtrl *ctrl, gdouble freq) +{ + gchar *buff; + gint written,size; + gint status; + struct hostent *h; + struct sockaddr_in ServAddr; + gint sock; /*!< Network socket */ + + /* create socket */ + sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + if (sock < 0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to create socket"), + __FUNCTION__); + return; + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Network socket created successfully"), + __FUNCTION__); + } + + memset(&ServAddr, 0, sizeof(ServAddr)); /* Zero out structure */ + ServAddr.sin_family = AF_INET; /* Internet address family */ + h = gethostbyname(ctrl->conf->host); + memcpy((char *) &ServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length); + ServAddr.sin_port = htons(ctrl->conf->port); /* Server port */ + + /* establish connection */ + status = connect(sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)); + if (status < 0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to connect to %s:%d"), + __FUNCTION__, ctrl->conf->host, ctrl->conf->port); + return; + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Connection opened to %s:%d"), + __FUNCTION__, ctrl->conf->host, ctrl->conf->port); + } + + /* send command */ + buff = g_strdup_printf ("F %10.0f\n", freq); + + /* number of bytes to write depends on platform (EOL) */ +#ifdef G_OS_WIN32 + size = 14; +#else + size = 13; +#endif + written = send(sock, buff, size, 0); + if (written != size) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: SIZE ERROR %d / %d"), + __FUNCTION__, written, size); + } + g_free (buff); + close (sock); + +} Modified: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h 2008-09-06 21:48:12 UTC (rev 94) +++ trunk/src/gtk-rig-ctrl.h 2008-09-06 23:21:32 UTC (rev 95) @@ -75,7 +75,6 @@ GtkWidget *LO; /*!< Local oscillator */ radio_conf_t *conf; /*!< Radio configuration */ - gint sock; /*!< Network socket */ GSList *sats; /*!< List of sats in parent module */ sat_t *target; /*!< Target satellite */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 21:48:01
|
Revision: 94 http://gpredict.svn.sourceforge.net/gpredict/?rev=94&view=rev Author: csete Date: 2008-09-06 21:48:12 +0000 (Sat, 06 Sep 2008) Log Message: ----------- updated. Modified Paths: -------------- trunk/src/gtk-rig-ctrl.c Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2008-09-06 21:38:14 UTC (rev 93) +++ trunk/src/gtk-rig-ctrl.c 2008-09-06 21:48:12 UTC (rev 94) @@ -51,11 +51,11 @@ #endif /* NETWORK */ -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <netdb.h> +//#include <sys/types.h> +#include <sys/socket.h> /* socket(), connect(), send() */ +#include <netinet/in.h> /* struct sockaddr_in */ +#include <arpa/inet.h> /* htons() */ +#include <netdb.h> /* gethostbyname() */ /* END */ #define AZEL_FMTSTR "%7.2f\302\260" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 21:38:04
|
Revision: 93 http://gpredict.svn.sourceforge.net/gpredict/?rev=93&view=rev Author: csete Date: 2008-09-06 21:38:14 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Finished implementation of doppler tuning. Modified Paths: -------------- trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2008-09-06 18:42:03 UTC (rev 92) +++ trunk/src/gtk-rig-ctrl.c 2008-09-06 21:38:14 UTC (rev 93) @@ -41,14 +41,24 @@ #include "compat.h" #include "sat-log.h" #include "predict-tools.h" +#include "gpredict-utils.h" +#include "sat-cfg.h" #include "gtk-freq-knob.h" #include "gtk-rig-ctrl.h" +#include "radio-conf.h" #ifdef HAVE_CONFIG_H # include <build-config.h> #endif +/* NETWORK */ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <arpa/inet.h> +#include <netdb.h> +/* END */ -#define FMTSTR "%7.2f\302\260" +#define AZEL_FMTSTR "%7.2f\302\260" static void gtk_rig_ctrl_class_init (GtkRigCtrlClass *class); @@ -136,7 +146,8 @@ ctrl->target = NULL; ctrl->pass = NULL; ctrl->qth = NULL; - + ctrl->conf = NULL; + ctrl->sock = -10; ctrl->tracking = FALSE; ctrl->busy = FALSE; ctrl->engaged = FALSE; @@ -149,12 +160,23 @@ { GtkRigCtrl *ctrl = GTK_RIG_CTRL (object); - /* stop timer */ if (ctrl->timerid > 0) g_source_remove (ctrl->timerid); + /* close network socket */ + if (ctrl->sock >= 0) { + close (ctrl->sock); + } + /* free configuration */ + if (ctrl->conf != NULL) { + g_free (ctrl->conf->name); + g_free (ctrl->conf->host); + g_free (ctrl->conf); + ctrl->conf = NULL; + } + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -225,23 +247,57 @@ void gtk_rig_ctrl_update (GtkRigCtrl *ctrl, gdouble t) { + gdouble satfreq, doppler; gchar *buff; if (ctrl->target) { + /* update Az/El */ + buff = g_strdup_printf (AZEL_FMTSTR, ctrl->target->az); + gtk_label_set_text (GTK_LABEL (ctrl->SatAz), buff); + g_free (buff); + buff = g_strdup_printf (AZEL_FMTSTR, ctrl->target->el); + gtk_label_set_text (GTK_LABEL (ctrl->SatEl), buff); + g_free (buff); + + /* update range */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { + buff = g_strdup_printf ("%.0f mi", KM_TO_MI (ctrl->target->range)); + } + else { + buff = g_strdup_printf ("%.0f km", ctrl->target->range); + } + gtk_label_set_text (GTK_LABEL (ctrl->SatRng), buff); + g_free (buff); + + /* update range rate */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { + buff = g_strdup_printf ("%.3f mi/s", KM_TO_MI (ctrl->target->range_rate)); + } + else { + buff = g_strdup_printf ("%.3f km/s", ctrl->target->range_rate); + } + gtk_label_set_text (GTK_LABEL (ctrl->SatRngRate), buff); + g_free (buff); + + /* doppler shift */ + satfreq = gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->SatFreq)); + doppler = -satfreq * (ctrl->target->range_rate / 299792.4580); // Hz + buff = g_strdup_printf ("%.0f Hz", doppler); + gtk_label_set_text (GTK_LABEL (ctrl->SatDop), buff); + g_free (buff); + /* update next pass if necessary */ if (ctrl->pass != NULL) { if (ctrl->target->aos > ctrl->pass->aos) { /* update pass */ free_pass (ctrl->pass); ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); - /* TODO: update polar plot */ } } else { /* we don't have any current pass; store the current one */ ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); - /* TODO: update polar plot */ } } } @@ -258,15 +314,17 @@ GtkWidget *create_sat_widgets (GtkRigCtrl *ctrl) { GtkWidget *frame; + GtkWidget *label; + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), _("<b>Satellite</b>")); + frame = gtk_frame_new (NULL); + gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5); + gtk_frame_set_label_widget (GTK_FRAME (frame), label); - frame = gtk_frame_new (_("Satellite")); - - - ctrl->SatFreq = gtk_freq_knob_new (145890000.0); + ctrl->SatFreq = gtk_freq_knob_new (145890000.0, TRUE); gtk_container_add (GTK_CONTAINER (frame), ctrl->SatFreq); - return frame; } @@ -281,18 +339,16 @@ GtkWidget *create_rig_widgets (GtkRigCtrl *ctrl) { GtkWidget *frame; - GtkWidget *table; GtkWidget *label; - - frame = gtk_frame_new (_("Radio")); - - table = gtk_table_new (2, 2, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (table), 5); - gtk_table_set_col_spacings (GTK_TABLE (table), 5); - gtk_table_set_row_spacings (GTK_TABLE (table), 5); - gtk_container_add (GTK_CONTAINER (frame), table); + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), _("<b>Radio</b>")); + frame = gtk_frame_new (NULL); + gtk_frame_set_label_align (GTK_FRAME (frame), 0.5, 0.5); + gtk_frame_set_label_widget (GTK_FRAME (frame), label); + ctrl->RigFreq = gtk_freq_knob_new (145890000.0, FALSE); + gtk_container_add (GTK_CONTAINER (frame), ctrl->RigFreq); return frame; } @@ -309,9 +365,9 @@ sat_t *sat = NULL; - buff = g_strdup_printf (FMTSTR, 0.0); + buff = g_strdup_printf (AZEL_FMTSTR, 0.0); - table = gtk_table_new (4, 3, FALSE); + table = gtk_table_new (4, 4, FALSE); gtk_container_set_border_width (GTK_CONTAINER (table), 5); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_table_set_row_spacings (GTK_TABLE (table), 5); @@ -328,33 +384,64 @@ gtk_combo_box_set_active (GTK_COMBO_BOX (satsel), 0); gtk_widget_set_tooltip_text (satsel, _("Select target object")); g_signal_connect (satsel, "changed", G_CALLBACK (sat_selected_cb), ctrl); - gtk_table_attach_defaults (GTK_TABLE (table), satsel, 0, 2, 0, 1); + gtk_table_attach_defaults (GTK_TABLE (table), satsel, 0, 3, 0, 1); /* tracking button */ track = gtk_toggle_button_new_with_label (_("Track")); gtk_widget_set_tooltip_text (track, _("Track the satellite when it is within range")); - gtk_table_attach_defaults (GTK_TABLE (table), track, 2, 3, 0, 1); + gtk_table_attach_defaults (GTK_TABLE (table), track, 3, 4, 0, 1); g_signal_connect (track, "toggled", G_CALLBACK (track_toggle_cb), ctrl); /* Azimuth */ label = gtk_label_new (_("Az:")); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + ctrl->SatAz = gtk_label_new (buff); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatAz), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatAz, 1, 2, 1, 2); - /* Elevation */ label = gtk_label_new (_("El:")); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3); + ctrl->SatEl = gtk_label_new (buff); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatEl), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatEl, 1, 2, 2, 3); - /* count down */ label = gtk_label_new (_("Time:")); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4); + ctrl->SatCnt = gtk_label_new ("00:00:00"); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatCnt), 0.5, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatCnt, 1, 2, 3, 4); + /* Range */ + label = gtk_label_new (_(" Range:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 1, 2); + ctrl->SatRng = gtk_label_new ("0 km"); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatRng), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatRng, 3, 4, 1, 2); + + /* Range rate */ + label = gtk_label_new (_(" Rate:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 2, 3); + ctrl->SatRngRate = gtk_label_new ("0.0 km/s"); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatRngRate), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatRngRate, 3, 4, 2, 3); + + /* Doppler shift */ + label = gtk_label_new (_(" Doppler:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 3, 4); + ctrl->SatDop = gtk_label_new ("0 Hz"); + gtk_misc_set_alignment (GTK_MISC (ctrl->SatDop), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->SatDop, 3, 4, 3, 4); + frame = gtk_frame_new (_("Target")); -; + gtk_container_add (GTK_CONTAINER (frame), table); g_free (buff); @@ -366,7 +453,7 @@ static GtkWidget * create_conf_widgets (GtkRigCtrl *ctrl) { - GtkWidget *frame,*table,*label,*timer,*toler; + GtkWidget *frame,*table,*label,*timer; GtkWidget *lock; GDir *dir = NULL; /* directory handle */ GError *error = NULL; /* error flag and info */ @@ -422,6 +509,7 @@ gtk_combo_box_set_active (GTK_COMBO_BOX (ctrl->DevSel), 0); g_signal_connect (ctrl->DevSel, "changed", G_CALLBACK (rig_selected_cb), ctrl); gtk_table_attach_defaults (GTK_TABLE (table), ctrl->DevSel, 1, 2, 0, 1); + /* config will be force-loaded after LO spin is created */ /* Engage button */ lock = gtk_toggle_button_new_with_label (_("Engage")); @@ -429,10 +517,29 @@ g_signal_connect (lock, "toggled", G_CALLBACK (rig_locked_cb), ctrl); gtk_table_attach_defaults (GTK_TABLE (table), lock, 2, 3, 0, 1); + /* Local oscillator value */ + label = gtk_label_new (_("Local Osc:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + + ctrl->LO = gtk_spin_button_new_with_range (-10000, 10000, 1); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (ctrl->LO), 0); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON (ctrl->LO), 0); + gtk_widget_set_tooltip_text (ctrl->LO, + _("Enter the frequency of the local oscillator, if any.")); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->LO, 1, 2, 1, 2); + + label = gtk_label_new (_("MHz")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 1, 2); + + /* Now, load config*/ + rig_selected_cb (GTK_COMBO_BOX (ctrl->DevSel), ctrl); + /* Timeout */ label = gtk_label_new (_("Cycle:")); gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3); timer = gtk_spin_button_new_with_range (100, 5000, 10); gtk_spin_button_set_digits (GTK_SPIN_BUTTON (timer), 0); @@ -441,12 +548,12 @@ "commands sent to the rigator.")); gtk_spin_button_set_value (GTK_SPIN_BUTTON (timer), ctrl->delay); g_signal_connect (timer, "value-changed", G_CALLBACK (delay_changed_cb), ctrl); - gtk_table_attach (GTK_TABLE (table), timer, 1, 2, 1, 2, + gtk_table_attach (GTK_TABLE (table), timer, 1, 2, 2, 3, GTK_FILL, GTK_FILL, 0, 0); label = gtk_label_new (_("msec")); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 1, 2); + gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 2, 3); frame = gtk_frame_new (_("Settings")); @@ -555,9 +662,43 @@ { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); - /* TODO: update device */ + /* free previous configuration */ + if (ctrl->conf != NULL) { + g_free (ctrl->conf->name); + g_free (ctrl->conf->host); + g_free (ctrl->conf); + } + + ctrl->conf = g_try_new (radio_conf_t, 1); + if (ctrl->conf == NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to allocate memory for radio config"), + __FILE__, __LINE__); + return; + } + + /* load new configuration */ + ctrl->conf->name = gtk_combo_box_get_active_text (box); + if (radio_conf_read (ctrl->conf)) { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("Loaded new radio configuration %s"), + ctrl->conf->name); + /* update LO widget */ + gtk_spin_button_set_value (GTK_SPIN_BUTTON (ctrl->LO), ctrl->conf->lo/1.0e6); + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to load radio configuration %s"), + __FILE__, __LINE__, ctrl->conf->name); + g_free (ctrl->conf->name); + if (ctrl->conf->host) + g_free (ctrl->conf->host); + g_free (ctrl->conf); + ctrl->conf = NULL; + } + } @@ -571,14 +712,62 @@ rig_locked_cb (GtkToggleButton *button, gpointer data) { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + - if (gtk_toggle_button_get_active (button)) { - gtk_widget_set_sensitive (ctrl->DevSel, FALSE); + if (!gtk_toggle_button_get_active (button)) { + /* close socket */ + gtk_widget_set_sensitive (ctrl->DevSel, TRUE); ctrl->engaged = FALSE; + + if (ctrl->sock >= 0) { + close (ctrl->sock); + ctrl->sock = -10; + } } else { - gtk_widget_set_sensitive (ctrl->DevSel, TRUE); + if (ctrl->conf == NULL) { + /* we don't have a working configuration */ + return; + } + + gtk_widget_set_sensitive (ctrl->DevSel, FALSE); ctrl->engaged = TRUE; + + gint status; + struct sockaddr_in ServAddr; + struct hostent *h; + + ctrl->sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); + if (ctrl->sock < 0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to create socket"), + __FUNCTION__); + return; + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Network socket created successfully"), + __FUNCTION__); + } + + memset(&ServAddr, 0, sizeof(ServAddr)); /* Zero out structure */ + ServAddr.sin_family = AF_INET; /* Internet address family */ + h = gethostbyname(ctrl->conf->host); + memcpy((char *) &ServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length); + ServAddr.sin_port = htons(ctrl->conf->port); /* Server port */ + + status = connect(ctrl->sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr)); + if (status < 0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to connect to %s:%d"), + __FUNCTION__, ctrl->conf->host, ctrl->conf->port); + return; + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Connection opened to %s:%d"), + __FUNCTION__, ctrl->conf->host, ctrl->conf->port); + } } } @@ -591,7 +780,9 @@ rig_ctrl_timeout_cb (gpointer data) { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + gdouble satfreq,doppler,lof; + if (ctrl->busy) { sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); return TRUE; @@ -599,27 +790,41 @@ ctrl->busy = TRUE; - /* If we are tracking and the target satellite is within - range, set the rig controller knob value to the target - frequency value. If the target satellite is out of range - set the rig controller to the frequency which we expect - when the target sat comes up. - In either case, update the range, delay, loss, rate, and - doppler values. + /* If we are tracking, calculate the radio freq by applying both dopper shift + and tranverter LO frequency. + If we are not tracking, apply only LO frequency. */ if (ctrl->tracking) { - if (ctrl->target->el < 0.0) { - gdouble aosshift = 0.0; - - } - else { - } - - + satfreq = gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->SatFreq)); + doppler = -satfreq * (ctrl->target->range_rate / 299792.4580); + lof = 1.0e6*gtk_spin_button_get_value (GTK_SPIN_BUTTON (ctrl->LO)); + gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreq), satfreq+doppler+lof); } + else { + satfreq = gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->SatFreq)); + lof = 1.0e6*gtk_spin_button_get_value (GTK_SPIN_BUTTON (ctrl->LO)); + gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreq), satfreq+lof); + } - if (ctrl->engaged) { - /* TODO: send controller values to radio device */ + /* if device is engaged, send freq command to radio */ + if ((ctrl->engaged) && (ctrl->sock >= 0)) { + gchar *buff; + gint written,size; + + buff = g_strdup_printf ("F %10.0f\n", + gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->RigFreq))); + + /* number of bytes to write depends on platform (EOL) */ +#ifdef G_OS_WIN32 + size = 14; +#else + size = 13; +#endif + written = send(ctrl->sock, buff, size, 0); + if (written != size) { + g_print ("SIZE ERR: %d\n", written); + } + g_free (buff); } Modified: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h 2008-09-06 18:42:03 UTC (rev 92) +++ trunk/src/gtk-rig-ctrl.h 2008-09-06 21:38:14 UTC (rev 93) @@ -33,6 +33,7 @@ #include <gtk/gtk.h> #include "sgpsdp/sgp4sdp4.h" #include "gtk-sat-module.h" +#include "radio-conf.h" #ifdef __cplusplus extern "C" { @@ -63,11 +64,18 @@ GtkVBox vbox; GtkWidget *SatFreq; + GtkWidget *RigFreq; + + /* target status labels*/ + GtkWidget *SatAz,*SatEl,*SatCnt; + GtkWidget *SatRng,*SatRngRate,*SatDop; /* other widgets */ GtkWidget *DevSel; /*!< Device selector */ GtkWidget *LO; /*!< Local oscillator */ + radio_conf_t *conf; /*!< Radio configuration */ + gint sock; /*!< Network socket */ GSList *sats; /*!< List of sats in parent module */ sat_t *target; /*!< Target satellite */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 18:41:52
|
Revision: 92 http://gpredict.svn.sourceforge.net/gpredict/?rev=92&view=rev Author: csete Date: 2008-09-06 18:42:03 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Fixed incorrect engaged logic. Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2008-09-06 14:34:18 UTC (rev 91) +++ trunk/src/gtk-rot-ctrl.c 2008-09-06 18:42:03 UTC (rev 92) @@ -660,11 +660,11 @@ if (gtk_toggle_button_get_active (button)) { gtk_widget_set_sensitive (ctrl->DevSel, FALSE); - ctrl->engaged = FALSE; + ctrl->engaged = TRUE; } else { gtk_widget_set_sensitive (ctrl->DevSel, TRUE); - ctrl->engaged = TRUE; + ctrl->engaged = FALSE; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 14:34:07
|
Revision: 91 http://gpredict.svn.sourceforge.net/gpredict/?rev=91&view=rev Author: csete Date: 2008-09-06 14:34:18 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Be slightly less ambitious with frequency converage. Modified Paths: -------------- trunk/src/sat-pref-rig-editor.c Modified: trunk/src/sat-pref-rig-editor.c =================================================================== --- trunk/src/sat-pref-rig-editor.c 2008-09-06 13:31:47 UTC (rev 90) +++ trunk/src/sat-pref-rig-editor.c 2008-09-06 14:34:18 UTC (rev 91) @@ -191,7 +191,7 @@ gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4); - lo = gtk_spin_button_new_with_range (-40000, 40000, 1); + lo = gtk_spin_button_new_with_range (-10000, 10000, 1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (lo), 0); gtk_spin_button_set_digits (GTK_SPIN_BUTTON (lo), 0); gtk_widget_set_tooltip_text (lo, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 13:31:36
|
Revision: 90 http://gpredict.svn.sourceforge.net/gpredict/?rev=90&view=rev Author: csete Date: 2008-09-06 13:31:47 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Added degree sign. Modified Paths: -------------- trunk/src/gtk-rot-knob.c Modified: trunk/src/gtk-rot-knob.c =================================================================== --- trunk/src/gtk-rot-knob.c 2008-09-06 13:18:31 UTC (rev 89) +++ trunk/src/gtk-rot-knob.c 2008-09-06 13:31:47 UTC (rev 90) @@ -137,6 +137,7 @@ { GtkWidget *widget; GtkWidget *table; + GtkWidget *label; guint i; widget = g_object_new (GTK_TYPE_ROT_KNOB, NULL); @@ -146,7 +147,7 @@ GTK_ROT_KNOB(widget)->value = val; /* create table */ - table = gtk_table_new (3, 7, FALSE); + table = gtk_table_new (3, 8, FALSE); /* create buttons */ /* +100 deg */ @@ -286,8 +287,13 @@ i, i+1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); } + /* degree sign */ + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), "<span size='xx-large'>\302\260</span>"); + gtk_table_attach (GTK_TABLE (table), label, 7, 8, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); + gtk_rot_knob_update (GTK_ROT_KNOB(widget)); - gtk_container_add (GTK_CONTAINER (widget), table); gtk_widget_show_all (widget); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 13:18:22
|
Revision: 89 http://gpredict.svn.sourceforge.net/gpredict/?rev=89&view=rev Author: csete Date: 2008-09-06 13:18:31 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Include radio controller into module controller cycle. Modified Paths: -------------- trunk/src/gtk-sat-module.c Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2008-09-06 12:22:17 UTC (rev 88) +++ trunk/src/gtk-sat-module.c 2008-09-06 13:18:31 UTC (rev 89) @@ -64,6 +64,7 @@ #include "gtk-polar-view.h" #include "gtk-single-sat.h" #include "gtk-met.h" +#include "gtk-rig-ctrl.h" #include "gtk-rot-ctrl.h" //#ifdef G_OS_WIN32 @@ -869,6 +870,8 @@ update_child (mod->child_3, mod->tmgCdnum); /* send notice to radio and rotator controller */ + if (mod->rigctrl) + gtk_rig_ctrl_update (GTK_RIG_CTRL (mod->rigctrl), mod->tmgCdnum); if (mod->rotctrl) gtk_rot_ctrl_update (GTK_ROT_CTRL (mod->rotctrl), mod->tmgCdnum); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 12:22:07
|
Revision: 88 http://gpredict.svn.sourceforge.net/gpredict/?rev=88&view=rev Author: csete Date: 2008-09-06 12:22:17 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Added option to hide buttons. Changed label packing to fill and expand into all y-space. Modified Paths: -------------- trunk/src/gtk-freq-knob.c trunk/src/gtk-freq-knob.h Modified: trunk/src/gtk-freq-knob.c =================================================================== --- trunk/src/gtk-freq-knob.c 2008-09-06 12:02:22 UTC (rev 87) +++ trunk/src/gtk-freq-knob.c 2008-09-06 12:22:17 UTC (rev 88) @@ -137,11 +137,12 @@ /** \brief Create a new Frequency control widget. * \param[in] val The initial value of the control. + * \param[in] buttons Flag indicating whether buttons should be shown * \return A new frequency control widget. * */ GtkWidget * -gtk_freq_knob_new (gdouble val) +gtk_freq_knob_new (gdouble val, gboolean buttons) { GtkWidget *widget; GtkWidget *table; @@ -161,39 +162,40 @@ /* labels */ GTK_FREQ_KNOB(widget)->digits[i] = gtk_label_new (NULL); gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->digits[i], - idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); + idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_FILL | GTK_EXPAND, 0, 0); - /* UP buttons */ - GTK_FREQ_KNOB(widget)->buttons[i] = gtk_button_new (); - - label = gtk_label_new ("\342\226\264"); - gtk_container_add (GTK_CONTAINER(GTK_FREQ_KNOB(widget)->buttons[i]), - label); - gtk_button_set_relief (GTK_BUTTON(GTK_FREQ_KNOB(widget)->buttons[i]), - GTK_RELIEF_NONE); - delta = (gint) pow(10,9-i); - g_object_set_data (G_OBJECT (GTK_FREQ_KNOB(widget)->buttons[i]), - "delta", GINT_TO_POINTER(delta)); - gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->buttons[i], - idx[i], idx[i]+1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); - g_signal_connect (GTK_FREQ_KNOB(widget)->buttons[i], "clicked", - G_CALLBACK (button_clicked_cb), widget); - - /* DOWN buttons */ - GTK_FREQ_KNOB(widget)->buttons[i+10] = gtk_button_new (); - - label = gtk_label_new ("\342\226\276"); - gtk_container_add (GTK_CONTAINER(GTK_FREQ_KNOB(widget)->buttons[i+10]), - label); - gtk_button_set_relief (GTK_BUTTON(GTK_FREQ_KNOB(widget)->buttons[i+10]), - GTK_RELIEF_NONE); - g_object_set_data (G_OBJECT (GTK_FREQ_KNOB(widget)->buttons[i+10]), - "delta", GINT_TO_POINTER(-delta)); - gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->buttons[i+10], - idx[i], idx[i]+1, 2, 3, GTK_SHRINK, GTK_SHRINK, 0, 0); - g_signal_connect (GTK_FREQ_KNOB(widget)->buttons[i+10], "clicked", - G_CALLBACK (button_clicked_cb), widget); - + if (buttons) { + /* UP buttons */ + GTK_FREQ_KNOB(widget)->buttons[i] = gtk_button_new (); + + label = gtk_label_new ("\342\226\264"); + gtk_container_add (GTK_CONTAINER(GTK_FREQ_KNOB(widget)->buttons[i]), + label); + gtk_button_set_relief (GTK_BUTTON(GTK_FREQ_KNOB(widget)->buttons[i]), + GTK_RELIEF_NONE); + delta = (gint) pow(10,9-i); + g_object_set_data (G_OBJECT (GTK_FREQ_KNOB(widget)->buttons[i]), + "delta", GINT_TO_POINTER(delta)); + gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->buttons[i], + idx[i], idx[i]+1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); + g_signal_connect (GTK_FREQ_KNOB(widget)->buttons[i], "clicked", + G_CALLBACK (button_clicked_cb), widget); + + /* DOWN buttons */ + GTK_FREQ_KNOB(widget)->buttons[i+10] = gtk_button_new (); + + label = gtk_label_new ("\342\226\276"); + gtk_container_add (GTK_CONTAINER(GTK_FREQ_KNOB(widget)->buttons[i+10]), + label); + gtk_button_set_relief (GTK_BUTTON(GTK_FREQ_KNOB(widget)->buttons[i+10]), + GTK_RELIEF_NONE); + g_object_set_data (G_OBJECT (GTK_FREQ_KNOB(widget)->buttons[i+10]), + "delta", GINT_TO_POINTER(-delta)); + gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->buttons[i+10], + idx[i], idx[i]+1, 2, 3, GTK_SHRINK, GTK_SHRINK, 0, 0); + g_signal_connect (GTK_FREQ_KNOB(widget)->buttons[i+10], "clicked", + G_CALLBACK (button_clicked_cb), widget); + } } /* Add misc labels */ Modified: trunk/src/gtk-freq-knob.h =================================================================== --- trunk/src/gtk-freq-knob.h 2008-09-06 12:02:22 UTC (rev 87) +++ trunk/src/gtk-freq-knob.h 2008-09-06 12:22:17 UTC (rev 88) @@ -77,7 +77,7 @@ GtkType gtk_freq_knob_get_type (void); -GtkWidget* gtk_freq_knob_new (gdouble val); +GtkWidget* gtk_freq_knob_new (gdouble val, gboolean buttons); void gtk_freq_knob_set_value (GtkFreqKnob *knob, gdouble val); gdouble gtk_freq_knob_get_value (GtkFreqKnob *knob); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-06 12:02:13
|
Revision: 87 http://gpredict.svn.sourceforge.net/gpredict/?rev=87&view=rev Author: csete Date: 2008-09-06 12:02:22 +0000 (Sat, 06 Sep 2008) Log Message: ----------- Finished implementation of freq controller. Modified Paths: -------------- trunk/src/gtk-freq-knob.c trunk/src/gtk-freq-knob.h trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h trunk/src/gtk-rot-knob.c Modified: trunk/src/gtk-freq-knob.c =================================================================== --- trunk/src/gtk-freq-knob.c 2008-09-05 21:57:21 UTC (rev 86) +++ trunk/src/gtk-freq-knob.c 2008-09-06 12:02:22 UTC (rev 87) @@ -29,11 +29,14 @@ * * More info... * + * 1 222.333 444 MHz + * * \bug This should be a generic widget, not just frequency specific * */ #include <gtk/gtk.h> #include <glib/gi18n.h> +#include <math.h> #include "gtk-freq-knob.h" #ifdef HAVE_CONFIG_H # include <build-config.h> @@ -44,13 +47,28 @@ static void gtk_freq_knob_class_init (GtkFreqKnobClass *class); static void gtk_freq_knob_init (GtkFreqKnob *list); static void gtk_freq_knob_destroy (GtkObject *object); - static void gtk_freq_knob_update (GtkFreqKnob *knob); +static void button_clicked_cb (GtkWidget *button, gpointer data); - static GtkHBoxClass *parent_class = NULL; +#define FMTSTR "<span size='xx-large'>%c</span>" +/* x-index in table for buttons and labels */ +static const guint idx[] = { + 0, + 2, + 3, + 4, + 6, + 7, + 8, + 10, + 11, + 12 +}; + + GType gtk_freq_knob_get_type () { @@ -104,7 +122,8 @@ static void gtk_freq_knob_init (GtkFreqKnob *knob) { - + knob->min = 0.0; + knob->max = 9999999999.0; } @@ -126,14 +145,72 @@ { GtkWidget *widget; GtkWidget *table; + GtkWidget *label; + guint i; + gint delta; widget = g_object_new (GTK_TYPE_FREQ_KNOB, NULL); GTK_FREQ_KNOB(widget)->value = val; + + table = gtk_table_new (3, 14, FALSE); + + /* create buttons and labels */ + for (i = 0; i < 10; i++) { + /* labels */ + GTK_FREQ_KNOB(widget)->digits[i] = gtk_label_new (NULL); + gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->digits[i], + idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); + + /* UP buttons */ + GTK_FREQ_KNOB(widget)->buttons[i] = gtk_button_new (); + + label = gtk_label_new ("\342\226\264"); + gtk_container_add (GTK_CONTAINER(GTK_FREQ_KNOB(widget)->buttons[i]), + label); + gtk_button_set_relief (GTK_BUTTON(GTK_FREQ_KNOB(widget)->buttons[i]), + GTK_RELIEF_NONE); + delta = (gint) pow(10,9-i); + g_object_set_data (G_OBJECT (GTK_FREQ_KNOB(widget)->buttons[i]), + "delta", GINT_TO_POINTER(delta)); + gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->buttons[i], + idx[i], idx[i]+1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); + g_signal_connect (GTK_FREQ_KNOB(widget)->buttons[i], "clicked", + G_CALLBACK (button_clicked_cb), widget); + + /* DOWN buttons */ + GTK_FREQ_KNOB(widget)->buttons[i+10] = gtk_button_new (); + + label = gtk_label_new ("\342\226\276"); + gtk_container_add (GTK_CONTAINER(GTK_FREQ_KNOB(widget)->buttons[i+10]), + label); + gtk_button_set_relief (GTK_BUTTON(GTK_FREQ_KNOB(widget)->buttons[i+10]), + GTK_RELIEF_NONE); + g_object_set_data (G_OBJECT (GTK_FREQ_KNOB(widget)->buttons[i+10]), + "delta", GINT_TO_POINTER(-delta)); + gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->buttons[i+10], + idx[i], idx[i]+1, 2, 3, GTK_SHRINK, GTK_SHRINK, 0, 0); + g_signal_connect (GTK_FREQ_KNOB(widget)->buttons[i+10], "clicked", + G_CALLBACK (button_clicked_cb), widget); + + } + + /* Add misc labels */ + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), "<span size='xx-large'>.</span>"); + gtk_table_attach (GTK_TABLE (table), label, 5, 6, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), "<span size='xx-large'> MHz</span>"); + gtk_table_attach (GTK_TABLE (table), label, 13, 14, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); + + gtk_freq_knob_update (GTK_FREQ_KNOB(widget)); - gtk_widget_show_all (widget); + gtk_container_add (GTK_CONTAINER (widget), table); + gtk_widget_show_all (widget); return widget; } @@ -147,11 +224,13 @@ void gtk_freq_knob_set_value (GtkFreqKnob *knob, gdouble val) { - /* set the new value */ - knob->value = val; + if ((val >= knob->min) && (val <= knob->max)) { + /* set the new value */ + knob->value = val; - /* update the display */ - gtk_freq_knob_update (knob); + /* update the display */ + gtk_freq_knob_update (knob); + } } @@ -177,5 +256,41 @@ static void gtk_freq_knob_update (GtkFreqKnob *knob) { + gchar b[11]; + gchar *buff; + guint i; + g_ascii_formatd (b, 11, "%10.0f", fabs(knob->value)); + + /* set label markups */ + for (i = 0; i < 10; i++) { + buff = g_strdup_printf (FMTSTR, b[i]); + gtk_label_set_markup (GTK_LABEL(knob->digits[i]), buff); + g_free (buff); + } + } + + +/** \brief Button clicked event. + * \param button The button that was clicked. + * \param data Pointer to the GtkFreqKnob widget. + * + */ +static void +button_clicked_cb (GtkWidget *button, gpointer data) +{ + GtkFreqKnob *knob = GTK_FREQ_KNOB (data); + gdouble delta = GPOINTER_TO_INT(g_object_get_data (G_OBJECT (button), "delta")); + + if ((delta > 0.0) && ((knob->value + delta) <= knob->max)) { + knob->value += delta; + } + else if ((delta < 0.0) && ((knob->value + delta) >= knob->min)) { + knob->value += delta; + } + + gtk_freq_knob_update (knob); + +} + Modified: trunk/src/gtk-freq-knob.h =================================================================== --- trunk/src/gtk-freq-knob.h 2008-09-05 21:57:21 UTC (rev 86) +++ trunk/src/gtk-freq-knob.h 2008-09-06 12:02:22 UTC (rev 87) @@ -60,7 +60,12 @@ struct _gtk_freq_knob { GtkVBox vbox; + + GtkWidget *digits[10]; /*!< Labels for the digits */ + GtkWidget *buttons[20]; /*!< Buttons; 0..9 up; 10..19 down */ + gdouble min; + gdouble max; gdouble value; }; Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2008-09-05 21:57:21 UTC (rev 86) +++ trunk/src/gtk-rig-ctrl.c 2008-09-06 12:02:22 UTC (rev 87) @@ -56,11 +56,10 @@ static void gtk_rig_ctrl_destroy (GtkObject *object); -static GtkWidget *create_az_widgets (GtkRigCtrl *ctrl); -static GtkWidget *create_el_widgets (GtkRigCtrl *ctrl); +static GtkWidget *create_sat_widgets (GtkRigCtrl *ctrl); +static GtkWidget *create_rig_widgets (GtkRigCtrl *ctrl); static GtkWidget *create_target_widgets (GtkRigCtrl *ctrl); static GtkWidget *create_conf_widgets (GtkRigCtrl *ctrl); -static GtkWidget *create_plot_widget (GtkRigCtrl *ctrl); static void store_sats (gpointer key, gpointer value, gpointer user_data); @@ -193,20 +192,18 @@ gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColGreen); /* create contents */ - table = gtk_table_new (3, 2, TRUE); + table = gtk_table_new (2, 2, FALSE); gtk_table_set_row_spacings (GTK_TABLE (table), 5); gtk_table_set_col_spacings (GTK_TABLE (table), 5); gtk_container_set_border_width (GTK_CONTAINER (table), 10); - gtk_table_attach (GTK_TABLE (table), create_az_widgets (GTK_RIG_CTRL (widget)), + gtk_table_attach (GTK_TABLE (table), create_sat_widgets (GTK_RIG_CTRL (widget)), 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); - gtk_table_attach (GTK_TABLE (table), create_el_widgets (GTK_RIG_CTRL (widget)), + gtk_table_attach (GTK_TABLE (table), create_rig_widgets (GTK_RIG_CTRL (widget)), 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); gtk_table_attach (GTK_TABLE (table), create_target_widgets (GTK_RIG_CTRL (widget)), 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_table_attach (GTK_TABLE (table), create_conf_widgets (GTK_RIG_CTRL (widget)), - 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); - gtk_table_attach (GTK_TABLE (table), create_plot_widget (GTK_RIG_CTRL (widget)), - 1, 2, 1, 3, GTK_FILL, GTK_FILL, 0, 0); + 1, 2, 1, 2, GTK_FILL, GTK_FILL, 0, 0); gtk_container_add (GTK_CONTAINER (widget), table); @@ -250,52 +247,45 @@ } -/** \brief Create azimuth control widgets. +/** \brief Create Satellite freq control widgets. * \param ctrl Pointer to the GtkRigCtrl widget. * * This function creates and initialises the widgets for controlling the - * azimuth of the the rigator. + * satellite frequency. * - * TODO: RENAME! */ static -GtkWidget *create_az_widgets (GtkRigCtrl *ctrl) +GtkWidget *create_sat_widgets (GtkRigCtrl *ctrl) { GtkWidget *frame; - GtkWidget *table; - GtkWidget *label; - frame = gtk_frame_new (_("Azimuth")); + frame = gtk_frame_new (_("Satellite")); - table = gtk_table_new (2, 2, FALSE); - gtk_container_set_border_width (GTK_CONTAINER (table), 5); - gtk_table_set_col_spacings (GTK_TABLE (table), 5); - gtk_table_set_row_spacings (GTK_TABLE (table), 5); - gtk_container_add (GTK_CONTAINER (frame), table); + ctrl->SatFreq = gtk_freq_knob_new (145890000.0); + gtk_container_add (GTK_CONTAINER (frame), ctrl->SatFreq); + return frame; } -/** \brief Create elevation control widgets. +/** \brief Create radio freq display widgets. * \param ctrl Pointer to the GtkRigCtrl widget. * - * This function creates and initialises the widgets for controlling the - * elevation of the the rigator. - * - * TODO: RENAME + * This function creates and initialises the widgets for displaying the + * frequency of the radio. */ static -GtkWidget *create_el_widgets (GtkRigCtrl *ctrl) +GtkWidget *create_rig_widgets (GtkRigCtrl *ctrl) { GtkWidget *frame; GtkWidget *table; GtkWidget *label; - frame = gtk_frame_new (_("Elevation")); + frame = gtk_frame_new (_("Radio")); table = gtk_table_new (2, 2, FALSE); gtk_container_set_border_width (GTK_CONTAINER (table), 5); @@ -466,20 +456,6 @@ } -/** \brief Create target widgets. - * \param ctrl Pointer to the GtkRigCtrl widget. - * - * FIXME: REMOVE - */ -static -GtkWidget *create_plot_widget (GtkRigCtrl *ctrl) -{ - GtkWidget *frame; - - frame = gtk_frame_new (NULL); - - return frame; -} /** \brief Copy satellite from hash table to singly linked list. Modified: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h 2008-09-05 21:57:21 UTC (rev 86) +++ trunk/src/gtk-rig-ctrl.h 2008-09-06 12:02:22 UTC (rev 87) @@ -62,10 +62,13 @@ { GtkVBox vbox; + GtkWidget *SatFreq; /* other widgets */ - GtkWidget *DevSel; + GtkWidget *DevSel; /*!< Device selector */ + GtkWidget *LO; /*!< Local oscillator */ + GSList *sats; /*!< List of sats in parent module */ sat_t *target; /*!< Target satellite */ pass_t *pass; /*!< Next pass of target satellite */ Modified: trunk/src/gtk-rot-knob.c =================================================================== --- trunk/src/gtk-rot-knob.c 2008-09-05 21:57:21 UTC (rev 86) +++ trunk/src/gtk-rot-knob.c 2008-09-06 12:02:22 UTC (rev 87) @@ -57,6 +57,9 @@ static GtkHBoxClass *parent_class = NULL; + + + GType gtk_rot_knob_get_type () { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-05 21:57:11
|
Revision: 86 http://gpredict.svn.sourceforge.net/gpredict/?rev=86&view=rev Author: csete Date: 2008-09-05 21:57:21 +0000 (Fri, 05 Sep 2008) Log Message: ----------- Don't show minus when value is 0. Modified Paths: -------------- trunk/src/gtk-rot-knob.c Modified: trunk/src/gtk-rot-knob.c =================================================================== --- trunk/src/gtk-rot-knob.c 2008-09-05 19:00:01 UTC (rev 85) +++ trunk/src/gtk-rot-knob.c 2008-09-05 21:57:21 UTC (rev 86) @@ -409,7 +409,7 @@ g_free (buff); } - if (knob->value <= 0) + if (knob->value < 0) buff = g_strdup_printf (FMTSTR, '-'); else buff = g_strdup_printf (FMTSTR, ' '); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-05 18:59:52
|
Revision: 85 http://gpredict.svn.sourceforge.net/gpredict/?rev=85&view=rev Author: csete Date: 2008-09-05 19:00:01 +0000 (Fri, 05 Sep 2008) Log Message: ----------- Use new radio controller widget. Modified Paths: -------------- trunk/src/Makefile.am trunk/src/gtk-sat-module-popup.c trunk/src/gtk-sat-module.h Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2008-09-05 18:59:10 UTC (rev 84) +++ trunk/src/Makefile.am 2008-09-05 19:00:01 UTC (rev 85) @@ -40,6 +40,7 @@ gtk-polar-plot.c gtk-polar-plot.h \ gtk-polar-view.c gtk-polar-view.h \ gtk-polar-view-popup.c gtk-polar-view-popup.h \ + gtk-rig-ctrl.c gtk.rig-ctrl.h \ gtk-rot-ctrl.c gtk-rot-ctrl.h \ gtk-rot-knob.c gtk-rot-knob.h \ gtk-sat-data.c gtk-sat-data.h \ Modified: trunk/src/gtk-sat-module-popup.c =================================================================== --- trunk/src/gtk-sat-module-popup.c 2008-09-05 18:59:10 UTC (rev 84) +++ trunk/src/gtk-sat-module-popup.c 2008-09-05 19:00:01 UTC (rev 85) @@ -41,6 +41,7 @@ #include "gtk-sat-module.h" #include "gtk-sat-module-tmg.h" #include "gtk-sat-module-popup.h" +#include "gtk-rig-ctrl.h" #include "gtk-rot-ctrl.h" #include "config-keys.h" @@ -867,7 +868,6 @@ rigctrl_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); - GtkWidget *rigctrl; gchar *buff; if (module->rigctrlwin != NULL) { @@ -876,7 +876,7 @@ return; } - //rigctrl = gtk_rot_ctrl_new (); + module->rigctrl = gtk_rig_ctrl_new (module); /* create a window */ module->rigctrlwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -884,7 +884,7 @@ gtk_window_set_title (GTK_WINDOW (module->rigctrlwin), buff); g_free (buff); g_signal_connect (G_OBJECT (module->rigctrlwin), "delete_event", - G_CALLBACK (window_delete), NULL); + G_CALLBACK (window_delete), NULL); g_signal_connect (G_OBJECT (module->rigctrlwin), "destroy", G_CALLBACK (destroy_rigctrl), module); @@ -893,7 +893,7 @@ gtk_window_set_icon_from_file (GTK_WINDOW (module->rigctrlwin), buff, NULL); g_free (buff); - //gtk_container_add (GTK_CONTAINER (module->rigctrlwin), rigctrl); + gtk_container_add (GTK_CONTAINER (module->rigctrlwin), module->rigctrl); gtk_widget_show_all (module->rigctrlwin); @@ -912,6 +912,7 @@ GtkSatModule *module = GTK_SAT_MODULE (data); module->rigctrlwin = NULL; + module->rigctrl = NULL; } @@ -923,7 +924,6 @@ rotctrl_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); - GtkWidget *rotctrl; gchar *buff; if (module->rotctrlwin != NULL) { @@ -932,8 +932,7 @@ return; } - rotctrl = gtk_rot_ctrl_new (module); - module->rotctrl = rotctrl; + module->rotctrl = gtk_rot_ctrl_new (module); /* create a window */ module->rotctrlwin = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -950,7 +949,7 @@ gtk_window_set_icon_from_file (GTK_WINDOW (module->rotctrlwin), buff, NULL); g_free (buff); - gtk_container_add (GTK_CONTAINER (module->rotctrlwin), rotctrl); + gtk_container_add (GTK_CONTAINER (module->rotctrlwin), module->rotctrl); gtk_widget_show_all (module->rotctrlwin); } Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2008-09-05 18:59:10 UTC (rev 84) +++ trunk/src/gtk-sat-module.h 2008-09-05 19:00:01 UTC (rev 85) @@ -96,7 +96,8 @@ GtkWidget *rotctrlwin; /*!< Rotator controller window */ GtkWidget *rotctrl; GtkWidget *rigctrlwin; /*!< Radio controller window */ - + GtkWidget *rigctrl; + GtkWidget *header; guint head_count; guint head_timeout; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2008-09-05 18:59:03
|
Revision: 84 http://gpredict.svn.sourceforge.net/gpredict/?rev=84&view=rev Author: csete Date: 2008-09-05 18:59:10 +0000 (Fri, 05 Sep 2008) Log Message: ----------- Added radio controller widget skeleton. Added Paths: ----------- trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h Added: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c (rev 0) +++ trunk/src/gtk-rig-ctrl.c 2008-09-05 18:59:10 UTC (rev 84) @@ -0,0 +1,655 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/groundstation/ + More details can be found at the project home page: + + http://groundstation.sourceforge.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +/** \brief RIG control window. + * \ingroup widgets + * + * The master radio control UI is implemented as a Gtk+ Widget in order + * to allow multiple instances. The widget is created from the module + * popup menu and each module can have several radio control windows + * attached to it. Note, however, that current implementation only + * allows one control window per module. + * + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#include <math.h> +#include "compat.h" +#include "sat-log.h" +#include "predict-tools.h" +#include "gtk-freq-knob.h" +#include "gtk-rig-ctrl.h" +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif + + +#define FMTSTR "%7.2f\302\260" + + +static void gtk_rig_ctrl_class_init (GtkRigCtrlClass *class); +static void gtk_rig_ctrl_init (GtkRigCtrl *list); +static void gtk_rig_ctrl_destroy (GtkObject *object); + + +static GtkWidget *create_az_widgets (GtkRigCtrl *ctrl); +static GtkWidget *create_el_widgets (GtkRigCtrl *ctrl); +static GtkWidget *create_target_widgets (GtkRigCtrl *ctrl); +static GtkWidget *create_conf_widgets (GtkRigCtrl *ctrl); +static GtkWidget *create_plot_widget (GtkRigCtrl *ctrl); + +static void store_sats (gpointer key, gpointer value, gpointer user_data); + +static void sat_selected_cb (GtkComboBox *satsel, gpointer data); +static void track_toggle_cb (GtkToggleButton *button, gpointer data); +static void delay_changed_cb (GtkSpinButton *spin, gpointer data); +static void rig_selected_cb (GtkComboBox *box, gpointer data); +static void rig_locked_cb (GtkToggleButton *button, gpointer data); +static gboolean rig_ctrl_timeout_cb (gpointer data); + + +static GtkVBoxClass *parent_class = NULL; + +static GdkColor ColBlack = { 0, 0, 0, 0}; +static GdkColor ColWhite = { 0, 0xFFFF, 0xFFFF, 0xFFFF}; +static GdkColor ColRed = { 0, 0xFFFF, 0, 0}; +static GdkColor ColGreen = {0, 0, 0xFFFF, 0}; + + +GType +gtk_rig_ctrl_get_type () +{ + static GType gtk_rig_ctrl_type = 0; + + if (!gtk_rig_ctrl_type) { + + static const GTypeInfo gtk_rig_ctrl_info = { + sizeof (GtkRigCtrlClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_rig_ctrl_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkRigCtrl), + 5, /* n_preallocs */ + (GInstanceInitFunc) gtk_rig_ctrl_init, + }; + + gtk_rig_ctrl_type = g_type_register_static (GTK_TYPE_VBOX, + "GtkRigCtrl", + >k_rig_ctrl_info, + 0); + } + + return gtk_rig_ctrl_type; +} + + +static void +gtk_rig_ctrl_class_init (GtkRigCtrlClass *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_rig_ctrl_destroy; + +} + + + +static void +gtk_rig_ctrl_init (GtkRigCtrl *ctrl) +{ + ctrl->sats = NULL; + ctrl->target = NULL; + ctrl->pass = NULL; + ctrl->qth = NULL; + + ctrl->tracking = FALSE; + ctrl->busy = FALSE; + ctrl->engaged = FALSE; + ctrl->delay = 1000; + ctrl->timerid = 0; +} + +static void +gtk_rig_ctrl_destroy (GtkObject *object) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (object); + + + /* stop timer */ + if (ctrl->timerid > 0) + g_source_remove (ctrl->timerid); + + + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + + + +/** \brief Create a new rig control widget. + * \return A new rig control window. + * + */ +GtkWidget * +gtk_rig_ctrl_new (GtkSatModule *module) +{ + GtkWidget *widget; + GtkWidget *table; + + widget = g_object_new (GTK_TYPE_RIG_CTRL, NULL); + + /* store satellites */ + g_hash_table_foreach (module->satellites, store_sats, widget); + + GTK_RIG_CTRL (widget)->target = SAT (g_slist_nth_data (GTK_RIG_CTRL (widget)->sats, 0)); + + /* store QTH */ + GTK_RIG_CTRL (widget)->qth = module->qth; + + /* get next pass for target satellite */ + GTK_RIG_CTRL (widget)->pass = get_next_pass (GTK_RIG_CTRL (widget)->target, + GTK_RIG_CTRL (widget)->qth, + 3.0); + + /* initialise custom colors */ + gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColBlack); + gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColWhite); + gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColRed); + gdk_rgb_find_color (gtk_widget_get_colormap (widget), &ColGreen); + + /* create contents */ + table = gtk_table_new (3, 2, TRUE); + gtk_table_set_row_spacings (GTK_TABLE (table), 5); + gtk_table_set_col_spacings (GTK_TABLE (table), 5); + gtk_container_set_border_width (GTK_CONTAINER (table), 10); + gtk_table_attach (GTK_TABLE (table), create_az_widgets (GTK_RIG_CTRL (widget)), + 0, 1, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (table), create_el_widgets (GTK_RIG_CTRL (widget)), + 1, 2, 0, 1, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (table), create_target_widgets (GTK_RIG_CTRL (widget)), + 0, 1, 1, 2, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (table), create_conf_widgets (GTK_RIG_CTRL (widget)), + 0, 1, 2, 3, GTK_FILL, GTK_FILL, 0, 0); + gtk_table_attach (GTK_TABLE (table), create_plot_widget (GTK_RIG_CTRL (widget)), + 1, 2, 1, 3, GTK_FILL, GTK_FILL, 0, 0); + + gtk_container_add (GTK_CONTAINER (widget), table); + + GTK_RIG_CTRL (widget)->timerid = g_timeout_add (GTK_RIG_CTRL (widget)->delay, + rig_ctrl_timeout_cb, + GTK_RIG_CTRL (widget)); + + return widget; +} + + +/** \brief Update rig control state. + * \param ctrl Pointer to the GtkRigCtrl. + * + * This function is called by the parent, i.e. GtkSatModule, indicating that + * the satellite data has been updated. The function updates the internal state + * of the controller and the rigator. + */ +void +gtk_rig_ctrl_update (GtkRigCtrl *ctrl, gdouble t) +{ + gchar *buff; + + if (ctrl->target) { + + /* update next pass if necessary */ + if (ctrl->pass != NULL) { + if (ctrl->target->aos > ctrl->pass->aos) { + /* update pass */ + free_pass (ctrl->pass); + ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); + /* TODO: update polar plot */ + } + } + else { + /* we don't have any current pass; store the current one */ + ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); + /* TODO: update polar plot */ + } + } +} + + +/** \brief Create azimuth control widgets. + * \param ctrl Pointer to the GtkRigCtrl widget. + * + * This function creates and initialises the widgets for controlling the + * azimuth of the the rigator. + * + * TODO: RENAME! + */ +static +GtkWidget *create_az_widgets (GtkRigCtrl *ctrl) +{ + GtkWidget *frame; + GtkWidget *table; + GtkWidget *label; + + + frame = gtk_frame_new (_("Azimuth")); + + table = gtk_table_new (2, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 5); + gtk_table_set_col_spacings (GTK_TABLE (table), 5); + gtk_table_set_row_spacings (GTK_TABLE (table), 5); + gtk_container_add (GTK_CONTAINER (frame), table); + + + return frame; +} + + +/** \brief Create elevation control widgets. + * \param ctrl Pointer to the GtkRigCtrl widget. + * + * This function creates and initialises the widgets for controlling the + * elevation of the the rigator. + * + * TODO: RENAME + */ +static +GtkWidget *create_el_widgets (GtkRigCtrl *ctrl) +{ + GtkWidget *frame; + GtkWidget *table; + GtkWidget *label; + + + frame = gtk_frame_new (_("Elevation")); + + table = gtk_table_new (2, 2, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 5); + gtk_table_set_col_spacings (GTK_TABLE (table), 5); + gtk_table_set_row_spacings (GTK_TABLE (table), 5); + gtk_container_add (GTK_CONTAINER (frame), table); + + + return frame; +} + +/** \brief Create target widgets. + * \param ctrl Pointer to the GtkRigCtrl widget. + */ +static +GtkWidget *create_target_widgets (GtkRigCtrl *ctrl) +{ + GtkWidget *frame,*table,*label,*satsel,*track; + gchar *buff; + guint i, n; + sat_t *sat = NULL; + + + buff = g_strdup_printf (FMTSTR, 0.0); + + table = gtk_table_new (4, 3, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 5); + gtk_table_set_col_spacings (GTK_TABLE (table), 5); + gtk_table_set_row_spacings (GTK_TABLE (table), 5); + + /* sat selector */ + satsel = gtk_combo_box_new_text (); + n = g_slist_length (ctrl->sats); + for (i = 0; i < n; i++) { + sat = SAT (g_slist_nth_data (ctrl->sats, i)); + if (sat) { + gtk_combo_box_append_text (GTK_COMBO_BOX (satsel), sat->tle.sat_name); + } + } + gtk_combo_box_set_active (GTK_COMBO_BOX (satsel), 0); + gtk_widget_set_tooltip_text (satsel, _("Select target object")); + g_signal_connect (satsel, "changed", G_CALLBACK (sat_selected_cb), ctrl); + gtk_table_attach_defaults (GTK_TABLE (table), satsel, 0, 2, 0, 1); + + /* tracking button */ + track = gtk_toggle_button_new_with_label (_("Track")); + gtk_widget_set_tooltip_text (track, _("Track the satellite when it is within range")); + gtk_table_attach_defaults (GTK_TABLE (table), track, 2, 3, 0, 1); + g_signal_connect (track, "toggled", G_CALLBACK (track_toggle_cb), ctrl); + + /* Azimuth */ + label = gtk_label_new (_("Az:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + + + /* Elevation */ + label = gtk_label_new (_("El:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 2, 3); + + + /* count down */ + label = gtk_label_new (_("Time:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 3, 4); + + frame = gtk_frame_new (_("Target")); +; + gtk_container_add (GTK_CONTAINER (frame), table); + + g_free (buff); + + return frame; +} + + +static GtkWidget * +create_conf_widgets (GtkRigCtrl *ctrl) +{ + GtkWidget *frame,*table,*label,*timer,*toler; + GtkWidget *lock; + GDir *dir = NULL; /* directory handle */ + GError *error = NULL; /* error flag and info */ + gchar *cfgdir; + gchar *dirname; /* directory name */ + gchar **vbuff; + const gchar *filename; /* file name */ + + + + table = gtk_table_new (3, 3, FALSE); + gtk_container_set_border_width (GTK_CONTAINER (table), 5); + gtk_table_set_col_spacings (GTK_TABLE (table), 5); + gtk_table_set_row_spacings (GTK_TABLE (table), 5); + + + label = gtk_label_new (_("Device:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); + + ctrl->DevSel = gtk_combo_box_new_text (); + gtk_widget_set_tooltip_text (ctrl->DevSel, _("Select radio device")); + + /* open configuration directory */ + cfgdir = get_conf_dir (); + dirname = g_strconcat (cfgdir, G_DIR_SEPARATOR_S, + "hwconf", NULL); + g_free (cfgdir); + + dir = g_dir_open (dirname, 0, &error); + if (dir) { + /* read each .rig file */ + while ((filename = g_dir_read_name (dir))) { + + if (g_strrstr (filename, ".rig")) { + + vbuff = g_strsplit (filename, ".rig", 0); + gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->DevSel), vbuff[0]); + g_strfreev (vbuff); + } + } + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to open hwconf dir (%s)"), + __FILE__, __LINE__, error->message); + g_clear_error (&error); + } + + g_free (dirname); + g_dir_close (dir); + + gtk_combo_box_set_active (GTK_COMBO_BOX (ctrl->DevSel), 0); + g_signal_connect (ctrl->DevSel, "changed", G_CALLBACK (rig_selected_cb), ctrl); + gtk_table_attach_defaults (GTK_TABLE (table), ctrl->DevSel, 1, 2, 0, 1); + + /* Engage button */ + lock = gtk_toggle_button_new_with_label (_("Engage")); + gtk_widget_set_tooltip_text (lock, _("Engage the selcted radio device")); + g_signal_connect (lock, "toggled", G_CALLBACK (rig_locked_cb), ctrl); + gtk_table_attach_defaults (GTK_TABLE (table), lock, 2, 3, 0, 1); + + /* Timeout */ + label = gtk_label_new (_("Cycle:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + + timer = gtk_spin_button_new_with_range (100, 5000, 10); + gtk_spin_button_set_digits (GTK_SPIN_BUTTON (timer), 0); + gtk_widget_set_tooltip_text (timer, + _("This parameter controls the delay between "\ + "commands sent to the rigator.")); + gtk_spin_button_set_value (GTK_SPIN_BUTTON (timer), ctrl->delay); + g_signal_connect (timer, "value-changed", G_CALLBACK (delay_changed_cb), ctrl); + gtk_table_attach (GTK_TABLE (table), timer, 1, 2, 1, 2, + GTK_FILL, GTK_FILL, 0, 0); + + label = gtk_label_new (_("msec")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 1, 2); + + + frame = gtk_frame_new (_("Settings")); + gtk_container_add (GTK_CONTAINER (frame), table); + + return frame; +} + + +/** \brief Create target widgets. + * \param ctrl Pointer to the GtkRigCtrl widget. + * + * FIXME: REMOVE + */ +static +GtkWidget *create_plot_widget (GtkRigCtrl *ctrl) +{ + GtkWidget *frame; + + frame = gtk_frame_new (NULL); + + return frame; +} + + +/** \brief Copy satellite from hash table to singly linked list. + */ +static void +store_sats (gpointer key, gpointer value, gpointer user_data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL( user_data); + sat_t *sat = SAT (value); + + ctrl->sats = g_slist_append (ctrl->sats, sat); +} + + +/** \brief Manage satellite selections + * \param satsel Pointer to the GtkComboBox. + * \param data Pointer to the GtkRigCtrl widget. + * + * This function is called when the user selects a new satellite. + */ +static void +sat_selected_cb (GtkComboBox *satsel, gpointer data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + gint i; + + i = gtk_combo_box_get_active (satsel); + if (i >= 0) { + ctrl->target = SAT (g_slist_nth_data (ctrl->sats, i)); + + /* update next pass */ + if (ctrl->pass != NULL) + free_pass (ctrl->pass); + ctrl->pass = get_next_pass (ctrl->target, ctrl->qth, 3.0); + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Invalid satellite selection: %d"), + __FILE__, __FUNCTION__, i); + + /* clear pass just in case... */ + if (ctrl->pass != NULL) { + free_pass (ctrl->pass); + ctrl->pass = NULL; + } + + } +} + + +/** \brief Manage toggle signals (tracking) + * \param button Pointer to the GtkToggle button. + * \param data Pointer to the GtkRigCtrl widget. + */ +static void +track_toggle_cb (GtkToggleButton *button, gpointer data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + + ctrl->tracking = gtk_toggle_button_get_active (button); +} + + +/** \brief Manage cycle delay changes. + * \param spin Pointer to the spin button. + * \param data Pointer to the GtkRigCtrl widget. + * + * This function is called when the user changes the value of the + * cycle delay. + */ +static void +delay_changed_cb (GtkSpinButton *spin, gpointer data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + + + ctrl->delay = (guint) gtk_spin_button_get_value (spin); + + if (ctrl->timerid > 0) + g_source_remove (ctrl->timerid); + + ctrl->timerid = g_timeout_add (ctrl->delay, rig_ctrl_timeout_cb, ctrl); +} + + + + +/** \brief New rigor device selected. + * \param box Pointer to the rigor selector combo box. + * \param data Pointer to the GtkRigCtrl widget. + * + * This function is called when the user selects a new rigor controller + * device. + */ +static void +rig_selected_cb (GtkComboBox *box, gpointer data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + + /* TODO: update device */ + + +} + + +/** \brief Rig locked. + * \param button Pointer to the "Engage" button. + * \param data Pointer to the GtkRigCtrl widget. + * + * This function is called when the user toggles the "Engage" button. + */ +static void +rig_locked_cb (GtkToggleButton *button, gpointer data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + + if (gtk_toggle_button_get_active (button)) { + gtk_widget_set_sensitive (ctrl->DevSel, FALSE); + ctrl->engaged = FALSE; + } + else { + gtk_widget_set_sensitive (ctrl->DevSel, TRUE); + ctrl->engaged = TRUE; + } +} + + +/** \brief Rigator controller timeout function + * \param data Pointer to the GtkRigCtrl widget. + * \return Always TRUE to let the timer continue. + */ +static gboolean +rig_ctrl_timeout_cb (gpointer data) +{ + GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); + + if (ctrl->busy) { + sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); + return TRUE; + } + + ctrl->busy = TRUE; + + /* If we are tracking and the target satellite is within + range, set the rig controller knob value to the target + frequency value. If the target satellite is out of range + set the rig controller to the frequency which we expect + when the target sat comes up. + In either case, update the range, delay, loss, rate, and + doppler values. + */ + if (ctrl->tracking) { + if (ctrl->target->el < 0.0) { + gdouble aosshift = 0.0; + + } + else { + } + + + } + + if (ctrl->engaged) { + /* TODO: send controller values to radio device */ + } + + + ctrl->busy = FALSE; + + return TRUE; +} + + Added: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h (rev 0) +++ trunk/src/gtk-rig-ctrl.h 2008-09-05 18:59:10 UTC (rev 84) @@ -0,0 +1,98 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2007 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/groundstation/ + More details can be found at the project home page: + + http://groundstation.sourceforge.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef __GTK_RIG_CTRL_H__ +#define __GTK_RIG_CTRL_H__ 1 + +#include <glib.h> +#include <glib/gi18n.h> +#include <gtk/gtk.h> +#include "sgpsdp/sgp4sdp4.h" +#include "gtk-sat-module.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + + + +#define GTK_TYPE_RIG_CTRL (gtk_rig_ctrl_get_type ()) +#define GTK_RIG_CTRL(obj) GTK_CHECK_CAST (obj,\ + gtk_rig_ctrl_get_type (),\ + GtkRigCtrl) + +#define GTK_RIG_CTRL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\ + gtk_rig_ctrl_get_type (),\ + GtkRigCtrlClass) + +#define IS_GTK_RIG_CTRL(obj) GTK_CHECK_TYPE (obj, gtk_rig_ctrl_get_type ()) + + +typedef struct _gtk_rig_ctrl GtkRigCtrl; +typedef struct _GtkRigCtrlClass GtkRigCtrlClass; + + + +struct _gtk_rig_ctrl +{ + GtkVBox vbox; + + + /* other widgets */ + GtkWidget *DevSel; + + GSList *sats; /*!< List of sats in parent module */ + sat_t *target; /*!< Target satellite */ + pass_t *pass; /*!< Next pass of target satellite */ + qth_t *qth; /*!< The QTH for this module */ + + guint delay; /*!< Timeout delay. */ + guint timerid; /*!< Timer ID */ + + gboolean tracking; /*!< Flag set when we are tracking a target. */ + gboolean busy; /*!< Flag set when control algorithm is busy. */ + gboolean engaged; /*!< Flag indicating that rig device is engaged. */ +}; + +struct _GtkRigCtrlClass +{ + GtkVBoxClass parent_class; +}; + + + +GtkType gtk_rig_ctrl_get_type (void); +GtkWidget* gtk_rig_ctrl_new (GtkSatModule *module); +void gtk_rig_ctrl_update (GtkRigCtrl *ctrl, gdouble t); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GTK_RIG_ctrl_H__ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |