gpredict-svn Mailing List for Gpredict (Page 11)
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: <aa...@us...> - 2010-11-21 20:51:37
|
Revision: 716 http://gpredict.svn.sourceforge.net/gpredict/?rev=716&view=rev Author: aa1vs Date: 2010-11-21 20:51:31 +0000 (Sun, 21 Nov 2010) Log Message: ----------- Change error checking in set_pos Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2010-11-11 19:20:31 UTC (rev 715) +++ trunk/src/gtk-rot-ctrl.c 2010-11-21 20:51:31 UTC (rev 716) @@ -1085,6 +1085,7 @@ gchar buffback[128]; gchar azstr[8],elstr[8]; gboolean retcode; + gint retval; /* send command */ g_ascii_formatd (azstr, 8, "%7.2f", az); @@ -1095,14 +1096,25 @@ g_free (buff); - if (retcode==TRUE) - if (strncmp(buffback,"RPRT 0",6)!=0) { + if (retcode==TRUE){ + retval=(gint)g_strtod(buffback+4,NULL); + switch(retval) { + + case 0: + /*no error case*/ + break; + + default: + /*any other case*/ + /*not sure what is a hard error or soft error*/ sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error (%s)"), - __FILE__, __LINE__,buffback); + _("%s:%d: rotctld returned error %d (%s)"), + __FILE__, __LINE__, retval, buffback); - retcode=FALSE; + //retcode=FALSE; + break; } + } return (retcode); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-11 19:20:38
|
Revision: 715 http://gpredict.svn.sourceforge.net/gpredict/?rev=715&view=rev Author: aa1vs Date: 2010-11-11 19:20:31 +0000 (Thu, 11 Nov 2010) Log Message: ----------- Updated NEWS Modified Paths: -------------- trunk/NEWS Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-11-07 23:31:07 UTC (rev 714) +++ trunk/NEWS 2010-11-11 19:20:31 UTC (rev 715) @@ -1,6 +1,7 @@ Changes in version 1.3 (TBD) - Feature request 2873824: Flip Passes. +- Feature Request 3022617: Malaysia's location. - Automatically refresh the Sky at a glance view every minute. - Added more checks with hamlib communications. - Fixed bug 2116691: Leave network connection open. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-07 23:31:13
|
Revision: 714 http://gpredict.svn.sourceforge.net/gpredict/?rev=714&view=rev Author: aa1vs Date: 2010-11-07 23:31:07 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Added Estonia, Latvia, and Lithuania to locations.dat Modified Paths: -------------- trunk/data/locations.dat Modified: trunk/data/locations.dat =================================================================== --- trunk/data/locations.dat 2010-11-07 18:02:23 UTC (rev 713) +++ trunk/data/locations.dat 2010-11-07 23:31:07 UTC (rev 714) @@ -736,6 +736,11 @@ Europe;Denmark;Vagar;EKVG;62.0667;-7.2833;92 Europe;Denmark;Vandel;EKVA;55.7;9.2;76 Europe;Denmark;Vojens/Skrydstrup;EKSP;55.2333;9.2667;47 +Europe;Estonia;Kardla;EEKA;58.983;22.817;5 +Europe;Estonia;Kuressaare;EEKE;58.217;22.500;4 +Europe;Estonia;Parnu;EEPU;58.417;24.467;14 +Europe;Estonia;Tallinn;EETN;59.400;24.817;40 +Europe;Estonia;Tartu/Ulenurme;EETU;58.300;26.733;59 Europe;Finland;Helsinki;EFHK;60.3167;24.9667;56 Europe;Finland;Tampere;EFTP;61.4167;23.5833;112 Europe;Finland;Turku;EFTU;60.5167;22.2667;59 @@ -945,6 +950,14 @@ Europe;Italy;Vicenza;LIPT;45.5667;11.5167;53 Europe;Italy;Villafranca;LIPX;45.3833;10.8667;68 Europe;Italy;Viterbo;LIRV;42.4333;12.05;308 +Europe;Latvia;Liepaja International Airport;EVLA;56.517;21.083;5 +Europe;Latvia;Riga International Airport;EVRA;56.917;23.967;10 +Europe;Latvia;Riga;UMRR;56.967;24.050;7 +Europe;Latvia;Ventspils;UMRW;57.400;21.533;3 +Europe;Lithuania;Kaunas;EYKA;54.900;23.917;77 +Europe;Lithuania;Palanga Intl.;EYPA;55.917;21.050;10 +Europe;Lithuania;Siauliai Intl./Mil.;EYSA;55.883;23.383;135 +Europe;Lithuania;Vilnius;EYVI;54.633;25.100;162 Europe;Luxembourg;Luxembourg;ELLX;49.6167;6.2167;379 Europe;Malta;Luqa;LMML;35.85;14.4833;91 Europe;Moldova;Kishineu;LUKK;46.9167;28.9308;0 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-07 18:02:29
|
Revision: 713 http://gpredict.svn.sourceforge.net/gpredict/?rev=713&view=rev Author: aa1vs Date: 2010-11-07 18:02:23 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Added locations in Malaysia, Indonesia, the Philippines, and Kiribati from US/NOAA Metar database. Modified Paths: -------------- trunk/ChangeLog trunk/data/locations.dat Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-07 13:57:41 UTC (rev 712) +++ trunk/ChangeLog 2010-11-07 18:02:23 UTC (rev 713) @@ -4,6 +4,10 @@ Updated pass regeneration logic in rotator controller. Fixes bug 2167508: problems in rotator controller. + * data/locations.dat + Added locations in Malaysia, Indonesia, the Philippines, and Kiribati from US/NOAA Metar database. + Addresses Feature Request 3022617: Malaysia's location. + 2010-11-07 Alexandru Csete <oz9aec at gmail.com> * configure.ac: Modified: trunk/data/locations.dat =================================================================== --- trunk/data/locations.dat 2010-11-07 13:57:41 UTC (rev 712) +++ trunk/data/locations.dat 2010-11-07 18:02:23 UTC (rev 713) @@ -224,9 +224,167 @@ Australasia;Australia;Port Hedland;YPPD;-20.1;119.5667;10 Australasia;Australia;Sydney;YSSY;-33.95;151.1833;3 Australasia;Australia;Townsville;YBTL;-19.25;146.75;9 +Australasia;Indonesia;Alor / Mali;WRKM;-8.217;124.567;12 +Australasia;Indonesia;Amahai;WAPA;-3.350;128.883;10 +Australasia;Indonesia;Ambon / Pattimura;WAPP;-3.700;128.083;12 +Australasia;Indonesia;Ampenan / Selaparang;WRRA;-8.533;116.067;3 +Australasia;Indonesia;Balikpapan / Sepinggan;WRLL;-1.267;116.900;3 +Australasia;Indonesia;Banda Aceh / Blangbintang;WITT;5.517;95.417;21 +Australasia;Indonesia;Bandung / Husein;WIIB;-6.900;107.583;740 +Australasia;Indonesia;Banjarmasin / Syamsuddin Noor;WRBB;-3.433;114.750;20 +Australasia;Indonesia;Batan, Sumatra;WIKB;1.117;104.117;24 +Australasia;Indonesia;Bau-Bau / Beto Ambiri;WAAB;-5.467;122.617;2 +Australasia;Indonesia;Bengkulu / Padangkemiling;WIPL;-3.883;102.333;16 +Australasia;Indonesia;Biak / Mokmer;WABB;-1.183;136.117;11 +Australasia;Indonesia;Bima;WRRB;-8.550;118.700;2 +Australasia;Indonesia;Cilacap;WIIL;-7.733;109.017;6 +Australasia;Indonesia;Curug / Budiarto;WIIA;-6.233;106.650;46 +Australasia;Indonesia;Denpasar / Ngurah-Rai;WRRR;-8.750;115.167;1 +Australasia;Indonesia;Enarotali;WABT;-3.917;136.367;1770 +Australasia;Indonesia;Fak-Fak / Torea;WASF;-2.883;132.250;130 +Australasia;Indonesia;Galela / Gamarmalamu;WAMA;1.817;127.833;8 +Australasia;Indonesia;Gorontalo / Jalaluddin;WAMG;0.517;123.067;2 +Australasia;Indonesia;Gunung Sitoli / Binaka;WIMB;1.500;97.633;6 +Australasia;Indonesia;Jakarta Halim Perdanakusuma;WIIH;-6.250;106.900;30 +Australasia;Indonesia;Jakarta / Soekarno-Hatta;WIII;-6.117;106.650;8 +Australasia;Indonesia;Jambi / Sultan Taha;WIPA;-1.633;103.650;25 +Australasia;Indonesia;Jayapura / Sentani;WAJJ;-2.567;140.483;99 +Australasia;Indonesia;Jogyakarta / Adisucipto;WIIJ;-7.783;110.433;107 +Australasia;Indonesia;Kaimana / Utarom;WASK;-3.667;133.750;3 +Australasia;Indonesia;Kalijati;WIIK;-6.550;107.667;110 +Australasia;Indonesia;Kendari / Woltermon-Ginsidi;WAAU;-4.100;122.433;50 +Australasia;Indonesia;Kerinci / Depati Parbo;WIPH;-2.767;101.367;782 +Australasia;Indonesia;Ketapang / Rahadi Usmaman;WIOK;-1.850;109.967;9 +Australasia;Indonesia;Kokonao / Timuka;WABN;-4.717;136.433;3 +Australasia;Indonesia;Kotabaru;WRBK;-3.400;116.217;18 +Australasia;Indonesia;Kupang / El Tari;WRKK;-10.167;123.667;108 +Australasia;Indonesia;Labuha / Taliabu;WAPH;-1.617;124.550;3 +Australasia;Indonesia;Larantuka;WRKL;-8.267;122.967;9 +Australasia;Indonesia;Lhokseumawe / Malikussaleh;WITM;5.233;97.200;87 +Australasia;Indonesia;Longbawan / Juvai Semaring;WRLB;3.733;115.683;550 +Australasia;Indonesia;Luwuk / Bubung;WAMW;-0.900;122.783;2 +Australasia;Indonesia;Madiun / Iswahyudi;WIAR;-7.617;111.517;110 +Australasia;Indonesia;Malang / Abdul Rahkmansaleh;WIAS;-7.967;112.700;526 +Australasia;Indonesia;Manokwari / Rendani;WASR;-0.883;134.050;3 +Australasia;Indonesia;Maumere / Wai Oti;WRKC;-8.633;122.250;3 +Australasia;Indonesia;Medan / Polonia;WIMM;3.567;98.683;25 +Australasia;Indonesia;Menado / Dr. Sam Ratulangi;WAMM;1.533;124.917;80 +Australasia;Indonesia;Menggala / Astra Ksetra;WIAG;-4.450;105.183;19 +Australasia;Indonesia;Merauke / Mopah;WAKK;-8.467;140.383;3 +Australasia;Indonesia;Meulaboh / Cut Nyak Dhien;WITC;4.250;96.117;90 +Australasia;Indonesia;Muaratewe / Beringin;WRBM;-0.950;114.900;60 +Australasia;Indonesia;Nabire;WABI;-3.333;135.500;3 +Australasia;Indonesia;Namlea;WAPR;-3.250;127.083;20 +Australasia;Indonesia;Padang / Tabing;WIMG;-0.883;100.350;3 +Australasia;Indonesia;Pakanbaru / Simpangtiga;WIBB;0.467;101.450;31 +Australasia;Indonesia;Palangkaraya / Panarung;WRBP;-1.000;114.000;27 +Australasia;Indonesia;Palembang / Talangbetutu;WIPP;-2.900;104.700;10 +Australasia;Indonesia;Palu / Mutiara;WAML;-0.683;119.733;6 +Australasia;Indonesia;Pangkalan Bun / Iskandar;WRBI;-2.700;110.700;25 +Australasia;Indonesia;Pangkalpinang / Pangkalpinang;WIKK;-2.167;106.133;33 +Australasia;Indonesia;Pontianak / Supadio;WIOO;-0.150;109.400;3 +Australasia;Indonesia;Poso / Kasiguncu;WAMP;-1.383;120.733;2 +Australasia;Indonesia;Ranai / Ranai;WION;3.950;108.383;2 +Australasia;Indonesia;Rengat / Japura;WIPR;0.467;102.317;46 +Australasia;Indonesia;Rote / Baa;WRKR;-10.733;123.067;1 +Australasia;Indonesia;Sabang / Cut Bau;WIAA;5.867;95.317;126 +Australasia;Indonesia;Sabu / Tardamu;WRKS;-10.500;121.833;26 +Australasia;Indonesia;Samarinda / Temindung;WRLS;-0.617;117.150;230 +Australasia;Indonesia;Sanana;WAPN;-2.083;126.000;2 +Australasia;Indonesia;Sarmi;WAJI;-1.833;138.717;3 +Australasia;Indonesia;Saumlaki;WAPI;-7.983;131.300;24 +Australasia;Indonesia;Semarang / Ahmadyani;WIIS;-6.983;110.383;3 +Australasia;Indonesia;Serui / Yendosa;WABO;-1.867;136.233;3 +Australasia;Indonesia;Sibolga / Pinangsori;WIMS;1.550;98.883;3 +Australasia;Indonesia;Singkawang Ii;WIOI;1.083;109.667;38 +Australasia;Indonesia;Singkep / Dabo;WIKS;-0.483;104.583;31 +Australasia;Indonesia;Sintang;WIOS;0.117;111.533;30 +Australasia;Indonesia;Sorong / Jefman;WASS;-0.933;131.117;3 +Australasia;Indonesia;Sumbawa Besar / Sumbawa Besar;WRRS;-8.433;117.417;3 +Australasia;Indonesia;Surabaya / Juanda;WRSJ;-7.367;112.767;3 +Australasia;Indonesia;Surabaya / Perak;WRSP;-7.217;112.717;3 +Australasia;Indonesia;Surabaya;WRSS;-7.217;113.717;3 +Australasia;Indonesia;Surakarta / Adisumarmo;WRSQ;-7.867;110.917;104 +Australasia;Indonesia;Tahuna;WAMH;3.583;125.467;38 +Australasia;Indonesia;Tanah Merah / Tanah Merah;WAKT;-6.100;140.300;16 +Australasia;Indonesia;Tanjungpandan / Buluh Tumbang;WIKD;-2.750;107.750;44 +Australasia;Indonesia;Tanjungpinang / Kijang;WIKN;0.917;104.533;18 +Australasia;Indonesia;Tanjung Redep / Berau;WRLK;2.117;117.450;26 +Australasia;Indonesia;Tanjung Selor;WRLG;2.850;117.333;50 +Australasia;Indonesia;Tarakan / Juwata;WRLR;3.333;117.567;6 +Australasia;Indonesia;Tasikmalaya / Cibeureum;WIAM;-7.333;108.250;335 +Australasia;Indonesia;Telukbetung / Beranti;WIIT;-5.267;105.183;96 +Australasia;Indonesia;Ternate / Babullah;WAMT;0.783;127.383;23 +Australasia;Indonesia;Toli-Toli / Lalos;WAMI;1.017;120.800;2 +Australasia;Indonesia;Ujung Pandang / Hasanuddin;WAAA;-5.067;119.550;14 +Australasia;Indonesia;Waingapu / Mau Hau;WRRW;-9.667;120.333;12 +Australasia;Indonesia;Wamena / Wamena;WAJW;-4.067;138.950;1660 +Australasia;Kiribati;Arorae;NGTR;-2.667;176.833;4 +Australasia;Kiribati;Beru;NGBR;-1.350;176.000;2 +Australasia;Kiribati;Butaritari;NGTU;3.033;172.783;1 +Australasia;Kiribati;Tarawa;NGTA;1.350;172.917;2 +Australasia;Malaysia;Bintulu;WBGB;3.200;113.033;2 +Australasia;Malaysia;Johore Bharu / Senai;WMKJ;1.633;103.667;37 +Australasia;Malaysia;Kota Bharu;WMKC;6.167;102.283;5 +Australasia;Malaysia;Kota Kinabalu;WBKK;5.933;116.050;3 +Australasia;Malaysia;Kuantan;WMKD;3.617;103.217;18 +Australasia;Malaysia;Kuching;WBGG;1.483;110.333;27 +Australasia;Malaysia;Kudat;WBKT;6.917;116.833;3 +Australasia;Malaysia;Labuan;WBKL;5.300;115.250;30 +Australasia;Malaysia;Langkawi;WMKL;6.333;99.733;8 +Australasia;Malaysia;Malacca;WMKM;2.267;102.250;11 +Australasia;Malaysia;Miri;WBGR;4.333;113.983;17 +Australasia;Malaysia;Penang / Bayan Lepas;WMKP;5.300;100.267;3 +Australasia;Malaysia;Sandakan;WBKS;5.900;118.067;12 +Australasia;Malaysia;Sepang/KL International Airport;WMKK;2.733;101.700;21 +Australasia;Malaysia;Sibu;WBGS;2.333;111.833;8 +Australasia;Malaysia;Sitiawan;WMBA;4.217;100.700;7 +Australasia;Malaysia;Subang/Sultan Abdul Aziz Shah Airport;WMSA;3.117;101.533;27 +Australasia;Malaysia;Tawau;WBKW;4.267;117.883;18 Australasia;New Zealand;Auckland;NZAA;-37.0167;174.8;6 Australasia;New Zealand;Christchurch;NZCH;-43.4833;172.55;30 Australasia;New Zealand;Wellington;NZWN;-41.3333;174.8;8 +Australasia;Philippines;Alabat;RPXT;14.083;122.017;4 +Australasia;Philippines;Aparri;RPUA;18.367;121.633;2 +Australasia;Philippines;Baguio;RPUB;16.417;120.600;1500 +Australasia;Philippines;Baler;RPUR;15.767;121.567;4 +Australasia;Philippines;Basco;RPUO;20.450;121.967;10 +Australasia;Philippines;Butuan;RPWE;9.933;125.517;45 +Australasia;Philippines;Cagayan De Oro;RPWL;8.483;124.633;5 +Australasia;Philippines;Calapan;RPUK;13.417;121.183;39 +Australasia;Philippines;Catarman;RPVF;12.483;124.633;4 +Australasia;Philippines;Clark Ab;RPMK;15.167;120.567;196 +Australasia;Philippines;Clarkfield Pampanga International Airport;RPLC;15.183;120.550;148 +Australasia;Philippines;Cotobato;RPWC;7.167;124.217;58 +Australasia;Philippines;Daet;RPUD;14.133;122.983;3 +Australasia;Philippines;Davao Airport;RPMD;7.117;125.650;17 +Australasia;Philippines;Dipolog;RPWG;8.600;123.350;3 +Australasia;Philippines;Dumaguete;RPVD;9.300;123.300;5 +Australasia;Philippines;Gen. Santos;RPWB;6.117;125.183;14 +Australasia;Philippines;Guiuan;RPVG;11.033;126.733;56 +Australasia;Philippines;Iba;RPUI;15.333;119.967;4 +Australasia;Philippines;Iloilo;RPVI;10.700;122.567;7 +Australasia;Philippines;Laoag;RPLI;18.183;120.533;4 +Australasia;Philippines;Legaspi;RPMP;13.133;123.733;16 +Australasia;Philippines;Mactan;RPMT;10.300;123.967;23 +Australasia;Philippines;Malaybalay;RPWY;8.150;125.083;626 +Australasia;Philippines;Marinduque Island;RPUW;13.367;121.833;5 +Australasia;Philippines;Masbate;RPVM;12.367;123.617;6 +Australasia;Philippines;Naga / Luzon Island;RPUN;13.583;123.267;43 +Australasia;Philippines;Ninoy Aquino Inter-National Airport;RPLL;14.517;121.000;14 +Australasia;Philippines;Puerto Princesa;RPVP;9.750;118.733;14 +Australasia;Philippines;Romblon;RPMR;12.583;122.267;46 +Australasia;Philippines;Roxas;RPVR;11.583;122.750;3 +Australasia;Philippines;Sangley Point;RPMS;14.500;120.917;3 +Australasia;Philippines;San Jose;RPUH;12.350;121.033;2 +Australasia;Philippines;Subic Bay Weather Station;RPLB;14.800;120.267;18 +Australasia;Philippines;Surigao;RPWS;9.800;125.500;54 +Australasia;Philippines;Tacloban;RPVA;11.250;125.000;2 +Australasia;Philippines;Tagbilaran;RPVT;9.600;123.850;7 +Australasia;Philippines;Tuguegarao;RPUT;17.617;121.733;61 +Australasia;Philippines;Vigan;RPUQ;17.567;120.383;31 +Australasia;Philippines;Virac;RPUV;13.583;124.233;39 +Australasia;Philippines;Zamboanga;RPMZ;6.900;122.067;5 Canada;Alberta;Calgary;CYYC;51.1167;-114.0167;1084 Canada;Alberta;Edmonton;CYEG;53.3;-113.5833;723 Canada;British Columbia;Abbotsford;CYXX;49.0333;-122.3667;58 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-07 13:57:47
|
Revision: 712 http://gpredict.svn.sourceforge.net/gpredict/?rev=712&view=rev Author: aa1vs Date: 2010-11-07 13:57:41 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Updated pass regeneration logic in rotator controller. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-rot-ctrl.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-07 08:56:11 UTC (rev 711) +++ trunk/ChangeLog 2010-11-07 13:57:41 UTC (rev 712) @@ -1,6 +1,12 @@ +2010-11-07 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-rot-ctrl.c + Updated pass regeneration logic in rotator controller. + Fixes bug 2167508: problems in rotator controller. + 2010-11-07 Alexandru Csete <oz9aec at gmail.com> - * configura.ac: + * configure.ac: Added implicit check for libm (required on Fedora core 13 and later). Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-11-07 08:56:11 UTC (rev 711) +++ trunk/NEWS 2010-11-07 13:57:41 UTC (rev 712) @@ -5,8 +5,8 @@ - Added more checks with hamlib communications. - Fixed bug 2116691: Leave network connection open. - Fixed bug 3099314: Rotator Thrashing. +- Fixed bug 2167508: problems in rotator controller. - Changes in version 1.2 (12 Oct 2010) - New layout engine that allows any combination of views to be created in a NxM grid. Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2010-11-07 08:56:11 UTC (rev 711) +++ trunk/src/gtk-rot-ctrl.c 2010-11-07 13:57:41 UTC (rev 712) @@ -298,16 +298,46 @@ update_count_down (ctrl, t); + /* update next pass if necessary */ if (ctrl->pass != NULL) { - 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_pass (ctrl->target, ctrl->qth, t, 3.0); - set_flipped_pass(ctrl); - - /* update polar plot */ - gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); + /*if we are not in the current pass*/ + if ((ctrl->pass->aos>t)||(ctrl->pass->los<t)){ + /* the pass may not have met the minimum + elevation, calculate the pass and plot it*/ + if (ctrl->target->el >= 0.0) { + /*inside an unexpected/unpredicted pass*/ + free_pass (ctrl->pass); + ctrl->pass=NULL; + ctrl->pass = get_current_pass (ctrl->target, ctrl->qth, t); + set_flipped_pass(ctrl); + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); + } else if ((ctrl->target->aos-ctrl->pass->aos)>(ctrl->delay/secday/1000/4.0)) { + /*the target is expected to appear in a new pass + sufficiently later after the current pass says*/ + + /*converted milliseconds to gpredict time and took a + fraction of it as a threshold for deciding a new pass*/ + + /*if the next pass is not the one for the target*/ + free_pass (ctrl->pass); + ctrl->pass=NULL; + ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); + set_flipped_pass(ctrl); + /* update polar plot */ + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); + } + } else { + /* inside a pass and target dropped below the + horizon so look for a new pass */ + if (ctrl->target->el < 0.0) { + free_pass (ctrl->pass); + ctrl->pass=NULL; + ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); + set_flipped_pass(ctrl); + /* update polar plot */ + gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); + } } } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2010-11-07 08:56:18
|
Revision: 711 http://gpredict.svn.sourceforge.net/gpredict/?rev=711&view=rev Author: csete Date: 2010-11-07 08:56:11 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Added explicit check for libm (required for FC13 and later). Modified Paths: -------------- trunk/ChangeLog trunk/configure.ac Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-07 01:08:13 UTC (rev 710) +++ trunk/ChangeLog 2010-11-07 08:56:11 UTC (rev 711) @@ -1,3 +1,9 @@ +2010-11-07 Alexandru Csete <oz9aec at gmail.com> + + * configura.ac: + Added implicit check for libm (required on Fedora core 13 and later). + + 2010-11-06 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.c Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2010-11-07 01:08:13 UTC (rev 710) +++ trunk/configure.ac 2010-11-07 08:56:11 UTC (rev 711) @@ -20,6 +20,9 @@ CFLAGS="${CFLAGS} -Wall" fi +dnl check for libm +AC_CHECK_LIB([m], [sin],, AC_MSG_ERROR([Can't find libm. Check your libc installation])) + dnl check for glib, gtk, and goocanvas libraries pkg_modules="gtk+-2.0 >= 2.18.0 glib-2.0 >= 2.22.0 gthread-2.0 >= 2.22.0 goocanvas >= 0.15 libcurl >= 7.19.0" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-07 01:08:19
|
Revision: 710 http://gpredict.svn.sourceforge.net/gpredict/?rev=710&view=rev Author: aa1vs Date: 2010-11-07 01:08:13 +0000 (Sun, 07 Nov 2010) Log Message: ----------- Update ChangeLog Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-07 01:01:41 UTC (rev 709) +++ trunk/ChangeLog 2010-11-07 01:08:13 UTC (rev 710) @@ -3,6 +3,10 @@ * src/gtk-rot-ctrl.c Added checks on g_strsplit in get_pos + * src/predict-tools.c + get_current_pass now works on copy of sat_t structure + to address bug 3099314 + 2010-11-05 Charles Suprin <hamaa1vs at gmail.com> * src/predict-tools.c This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-07 01:01:47
|
Revision: 709 http://gpredict.svn.sourceforge.net/gpredict/?rev=709&view=rev Author: aa1vs Date: 2010-11-07 01:01:41 +0000 (Sun, 07 Nov 2010) Log Message: ----------- get_current_pass now works on a copy of sat_t structure to address bug 3099314 Modified Paths: -------------- trunk/src/predict-tools.c Modified: trunk/src/predict-tools.c =================================================================== --- trunk/src/predict-tools.c 2010-11-06 15:17:48 UTC (rev 708) +++ trunk/src/predict-tools.c 2010-11-07 01:01:41 UTC (rev 709) @@ -986,7 +986,7 @@ default: break; } - + pass->details = g_slist_prepend (pass->details, detail); /* store elevation if greater than the @@ -1036,11 +1036,14 @@ * */ pass_t * -get_current_pass (sat_t *sat, qth_t *qth, gdouble start) +get_current_pass (sat_t *sat_in, qth_t *qth, gdouble start) { gdouble t; + sat_t *sat,sat_working; + + /*copy sat_in to a working structure*/ + sat = memcpy(&sat_working,sat_in,sizeof(sat_t)); - if (start > 0.0) t = start; else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-06 15:17:54
|
Revision: 708 http://gpredict.svn.sourceforge.net/gpredict/?rev=708&view=rev Author: aa1vs Date: 2010-11-06 15:17:48 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Update ChangeLog and NEWS Modified Paths: -------------- trunk/ChangeLog trunk/NEWS Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-06 13:35:09 UTC (rev 707) +++ trunk/ChangeLog 2010-11-06 15:17:48 UTC (rev 708) @@ -1,3 +1,25 @@ +2010-11-06 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-rot-ctrl.c + Added checks on g_strsplit in get_pos + +2010-11-05 Charles Suprin <hamaa1vs at gmail.com> + + * src/predict-tools.c + get_pass and get_pass_no_min_el now work on copies of sat_t structure + to address bug 3099314 + + * src/gtk-rot-ctrl.c + Update is_flipped_pass to handle pass with no details + +2010-11-01 Charles Suprin <hamaa1vs at gmail.com> + + * src/orbit-tools.c + Corrected fixme inside decayed. + + * src/gtk-rig-ctrl.c + Add checks to g_strsplit calls in gtk-rig-ctrl.c + 2010-10-31 Charles Suprin <hamaa1vs at gmail.com> * src/about.[ch] @@ -135,7 +157,6 @@ * src/gtk-sat-module-popup.c: Allow only one GtkSkyGlance widget per module (consistent with GtkRigCtrl and GtkRotCtrl). - 2010-10-15 Alexandru Csete <oz9aec at gmail.com> Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-11-06 13:35:09 UTC (rev 707) +++ trunk/NEWS 2010-11-06 15:17:48 UTC (rev 708) @@ -2,7 +2,9 @@ - Feature request 2873824: Flip Passes. - Automatically refresh the Sky at a glance view every minute. +- Added more checks with hamlib communications. - Fixed bug 2116691: Leave network connection open. +- Fixed bug 3099314: Rotator Thrashing. Changes in version 1.2 (12 Oct 2010) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-06 13:35:16
|
Revision: 707 http://gpredict.svn.sourceforge.net/gpredict/?rev=707&view=rev Author: aa1vs Date: 2010-11-06 13:35:09 +0000 (Sat, 06 Nov 2010) Log Message: ----------- Added checks on g_strsplit in get_pos Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2010-11-05 11:24:39 UTC (rev 706) +++ trunk/src/gtk-rot-ctrl.c 2010-11-06 13:35:09 UTC (rev 707) @@ -1019,8 +1019,15 @@ } else { vbuff = g_strsplit (buffback, "\n", 3); - *az = g_strtod (vbuff[0], NULL); - *el = g_strtod (vbuff[1], NULL); + if ((vbuff[0] !=NULL) && (vbuff[1]!=NULL)){ + *az = g_strtod (vbuff[0], NULL); + *el = g_strtod (vbuff[1], NULL); + } else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: rotctld returned bad response (%s)"), + __FILE__, __LINE__,buffback); + retcode=FALSE; + } g_strfreev (vbuff); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-05 11:24:45
|
Revision: 706 http://gpredict.svn.sourceforge.net/gpredict/?rev=706&view=rev Author: aa1vs Date: 2010-11-05 11:24:39 +0000 (Fri, 05 Nov 2010) Log Message: ----------- Update is_flipped_pass to handle pass with no details Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2010-11-05 11:23:27 UTC (rev 705) +++ trunk/src/gtk-rot-ctrl.c 2010-11-05 11:24:39 UTC (rev 706) @@ -1341,20 +1341,22 @@ last_az+=360; } - for (i = 1; i < num-1; i++) { - detail = PASS_DETAIL(g_slist_nth_data (pass->details, i)); - caz=detail->az; - while (caz>max_az) { - caz-=360; - } - while (caz<min_az) { - caz+=360; + if (num>1) { + for (i = 1; i < num-1; i++) { + detail = PASS_DETAIL(g_slist_nth_data (pass->details, i)); + caz=detail->az; + while (caz>max_az) { + caz-=360; + } + while (caz<min_az) { + caz+=360; + } + if (fabs(caz-last_az)>180) { + retval=TRUE; + } + last_az=caz; + } - if (fabs(caz-last_az)>180) { - retval=TRUE; - } - last_az=caz; - } caz=pass->los_az; while (caz>max_az) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-05 11:23:33
|
Revision: 705 http://gpredict.svn.sourceforge.net/gpredict/?rev=705&view=rev Author: aa1vs Date: 2010-11-05 11:23:27 +0000 (Fri, 05 Nov 2010) Log Message: ----------- get_pass and get_pass_no_min_el now work on copies of sat_t structure to address bug 3099314 Modified Paths: -------------- trunk/src/predict-tools.c Modified: trunk/src/predict-tools.c =================================================================== --- trunk/src/predict-tools.c 2010-11-01 19:54:24 UTC (rev 704) +++ trunk/src/predict-tools.c 2010-11-05 11:23:27 UTC (rev 705) @@ -418,7 +418,7 @@ * reversed */ pass_t * -get_pass (sat_t *sat, qth_t *qth, gdouble start, gdouble maxdt) +get_pass (sat_t *sat_in, qth_t *qth, gdouble start, gdouble maxdt) { gdouble aos = 0.0; /* time of AOS */ gdouble tca = 0.0; /* time of TCA */ @@ -433,9 +433,12 @@ pass_detail_t *detail = NULL; gboolean done = FALSE; guint iter = 0; /* number of iterations */ - + sat_t *sat,sat_working; /* FIXME: watchdog */ + /*copy sat_in to a working structure*/ + sat = memcpy(&sat_working,sat_in,sizeof(sat_t)); + /* get time resolution; sat-cfg stores it in seconds */ tres = sat_cfg_get_int (SAT_CFG_INT_PRED_RESOLUTION) / 86400.0; @@ -862,7 +865,7 @@ * reversed */ pass_t * -get_pass_no_min_el (sat_t *sat, qth_t *qth, gdouble start, gdouble maxdt) +get_pass_no_min_el (sat_t *sat_in, qth_t *qth, gdouble start, gdouble maxdt) { gdouble aos = 0.0; /* time of AOS */ gdouble tca = 0.0; /* time of TCA */ @@ -876,10 +879,13 @@ pass_t *pass = NULL; pass_detail_t *detail = NULL; gboolean done = FALSE; + sat_t *sat,sat_working; - /* FIXME: watchdog */ + /*copy sat_in to a working structure*/ + sat = memcpy(&sat_working,sat_in,sizeof(sat_t)); + /* get time resolution; sat-cfg stores it in seconds */ tres = sat_cfg_get_int (SAT_CFG_INT_PRED_RESOLUTION) / 86400.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-01 19:54:31
|
Revision: 704 http://gpredict.svn.sourceforge.net/gpredict/?rev=704&view=rev Author: aa1vs Date: 2010-11-01 19:54:24 +0000 (Mon, 01 Nov 2010) Log Message: ----------- Add checks to g_strsplit calls in gtk-rig-ctrl.c Modified Paths: -------------- trunk/src/gtk-rig-ctrl.c Modified: trunk/src/gtk-rig-ctrl.c =================================================================== --- trunk/src/gtk-rig-ctrl.c 2010-11-01 19:51:23 UTC (rev 703) +++ trunk/src/gtk-rig-ctrl.c 2010-11-01 19:54:24 UTC (rev 704) @@ -1965,8 +1965,8 @@ retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); if (retcode) { vbuff = g_strsplit (buffback, "\n", 3); - pttstat = g_ascii_strtoull (vbuff[0], NULL, 0); //FIXME base = 0 ok? - + if (vbuff[0]) + pttstat = g_ascii_strtoull (vbuff[0], NULL, 0); //FIXME base = 0 ok? g_strfreev (vbuff); } g_free (buff); @@ -2120,6 +2120,7 @@ gchar *buff,**vbuff; gchar buffback[128]; gboolean retcode; + gboolean retval = TRUE; buff = g_strdup_printf ("f\x0a"); @@ -2127,10 +2128,15 @@ retcode=check_get_response(buffback,retcode,__FUNCTION__); if (retcode) { vbuff = g_strsplit (buffback, "\n", 3); - *freq = g_ascii_strtod (vbuff[0], NULL); + if (vbuff[0]) + *freq = g_ascii_strtod (vbuff[0], NULL); + else + retval = FALSE; g_strfreev (vbuff); + } else { + retval = FALSE; } - return TRUE; + return retval; } /** \brief Get frequency when the radio is working toggle @@ -2145,6 +2151,7 @@ gchar *buff,**vbuff; gchar buffback[128]; gboolean retcode; + gboolean retval=TRUE; if (freq == NULL) { sat_log_log (SAT_LOG_LEVEL_BUG, @@ -2160,10 +2167,16 @@ retcode=check_get_response(buffback,retcode,__FUNCTION__); if (retcode) { vbuff = g_strsplit (buffback, "\n", 3); - *freq = g_ascii_strtod (vbuff[0], NULL); + if (vbuff[0]) + *freq = g_ascii_strtod (vbuff[0], NULL); + else + retval = FALSE; + g_strfreev (vbuff); + } else { + retval = FALSE; } - return TRUE; + return retval; } /** \brief Select target VFO This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-01 19:51:29
|
Revision: 703 http://gpredict.svn.sourceforge.net/gpredict/?rev=703&view=rev Author: aa1vs Date: 2010-11-01 19:51:23 +0000 (Mon, 01 Nov 2010) Log Message: ----------- Corrected fixme inside decayed. Modified Paths: -------------- trunk/src/orbit-tools.c Modified: trunk/src/orbit-tools.c =================================================================== --- trunk/src/orbit-tools.c 2010-11-01 00:42:00 UTC (rev 702) +++ trunk/src/orbit-tools.c 2010-11-01 19:51:23 UTC (rev 703) @@ -95,9 +95,14 @@ decayed (sat_t *sat) { - /*** FIXME: should use the unconverted xndt2o here! */ + /* tle.xndt2o/(twopi/xmnpda/xmnpda) is the value before converted the + value matches up with the value in predict 2.2.3 */ + /*** FIXME decayed is treated as a static quantity. + It is time dependent. Also sat->jul_utc is often zero + when this function is called + ***/ if (sat->jul_epoch + ((16.666666 - sat->meanmo) / - (10.0 * fabs (sat->tle.xndt2o))) < sat->jul_utc) + (10.0 * fabs (sat->tle.xndt2o/(twopi/xmnpda/xmnpda)))) < sat->jul_utc) return TRUE; else return FALSE; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-01 00:42:06
|
Revision: 702 http://gpredict.svn.sourceforge.net/gpredict/?rev=702&view=rev Author: aa1vs Date: 2010-11-01 00:42:00 +0000 (Mon, 01 Nov 2010) Log Message: ----------- Update ChangeLog Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-01 00:01:49 UTC (rev 701) +++ trunk/ChangeLog 2010-11-01 00:42:00 UTC (rev 702) @@ -89,6 +89,10 @@ * src/tle-update.[ch] Change tab to spaces and change emacs indent-tabs-mode. + * src/gtk-polar-view.c + * src/gtk-polar-view-popup.c + Catch if pass has no points before making polar view/polar view popup + 2010-10-30 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.[ch] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-11-01 00:01:55
|
Revision: 701 http://gpredict.svn.sourceforge.net/gpredict/?rev=701&view=rev Author: aa1vs Date: 2010-11-01 00:01:49 +0000 (Mon, 01 Nov 2010) Log Message: ----------- Catch if pass has no points before making polar view popup Modified Paths: -------------- trunk/src/gtk-polar-view-popup.c Modified: trunk/src/gtk-polar-view-popup.c =================================================================== --- trunk/src/gtk-polar-view-popup.c 2010-10-31 23:37:25 UTC (rev 700) +++ trunk/src/gtk-polar-view-popup.c 2010-11-01 00:01:49 UTC (rev 701) @@ -210,6 +210,12 @@ /* create points */ num = g_slist_length (obj->pass->details); + if (num == 0) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Pass has no details."), + __FILE__, __LINE__); + return; + } /* time resolution for time ticks; we need 3 additional points to AOS and LOS ticks. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-31 23:37:31
|
Revision: 700 http://gpredict.svn.sourceforge.net/gpredict/?rev=700&view=rev Author: aa1vs Date: 2010-10-31 23:37:25 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Catch if pass has no points before making polar view Modified Paths: -------------- trunk/src/gtk-polar-view.c Modified: trunk/src/gtk-polar-view.c =================================================================== --- trunk/src/gtk-polar-view.c 2010-10-31 15:06:50 UTC (rev 699) +++ trunk/src/gtk-polar-view.c 2010-10-31 23:37:25 UTC (rev 700) @@ -1005,6 +1005,12 @@ /* create points */ num = g_slist_length (obj->pass->details); + if (num == 0) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Pass had no points in it."), + __FILE__, __LINE__); + return; + } points = goo_canvas_points_new (num); @@ -1145,6 +1151,12 @@ /* create points */ num = g_slist_length (obj->pass->details); + if (num == 0) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Pass had no points in it."), + __FILE__, __LINE__); + return; + } /* time resolution for time ticks; we need 3 additional points to AOS and LOS ticks. @@ -1152,7 +1164,9 @@ tres = (num-2) / (TRACK_TICK_NUM-1); points = goo_canvas_points_new (num); + + /* first point should be (aos_az,0.0) */ azel_to_xy (pv, obj->pass->aos_az, 0.0, &x, &y); points->coords[0] = (double) x; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-31 15:06:56
|
Revision: 699 http://gpredict.svn.sourceforge.net/gpredict/?rev=699&view=rev Author: aa1vs Date: 2010-10-31 15:06:50 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Update ChangeLog Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-10-31 15:04:57 UTC (rev 698) +++ trunk/ChangeLog 2010-10-31 15:06:50 UTC (rev 699) @@ -1,7 +1,6 @@ 2010-10-31 Charles Suprin <hamaa1vs at gmail.com> - trunk/src/about.c - * src/about.h + * src/about.[ch] * src/compat.[ch] * src/config-keys.h * src/defaults.h This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-31 15:05:03
|
Revision: 698 http://gpredict.svn.sourceforge.net/gpredict/?rev=698&view=rev Author: aa1vs Date: 2010-10-31 15:04:57 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Update ChangeLog Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-10-31 14:46:55 UTC (rev 697) +++ trunk/ChangeLog 2010-10-31 15:04:57 UTC (rev 698) @@ -1,3 +1,95 @@ +2010-10-31 Charles Suprin <hamaa1vs at gmail.com> + + trunk/src/about.c + * src/about.h + * src/compat.[ch] + * src/config-keys.h + * src/defaults.h + * src/first-time.[ch] + * src/gpredict-help.[ch] + * src/gpredict-url-hook.[ch] + * src/gpredict-utils.[ch] + * src/gtk-azel-plot.[ch] + * src/gtk-event-list-popup.[ch] + * src/gtk-event-list.[ch] + * src/gtk-freq-knob.[ch] + * src/gtk-polar-plot.[ch] + * src/gtk-polar-view-popup.[ch] + * src/gtk-polar-view.[ch] + * src/gtk-rot-knob.[ch] + * src/gtk-sat-data.[ch] + * src/gtk-sat-list-col-sel.[ch] + * src/gtk-sat-list-popup.[ch] + * src/gtk-sat-list.[ch] + * src/gtk-sat-map-ground-track.[ch] + * src/gtk-sat-map-popup.[ch] + * src/gtk-sat-map.[ch] + * src/gtk-sat-module-popup.[ch] + * src/gtk-sat-module-tmg.[ch] + * src/gtk-sat-module.[ch] + * src/gtk-sat-selector.[ch] + * src/gtk-sat-tree.[ch] + * src/gtk-single-sat.[ch] + * src/gtk-sky-glance.[ch] + * src/gui.[ch] + * src/loc-tree.[ch] + * src/locator.[ch] + * src/main.c + * src/map-selector.[ch] + * src/menubar.[ch] + * src/mod-cfg-get-param.[ch] + * src/mod-cfg.[ch] + * src/mod-mgr.[ch] + * src/orbit-tools.[ch] + * src/pass-popup-menu.[ch] + * src/pass-to-txt.[ch] + * src/predict-tools.[ch] + * src/print-pass.[ch] + * src/qth-data.[ch] + * src/qth-editor.[ch] + * src/sat-cfg.[ch] + * src/sat-debugger.c + * src/sat-info.[ch] + * src/sat-log-browser.[ch] + * src/sat-log.[ch] + * src/sat-monitor.[ch] + * src/sat-pass-dialogs.[ch] + * src/sat-pref-conditions.[ch] + * src/sat-pref-debug.[ch] + * src/sat-pref-formats.[ch] + * src/sat-pref-general.[ch] + * src/sat-pref-help.[ch] + * src/sat-pref-interfaces.[ch] + * src/sat-pref-layout-utils.[ch] + * src/sat-pref-layout.[ch] + * src/sat-pref-list-view.[ch] + * src/sat-pref-map-view.[ch] + * src/sat-pref-modules.[ch] + * src/sat-pref-multi-pass.[ch] + * src/sat-pref-polar-view.[ch] + * src/sat-pref-predict.[ch] + * src/sat-pref-qth-data.h + * src/sat-pref-qth-editor.[ch] + * src/sat-pref-qth.[ch] + * src/sat-pref-refresh.[ch] + * src/sat-pref-rig-data.h + * src/sat-pref-rig-editor.[ch] + * src/sat-pref-rig.[ch] + * src/sat-pref-rot-data.h + * src/sat-pref-rot-editor.[ch] + * src/sat-pref-rot.[ch] + * src/sat-pref-single-pass.[ch] + * src/sat-pref-single-sat.[ch] + * src/sat-pref-sky-at-glance.[ch] + * src/sat-pref-tle.[ch] + * src/sat-pref.[ch] + * src/sat-vis.[ch] + * src/save-pass.[ch] + * src/time-tools.[ch] + * src/tle-tools.[ch] + * src/tle-update.[ch] + Change tab to spaces and change emacs indent-tabs-mode. + 2010-10-30 Charles Suprin <hamaa1vs at gmail.com> * src/gtk-rot-ctrl.[ch] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-31 14:47:05
|
Revision: 697 http://gpredict.svn.sourceforge.net/gpredict/?rev=697&view=rev Author: aa1vs Date: 2010-10-31 14:46:55 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Replacing tabs with spaces and updating c-mode commands Modified Paths: -------------- 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-event-list-popup.c trunk/src/gtk-event-list-popup.h trunk/src/gtk-event-list.c trunk/src/gtk-event-list.h trunk/src/gtk-freq-knob.c trunk/src/gtk-freq-knob.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-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-popup.c trunk/src/gtk-sat-list-popup.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-selector.c trunk/src/gtk-sat-selector.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.c 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/print-pass.c trunk/src/print-pass.h trunk/src/qth-data.c trunk/src/qth-data.h trunk/src/qth-editor.c trunk/src/qth-editor.h trunk/src/sat-cfg.c trunk/src/sat-cfg.h trunk/src/sat-debugger.c trunk/src/sat-info.c trunk/src/sat-info.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-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-utils.c trunk/src/sat-pref-layout-utils.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/time-tools.c trunk/src/time-tools.h trunk/src/tle-tools.c trunk/src/tle-tools.h trunk/src/tle-update.c trunk/src/tle-update.h Modified: trunk/src/about.c =================================================================== --- trunk/src/about.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/about.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Modified: trunk/src/about.h =================================================================== --- trunk/src/about.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/about.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Modified: trunk/src/compat.c =================================================================== --- trunk/src/compat.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/compat.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -106,7 +106,7 @@ gchar *buff = g_win32_get_package_installation_directory (NULL, NULL); dir = g_strconcat (buff, G_DIR_SEPARATOR_S, "share", G_DIR_SEPARATOR_S, - /* FIXME */ + /* FIXME */ "gpredict", G_DIR_SEPARATOR_S, "pixmaps", G_DIR_SEPARATOR_S, "maps", NULL); Modified: trunk/src/compat.h =================================================================== --- trunk/src/compat.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/compat.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Modified: trunk/src/config-keys.h =================================================================== --- trunk/src/config-keys.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/config-keys.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Modified: trunk/src/defaults.h =================================================================== --- trunk/src/defaults.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/defaults.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Modified: trunk/src/first-time.c =================================================================== --- trunk/src/first-time.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/first-time.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -626,7 +626,7 @@ } g_free (source); } - g_free (catfilename); + g_free (catfilename); } } g_dir_close (srcdir); @@ -885,10 +885,10 @@ } g_dir_close (dir); } else { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: %s directory does not exist. Incomplete installation."), - __FUNCTION__, datadirname); - } + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: %s directory does not exist. Incomplete installation."), + __FUNCTION__, datadirname); + } g_free (datadirname); } g_free (targetdirname); Modified: trunk/src/first-time.h =================================================================== --- trunk/src/first-time.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/first-time.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program Modified: trunk/src/gpredict-help.c =================================================================== --- trunk/src/gpredict-help.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gpredict-help.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -50,46 +50,46 @@ void gpredict_help_launch (gpredict_help_type_t type) { - browser_type_t idx; - gint resp; + browser_type_t idx; + gint resp; - idx = sat_cfg_get_int (SAT_CFG_INT_WEB_BROWSER_TYPE); + idx = sat_cfg_get_int (SAT_CFG_INT_WEB_BROWSER_TYPE); - /* some sanity check before accessing the arrays ;-) */ - if ((idx < BROWSER_TYPE_NONE) || (idx >= BROWSER_TYPE_NUM)) { - idx = BROWSER_TYPE_NONE; - } + /* some sanity check before accessing the arrays ;-) */ + if ((idx < BROWSER_TYPE_NONE) || (idx >= BROWSER_TYPE_NUM)) { + idx = BROWSER_TYPE_NONE; + } - if (idx == BROWSER_TYPE_NONE) { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Help browser is not set up yet."), - __FUNCTION__); + if (idx == BROWSER_TYPE_NONE) { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Help browser is not set up yet."), + __FUNCTION__); - resp = config_help (); + resp = config_help (); - if (resp == GTK_RESPONSE_CANCEL) { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Configure help browser cancelled."), - __FUNCTION__); + if (resp == GTK_RESPONSE_CANCEL) { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Configure help browser cancelled."), + __FUNCTION__); - return; - } + return; + } - /* else try again */ - idx = sat_cfg_get_int (SAT_CFG_INT_WEB_BROWSER_TYPE); - } + /* else try again */ + idx = sat_cfg_get_int (SAT_CFG_INT_WEB_BROWSER_TYPE); + } - if ((idx <= BROWSER_TYPE_NONE) || (idx >= BROWSER_TYPE_NUM)) { - return; - } + if ((idx <= BROWSER_TYPE_NONE) || (idx >= BROWSER_TYPE_NUM)) { + return; + } - /* launch help browser */ - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Launching help browser %s."), - __FUNCTION__, sat_help[idx].type); + /* launch help browser */ + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Launching help browser %s."), + __FUNCTION__, sat_help[idx].type); - g_print ("FIXME: FINSH IMPELMTATION\n"); + g_print ("FIXME: FINSH IMPELMTATION\n"); } @@ -106,45 +106,45 @@ static gint config_help (void) { - GtkWidget *dialog; - GtkWidget *label; - gint resp; + GtkWidget *dialog; + GtkWidget *label; + gint resp; - dialog = gtk_dialog_new_with_buttons (_("Configure Help Browser"), - GTK_WINDOW (app), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, - GTK_RESPONSE_OK, - NULL); + dialog = gtk_dialog_new_with_buttons (_("Configure Help Browser"), + GTK_WINDOW (app), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, + GTK_RESPONSE_OK, + NULL); - label = gtk_label_new (_("Please select a HTML browser to be used to view the help.")); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - sat_pref_help_create (), TRUE, FALSE, 0); + label = gtk_label_new (_("Please select a HTML browser to be used to view the help.")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + sat_pref_help_create (), TRUE, FALSE, 0); - gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); - resp = gtk_dialog_run (GTK_DIALOG (dialog)); + resp = gtk_dialog_run (GTK_DIALOG (dialog)); - switch (resp) { + switch (resp) { - /* save browser settings */ - case GTK_RESPONSE_OK: - sat_pref_help_ok (); - break; - - default: - sat_pref_help_cancel (); - break; - } + /* save browser settings */ + case GTK_RESPONSE_OK: + sat_pref_help_ok (); + break; + + default: + sat_pref_help_cancel (); + break; + } - gtk_widget_destroy (dialog); + gtk_widget_destroy (dialog); - return resp; + return resp; } @@ -160,92 +160,92 @@ void gpredict_help_show_txt (const gchar *filename) { - GtkWidget *dialog; - GtkWidget *swin; - GtkWidget *view; - GtkTextBuffer *txtbuf; - GIOChannel *chan; - GError *error = NULL; - gchar *fname; - gchar *buff; - gsize length; + GtkWidget *dialog; + GtkWidget *swin; + GtkWidget *view; + GtkTextBuffer *txtbuf; + GIOChannel *chan; + GError *error = NULL; + gchar *fname; + gchar *buff; + gsize length; - /* get system data directory */ + /* get system data directory */ #ifdef G_OS_UNIX - fname = g_strconcat (PACKAGE_DATA_DIR, G_DIR_SEPARATOR_S, filename, NULL); + fname = g_strconcat (PACKAGE_DATA_DIR, G_DIR_SEPARATOR_S, filename, NULL); #else # ifdef G_OS_WIN32 buff = g_win32_get_package_installation_directory (NULL, NULL); fname = g_strconcat (buff, G_DIR_SEPARATOR_S, - "doc", G_DIR_SEPARATOR_S, - filename, ".txt", NULL); + "doc", G_DIR_SEPARATOR_S, + filename, ".txt", NULL); g_free (buff); # endif #endif - /* load file into buffer */ - chan = g_io_channel_new_file (fname, "r", &error); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to load %s (%s)"), - __FUNCTION__, fname, error->message); - g_free (fname); - g_clear_error (&error); + /* load file into buffer */ + chan = g_io_channel_new_file (fname, "r", &error); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to load %s (%s)"), + __FUNCTION__, fname, error->message); + g_free (fname); + g_clear_error (&error); - return; - } + return; + } - g_io_channel_read_to_end (chan, &buff, &length, &error); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Error reading %s (%s)"), - __FUNCTION__, fname, error->message); + g_io_channel_read_to_end (chan, &buff, &length, &error); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Error reading %s (%s)"), + __FUNCTION__, fname, error->message); - g_free (buff); - g_clear_error (&error); - g_io_channel_shutdown (chan, TRUE, NULL); - g_io_channel_unref (chan); + g_free (buff); + g_clear_error (&error); + g_io_channel_shutdown (chan, TRUE, NULL); + g_io_channel_unref (chan); - return; - } + return; + } - g_free (fname); - - /* create text view and text buffer widgets */ - view = gtk_text_view_new (); - gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); - gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE); - txtbuf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); + g_free (fname); + + /* create text view and text buffer widgets */ + view = gtk_text_view_new (); + gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); + gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE); + txtbuf = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); - gtk_text_buffer_set_text (txtbuf, buff, -1); - g_free (buff); + gtk_text_buffer_set_text (txtbuf, buff, -1); + g_free (buff); - /* scrolled window */ - swin = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swin), - GTK_SHADOW_ETCHED_IN); - gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), - GTK_POLICY_NEVER, - GTK_POLICY_AUTOMATIC); - gtk_container_add (GTK_CONTAINER (swin), view); + /* scrolled window */ + swin = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (swin), + GTK_SHADOW_ETCHED_IN); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (swin), view); - /* create and show dialogue with textbuffer */ - dialog = gtk_dialog_new_with_buttons (_("Gpredict Info"), - NULL, - 0, - GTK_STOCK_CLOSE, - GTK_RESPONSE_ACCEPT, - NULL); - gtk_widget_set_size_request (dialog, -1, 450); - buff = icon_file_name ("gpredict-icon.png"); - gtk_window_set_icon_from_file (GTK_WINDOW (dialog), buff, NULL); - g_free (buff); + /* create and show dialogue with textbuffer */ + dialog = gtk_dialog_new_with_buttons (_("Gpredict Info"), + NULL, + 0, + GTK_STOCK_CLOSE, + GTK_RESPONSE_ACCEPT, + NULL); + gtk_widget_set_size_request (dialog, -1, 450); + buff = icon_file_name ("gpredict-icon.png"); + gtk_window_set_icon_from_file (GTK_WINDOW (dialog), buff, NULL); + g_free (buff); - g_signal_connect_swapped (dialog, "response", - G_CALLBACK (gtk_widget_destroy), dialog); + g_signal_connect_swapped (dialog, "response", + G_CALLBACK (gtk_widget_destroy), dialog); - gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), swin); - gtk_widget_show_all (dialog); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), swin); + gtk_widget_show_all (dialog); } Modified: trunk/src/gpredict-help.h =================================================================== --- trunk/src/gpredict-help.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gpredict-help.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -30,8 +30,8 @@ typedef enum { - GPREDICT_HELP_GETTING_STARTED, - GPREDICT_HELP_USER_MANUAL + GPREDICT_HELP_GETTING_STARTED, + GPREDICT_HELP_USER_MANUAL } gpredict_help_type_t; Modified: trunk/src/gpredict-url-hook.c =================================================================== --- trunk/src/gpredict-url-hook.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gpredict-url-hook.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -36,8 +36,8 @@ void gpredict_url_hook_cb (GtkAboutDialog *about, - const gchar *link, - gpointer data) + const gchar *link, + gpointer data) { Modified: trunk/src/gpredict-url-hook.h =================================================================== --- trunk/src/gpredict-url-hook.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gpredict-url-hook.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -31,7 +31,7 @@ #include <gtk/gtk.h> void gpredict_url_hook_cb (GtkAboutDialog *about, - const gchar *link, - gpointer data); + const gchar *link, + gpointer data); #endif Modified: trunk/src/gpredict-utils.c =================================================================== --- trunk/src/gpredict-utils.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gpredict-utils.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -51,28 +51,28 @@ GtkWidget * gpredict_hpixmap_button (const gchar *file, const gchar *text, const gchar *tooltip) { - GtkWidget *button; - GtkWidget *image; - GtkWidget *box; - gchar *path; - GtkTooltips *tips; + GtkWidget *button; + GtkWidget *image; + GtkWidget *box; + gchar *path; + GtkTooltips *tips; - path = icon_file_name (file); - image = gtk_image_new_from_file (path); - g_free (path); - box = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); - if (text != NULL) - gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); + path = icon_file_name (file); + image = gtk_image_new_from_file (path); + g_free (path); + box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); + if (text != NULL) + gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); - button = gtk_button_new (); - gtk_container_add (GTK_CONTAINER (button), box); + button = gtk_button_new (); + gtk_container_add (GTK_CONTAINER (button), box); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, button, tooltip, NULL); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, button, tooltip, NULL); - return button; + return button; } @@ -86,28 +86,28 @@ GtkWidget * gpredict_vpixmap_button (const gchar *file, const gchar *text, const gchar *tooltip) { - GtkWidget *button; - GtkWidget *image; - GtkWidget *box; - gchar *path; - GtkTooltips *tips; + GtkWidget *button; + GtkWidget *image; + GtkWidget *box; + gchar *path; + GtkTooltips *tips; - path = icon_file_name (file); - image = gtk_image_new_from_file (path); - g_free (path); - box = gtk_vbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); - if (text != NULL) - gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); + path = icon_file_name (file); + image = gtk_image_new_from_file (path); + g_free (path); + box = gtk_vbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); + if (text != NULL) + gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); - button = gtk_button_new (); - gtk_container_add (GTK_CONTAINER (button), box); + button = gtk_button_new (); + gtk_container_add (GTK_CONTAINER (button), box); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, button, tooltip, NULL); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, button, tooltip, NULL); - return button; + return button; } @@ -119,26 +119,26 @@ GtkWidget * gpredict_hstock_button (const gchar *stock_id, const gchar *text, const gchar *tooltip) { - GtkWidget *button; - GtkWidget *image; - GtkWidget *box; - GtkTooltips *tips; - + GtkWidget *button; + GtkWidget *image; + GtkWidget *box; + GtkTooltips *tips; + - image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); - box = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); - if (text != NULL) - gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); + image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_BUTTON); + box = gtk_hbox_new (FALSE, 0); + gtk_box_pack_start (GTK_BOX (box), image, TRUE, TRUE, 0); + if (text != NULL) + gtk_box_pack_start (GTK_BOX (box), gtk_label_new (text), TRUE, TRUE, 0); - button = gtk_button_new (); - gtk_container_add (GTK_CONTAINER (button), box); + button = gtk_button_new (); + gtk_container_add (GTK_CONTAINER (button), box); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, button, tooltip, NULL); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, button, tooltip, NULL); - return button; + return button; } @@ -164,12 +164,12 @@ gpredict_set_combo_tooltips (GtkWidget *combo, gpointer text) { - /* for each child in the container call the internal - function which actually creates the tooltips. - */ - gtk_container_forall (GTK_CONTAINER (combo), - set_combo_tooltip, - text); + /* for each child in the container call the internal + function which actually creates the tooltips. + */ + gtk_container_forall (GTK_CONTAINER (combo), + set_combo_tooltip, + text); } @@ -185,17 +185,17 @@ set_combo_tooltip (GtkWidget *combo, gpointer text) { - /* if current child is a button we have BINGO! */ - if (GTK_IS_BUTTON (combo)) { + /* if current child is a button we have BINGO! */ + if (GTK_IS_BUTTON (combo)) { - GtkTooltips *tips; + GtkTooltips *tips; - tips = gtk_tooltips_new (); + tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, combo, - (gchar *) text, - NULL); - } + gtk_tooltips_set_tip (tips, combo, + (gchar *) text, + NULL); + } } @@ -207,44 +207,44 @@ gint gpredict_file_copy (const gchar *in, const gchar *out) { - gchar *contents; - gboolean status=0; - GError *err=NULL; - gsize ulen; - gssize slen; + gchar *contents; + gboolean status=0; + GError *err=NULL; + gsize ulen; + gssize slen; - g_return_val_if_fail (in != NULL, 1); - g_return_val_if_fail (out != NULL, 1); + g_return_val_if_fail (in != NULL, 1); + g_return_val_if_fail (out != NULL, 1); - /* read source file */ - if (!g_file_get_contents (in, &contents, &ulen, &err)) { + /* read source file */ + if (!g_file_get_contents (in, &contents, &ulen, &err)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __FUNCTION__, err->message); - g_clear_error (&err); + sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __FUNCTION__, err->message); + g_clear_error (&err); - status = 1; - } - else { + status = 1; + } + else { - /* write contents to new file */ - slen = (gssize) ulen; + /* write contents to new file */ + slen = (gssize) ulen; - if (!g_file_set_contents (out, contents, slen, &err)) { + if (!g_file_set_contents (out, contents, slen, &err)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __FUNCTION__, err->message); - g_clear_error (&err); + sat_log_log (SAT_LOG_LEVEL_ERROR, "%s: %s", __FUNCTION__, err->message); + g_clear_error (&err); - status = 1; + status = 1; - } + } - g_free (contents); - } + g_free (contents); + } - return status; + return status; } @@ -256,24 +256,24 @@ GtkWidget * gpredict_mini_mod_button (const gchar *pixmapfile, const gchar *tooltip) { - GtkWidget *button; - GtkWidget *image; - gchar *path; - GtkTooltips *tips; + GtkWidget *button; + GtkWidget *image; + gchar *path; + GtkTooltips *tips; - path = icon_file_name (pixmapfile); - image = gtk_image_new_from_file (path); - g_free (path); + path = icon_file_name (pixmapfile); + image = gtk_image_new_from_file (path); + g_free (path); - button = gtk_button_new (); - gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); - gtk_container_add (GTK_CONTAINER (button), image); + button = gtk_button_new (); + gtk_button_set_relief (GTK_BUTTON (button), GTK_RELIEF_NONE); + gtk_container_add (GTK_CONTAINER (button), image); - tips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tips, button, tooltip, NULL); + tips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tips, button, tooltip, NULL); - return button; + return button; } @@ -284,33 +284,33 @@ void rgb2gdk (guint rgb, GdkColor *color) { - guint16 r,g,b; - guint tmp; + guint16 r,g,b; + guint tmp; - /* sanity checks */ - if (color == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } + /* sanity checks */ + if (color == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with color = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } - /* red */ - tmp = rgb & 0xFF0000; - r = (guint16) (tmp >> 16); + /* red */ + tmp = rgb & 0xFF0000; + r = (guint16) (tmp >> 16); - /* green */ - tmp = rgb & 0x00FF00; - g = (guint16) (tmp >> 8); + /* green */ + tmp = rgb & 0x00FF00; + g = (guint16) (tmp >> 8); - /* blue */ - tmp = rgb & 0x0000FF; - b = (guint16) tmp; + /* blue */ + tmp = rgb & 0x0000FF; + b = (guint16) tmp; - /* store colours */ - color->red = 257 * r; - color->green = 257 * g; - color->blue = 257 * b; + /* store colours */ + color->red = 257 * r; + color->green = 257 * g; + color->blue = 257 * b; } @@ -322,43 +322,43 @@ void rgba2gdk (guint rgba, GdkColor *color, guint16 *alpha) { - guint16 r,g,b; - guint tmp; + guint16 r,g,b; + guint tmp; - /* sanity checks */ - if (color == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } - if (alpha == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with alpha = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } + /* sanity checks */ + if (color == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with color = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } + if (alpha == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with alpha = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } - /* red */ - tmp = rgba & 0xFF000000; - r = (guint16) (tmp >> 24); + /* red */ + tmp = rgba & 0xFF000000; + r = (guint16) (tmp >> 24); - /* green */ - tmp = rgba & 0x00FF0000; - g = (guint16) (tmp >> 16); + /* green */ + tmp = rgba & 0x00FF0000; + g = (guint16) (tmp >> 16); - /* blue */ - tmp = rgba & 0x0000FF00; - b = (guint16) (tmp >> 8); + /* blue */ + tmp = rgba & 0x0000FF00; + b = (guint16) (tmp >> 8); - /* alpha channel */ - *alpha = (guint16) (257 * (rgba & 0x000000FF)); + /* alpha channel */ + *alpha = (guint16) (257 * (rgba & 0x000000FF)); - /* store colours */ - color->red = 257 * r; - color->green = 257 * g; - color->blue = 257 * b; + /* store colours */ + color->red = 257 * r; + color->green = 257 * g; + color->blue = 257 * b; } @@ -369,37 +369,37 @@ void gdk2rgb (const GdkColor *color, guint *rgb) { - guint r,g,b; - guint16 tmp; + guint r,g,b; + guint16 tmp; - /* sanity checks */ - if (color == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } - if (rgb == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with rgb = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } + /* sanity checks */ + if (color == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with color = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } + if (rgb == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with rgb = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } - /* red */ - tmp = color->red / 257; - r = (guint) (tmp << 16); + /* red */ + tmp = color->red / 257; + r = (guint) (tmp << 16); - /* green */ - tmp = color->green / 257; - g = (guint) (tmp << 8); + /* green */ + tmp = color->green / 257; + g = (guint) (tmp << 8); - /* blue */ - tmp = color->blue / 257; - b = (guint) tmp; + /* blue */ + tmp = color->blue / 257; + b = (guint) tmp; - *rgb = (r | g | b); + *rgb = (r | g | b); } @@ -411,41 +411,41 @@ void gdk2rgba (const GdkColor *color, guint16 alpha, guint *rgba) { - guint r,g,b,a; - guint16 tmp; + guint r,g,b,a; + guint16 tmp; - /* sanity checks */ - if (color == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with color = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } - if (rgba == NULL) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%s: %s called with rgba = NULL"), - __FILE__, __LINE__, __FUNCTION__); - return; - } + /* sanity checks */ + if (color == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with color = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } + if (rgba == NULL) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%s: %s called with rgba = NULL"), + __FILE__, __LINE__, __FUNCTION__); + return; + } - /* red */ - tmp = color->red / 257; - r = (guint) (tmp << 24); + /* red */ + tmp = color->red / 257; + r = (guint) (tmp << 24); - /* green */ - tmp = color->green / 257; - g = (guint) (tmp << 16); + /* green */ + tmp = color->green / 257; + g = (guint) (tmp << 16); - /* blue */ - tmp = color->blue / 257; - b = (guint) (tmp << 8); + /* blue */ + tmp = color->blue / 257; + b = (guint) (tmp << 8); - /* alpha */ - tmp = alpha / 257; - a = (guint) tmp; + /* alpha */ + tmp = alpha / 257; + a = (guint) tmp; - *rgba = (r | g | b | a); + *rgba = (r | g | b | a); } @@ -456,24 +456,24 @@ gchar * rgba2html (guint rgba) { - gchar *col; - guint8 r,g,b; - guint16 tmp; + gchar *col; + guint8 r,g,b; + guint16 tmp; - tmp = rgba & 0xFF000000; - r = (guint8) (tmp >> 24); + tmp = rgba & 0xFF000000; + r = (guint8) (tmp >> 24); - /* green */ - tmp = rgba & 0x00FF0000; - g = (guint8) (tmp >> 16); + /* green */ + tmp = rgba & 0x00FF0000; + g = (guint8) (tmp >> 16); - /* blue */ - tmp = rgba & 0x0000FF00; - b = (guint8) (tmp >> 8); + /* blue */ + tmp = rgba & 0x0000FF00; + b = (guint8) (tmp >> 8); - col = g_strdup_printf ("%X%X%X",r,g,b); + col = g_strdup_printf ("%X%X%X",r,g,b); - return col; + return col; } Modified: trunk/src/gpredict-utils.h =================================================================== --- trunk/src/gpredict-utils.h 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gpredict-utils.h 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -49,7 +49,7 @@ const gchar *tooltip); GtkWidget *gpredict_mini_mod_button (const gchar *pixmapfile, - const gchar *tooltip); + const gchar *tooltip); void gpredict_set_combo_tooltips (GtkWidget *combo, gpointer text); Modified: trunk/src/gtk-azel-plot.c =================================================================== --- trunk/src/gtk-azel-plot.c 2010-10-31 12:47:44 UTC (rev 696) +++ trunk/src/gtk-azel-plot.c 2010-10-31 14:46:55 UTC (rev 697) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -61,16 +61,16 @@ static void gtk_azel_plot_init (GtkAzelPlot *polview); static void gtk_azel_plot_destroy (GtkObject *object); static void size_allocate_cb (GtkWidget *widget, - GtkAllocation *allocation, - gpointer data); + GtkAllocation *allocation, + gpointer data); static gboolean on_motion_notify (GooCanvasItem *item, - GooCanvasItem *target, - GdkEventMotion *event, - gpointer data); + GooCanvasItem *target, + GdkEventMotion *event, + gpointer data); static void on_item_created (GooCanvas *canvas, - GooCanvasItem *item, - GooCanvasItemModel *model, - gpointer data); + GooCanvasItem *item, + GooCanvasItemModel *model, + gpointer data); static void on_canvas_realized (GtkWidget *canvas, gpointer data); static GooCanvasItemModel* create_canvas_model (GtkAzelPlot *polv); static void get_canvas_bg_color (GtkAzelPlot *polv, GdkColor *color); @@ -85,65 +85,65 @@ GtkType gtk_azel_plot_get_type () { - static GType gtk_azel_plot_type = 0; + static GType gtk_azel_plot_type = 0; - if (!gtk_azel_plot_type) { - static const GTypeInfo gtk_azel_plot_info = { - sizeof (GtkAzelPlotClass), - NULL, /* base init */ - NULL, /* base finalise */ - (GClassInitFunc) gtk_azel_plot_class_init, - NULL, /* class finalise */ - NULL, /* class data */ - sizeof (GtkAzelPlot), - 5, /* n_preallocs */ - (GInstanceInitFunc) gtk_azel_plot_init, - }; + if (!gtk_azel_plot_type) { + static const GTypeInfo gtk_azel_plot_info = { + sizeof (GtkAzelPlotClass), + NULL, /* base init */ + NULL, /* base finalise */ + (GClassInitFunc) gtk_azel_plot_class_init, + NULL, /* class finalise */ + NULL, /* class data */ + sizeof (GtkAzelPlot), + 5, /* n_preallocs */ + (GInstanceInitFunc) gtk_azel_plot_init, + }; - gtk_azel_plot_type = g_type_register_static (GTK_TYPE_VBOX, - "GtkAzelPlot", - >k_azel_plot_info, - 0); - } + gtk_azel_plot_type = g_type_register_static (GTK_TYPE_VBOX, + "GtkAzelPlot", + >k_azel_plot_info, + 0); + } - return gtk_azel_plot_type; + return gtk_azel_plot_type; } static void gtk_azel_plot_class_init (GtkAzelPlotClass *class) { - GObjectClass *gobject_class; - GtkObjectClass *object_class; - GtkWidgetClass *widget_class; - GtkContainerClass *container_class; + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkContainerClass *container_class; - gobject_class = G_OBJECT_CLASS (class); - object_class = (GtkObjectClass*) class; - widget_class = (GtkWidgetClass*) class; - container_class = (GtkContainerClass*) class; + gobject_class = G_OBJECT_CLASS (class); + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + container_class = (GtkContainerClass*) class; - parent_class = g_type_class_peek_parent (class); + parent_class = g_type_class_peek_parent (class); - object_class->destroy = gtk_azel_plot_destroy; - //widget_class->size_allocate = gtk_azel_plot_size_allocate; + object_class->destroy = gtk_azel_plot_destroy; + //widget_class->size_allocate = gtk_azel_plot_size_allocate; } static void gtk_azel_plot_init (GtkAzelPlot *polview) { - polview->qth = NULL; - polview->width = 0; - polview->height = 0; - polview->x0 = 0; - polview->y0 = 0; - polview->xmax = 0; - polview->ymax = 0; - polview->maxaz = 0.0; - polview->qthinfo = FALSE; - polview->cursinfo = FALSE; - polview->extratick = FALSE; + polview->qth = NULL; + polview->width = 0; + polview->height = 0; + polview->x0 = 0; + polview->y0 = 0; + polview->xmax = 0; + polview->ymax = 0; + polview->maxaz = 0.0; + polview->qthinfo = FALSE; + polview->cursinfo = FALSE; + polview->extratick = FALSE; } @@ -151,7 +151,7 @@ gtk_azel_plot_destroy (GtkObject *object) { - (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -163,281 +163,281 @@ GtkWidget* gtk_azel_plot_new (qth_t *qth, pass_t *pass) { - GtkWidget *polv; - GooCanvasItemModel *root; - GdkColor bg_color = {0, 0xFFFF, 0xFFFF, 0xFFFF}; - guint i,n; - pass_detail_t *detail; + GtkWidget *polv; + GooCanvasItemModel *root; + GdkColor bg_color = {0, 0xFFFF, 0xFFFF, 0xFFFF}; + guint i,n; + pass_detail_t *detail; - polv = g_object_new (GTK_TYPE_AZEL_PLOT, NULL); + polv = g_object_new (GTK_TYPE_AZEL_PLOT, NULL); - GTK_AZEL_PLOT (polv)->qth = qth; - GTK_AZEL_PLOT (polv)->pass = pass; + GTK_AZEL_PLOT (polv)->qth = qth; + GTK_AZEL_PLOT (polv)->pass = pass; - /* get settings */ - GTK_AZEL_PLOT (polv)->qthinfo = sat_cfg_get_bool (SAT_CFG_BOOL_POL_SHOW_QTH_INFO); - GTK_AZEL_PLOT (polv)->extratick = sat_cfg_get_bool (SAT_CFG_BOOL_POL_SHOW_EXTRA_AZ_TICKS); - GTK_AZEL_PLOT (polv)->cursinfo = TRUE; + /* get settings */ + GTK_AZEL_PLOT (polv)->qthinfo = sat_cfg_get_bool (SAT_CFG_BOOL_POL_SHOW_QTH_INFO); + GTK_AZEL_PLOT (polv)->extratick = sat_cfg_get_bool (SAT_CFG_BOOL_POL_SHOW_EXTRA_AZ_TICKS); + GTK_AZEL_PLOT (polv)->cursinfo = TRUE; - /* check maximum Az */ - n = g_slist_length (pass->details); - for (i = 0; i < n; i++) { - detail = PASS_DETAIL (g_slist_nth_data (pass->details, i)); + /* check maximum Az */ + n = g_slist_length (pass->details); + for (i = 0; i < n; i++) { + detail = PASS_DETAIL (g_slist_nth_data (pass->details, i)); - if (detail->az > GTK_AZEL_PLOT (polv)->maxaz) { - GTK_AZEL_PLOT (polv)->maxaz = detail->az; - } - } + if (detail->az > GTK_AZEL_PLOT (polv)->maxaz) { + GTK_AZEL_PLOT (polv)->maxaz = detail->az; + } + } - if (GTK_AZEL_PLOT (polv)->maxaz > 180.0) - GTK_AZEL_PLOT (polv)->maxaz = 360.0; - else - GTK_AZEL_PLOT (polv)->maxaz = 180.0; + if (GTK_AZEL_PLOT (polv)->maxaz > 180.0) + GTK_AZEL_PLOT (polv)->maxaz = 360.0; + else + GTK_AZEL_PLOT (polv)->maxaz = 180.0; - /* create the canvas */ - GTK_AZEL_PLOT (polv)->canvas = goo_canvas_new (); - get_canvas_bg_color (GTK_AZEL_PLOT (polv), &bg_color); - gtk_widget_modify_base (GTK_AZEL_PLOT (polv)->canvas, GTK_STATE_NORMAL, &bg_color); - gtk_widget_set_size_request (GTK_AZEL_PLOT (polv)->canvas, - POLV_DEFAULT_SIZE, POLV_DEFAULT_SIZE); - goo_canvas_set_bounds (GOO_CANVAS (GTK_AZEL_PLOT (polv)->canvas), 0, 0, - POLV_DEFAULT_SIZE, POLV_DEFAULT_SIZE); + /* create the canvas */ + GTK_AZEL_PLOT (polv)->canvas = goo_canvas_new (); + get_canvas_bg_color (GTK_AZEL_PLOT (polv), &bg_color); + gtk_widget_modify_base (GTK_AZEL_PLOT (polv)->canvas, GTK_STATE_NORMAL, &bg_color); + gtk_widget_set_size_request (GTK_AZEL_PLOT (polv)->canvas, + POLV_DEFAULT_SIZE, POLV_DEFAULT_SIZE); + goo_canvas_set_bounds (GOO_CANVAS (GTK_AZEL_PLOT (polv)->canvas), 0, 0, + POLV_DEFAULT_SIZE, POLV_DEFAULT_SIZE); - /* connect size-request signal */ - g_signal_connect (GTK_AZEL_PLOT (polv)->canvas, "size-allocate", - G_CALLBACK (size_allocate_cb), polv); - g_signal_connect (GTK_AZEL_PLOT (polv)->canvas, "item_created", - (GtkSignalFunc) on_item_created, polv); - g_signal_connect_after (GTK_AZEL_PLOT (polv)->canvas, "realize", - (GtkSignalFunc) on_canvas_realized, polv); + /* connect size-request signal */ + g_signal_connect (GTK_AZEL_PLOT (polv)->canvas, "size-allocate", + G_CALLBACK (size_allocate_cb), polv); + g_signal_connect (GTK_AZEL_PLOT (polv)->canvas, "item_created", + (GtkSignalFunc) on_item_created, polv); + g_signal_connect_after (GTK_AZEL_PLOT (polv)->canvas, "realize", + (GtkSignalFunc) on_canvas_realized, polv); - gtk_widget_show (GTK_AZEL_PLOT (polv)->canvas); + gtk_widget_show (GTK_AZEL_PLOT (polv)->canvas); - /* Create the canvas model */ - root = create_canvas_model (GTK_AZEL_PLOT (polv)); - goo_canvas_set_root_item_model (GOO_CANVAS (GTK_AZEL_PLOT (polv)->canvas), root); + /* Create the canvas model */ + root = create_canvas_model (GTK_AZEL_PLOT (polv)); + goo_canvas_set_root_item_model (GOO_CANVAS (GTK_AZEL_PLOT (polv)->canvas), root); - g_object_unref (root); + g_object_unref (root); - gtk_container_add (GTK_CONTAINER (polv), GTK_AZEL_PLOT (polv)->canvas); + gtk_container_add (GTK_CONTAINER (polv), GTK_AZEL_PLOT (polv)->canvas); - return polv; + return polv; } static GooCanvasItemModel * create_canvas_model (GtkAzelPlot *polv) { - GooCanvasItemModel *root; - guint32 col; - guint i; - gdouble xstep,ystep; - gdouble t,az,el; - time_t tim; - gchar buff[7]; - gchar *txt; + GooCanvasItemModel *root; + guint32 col; + guint i; + gdouble xstep,ystep; + gdouble t,az,el; + time_t tim; + gchar buff[7]; + gchar *txt; - root = goo_canvas_group_model_new (NULL, NULL); + root = goo_canvas_group_model_new (NULL, NULL); - /* graph dimensions */ - polv->width = POLV_DEFAULT_SIZE; - polv->height = POLV_DEFAULT_SIZE; + /* graph dimensions */ + polv->width = POLV_DEFAULT_SIZE; + polv->height = POLV_DEFAULT_SIZE; - /* update coordinate system */ - polv->x0 = POLV_X_MARGIN; - polv->xmax = polv->width - POLV_X_MARGIN; - polv->y0 = polv->height - POLV_Y_MARGIN; - polv->ymax = POLV_Y_MARGIN; - - col = sat_cfg_get_int (SAT_CFG_INT_POLAR_AXIS_COL); + /* update coordinate system */ + polv->x0 = POLV_X_MARGIN; + polv->xmax = polv->width - POLV_X_MARGIN; + polv->y0 = polv->height - POLV_Y_MARGIN; + polv->ymax = POLV_Y_MARGIN; + + col = sat_cfg_get_int (SAT_CFG_INT_POLAR_AXIS_COL); - /* frame */ - polv->frame = goo_canvas_rect_model_new (root, - (gdouble) polv->x0, - (gdouble) polv->ymax, - (gdouble) (polv->xmax - polv->x0), - (gdouble) (polv->y0 - POLV_Y_MARGIN), - "stroke-color-rgba", 0x000000FF, - "line-cap", CAIRO_LINE_CAP_SQUARE, - "line-join", CAIRO_LINE_JOIN_MITER, - "line-width", 1.0, - NULL); + /* frame */ + polv->frame = goo_canvas_rect_model_new (root, + (gdouble) polv->x0, + (gdouble) polv->ymax, + (gdouble) (polv->xmax - polv->x0), + (gdouble) (polv->y0 - POLV_Y_MARGIN), + "stroke-color-rgba", 0x000000FF, + "line-cap", CAIRO_LINE_CAP_SQUARE, + "line-join", CAIRO_LINE_JOIN_MITER, + "line-width", 1.0, + NULL); - xstep = (polv->xmax - polv->x0) / (AZEL_PLOT_NUM_TICKS+1); - ystep = (polv->y0 - polv->ymax) / (AZEL_PLOT_NUM_TICKS+1); + xstep = (polv->xmax - polv->x0) / (AZEL_PLOT_NUM_TICKS+1); + ystep = (polv->y0 - polv->ymax) / (AZEL_PLOT_NUM_TICKS+1); - /* tick marks */ - for (i = 0; i < AZEL_PLOT_NUM_TICKS; i++) { + /* tick marks */ + for (i = 0; i < AZEL_PLOT_NUM_TICKS; i++) { - /* bottom x tick marks */ - polv->xticksb[i] = goo_canvas_polyline_model_new_line (root, - (gdouble) (polv->x0 + (i+1) * xstep), - (gdouble) polv->y0, - (gdouble) (polv->x0 + (i+1) * xstep), - (gdouble) (polv->y0 - MARKER_SIZE), - "fill-color-rgba", col, - "line-cap", CAIRO_LINE_CAP_SQUARE, - "line-join", CAIRO_LINE_JOIN_MITER, - "line-width", 1.0, - NULL); + /* bottom x tick marks */ + polv->xticksb[i] = goo_canvas_polyline_model_new_line (root, + (gdouble) (polv->x0 + (i+1) * xstep), + (gdouble) polv->y0, + (gdouble) (polv->x0 + (i+1) * xstep), + (gdouble) (polv->y0 - MARKER_SIZE), + "fill-color-rgba", col, + "line-cap", CAIRO_LINE_CAP_SQUARE, + "line-join", CAIRO_LINE_JOIN_MITER, + "line-width", 1.0, + NULL); - /* top x tick marks */ - polv->xtickst[i] = goo_canvas_polyline_model_new_line (root, - (gdouble) (polv->x0 + (i+1) * xstep), - (gdouble) polv->ymax, - (gdouble) (polv->x0 + (i+1) * xstep), - (gdouble) (polv->ymax + MARKER_SIZE), - "fill-color-rgba", col, - "line-cap", CAIRO_LINE_CAP_SQUARE, - "line-join", CAIRO_LINE_JOIN_MITER, - "line-width", 1.0, - NULL); + /* top x tick marks */ + polv->xtickst[i] = goo_canvas_polyline_model_new_line (root, + (gdouble) (polv->x0 + (i+1) * xstep), + (gdouble) polv->ymax, + (gdouble) (polv->x0 + (i+1) * xstep), + (gdouble) (polv->ymax + MARKER_SIZE), + "fill-color-rgba", col, + "line-cap", CAIRO_LINE_CAP_SQUARE, + "line-join", CAIRO_LINE_JOIN_MITER, + "line-width", 1.0, + NULL); - /* x tick labels */ - /* get time */ - xy_to_graph (polv, polv->x0 + (i+1) * xstep, 0.0, &t, &az, &el); + /* x tick labels */ + /* get time */ + xy_to_graph (polv, polv->x0 + (i+1) * xstep, 0.0, &t, &az, &el); - /* convert julian date to struct tm */ - tim = (t - 2440587.5)*86400.0; + /* convert julian date to struct tm */ + tim = (t - 2440587.5)*86400.0; - /* format either local time or UTC depending on check box */ - if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) - strftime (buff, 7, "%H:%M", localtime (&tim)); - else - strftime (buff, 7, "%H:%M", gmtime (&tim)); - - buff[6]='\0'; + /* format either local time or UTC depending on check box */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) + strftime (buff, 7, "%H:%M", localtime (&tim)); + else + strftime (buff, 7, "%H:%M", gmtime (&tim)); + + buff[6]='\0'; - polv->xlab[i] = goo_canvas_text_model_new (root, buff, - (gfloat) (polv->x0 + (i+1) * xstep), - (gfloat) (polv->y0 + 5), - -1, - GTK_ANCHOR_N, - "font", "Sans 8", - "fill-color-rgba", 0x000000FF, - NULL); + polv->xlab[i] = goo_canvas_text_model_new (root, buff, + (gfloat) (polv->x0 + (i+1) * xstep), + (gfloat) (polv->y0 + 5), + -1, + GTK_ANCHOR_N, + "font", "Sans 8", + "fill-color-rgba", 0x000000FF, + NULL); - /* left y tick marks */ - polv->yticksl[i] = goo_canvas_polyline_model_new_line (root, - (gdouble) polv->x0, - (gdouble) (polv->y0 - (i+1) * ystep), - (gdouble) (polv->x0 + MARKER_SIZE), - (gdouble) (polv->y0 - (i+1) * ystep), - "fill-color-rgba", col, - "line-cap", CAIRO_LINE_CAP_SQUARE, - "line-join", CAIRO_LINE_JOIN_MITER, - "line-width", 1.0, - NULL); + /* left y tick marks */ + polv->yticksl[i] = goo_canvas_polyline_model_new_line (root, + (gdouble) polv->x0, + (gdouble) (polv->y0 - (i+1) * ystep), + (gdouble) (polv->x0 + MARKER_SIZE), + (gdouble) (polv->y0 - (i+1) * ystep), + "fill-color-rgba", col, + "line-cap", CAIRO_LINE_CAP_SQUARE, + "line-join", CAIRO_LINE_JOIN_MITER, + "line-width", 1.0, + NULL); - /* right y tick marks */ - polv->yticksr[i] = goo_canvas_polyline_model_new_line (root, - (gdouble) polv->xmax, - (gdouble) (polv->y0 - (i+1) * ystep), - (gdouble) (polv->xmax - MARKER_SIZE), - (gdouble) (polv->y0 - (i+1) * ystep), - "fill-color-rgba", col, - "line-cap", CAIRO_LINE_CAP_SQUARE, - "line-join", CAIRO_LINE_JOIN_MITER, - "line-width", 1.0, - NULL); + /* right y tick marks */ + polv->yticksr[i] = goo_canvas_polyline_model_new_line (root, + (gdouble) polv->xmax, + (gdouble) (polv->y0 - (i+1) * ystep), + (gdouble) (polv->xmax - MARKER_SIZE), + (gdouble) (polv->y0 - (i+1) * ystep), + "fill-color-rgba", col, + "line-cap", CAIRO_LINE_CAP_SQUARE, + "line-join", CAIRO_LINE_JOIN_MITER, + "line-width", 1.0, + NULL); - /* Az tick labels */ - txt = g_strdup_printf ("%.0f\302\260", polv->maxaz / (AZEL_PLOT_NUM_TICKS+1) * (i+1)); - polv->azlab[i] = goo_canvas_text_model_new (root, txt, - (gfloat) (polv->x0 - 5), - (gfloat) (polv->y0 - (i+1) * ystep), - -1, - GTK_ANCHOR_E, - "font", "Sans 8", - "fill-color-rgba", 0x0000BFFF, - NULL); - g_free (txt); + /* Az tick labels */ + txt = g_strdup_... [truncated message content] |
From: <aa...@us...> - 2010-10-31 12:47:50
|
Revision: 696 http://gpredict.svn.sourceforge.net/gpredict/?rev=696&view=rev Author: aa1vs Date: 2010-10-31 12:47:44 +0000 (Sun, 31 Oct 2010) Log Message: ----------- Update Changelog NEWS and TODO Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/TODO Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-10-30 22:46:59 UTC (rev 695) +++ trunk/ChangeLog 2010-10-31 12:47:44 UTC (rev 696) @@ -1,3 +1,32 @@ +2010-10-30 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-rot-ctrl.[ch] + * src/gtk-rig-ctrl.[ch] + Change tab to spaces and change emacs indent-tabs-mode. + +2010-10-28 Charles Suprin <hamaa1vs at gmail.com> + + * src/predict-tools.c + Explicitly compute pass LOS_AZ. + +2010-10-27 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-rot-ctrl.[ch] + Added support for flipped passes. + Remove return from void function. + +2010-10-17 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-rot-ctrl.[ch] + * src/gtk-rig-ctrl.[ch] + Continuous network rotator and rig merge. + + +2010-10-16 Charles Suprin <hamaa1vs at gmail.com> + + * src/gtk-polar-plot.c + Make rotator show when on horizon as with other items. + 2010-10-16 Alexandru Csete <oz9aec at gmail.com> * src/time-tools.[ch]: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2010-10-30 22:46:59 UTC (rev 695) +++ trunk/NEWS 2010-10-31 12:47:44 UTC (rev 696) @@ -1,6 +1,8 @@ Changes in version 1.3 (TBD) +- Feature request 2873824: Flip Passes. - Automatically refresh the Sky at a glance view every minute. +- Fixed bug 2116691: Leave network connection open. Changes in version 1.2 (12 Oct 2010) Modified: trunk/TODO =================================================================== --- trunk/TODO 2010-10-30 22:46:59 UTC (rev 695) +++ trunk/TODO 2010-10-31 12:47:44 UTC (rev 696) @@ -3,7 +3,6 @@ * New satellite editor to manually add/edit/delete satellite data. * New transponder editor to edit transponder data. * Feature request 2866570: Set operating mode via CAT. -* Feature request 2873824: Flip Passes. * Feature request 2778735: Visual indicator for RX/TX/TRX. * Feature request 2689352: Mutual Contact Window AOS/LOS. * Show day/night on satmap. @@ -20,7 +19,7 @@ * Native Mac OS X port. * Dynamic reconfiguration. No need to re-load modules if configuration changes * Plot more parameters in detailed pass prediction dialogue (depending - on settingss). + on settings). * Predict satellite parameters over a given time period (Tools). * Solar illumination prediction. * Treat Sun and Moon as satellites. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-30 22:47:06
|
Revision: 695 http://gpredict.svn.sourceforge.net/gpredict/?rev=695&view=rev Author: aa1vs Date: 2010-10-30 22:46:59 +0000 (Sat, 30 Oct 2010) Log Message: ----------- Change tab to spaces and change emacs indent-tabs-mode Modified Paths: -------------- trunk/src/gtk-rig-ctrl.c trunk/src/gtk-rig-ctrl.h 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 2010-10-29 02:10:37 UTC (rev 694) +++ trunk/src/gtk-rig-ctrl.c 2010-10-30 22:46:59 UTC (rev 695) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -660,7 +660,7 @@ gchar *dirname; /* directory name */ gchar **vbuff; const gchar *filename; /* file name */ - gchar *rigname; + gchar *rigname; table = gtk_table_new (4, 3, FALSE); @@ -684,26 +684,26 @@ dir = g_dir_open (dirname, 0, &error); if (dir) { /* read each .rig file */ - GSList *rigs=NULL; - gint i; - gint n; + GSList *rigs=NULL; + gint i; + gint n; while ((filename = g_dir_read_name (dir))) { if (g_str_has_suffix (filename, ".rig")) { - vbuff = g_strsplit (filename, ".rig", 0); - rigs=g_slist_insert_sorted(rigs,g_strdup(vbuff[0]),(GCompareFunc)rig_name_compare); + vbuff = g_strsplit (filename, ".rig", 0); + rigs=g_slist_insert_sorted(rigs,g_strdup(vbuff[0]),(GCompareFunc)rig_name_compare); g_strfreev (vbuff); } } - n = g_slist_length (rigs); - for (i = 0; i < n; i++) { - rigname = g_slist_nth_data (rigs, i); - if (rigname) { - gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->DevSel), rigname); - g_free(rigname); - } - } - g_slist_free(rigs); + n = g_slist_length (rigs); + for (i = 0; i < n; i++) { + rigname = g_slist_nth_data (rigs, i); + if (rigname) { + gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->DevSel), rigname); + g_free(rigname); + } + } + g_slist_free(rigs); } else { sat_log_log (SAT_LOG_LEVEL_ERROR, @@ -829,7 +829,7 @@ sat_t *sat = SAT (value); //ctrl->sats = g_slist_append (ctrl->sats, sat); - ctrl->sats = g_slist_insert_sorted (ctrl->sats, sat, (GCompareFunc)sat_name_compare); + ctrl->sats = g_slist_insert_sorted (ctrl->sats, sat, (GCompareFunc)sat_name_compare); } @@ -1180,13 +1180,13 @@ { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); - if (ctrl->conf == NULL) { - /* we don't have a working configuration */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Controller does not have a valid configuration"), - __FUNCTION__); - return; - } + if (ctrl->conf == NULL) { + /* we don't have a working configuration */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Controller does not have a valid configuration"), + __FUNCTION__); + return; + } if (!gtk_toggle_button_get_active (button)) { @@ -1200,14 +1200,14 @@ if ((ctrl->conf->type == RIG_TYPE_TOGGLE_AUTO) || (ctrl->conf->type == RIG_TYPE_TOGGLE_MAN)) { unset_toggle (ctrl,ctrl->sock); - } + } if (ctrl->conf2 != NULL) { - close_rigctld_socket(ctrl->sock2); - } - close_rigctld_socket(ctrl->sock); - + close_rigctld_socket(ctrl->sock2); + } + close_rigctld_socket(ctrl->sock); + } else { @@ -1304,14 +1304,14 @@ { GtkRigCtrl *ctrl = GTK_RIG_CTRL (data); if (ctrl->conf == NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Controller does not have a valid configuration"), - __FUNCTION__); - return (TRUE); + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Controller does not have a valid configuration"), + __FUNCTION__); + return (TRUE); - } - - + } + + if (g_static_mutex_trylock(&(ctrl->busy))==FALSE) { sat_log_log (SAT_LOG_LEVEL_ERROR,_("%s missed the deadline"),__FUNCTION__); return TRUE; @@ -1947,8 +1947,8 @@ static gboolean get_ptt (GtkRigCtrl *ctrl, gint sock) { gchar *buff,**vbuff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; guint64 pttstat = 0; @@ -1962,14 +1962,14 @@ buff = g_strdup_printf ("%c\x0a",0x8b); } - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - if (retcode) { - vbuff = g_strsplit (buffback, "\n", 3); + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + if (retcode) { + vbuff = g_strsplit (buffback, "\n", 3); pttstat = g_ascii_strtoull (vbuff[0], NULL, 0); //FIXME base = 0 ok? g_strfreev (vbuff); } - g_free (buff); + g_free (buff); return (pttstat == 1) ? TRUE : FALSE; @@ -1985,7 +1985,7 @@ static gboolean set_ptt (GtkRigCtrl *ctrl, gint sock, gboolean ptt) { gchar *buff; - gchar buffback[128]; + gchar buffback[128]; gboolean retcode; /* send command */ @@ -1996,10 +1996,10 @@ buff = g_strdup_printf ("T 0\x0aq\x0a"); } - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + g_free (buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__FUNCTION__)); } @@ -2018,15 +2018,15 @@ static gboolean set_freq_simplex (GtkRigCtrl *ctrl, gint sock, gdouble freq) { gchar *buff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; buff = g_strdup_printf ("F %10.0f\x0a", freq); - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - - g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + + g_free(buff); + return(check_set_response(buffback,retcode,__FUNCTION__)); } @@ -2045,17 +2045,17 @@ static gboolean set_freq_toggle (GtkRigCtrl *ctrl, gint sock, gdouble freq) { gchar *buff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; /* send command */ buff = g_strdup_printf ("I %10.0f\x0a", freq); - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - - g_free(buff); + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + + g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__FUNCTION__)); } @@ -2069,15 +2069,15 @@ static gboolean set_toggle (GtkRigCtrl *ctrl, gint sock) { gchar *buff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; buff = g_strdup_printf ("S 1 %d\x0a",ctrl->conf->vfoDown); - - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - - g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + + g_free(buff); + return(check_set_response(buffback,retcode,__FUNCTION__)); } @@ -2091,17 +2091,17 @@ static gboolean unset_toggle (GtkRigCtrl *ctrl, gint sock) { gchar *buff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; /* send command */ buff = g_strdup_printf ("S 0 %d\x0a",ctrl->conf->vfoDown); - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - - g_free(buff); + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + + g_free(buff); - return(check_set_response(buffback,retcode,__FUNCTION__)); + return(check_set_response(buffback,retcode,__FUNCTION__)); } @@ -2118,18 +2118,18 @@ static gboolean get_freq_simplex (GtkRigCtrl *ctrl, gint sock, gdouble *freq) { gchar *buff,**vbuff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; buff = g_strdup_printf ("f\x0a"); - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - retcode=check_get_response(buffback,retcode,__FUNCTION__); - if (retcode) { - vbuff = g_strsplit (buffback, "\n", 3); - *freq = g_ascii_strtod (vbuff[0], NULL); - g_strfreev (vbuff); - } + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + retcode=check_get_response(buffback,retcode,__FUNCTION__); + if (retcode) { + vbuff = g_strsplit (buffback, "\n", 3); + *freq = g_ascii_strtod (vbuff[0], NULL); + g_strfreev (vbuff); + } return TRUE; } @@ -2143,8 +2143,8 @@ static gboolean get_freq_toggle (GtkRigCtrl *ctrl, gint sock, gdouble *freq) { gchar *buff,**vbuff; - gchar buffback[128]; - gboolean retcode; + gchar buffback[128]; + gboolean retcode; if (freq == NULL) { sat_log_log (SAT_LOG_LEVEL_BUG, @@ -2156,13 +2156,13 @@ /* send command */ buff = g_strdup_printf ("i\x0a"); - retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); - retcode=check_get_response(buffback,retcode,__FUNCTION__); - if (retcode) { - vbuff = g_strsplit (buffback, "\n", 3); - *freq = g_ascii_strtod (vbuff[0], NULL); - g_strfreev (vbuff); - } + retcode=send_rigctld_command(ctrl,sock,buff,buffback,128); + retcode=check_get_response(buffback,retcode,__FUNCTION__); + if (retcode) { + vbuff = g_strsplit (buffback, "\n", 3); + *freq = g_ascii_strtod (vbuff[0], NULL); + g_strfreev (vbuff); + } return TRUE; } @@ -2176,38 +2176,38 @@ static gboolean set_vfo (GtkRigCtrl *ctrl, vfo_t vfo) { gchar *buff; - gchar buffback[128]; + gchar buffback[128]; gboolean retcode; switch (vfo) { case VFO_A: - buff = g_strdup_printf ("V VFOA\x0a"); + buff = g_strdup_printf ("V VFOA\x0a"); break; case VFO_B: - buff = g_strdup_printf ("V VFOB\x0a"); + buff = g_strdup_printf ("V VFOB\x0a"); break; case VFO_MAIN: - buff = g_strdup_printf ("V Main\x0a"); + buff = g_strdup_printf ("V Main\x0a"); break; case VFO_SUB: - buff = g_strdup_printf ("V Sub\x0a"); + buff = g_strdup_printf ("V Sub\x0a"); break; default: sat_log_log (SAT_LOG_LEVEL_BUG, _("%s: Invalid VFO argument. Using VFOA."), __FUNCTION__); - buff = g_strdup_printf ("V VFOA\x0a"); + buff = g_strdup_printf ("V VFOA\x0a"); break; } - retcode=send_rigctld_command(ctrl,ctrl->sock,buff,buffback,128); + retcode=send_rigctld_command(ctrl,ctrl->sock,buff,buffback,128); - g_free(buff); - - return(check_set_response(buffback,retcode,__FUNCTION__)); + g_free(buff); + + return(check_set_response(buffback,retcode,__FUNCTION__)); } @@ -2371,8 +2371,8 @@ if (g_str_has_suffix (filename, ".rig")) { i++; - /*once we have one we are done*/ - break; + /*once we have one we are done*/ + break; } } } @@ -2499,13 +2499,13 @@ gboolean send_rigctld_command(GtkRigCtrl *ctrl, gint sock, gchar *buff, gchar *buffout, gint sizeout) { gint written; - gint size; - - size = strlen(buff)-1; + gint size; + + size = strlen(buff)-1; - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s:%s: sending %d bytes to rigctld as \"%s\""), - __FILE__, __FUNCTION__, size, buff); + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s:%s: sending %d bytes to rigctld as \"%s\""), + __FILE__, __FUNCTION__, size, buff); /* send command */ written = send(sock, buff, strlen(buff), 0); if (written != size) { @@ -2517,7 +2517,7 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rigctld port closed"), __FUNCTION__); - return FALSE; + return FALSE; } /* try to read answer */ size = read (sock, buffout, 127); @@ -2525,10 +2525,10 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rigctld port closed"), __FUNCTION__); - return FALSE; + return FALSE; } - buffout[size]='\0'; + buffout[size]='\0'; if (size == 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Got 0 bytes from rigctld"), @@ -2670,12 +2670,12 @@ static gboolean open_rigctld_socket (radio_conf_t *conf, gint *sock) { - struct sockaddr_in ServAddr; - struct hostent *h; - gint status; + struct sockaddr_in ServAddr; + struct hostent *h; + gint status; - *sock=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); - if (*sock < 0) { + *sock=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); + if (*sock < 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: Failed to create socket"), __FUNCTION__); @@ -2707,7 +2707,7 @@ __FUNCTION__, conf->host, conf->port); } - return TRUE; + return TRUE; } static gboolean close_rigctld_socket (gint sock) { @@ -2728,33 +2728,33 @@ /*simple function to sort the list of satellites in the combo box.*/ static gint sat_name_compare (sat_t* a,sat_t*b){ - return (g_ascii_strcasecmp(a->nickname,b->nickname)); + return (g_ascii_strcasecmp(a->nickname,b->nickname)); } static gint rig_name_compare (const gchar* a,const gchar *b){ - return (g_ascii_strcasecmp(a,b)); + return (g_ascii_strcasecmp(a,b)); } static inline gboolean check_set_response (gchar *buffback,gboolean retcode,const gchar *function){ - if (retcode==TRUE) - if (strncmp(buffback,"RPRT 0",6)!=0) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: %s rigctld returned error (%s)"), - __FILE__,function,buffback); - - retcode=FALSE; - } - return retcode; + if (retcode==TRUE) + if (strncmp(buffback,"RPRT 0",6)!=0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: %s rigctld returned error (%s)"), + __FILE__,function,buffback); + + retcode=FALSE; + } + return retcode; } static inline gboolean check_get_response (gchar *buffback,gboolean retcode,const gchar *function){ - if (retcode==TRUE) - if (strncmp(buffback,"RPRT",4)==0) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: %s rigctld returned error (%s)"), - __FILE__,function,buffback); - - retcode=FALSE; - } - return retcode; + if (retcode==TRUE) + if (strncmp(buffback,"RPRT",4)==0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: %s rigctld returned error (%s)"), + __FILE__,function,buffback); + + retcode=FALSE; + } + return retcode; } Modified: trunk/src/gtk-rig-ctrl.h =================================================================== --- trunk/src/gtk-rig-ctrl.h 2010-10-29 02:10:37 UTC (rev 694) +++ trunk/src/gtk-rig-ctrl.h 2010-10-30 22:46:59 UTC (rev 695) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -98,7 +98,7 @@ guint timerid; /*!< Timer ID */ gboolean tracking; /*!< Flag set when we are tracking a target. */ - GStaticMutex busy;/*!< Flag set when control algorithm is busy. */ + GStaticMutex busy;/*!< Flag set when control algorithm is busy. */ gboolean engaged; /*!< Flag indicating that rig device is engaged. */ gint errcnt; /*!< Error counter. */ @@ -108,8 +108,8 @@ glong last_toggle_tx; /*!< Last time when exec_toggle_tx_cycle() was executed (seconds) -1 indicates that an update should be performed ASAP */ - - gint sock, sock2; /*!< Sockets for controlling the radio(s). */ + + gint sock, sock2; /*!< Sockets for controlling the radio(s). */ /* debug related */ guint wrops; Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2010-10-29 02:10:37 UTC (rev 694) +++ trunk/src/gtk-rot-ctrl.c 2010-10-30 22:46:59 UTC (rev 695) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -193,7 +193,7 @@ g_free (ctrl->conf); ctrl->conf = NULL; } - + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -228,19 +228,19 @@ GTK_ROT_CTRL (widget)->qth = module->qth; /* get next pass for target satellite */ - if (GTK_ROT_CTRL (widget)->target){ - 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); - } - } - + if (GTK_ROT_CTRL (widget)->target){ + 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); @@ -487,7 +487,7 @@ gchar *dirname; /* directory name */ gchar **vbuff; const gchar *filename; /* file name */ - gchar *rotname; + gchar *rotname; table = gtk_table_new (3, 3, FALSE); @@ -509,27 +509,27 @@ dir = g_dir_open (dirname, 0, &error); if (dir) { /* read each .rot file */ - GSList *rots=NULL; - gint i; - gint n; + GSList *rots=NULL; + gint i; + gint n; while ((filename = g_dir_read_name (dir))) { if (g_str_has_suffix (filename, ".rot")) { vbuff = g_strsplit (filename, ".rot", 0); - rots=g_slist_insert_sorted(rots,g_strdup(vbuff[0]),(GCompareFunc)rot_name_compare); + rots=g_slist_insert_sorted(rots,g_strdup(vbuff[0]),(GCompareFunc)rot_name_compare); g_strfreev (vbuff); } } - n = g_slist_length (rots); - for (i = 0; i < n; i++) { - rotname = g_slist_nth_data (rots, i); - if (rotname) { - gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->DevSel), rotname); - g_free(rotname); - } - } - g_slist_free(rots); + n = g_slist_length (rots); + for (i = 0; i < n; i++) { + rotname = g_slist_nth_data (rots, i); + if (rotname) { + gtk_combo_box_append_text (GTK_COMBO_BOX (ctrl->DevSel), rotname); + g_free(rotname); + } + } + g_slist_free(rots); } else { sat_log_log (SAT_LOG_LEVEL_ERROR, @@ -628,7 +628,7 @@ sat_t *sat = SAT (value); //ctrl->sats = g_slist_append (ctrl->sats, sat); - ctrl->sats = g_slist_insert_sorted (ctrl->sats, sat, (GCompareFunc)sat_name_compare); + ctrl->sats = g_slist_insert_sorted (ctrl->sats, sat, (GCompareFunc)sat_name_compare); } @@ -769,8 +769,8 @@ gtk_rot_knob_set_range (GTK_ROT_KNOB (ctrl->AzSet), ctrl->conf->minaz, ctrl->conf->maxaz); gtk_rot_knob_set_range (GTK_ROT_KNOB (ctrl->ElSet), ctrl->conf->minel, ctrl->conf->maxel); - /*Update flipped when changing rotor if there is a plot*/ - set_flipped_pass(ctrl); + /*Update flipped when changing rotor if there is a plot*/ + set_flipped_pass(ctrl); } else { sat_log_log (SAT_LOG_LEVEL_ERROR, @@ -801,7 +801,7 @@ if (!gtk_toggle_button_get_active (button)) { gtk_widget_set_sensitive (ctrl->DevSel, TRUE); ctrl->engaged = FALSE; - close_rotctld_socket(ctrl->sock); + close_rotctld_socket(ctrl->sock); gtk_label_set_text (GTK_LABEL (ctrl->AzRead), "---"); gtk_label_set_text (GTK_LABEL (ctrl->ElRead), "---"); } @@ -860,8 +860,8 @@ if (aosaz>180) aosaz-=180; else - aosaz+=180; - } + aosaz+=180; + } if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (aosaz > 180.0)) { aosaz -= 360.0; @@ -966,19 +966,19 @@ } /* update controller circle on polar plot */ - if (ctrl->conf !=NULL){ - if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (rotaz < 0.0)) { - gtk_polar_plot_set_ctrl_pos (GTK_POLAR_PLOT (ctrl->plot), - gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet))+360.0, - gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet))); - } - else { - gtk_polar_plot_set_ctrl_pos (GTK_POLAR_PLOT (ctrl->plot), - gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet)), - gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet))); - } + if (ctrl->conf !=NULL){ + if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (rotaz < 0.0)) { + gtk_polar_plot_set_ctrl_pos (GTK_POLAR_PLOT (ctrl->plot), + gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet))+360.0, + gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet))); + } + else { + gtk_polar_plot_set_ctrl_pos (GTK_POLAR_PLOT (ctrl->plot), + gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet)), + gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet))); + } } - g_static_mutex_unlock(&(ctrl->busy)); + g_static_mutex_unlock(&(ctrl->busy)); return TRUE; } @@ -994,9 +994,9 @@ static gboolean get_pos (GtkRotCtrl *ctrl, gdouble *az, gdouble *el) { gchar *buff,**vbuff; - gchar buffback[128]; - gboolean retcode; - + gchar buffback[128]; + gboolean retcode; + if ((az == NULL) || (el == NULL)) { sat_log_log (SAT_LOG_LEVEL_BUG, _("%s:%d: NULL storage."), @@ -1007,24 +1007,24 @@ /* send command */ buff = g_strdup_printf ("p\x0a"); - retcode=send_rotctld_command(ctrl,buff,buffback,128); + retcode=send_rotctld_command(ctrl,buff,buffback,128); /* try to read answer */ - if (retcode) { - if (strncmp(buffback,"RPRT",4)==0){ - retcode=FALSE; - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error (%s)"), - __FILE__, __LINE__,buffback); + if (retcode) { + if (strncmp(buffback,"RPRT",4)==0){ + retcode=FALSE; + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: rotctld returned error (%s)"), + __FILE__, __LINE__,buffback); - } else { - vbuff = g_strsplit (buffback, "\n", 3); - *az = g_strtod (vbuff[0], NULL); - *el = g_strtod (vbuff[1], NULL); - - g_strfreev (vbuff); - } - } + } else { + vbuff = g_strsplit (buffback, "\n", 3); + *az = g_strtod (vbuff[0], NULL); + *el = g_strtod (vbuff[1], NULL); + + g_strfreev (vbuff); + } + } g_free (buff); @@ -1045,27 +1045,27 @@ static gboolean set_pos (GtkRotCtrl *ctrl, gdouble az, gdouble el) { gchar *buff; - gchar buffback[128]; + gchar buffback[128]; gchar azstr[8],elstr[8]; - gboolean retcode; + gboolean retcode; /* send command */ g_ascii_formatd (azstr, 8, "%7.2f", az); g_ascii_formatd (elstr, 8, "%7.2f", el); buff = g_strdup_printf ("P %s %s\x0a", azstr, elstr); - retcode=send_rotctld_command(ctrl,buff,buffback,128); + retcode=send_rotctld_command(ctrl,buff,buffback,128); g_free (buff); - if (retcode==TRUE) - if (strncmp(buffback,"RPRT 0",6)!=0) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: rotctld returned error (%s)"), - __FILE__, __LINE__,buffback); - - retcode=FALSE; - } + if (retcode==TRUE) + if (strncmp(buffback,"RPRT 0",6)!=0) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: rotctld returned error (%s)"), + __FILE__, __LINE__,buffback); + + retcode=FALSE; + } return (retcode); } @@ -1161,8 +1161,8 @@ if (g_str_has_suffix (filename, ".rot")) { i++; - /*once we have one we need nothing else*/ - break; + /*once we have one we need nothing else*/ + break; } } } @@ -1182,12 +1182,12 @@ /** \brief open the rotcld socket. return true if successful false otherwise.*/ static gboolean open_rotctld_socket (GtkRotCtrl * ctrl, gint *sock) { - struct sockaddr_in ServAddr; - struct hostent *h; - gint status; + struct sockaddr_in ServAddr; + struct hostent *h; + gint status; - ctrl->sock=socket(PF_INET,SOCK_STREAM,IPPROTO_TCP); - if (ctrl->sock < 0) { + 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__); @@ -1219,7 +1219,7 @@ __FUNCTION__, ctrl->conf->host, ctrl->conf->port); } - return TRUE; + return TRUE; } @@ -1247,13 +1247,13 @@ gboolean send_rotctld_command(GtkRotCtrl *ctrl, gchar *buff, gchar *buffout, gint sizeout) { gint written; - gint size; + gint size; - size = strlen(buff); - - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s:%s: Sending %d bytes as %s."), - __FILE__, __FUNCTION__, size, buff); + size = strlen(buff); + + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s:%s: Sending %d bytes as %s."), + __FILE__, __FUNCTION__, size, buff); /* send command */ @@ -1267,21 +1267,21 @@ sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rotctld Socket Down"), __FUNCTION__); - return FALSE; + return FALSE; } /* try to read answer */ size = read (ctrl->sock, buffout, sizeout); - if (size == -1) { + if (size == -1) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s: rotctld Socket Down"), __FUNCTION__); - return FALSE; + return FALSE; } - buffout[size]='\0'; - if (size == 0) { + buffout[size]='\0'; + if (size == 0) { sat_log_log (SAT_LOG_LEVEL_ERROR, _("%s:%s: Got 0 bytes from rotctld"), __FILE__, __FUNCTION__); @@ -1302,14 +1302,14 @@ *simple function to sort the list of satellites in the combo box. */ static gint sat_name_compare (sat_t* a,sat_t*b){ - return (g_ascii_strcasecmp(a->nickname,b->nickname)); + return (g_ascii_strcasecmp(a->nickname,b->nickname)); } /** \brief Compare Rotator Names. */ static gint rot_name_compare (const gchar* a,const gchar *b){ - return (g_ascii_strcasecmp(a,b)); + return (g_ascii_strcasecmp(a,b)); } @@ -1331,8 +1331,8 @@ min_az = -180; max_az = 180; } - - /* Assume that min_az and max_az are atleat 360 degrees apart*/ + + /* Assume that min_az and max_az are atleat 360 degrees apart*/ /*get the azimuth that is in a settable range*/ while (last_az>max_az) { last_az-=360; Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2010-10-29 02:10:37 UTC (rev 694) +++ trunk/src/gtk-rot-ctrl.h 2010-10-30 22:46:59 UTC (rev 695) @@ -1,4 +1,4 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* Gpredict: Real-time satellite tracking and orbit prediction program @@ -44,12 +44,12 @@ #define GTK_TYPE_ROT_CTRL (gtk_rot_ctrl_get_type ()) #define GTK_ROT_CTRL(obj) GTK_CHECK_CAST (obj,\ - gtk_rot_ctrl_get_type (),\ - GtkRotCtrl) + gtk_rot_ctrl_get_type (),\ + GtkRotCtrl) #define GTK_ROT_CTRL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\ - gtk_rot_ctrl_get_type (),\ - GtkRotCtrlClass) + gtk_rot_ctrl_get_type (),\ + GtkRotCtrlClass) #define IS_GTK_ROT_CTRL(obj) GTK_CHECK_TYPE (obj, gtk_rot_ctrl_get_type ()) @@ -61,7 +61,7 @@ struct _gtk_rot_ctrl { - GtkVBox vbox; + GtkVBox vbox; /* Azimuth widgets */ GtkWidget *AzSat,*AzSet,*AzRead,*AzDevSel; @@ -83,7 +83,7 @@ sat_t *target; /*!< Target satellite */ pass_t *pass; /*!< Next pass of target satellite */ qth_t *qth; /*!< The QTH for this module */ - gboolean flipped; /*!< Whether the current pass loaded is a flip pass or not */ + gboolean flipped; /*!< Whether the current pass loaded is a flip pass or not */ guint delay; /*!< Timeout delay. */ guint timerid; /*!< Timer ID */ @@ -94,8 +94,8 @@ gboolean engaged; /*!< Flag indicating that rotor device is engaged. */ gint errcnt; /*!< Error counter. */ - gint sock; /*!< socket for connecting to rotctld. */ - + gint sock; /*!< socket for connecting to rotctld. */ + /* debug related */ guint wrops; guint rdops; @@ -103,7 +103,7 @@ struct _GtkRotCtrlClass { - GtkVBoxClass parent_class; + GtkVBoxClass parent_class; }; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-29 02:10:43
|
Revision: 694 http://gpredict.svn.sourceforge.net/gpredict/?rev=694&view=rev Author: aa1vs Date: 2010-10-29 02:10:37 +0000 (Fri, 29 Oct 2010) Log Message: ----------- Explitly compute pass LOS_AZ Modified Paths: -------------- trunk/src/predict-tools.c Modified: trunk/src/predict-tools.c =================================================================== --- trunk/src/predict-tools.c 2010-10-27 16:01:35 UTC (rev 693) +++ trunk/src/predict-tools.c 2010-10-29 02:10:37 UTC (rev 694) @@ -571,6 +571,8 @@ pass->details = g_slist_reverse (pass->details); + /* calculate satellite data */ + predict_calc (sat, qth, pass->los); /* store los_az, max_el and tca */ pass->los_az = sat->az; pass->max_el = max_el; @@ -996,6 +998,8 @@ pass->details = g_slist_reverse (pass->details); + /* calculate satellite data */ + predict_calc (sat, qth, pass->los); /* store los_az, max_el and tca */ pass->los_az = sat->az; pass->max_el = max_el; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-27 16:01:43
|
Revision: 693 http://gpredict.svn.sourceforge.net/gpredict/?rev=693&view=rev Author: aa1vs Date: 2010-10-27 16:01:35 +0000 (Wed, 27 Oct 2010) Log Message: ----------- Remove return from void function Modified Paths: -------------- trunk/src/gtk-rot-ctrl.c Modified: trunk/src/gtk-rot-ctrl.c =================================================================== --- trunk/src/gtk-rot-ctrl.c 2010-10-27 15:53:53 UTC (rev 692) +++ trunk/src/gtk-rot-ctrl.c 2010-10-27 16:01:35 UTC (rev 693) @@ -783,8 +783,6 @@ g_free (ctrl->conf); ctrl->conf = NULL; } - - return TRUE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2010-10-27 15:53:59
|
Revision: 692 http://gpredict.svn.sourceforge.net/gpredict/?rev=692&view=rev Author: aa1vs Date: 2010-10-27 15:53:53 +0000 (Wed, 27 Oct 2010) Log Message: ----------- Added support for "flipped" passes 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 2010-10-17 16:29:44 UTC (rev 691) +++ trunk/src/gtk-rot-ctrl.c 2010-10-27 15:53:53 UTC (rev 692) @@ -97,6 +97,9 @@ static gint sat_name_compare (sat_t* a,sat_t*b); static gint rot_name_compare (const gchar* a,const gchar *b); +static gboolean is_flipped_pass (pass_t * pass,rot_az_type_t type); +static inline void set_flipped_pass (GtkRotCtrl* ctrl); + static GtkVBoxClass *parent_class = NULL; static GdkColor ColBlack = { 0, 0, 0, 0}; @@ -301,7 +304,8 @@ /* we need to update the pass */ free_pass (ctrl->pass); ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); - + set_flipped_pass(ctrl); + /* update polar plot */ gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); } @@ -314,7 +318,7 @@ else { ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0); } - + set_flipped_pass(ctrl); /* update polar plot */ gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass); } @@ -652,6 +656,9 @@ ctrl->pass = get_current_pass (ctrl->target, ctrl->qth, ctrl->t); else ctrl->pass = get_pass (ctrl->target, ctrl->qth, ctrl->t, 3.0); + + set_flipped_pass(ctrl); + } else { sat_log_log (SAT_LOG_LEVEL_ERROR, @@ -761,6 +768,9 @@ /* update new ranges of the Az and El controller widgets */ gtk_rot_knob_set_range (GTK_ROT_KNOB (ctrl->AzSet), ctrl->conf->minaz, ctrl->conf->maxaz); gtk_rot_knob_set_range (GTK_ROT_KNOB (ctrl->ElSet), ctrl->conf->minel, ctrl->conf->maxel); + + /*Update flipped when changing rotor if there is a plot*/ + set_flipped_pass(ctrl); } else { sat_log_log (SAT_LOG_LEVEL_ERROR, @@ -842,26 +852,45 @@ if (ctrl->tracking && ctrl->target) { if (ctrl->target->el < 0.0) { gdouble aosaz = 0.0; - + gdouble aosel = 0.0; + if (ctrl->pass != NULL) { aosaz = ctrl->pass->aos_az; - + /* if this is a flipped pass and the rotor supports it*/ + if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){ + aosel=180; + if (aosaz>180) + aosaz-=180; + else + aosaz+=180; + } + if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (aosaz > 180.0)) { aosaz -= 360.0; } } gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), aosaz); - gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), 0.0); + gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), aosel); } else { + setaz=ctrl->target->az; + setel=ctrl->target->el; + if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){ + setel=180-setel; + if (setaz>180) + setaz-=180; + else + setaz+=180; + } + if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && - (ctrl->target->az > 180.0)) { - gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), ctrl->target->az - 360.0); + (setaz > 180.0)) { + gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), setaz- 360.0); } else { - gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), ctrl->target->az); + gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), setaz); } - gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), ctrl->target->el); + gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), setel); } } @@ -1284,3 +1313,69 @@ static gint rot_name_compare (const gchar* a,const gchar *b){ return (g_ascii_strcasecmp(a,b)); } + + +/** \brief Compute if a pass is flipped or not. this is a function of the rotator and the particular pass. + */ +static gboolean is_flipped_pass (pass_t * pass,rot_az_type_t type){ + gdouble max_az,min_az; + gdouble caz,last_az=pass->aos_az; + guint num,i; + pass_detail_t *detail; + gboolean retval=FALSE; + + num = g_slist_length (pass->details); + if (type==ROT_AZ_TYPE_360) { + min_az = 0; + max_az = 360; + } + else if (type==ROT_AZ_TYPE_180) { + min_az = -180; + max_az = 180; + } + + /* Assume that min_az and max_az are atleat 360 degrees apart*/ + /*get the azimuth that is in a settable range*/ + while (last_az>max_az) { + last_az-=360; + } + while (last_az<min_az) { + last_az+=360; + } + + for (i = 1; i < num-1; i++) { + detail = PASS_DETAIL(g_slist_nth_data (pass->details, i)); + caz=detail->az; + while (caz>max_az) { + caz-=360; + } + while (caz<min_az) { + caz+=360; + } + if (fabs(caz-last_az)>180) { + retval=TRUE; + } + last_az=caz; + + } + caz=pass->los_az; + while (caz>max_az) { + caz-=360; + } + while (caz<min_az) { + caz+=360; + } + if (fabs(caz-last_az)>180) { + retval=TRUE; + } + + return retval; +} + +static inline void set_flipped_pass (GtkRotCtrl* ctrl){ + if (ctrl->conf) + if (ctrl->pass){ + ctrl->flipped=is_flipped_pass(ctrl->pass,ctrl->conf->aztype); + } + +} Modified: trunk/src/gtk-rot-ctrl.h =================================================================== --- trunk/src/gtk-rot-ctrl.h 2010-10-17 16:29:44 UTC (rev 691) +++ trunk/src/gtk-rot-ctrl.h 2010-10-27 15:53:53 UTC (rev 692) @@ -83,7 +83,8 @@ sat_t *target; /*!< Target satellite */ pass_t *pass; /*!< Next pass of target satellite */ qth_t *qth; /*!< The QTH for this module */ - + gboolean flipped; /*!< Whether the current pass loaded is a flip pass or not */ + guint delay; /*!< Timeout delay. */ guint timerid; /*!< Timer ID */ gdouble tolerance; /*!< Error tolerance */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |