gpredict-svn Mailing List for Gpredict (Page 18)
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: <fi...@us...> - 2009-12-06 13:05:27
|
Revision: 541 http://gpredict.svn.sourceforge.net/gpredict/?rev=541&view=rev Author: fillods Date: 2009-12-06 13:05:21 +0000 (Sun, 06 Dec 2009) Log Message: ----------- fix rare memleak, found by cppcheck Modified Paths: -------------- trunk/src/loc-tree.c Modified: trunk/src/loc-tree.c =================================================================== --- trunk/src/loc-tree.c 2009-12-03 16:18:09 UTC (rev 540) +++ trunk/src/loc-tree.c 2009-12-06 13:05:21 UTC (rev 541) @@ -354,6 +354,8 @@ _("%s: %s does not exist!"), __FUNCTION__, fname); + g_free(continent); + g_free(country); return GTK_TREE_MODEL (treestore); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-03 16:18:19
|
Revision: 540 http://gpredict.svn.sourceforge.net/gpredict/?rev=540&view=rev Author: csete Date: 2009-12-03 16:18:09 +0000 (Thu, 03 Dec 2009) Log Message: ----------- Updated satellite data. Modified Paths: -------------- trunk/data/satdata/amateur.cat trunk/data/satdata/cubesat.cat trunk/data/satdata/geo.cat trunk/data/satdata/satellites.dat trunk/data/satdata/science.cat trunk/data/satdata/tle-new.cat trunk/data/satdata/visual.cat Modified: trunk/data/satdata/amateur.cat =================================================================== --- trunk/data/satdata/amateur.cat 2009-12-02 15:14:39 UTC (rev 539) +++ trunk/data/satdata/amateur.cat 2009-12-03 16:18:09 UTC (rev 540) @@ -55,7 +55,6 @@ 28894 28895 28897 -28941 29712 32785 32789 Modified: trunk/data/satdata/cubesat.cat =================================================================== --- trunk/data/satdata/cubesat.cat 2009-12-02 15:14:39 UTC (rev 539) +++ trunk/data/satdata/cubesat.cat 2009-12-03 16:18:09 UTC (rev 540) @@ -8,7 +8,6 @@ 28892 28895 28897 -28941 29655 31122 31126 Modified: trunk/data/satdata/geo.cat =================================================================== --- trunk/data/satdata/geo.cat 2009-12-02 15:14:39 UTC (rev 539) +++ trunk/data/satdata/geo.cat 2009-12-03 16:18:09 UTC (rev 540) @@ -71,7 +71,6 @@ 23680 23686 23723 -23730 23754 23764 23765 @@ -172,7 +171,6 @@ 26243 26352 26369 -26378 26388 26394 26402 Modified: trunk/data/satdata/satellites.dat =================================================================== --- trunk/data/satdata/satellites.dat 2009-12-02 15:14:39 UTC (rev 539) +++ trunk/data/satdata/satellites.dat 2009-12-03 16:18:09 UTC (rev 540) @@ -1,8638 +1,8659 @@ -[733] +[28082] VERSION=1.1 -NAME=THOR AGENA D R/B -NICKNAME=THOR AGENA D R/B -TLE1=1 00733U 64002A 09309.80936482 .00000018 00000-0 25026-4 0 9163 -TLE2=2 00733 99.1090 338.5787 0034085 344.4342 15.5788 14.31273131384463 +NAME=ZHONGXING-20 +NICKNAME=ZHONGXING-20 +TLE1=1 28082U 03052A 09336.74327373 -.00000275 00000-0 10000-3 0 8928 +TLE2=2 28082 0.0562 273.6372 0002047 14.7054 149.0704 1.00270767 22211 -[24960] +[35004] VERSION=1.1 -NAME=MOLNIYA 1-90 -NICKNAME=MOLNIYA 1-90 -TLE1=1 24960U 97054A 09309.47318012 .00000207 00000-0 10000-3 0 6285 -TLE2=2 24960 63.7546 67.0026 7342212 253.6285 88.2642 2.00607347 88811 +NAME=POLYSAT CP6 +NICKNAME=POLYSAT CP6 +TLE1=1 35004U 09028D 09337.23243077 .00006403 00000-0 15149-3 0 1528 +TLE2=2 35004 40.4659 306.6499 0025486 345.8712 14.1385 15.41780882 30429 -[25908] +[24714] VERSION=1.1 -NAME=GLOBALSTAR M050 -NICKNAME=GLOBALSTAR M050 -TLE1=1 25908U 99049B 09309.95130218 -.00000079 00000-0 10000-3 0 122 -TLE2=2 25908 52.0007 287.0013 0008362 182.0960 177.9839 12.07309383464134 +NAME=NAHUEL 1A +NICKNAME=NAHUEL 1A +TLE1=1 24714U 97002B 09335.40433101 -.00000239 00000-0 10000-3 0 9777 +TLE2=2 24714 2.1777 76.8245 0004237 162.8245 264.5144 1.00269701 47025 -[28922] +[25482] VERSION=1.1 -NAME=GIOVE-A -NICKNAME=GIOVE-A -TLE1=1 28922U 05051A 09307.75428185 .00000099 00000-0 10000-3 0 6116 -TLE2=2 28922 56.0742 153.7009 0009222 350.7274 9.3555 1.69483052 23939 +NAME=ORBCOMM FM28 [-] +NICKNAME=ORBCOMM FM28 [-] +TLE1=1 25482U 98053H 09336.24686364 .00000290 00000-0 16471-3 0 7548 +TLE2=2 25482 45.0122 258.3683 0002534 102.9982 257.1145 14.30116300584345 -[24932] +[25732] VERSION=1.1 -NAME=METEOSAT-7 -NICKNAME=METEOSAT-7 -TLE1=1 24932U 97049B 09308.07012444 .00000079 00000-0 10000-3 0 7663 -TLE2=2 24932 5.5353 67.8731 0000918 230.2563 187.9405 1.00275487 44594 +NAME=CZ-4B R/B +NICKNAME=CZ-4B R/B +TLE1=1 25732U 99025C 09336.49939442 -.00000008 00000-0 17190-4 0 2612 +TLE2=2 25732 98.6657 307.4971 0038279 38.5241 321.8645 14.17195662546540 -[27858] +[28353] VERSION=1.1 -NAME=SCISAT 1 -NICKNAME=SCISAT 1 -TLE1=1 27858U 03036A 09307.96934215 -.00000033 00000-0 23083-6 0 8796 -TLE2=2 27858 73.9339 266.9343 0009137 287.0970 72.9202 14.74819934335320 +NAME=SL-16 R/B +NICKNAME=SL-16 R/B +TLE1=1 28353U 04021B 09336.17511281 -.00000337 00000-0 -15254-3 0 5097 +TLE2=2 28353 70.9980 92.7132 0003035 43.4566 316.6806 14.13909945282859 -[25495] +[28493] VERSION=1.1 -NAME=EUROBIRD 2 -NICKNAME=EUROBIRD 2 -TLE1=1 25495U 98057A 09305.77625001 .00000159 00000-0 10000-3 0 7402 -TLE2=2 25495 0.0832 26.4359 0003445 207.0414 112.7040 1.00274090 40566 +NAME=NANOSAT-1 +NICKNAME=NANOSAT-1 +TLE1=1 28493U 04049B 09336.88812623 .00000178 00000-0 37995-4 0 4989 +TLE2=2 28493 98.2870 300.5937 0005908 82.4635 277.7264 14.70347592265953 -[24869] +[24653] VERSION=1.1 -NAME=IRIDIUM 15 [+] -NICKNAME=IRIDIUM 15 [+] -TLE1=1 24869U 97034A 09309.53665980 -.00000015 00000-0 -12599-4 0 8598 -TLE2=2 24869 86.3925 104.0064 0002111 80.5957 279.5476 14.34213438645365 +NAME=MEASAT-2 +NICKNAME=MEASAT-2 +TLE1=1 24653U 96063B 09336.87536735 .00000142 00000-0 10000-3 0 700 +TLE2=2 24653 1.9787 76.9365 0000821 203.2325 160.4990 0.99907737 47863 -[32404] +[24871] VERSION=1.1 -NAME=THURAYA-3 -NICKNAME=THURAYA-3 -TLE1=1 32404U 08001A 09308.34677801 -.00000298 00000-0 10000-3 0 3334 -TLE2=2 32404 5.5119 331.8528 0005219 244.7090 50.6736 1.00271742 6679 +NAME=IRIDIUM 920 [-] +NICKNAME=IRIDIUM 920 [-] +TLE1=1 24871U 97034C 09336.39257692 .00000083 00000-0 20932-4 0 4579 +TLE2=2 24871 86.3964 85.3772 0013490 36.9272 323.2848 14.38085892650401 -[28892] +[27414] VERSION=1.1 -NAME=UWE-1 -NICKNAME=UWE-1 -TLE1=1 28892U 05043C 09309.71912560 .00000078 00000-0 25769-4 0 4727 -TLE2=2 28892 98.0341 195.6070 0016332 265.3167 94.6162 14.59783559214493 +NAME=NSS-7 +NICKNAME=NSS-7 +TLE1=1 27414U 02019A 09334.80921146 -.00000145 00000-0 10000-3 0 4349 +TLE2=2 27414 0.0240 185.5364 0002637 50.1669 103.4378 1.00271304 27994 -[23319] +[18362] VERSION=1.1 -NAME=EXPRESS 1 -NICKNAME=EXPRESS 1 -TLE1=1 23319U 94067A 09306.10464947 -.00000186 00000-0 10000-3 0 7579 -TLE2=2 23319 8.4283 61.1524 0003232 91.7148 268.2647 0.99833233 54996 +NAME=OSCAR 29 +NICKNAME=OSCAR 29 +TLE1=1 18362U 87080B 09336.74013157 .00000069 00000-0 10000-3 0 8068 +TLE2=2 18362 90.3398 239.1486 0109529 69.1592 292.1234 13.43705110 89033 -[25104] +[25983] VERSION=1.1 -NAME=IRIDIUM 45 [+] -NICKNAME=IRIDIUM 45 [+] -TLE1=1 25104U 97082A 09309.52295456 .00000045 00000-0 89699-5 0 7394 -TLE2=2 25104 86.3970 337.6853 0002486 81.4654 278.6834 14.34220784621811 +NAME=ORBCOMM FM33 [-] +NICKNAME=ORBCOMM FM33 [-] +TLE1=1 25983U 99065D 09336.70517003 .00000385 00000-0 20615-3 0 6934 +TLE2=2 25983 45.0313 89.4281 0003358 237.1725 122.8798 14.28823352521376 -[17912] +[25407] VERSION=1.1 -NAME=SL-14 R/B -NICKNAME=SL-14 R/B -TLE1=1 17912U 87038B 09308.61668340 .00000094 00000-0 89179-5 0 9037 -TLE2=2 17912 82.4984 136.9258 0021831 23.8553 336.3656 14.81489666215713 +NAME=SL-16 R/B +NICKNAME=SL-16 R/B +TLE1=1 25407U 98045B 09337.05587924 .00000247 00000-0 15073-3 0 1990 +TLE2=2 25407 71.0110 65.7346 0006010 80.3995 279.7792 14.15510215586560 -[28376] +[31573] VERSION=1.1 -NAME=AURA -NICKNAME=AURA -TLE1=1 28376U 04026A 09308.97824545 .00000056 00000-0 22539-4 0 6401 -TLE2=2 28376 98.1913 250.9614 0001508 74.4786 285.6586 14.57128919282319 +NAME=GLOBALSTAR M069 +NICKNAME=GLOBALSTAR M069 +TLE1=1 31573U 07020C 09336.55511247 -.00000086 00000-0 10000-3 0 3992 +TLE2=2 31573 51.9934 182.8125 0000907 113.1284 246.9693 12.62734893117716 -[27704] +[26867] VERSION=1.1 -NAME=GPS BIIR-09 (PRN 21) -NICKNAME=GPS BIIR-09 (PRN 21) -TLE1=1 27704U 03010A 09308.94039014 .00000031 00000-0 10000-3 0 7721 -TLE2=2 27704 53.4738 213.3375 0158236 214.8477 144.1769 2.00554737 48393 +NAME=MOLNIYA 3-51 +NICKNAME=MOLNIYA 3-51 +TLE1=1 26867U 01030A 09335.69947226 .00000862 00000-0 00000+0 0 73 +TLE2=2 26867 64.0872 183.7567 6970053 265.0325 45.9717 2.00607738 61315 -[25478] +[23546] VERSION=1.1 -NAME=ORBCOMM FM24 [+] -NICKNAME=ORBCOMM FM24 [+] -TLE1=1 25478U 98053D 09309.26493248 .00000008 00000-0 57603-4 0 7104 -TLE2=2 25478 45.0115 53.5077 0001274 219.8669 140.2091 14.28975732580138 +NAME=ORBCOMM FM02 [+] +NICKNAME=ORBCOMM FM02 [+] +TLE1=1 23546U 95017B 09336.01491591 .00000248 00000-0 63858-4 0 4211 +TLE2=2 23546 69.9736 108.7698 0011256 330.2608 29.7891 14.61273651778608 -[26407] +[25789] VERSION=1.1 -NAME=GPS BIIR-05 (PRN 28) -NICKNAME=GPS BIIR-05 (PRN 28) -TLE1=1 26407U 00040A 09308.55532455 .00000039 00000-0 10000-3 0 6147 -TLE2=2 26407 55.4724 94.2899 0154476 245.0606 113.3161 2.00565751 68235 +NAME=QUIKSCAT +NICKNAME=QUIKSCAT +TLE1=1 25789U 99034A 09336.54126340 .00000008 00000-0 21128-4 0 5859 +TLE2=2 25789 98.6282 163.4552 0001085 103.1132 257.0180 14.26794321544464 -[33315] +[9478] VERSION=1.1 -NAME=RAPIDEYE 3 -NICKNAME=RAPIDEYE 3 -TLE1=1 33315U 08040D 09310.22629037 .00000052 00000-0 13940-4 0 3296 -TLE2=2 33315 97.9672 33.8987 0011613 323.6946 36.3480 14.79903293 64168 +NAME=MARISAT 2 +NICKNAME=MARISAT 2 +TLE1=1 09478U 76101A 09333.48317595 -.00000146 00000-0 10000-3 0 2082 +TLE2=2 09478 13.2596 354.8709 0101014 203.9888 155.5160 0.97590681 64500 -[36037] +[28902] VERSION=1.1 -NAME=PROBA-2 -NICKNAME=PROBA-2 -TLE1=1 36037U 09059B 09309.57887889 -.00000045 00000-0 00000+0 0 61 -TLE2=2 36037 98.3076 134.9573 0012256 240.6998 119.2992 14.51961699 509 +NAME=TELKOM 2 +NICKNAME=TELKOM 2 +TLE1=1 28902U 05046A 09334.64150244 -.00000339 00000-0 10000-3 0 7337 +TLE2=2 28902 0.0368 150.0303 0001601 109.3761 159.1817 1.00268907 14827 -[27560] +[33056] VERSION=1.1 -NAME=MOZHAYETS -NICKNAME=MOZHAYETS -TLE1=1 27560U 02054B 09309.58783119 .00000060 00000-0 23798-4 0 826 -TLE2=2 27560 97.9209 145.2346 0043711 129.8689 230.6367 14.55050903367311 +NAME=TURKSAT 3A +NICKNAME=TURKSAT 3A +TLE1=1 33056U 08030B 09333.97856993 .00000170 00000-0 10000-3 0 2638 +TLE2=2 33056 0.0109 7.0116 0003191 231.5903 224.6824 1.00273889 5484 -[20479] +[29644] VERSION=1.1 -NAME=ORIZURU (DEBUT) -NICKNAME=ORIZURU (DEBUT) -TLE1=1 20479U 90013B 09309.36827812 -.00000065 00000-0 -71621-4 0 4127 -TLE2=2 20479 99.0598 205.5420 0539116 205.5383 151.8176 12.83686247925140 +NAME=AMC-18 +NICKNAME=AMC-18 +TLE1=1 29644U 06054B 09336.24233444 -.00000071 00000-0 10000-3 0 5424 +TLE2=2 29644 0.0500 57.4425 0003219 194.1315 161.9460 1.00271690 10989 -[25262] +[25113] VERSION=1.1 -NAME=IRIDIUM 51 [S] -NICKNAME=IRIDIUM 51 [S] -TLE1=1 25262U 98018A 09309.31855741 .00000173 00000-0 45637-4 0 8784 -TLE2=2 25262 86.4492 41.1021 0002417 83.6659 276.4805 14.42954760611723 +NAME=ORBCOMM FM10 [+] +NICKNAME=ORBCOMM FM10 [+] +TLE1=1 25113U 97084B 09336.21918402 .00000015 00000-0 55057-4 0 1161 +TLE2=2 25113 45.0225 286.6262 0004474 208.7725 151.2875 14.34425040624372 -[29505] +[24277] VERSION=1.1 -NAME=SJ-6C -NICKNAME=SJ-6C -TLE1=1 29505U 06046A 09310.14733290 -.00000091 00000-0 -37667-5 0 4192 -TLE2=2 29505 97.6906 313.3063 0002803 348.5609 11.5538 14.90678844165238 +NAME=MIDORI (ADEOS) +NICKNAME=MIDORI (ADEOS) +TLE1=1 24277U 96046A 09337.44578686 -.00000012 00000-0 12031-4 0 2221 +TLE2=2 24277 98.3881 295.3309 0001721 104.3628 255.7744 14.28604359693090 -[25431] +[28935] VERSION=1.1 -NAME=IRIDIUM 3 [+] -NICKNAME=IRIDIUM 3 [+] -TLE1=1 25431U 98048A 09309.56101349 .00000026 00000-0 23478-5 0 7124 -TLE2=2 25431 86.3976 337.8019 0002988 81.1860 278.9669 14.34220568587066 +NAME=ECHOSTAR 10 +NICKNAME=ECHOSTAR 10 +TLE1=1 28935U 06003A 09335.26370907 -.00000034 00000-0 10000-3 0 8047 +TLE2=2 28935 0.0363 20.0176 0002054 232.8417 162.1487 1.00272599 13935 -[26081] +[12054] VERSION=1.1 -NAME=GLOBALSTAR M063 -NICKNAME=GLOBALSTAR M063 -TLE1=1 26081U 00008A 09309.56785201 -.00000086 00000-0 10000-3 0 967 -TLE2=2 26081 51.9979 174.7404 0001772 89.8782 270.2287 12.62260182457830 +NAME=COSMOS 1220 +NICKNAME=COSMOS 1220 +TLE1=1 12054U 80089A 09336.75569648 .00002211 00000-0 99351-4 0 1447 +TLE2=2 12054 64.9752 114.9713 0034849 87.6124 272.8974 15.23560283493908 -[27600] +[19688] VERSION=1.1 -NAME=MICRO LABSAT -NICKNAME=MICRO LABSAT -TLE1=1 27600U 02056D 09309.22314088 .00000042 00000-0 33001-4 0 8993 -TLE2=2 27600 98.3743 0.6286 0010991 188.4516 171.6470 14.28869982359589 +NAME=ASTRA 1A +NICKNAME=ASTRA 1A +TLE1=1 19688U 88109B 09335.22682363 .00000002 00000-0 10000-3 0 6274 +TLE2=2 19688 8.0199 62.3391 0013520 301.9763 57.7386 0.98335655 56691 -[29480] +[733] VERSION=1.1 -NAME=M-V-7 R/B -NICKNAME=M-V-7 R/B -TLE1=1 29480U 06041B 09292.83767789 .12043556 30710-5 10894-3 0 786 -TLE2=2 29480 98.2372 143.7071 0010206 333.6641 26.5161 16.51401864175082 +NAME=THOR AGENA D R/B +NICKNAME=THOR AGENA D R/B +TLE1=1 00733U 64002A 09336.58374092 .00000000 00000-0 18369-4 0 9388 +TLE2=2 00733 99.1045 6.6324 0033624 265.6371 94.0967 14.31275977388293 -[32750] +[25651] VERSION=1.1 -NAME=SAR-LUPE 4 -NICKNAME=SAR-LUPE 4 -TLE1=1 32750U 08014A 09310.08084650 .00000878 00000-0 36824-4 0 8094 -TLE2=2 32750 98.1363 63.2602 0020080 300.7235 174.4343 15.26511638 89751 +NAME=GLOBALSTAR M046 +NICKNAME=GLOBALSTAR M046 +TLE1=1 25651U 99012C 09336.72290777 -.00000086 00000-0 10000-3 0 1274 +TLE2=2 25651 52.0025 182.4893 0002747 85.8335 274.2841 12.62267182494611 -[20918] +[27811] VERSION=1.1 -NAME=INMARSAT 2-F1 -NICKNAME=INMARSAT 2-F1 -TLE1=1 20918U 90093A 09309.57324852 .00000116 00000-0 10000-3 0 6650 -TLE2=2 20918 6.9223 54.0206 0003595 171.7999 243.4976 1.00270393 66097 +NAME=HELLAS-SAT 2 +NICKNAME=HELLAS-SAT 2 +TLE1=1 27811U 03020A 09336.75734872 .00000169 00000-0 10000-3 0 214 +TLE2=2 27811 0.0138 274.8591 0003516 332.0701 136.4244 1.00271257 23925 -[32790] +[25397] VERSION=1.1 -NAME=CANX-2 -NICKNAME=CANX-2 -TLE1=1 32790U 08021H 09310.23279295 .00000360 00000-0 52630-4 0 5012 -TLE2=2 32790 97.9286 12.8510 0014544 292.4810 67.4857 14.81508301 82452 +NAME=TECHSAT 1B (GO-32) +NICKNAME=GO-32 +TLE1=1 25397U 98043D 09336.45589818 -.00000039 00000-0 53186-6 0 543 +TLE2=2 25397 98.3179 349.7125 0002073 106.7850 253.3569 14.23167167592068 -[25415] +[27651] VERSION=1.1 -NAME=ORBCOMM FM19 [+] -NICKNAME=ORBCOMM FM19 [+] -TLE1=1 25415U 98046C 09310.03567091 -.00000137 00000-0 82161-6 0 1367 -TLE2=2 25415 44.9984 320.7691 0003668 302.5530 57.4951 14.27653806586963 +NAME=SORCE +NICKNAME=SORCE +TLE1=1 27651U 03004A 09336.51695612 -.00000039 00000-0 11099-4 0 655 +TLE2=2 27651 39.9950 105.0133 0024551 73.5590 286.7906 14.82232229371270 -[29155] +[25946] VERSION=1.1 -NAME=GOES 13 -NICKNAME=GOES 13 -TLE1=1 29155U 06018A 09309.46387402 -.00000077 00000-0 10000-3 0 8204 -TLE2=2 29155 0.2224 102.0835 0003383 113.9783 250.3048 1.00272275 12676 +NAME=GLOBALSTAR M031 +NICKNAME=GLOBALSTAR M031 +TLE1=1 25946U 99058D 09335.90627399 -.00000086 00000-0 10000-3 0 600 +TLE2=2 25946 51.9959 94.5484 0002557 194.9893 165.0897 12.62267764467794 -[23864] +[25621] VERSION=1.1 -NAME=PALAPA C2 -NICKNAME=PALAPA C2 -TLE1=1 23864U 96030A 09309.77451546 -.00000350 00000-0 10000-3 0 9512 -TLE2=2 23864 0.0409 65.5821 0000972 147.6137 223.6206 1.00268015 49346 +NAME=GLOBALSTAR M023 +NICKNAME=GLOBALSTAR M023 +TLE1=1 25621U 99004A 09336.70990835 -.00000086 00000-0 10000-3 0 1698 +TLE2=2 25621 52.0117 50.4658 0009877 183.5880 176.4913 12.62224331499038 -[25937] +[36088] VERSION=1.1 -NAME=DIRECTV 1R -NICKNAME=DIRECTV 1R -TLE1=1 25937U 99056A 09308.33000791 -.00000245 00000-0 00000+0 0 7368 -TLE2=2 25937 0.0046 181.4539 0001968 19.0246 249.5746 1.00272559 36912 +NAME=SJ-11-01 +NICKNAME=SJ-11-01 +TLE1=1 36088U 09061A 09337.35246460 .00000422 00000-0 10000-3 0 716 +TLE2=2 36088 98.2757 27.9482 0010682 202.6862 157.3834 14.58937480 3081 -[25078] +[34264] VERSION=1.1 -NAME=IRIDIUM 44 [-] -NICKNAME=IRIDIUM 44 [-] -TLE1=1 25078U 97077B 09309.46652305 .00000117 00000-0 33199-4 0 2872 -TLE2=2 25078 86.3913 99.4432 0003593 52.1344 308.0168 14.36572944624210 +NAME=RADUGA-1 8 +NICKNAME=RADUGA-1 8 +TLE1=1 34264U 09010A 09336.70565186 .00000129 00000-0 10000-3 0 2100 +TLE2=2 34264 0.9981 204.3758 0027031 260.8642 237.4491 1.00267040 2785 -[1293] +[26038] VERSION=1.1 -NAME=OSCAR 3 (OSCAR III) -NICKNAME=OSCAR 3 (OSCAR III) -TLE1=1 01293U 65016F 09309.78689641 .00000049 00000-0 63833-4 0 6529 -TLE2=2 01293 70.0753 225.3857 0018820 332.5180 27.4902 14.04737208279695 +NAME=GALAXY 11 (G-11) +NICKNAME=GALAXY 11 (G-11) +TLE1=1 26038U 99071A 09334.99233735 .00000178 00000-0 00000+0 0 8090 +TLE2=2 26038 0.0266 249.4059 0001085 330.6489 240.0198 1.00275600 36526 -[25962] +[25509] VERSION=1.1 -NAME=GLOBALSTAR M034 -NICKNAME=GLOBALSTAR M034 -TLE1=1 25962U 99062B 09308.55075055 -.00000086 00000-0 10000-3 0 396 -TLE2=2 25962 52.0001 43.1393 0001096 192.1616 167.9224 12.62264932459173 +NAME=SEDSAT 1 (SO-33) +NICKNAME=SO-33 +TLE1=1 25509U 98061B 09335.73666657 .00000100 00000-0 87746-5 0 5984 +TLE2=2 25509 31.4328 185.0637 0354489 3.3628 356.9278 14.28271187579809 -[25275] +[27004] VERSION=1.1 -NAME=IRIDIUM 59 [+] -NICKNAME=IRIDIUM 59 [+] -TLE1=1 25275U 98019D 09309.48210327 -.00000024 00000-0 -15610-4 0 4075 -TLE2=2 25275 86.3998 9.5379 0002524 72.1314 288.0155 14.34224807607502 +NAME=MAROC-TUBSAT +NICKNAME=MAROC-TUBSAT +TLE1=1 27004U 01056D 09335.75796040 .00000023 00000-0 74373-4 0 4070 +TLE2=2 27004 99.2223 190.1382 0020087 326.6515 33.3363 13.70030077398875 -[30773] +[25964] VERSION=1.1 -NAME=MIDSTAR-1 -NICKNAME=MIDSTAR-1 -TLE1=1 30773U 07006B 09309.65015666 -.00000304 00000-0 00000+0 0 7567 -TLE2=2 30773 46.0316 323.8874 0010698 240.5057 119.4789 15.23853420148313 +NAME=GLOBALSTAR M061 +NICKNAME=GLOBALSTAR M061 +TLE1=1 25964U 99062D 09337.33641379 -.00000074 00000-0 10000-3 0 256 +TLE2=2 25964 51.9758 110.0937 0007118 102.3647 257.7987 11.76684721453408 -[27954] +[24968] VERSION=1.1 -NAME=GALAXY 13 (HORIZONS-1) -NICKNAME=GALAXY 13 (HORIZONS-1) -TLE1=1 27954U 03044A 09308.87007759 .00000000 00000-0 10000-3 0 9625 -TLE2=2 27954 0.0148 145.9790 0000470 311.6039 132.9758 1.00273475 22403 +NAME=IRIDIUM 37 [+] +NICKNAME=IRIDIUM 37 [+] +TLE1=1 24968U 97056D 09336.20685693 .00000154 00000-0 48060-4 0 8324 +TLE2=2 24968 86.3976 29.8057 0002398 84.4651 275.6818 14.34221382637802 -[25288] +[24904] VERSION=1.1 -NAME=IRIDIUM 65 [+] -NICKNAME=IRIDIUM 65 [+] -TLE1=1 25288U 98021D 09309.53857651 -.00000525 00000-0 -19458-3 0 7460 -TLE2=2 25288 86.3922 306.0654 0002683 75.2161 284.9330 14.34216659606464 +NAME=IRIDIUM 25 [+] +NICKNAME=IRIDIUM 25 [+] +TLE1=1 24904U 97043B 09336.51702944 -.00000026 00000-0 -16214-4 0 8486 +TLE2=2 24904 86.3936 326.3754 0002383 81.7722 278.3741 14.34215019643138 -[26063] +[19822] VERSION=1.1 -NAME=OPAL (OO-38) -NICKNAME=OO-38 -TLE1=1 26063U 00004C 09309.11881594 -.00000009 00000-0 17218-4 0 6472 -TLE2=2 26063 100.2247 121.5635 0036641 224.4257 135.3981 14.35876042512170 +NAME=AKEBONO (EXOS-D) +NICKNAME=AKEBONO (EXOS-D) +TLE1=1 19822U 89016A 09337.40846287 .00007672 -16546-6 24919-3 0 3923 +TLE2=2 19822 75.0616 136.0274 2687251 117.4345 272.4790 10.02099369612399 -[31601] +[25112] VERSION=1.1 -NAME=OFEQ 7 -NICKNAME=OFEQ 7 -TLE1=1 31601U 07025A 09310.21339115 .00002093 00000-0 69560-4 0 7300 -TLE2=2 31601 141.7471 233.3052 0071299 219.7572 240.5096 15.19940921134046 +NAME=ORBCOMM FM08 [+] +NICKNAME=ORBCOMM FM08 [+] +TLE1=1 25112U 97084A 09336.32363275 .00000040 00000-0 63831-4 0 3860 +TLE2=2 25112 45.0219 285.3261 0008126 231.2164 128.7957 14.34433596624392 -[11416] +[24869] VERSION=1.1 -NAME=NOAA 6 [P] -NICKNAME=NOAA 6 [P] -TLE1=1 11416U 79057A 09309.47728862 .00000083 00000-0 46903-4 0 231 -TLE2=2 11416 98.4056 320.0639 0009697 200.4929 159.5876 14.31941857581937 +NAME=IRIDIUM 15 [+] +NICKNAME=IRIDIUM 15 [+] +TLE1=1 24869U 97034A 09336.39759892 .00000117 00000-0 34728-4 0 8924 +TLE2=2 24869 86.3947 92.7790 0002229 85.5230 274.6220 14.34216806649210 -[23448] +[25159] VERSION=1.1 -NAME=RADUGA 32 -NICKNAME=RADUGA 32 -TLE1=1 23448U 94087A 09307.79860119 .00000000 00000-0 10000-3 0 2031 -TLE2=2 23448 10.5338 50.8090 0005381 127.1760 232.8085 1.00269234 72088 +NAME=ORBCOMM FM04 [+] +NICKNAME=ORBCOMM FM04 [+] +TLE1=1 25159U 98007C 09336.86594052 .00000137 00000-0 11162-3 0 374 +TLE2=2 25159 107.9664 96.0915 0045864 356.3943 3.6854 14.25514220613582 -[28946] +[13969] VERSION=1.1 -NAME=EUROBIRD 9A -NICKNAME=EUROBIRD 9A -TLE1=1 28946U 06007B 09308.09298878 .00000076 00000-0 10000-3 0 3983 -TLE2=2 28946 0.0103 7.5569 0011194 241.1274 197.2954 1.00276200 13452 +NAME=TDRS 1 +NICKNAME=TDRS 1 +TLE1=1 13969U 83026B 09336.23246067 -.00000293 00000-0 10000-3 0 9773 +TLE2=2 13969 13.4618 7.9456 0031581 240.7938 209.6026 1.00260217 70680 -[22912] +[23816] VERSION=1.1 -NAME=METEOSAT-6 (MOP-3) -NICKNAME=METEOSAT-6 (MOP-3) -TLE1=1 22912U 93073B 09305.57693947 -.00000003 00000-0 10000-3 0 3234 -TLE2=2 22912 8.6896 58.2352 0001066 210.6612 47.2198 1.00273506 56849 +NAME=INTELSAT 707 (IS-707) +NICKNAME=INTELSAT 707 (IS-707) +TLE1=1 23816U 96015A 09335.25761286 -.00000263 00000-0 10000-3 0 9220 +TLE2=2 23816 0.0056 357.4057 0003272 255.6302 216.9807 1.00271089 50254 -[24808] +[24839] VERSION=1.1 -NAME=THOR II -NICKNAME=THOR II -TLE1=1 24808U 97025A 09308.05303969 .00000049 00000-0 10000-3 0 6679 -TLE2=2 24808 1.4377 79.4828 0001245 121.8480 226.3466 1.00272942 45645 +NAME=IRIDIUM 10 [+] +NICKNAME=IRIDIUM 10 [+] +TLE1=1 24839U 97030D 09336.31806520 .00000146 00000-0 44892-4 0 8677 +TLE2=2 24839 86.3961 61.1234 0002349 84.0075 276.1386 14.34220317652249 -[6920] +[25880] VERSION=1.1 -NAME=NOAA 3 [-] -NICKNAME=NOAA 3 [-] -TLE1=1 06920U 73086A 09309.49183171 -.00000030 00000-0 10000-3 0 3033 -TLE2=2 06920 101.7143 326.6049 0006281 266.2278 93.8072 12.40301091629799 +NAME=TELKOM 1 +NICKNAME=TELKOM 1 +TLE1=1 25880U 99042A 09334.74464745 -.00000321 00000-0 10000-3 0 8267 +TLE2=2 25880 0.0061 328.6014 0002734 271.2892 205.9718 1.00273683 37803 -[25622] +[22698] VERSION=1.1 -NAME=GLOBALSTAR M040 -NICKNAME=GLOBALSTAR M040 -TLE1=1 25622U 99004B 09308.88256911 -.00000086 00000-0 10000-3 0 1035 -TLE2=2 25622 51.9956 130.8464 0001636 68.2986 291.8055 12.61708162495535 +NAME=RADCAL +NICKNAME=RADCAL +TLE1=1 22698U 93041A 09336.49667113 -.00000020 00000-0 -14655-4 0 4862 +TLE2=2 22698 89.5393 18.3107 0091161 126.8654 234.0925 14.22825866853203 -[27392] +[26643] VERSION=1.1 -NAME=GRACE 2 -NICKNAME=GRACE 2 -TLE1=1 27392U 02012B 09309.79650906 .00000681 00000-0 19431-4 0 3341 -TLE2=2 27392 89.0159 344.1558 0014133 282.0644 77.9021 15.34339935427021 +NAME=BEIDOU 1B +NICKNAME=BEIDOU 1B +TLE1=1 26643U 00082A 09336.57960954 -.00000122 00000-0 10000-3 0 4903 +TLE2=2 26643 2.4300 75.5182 0004471 183.1338 101.8280 1.00269530 32824 -[32050] +[33314] VERSION=1.1 -NAME=INSAT-4CR -NICKNAME=INSAT-4CR -TLE1=1 32050U 07037A 09308.90670512 -.00000068 00000-0 10000-3 0 5611 -TLE2=2 32050 0.1155 80.9395 0002897 106.0617 257.7586 1.00273220 8011 +NAME=RAPIDEYE 1 +NICKNAME=RAPIDEYE 1 +TLE1=1 33314U 08040C 09337.16434827 .00000048 00000-0 13401-4 0 4768 +TLE2=2 33314 97.9668 61.2219 0023885 298.2059 61.6741 14.79908777 68180 -[27830] +[20693] VERSION=1.1 -NAME=BSAT-2C -NICKNAME=BSAT-2C -TLE1=1 27830U 03028A 09307.33425459 -.00000336 00000-0 10000-3 0 669 -TLE2=2 27830 0.1193 91.9481 0004048 149.1505 31.8567 1.00271457 23461 +NAME=COSMOS 2085 +NICKNAME=COSMOS 2085 +TLE1=1 20693U 90061A 09336.69803287 -.00000053 00000-0 10000-3 0 9993 +TLE2=2 20693 12.4374 34.1195 0002960 273.3084 86.6194 1.00265825 70932 -[24285] +[23051] VERSION=1.1 -NAME=FAST -NICKNAME=FAST -TLE1=1 24285U 96049A 09308.97014863 .00001117 00000-0 10159-3 0 8502 -TLE2=2 24285 82.9803 347.8867 1995787 259.4290 77.7150 11.26479924534388 +NAME=GOES 8 [-] +NICKNAME=GOES 8 [-] +TLE1=1 23051U 94022A 09335.36580168 .00000074 00000-0 10000-3 0 395 +TLE2=2 23051 6.1647 71.2861 0008982 177.2544 182.5351 0.98904220 64378 -[25417] +[28051] VERSION=1.1 -NAME=ORBCOMM FM16 [+] -NICKNAME=ORBCOMM FM16 [+] -TLE1=1 25417U 98046E 09310.05578949 .00000261 00000-0 16061-3 0 1792 -TLE2=2 25417 45.0008 321.8078 0001702 294.4825 65.5842 14.27658369586966 +NAME=IRS-P6 (RESOURCESAT-1) +NICKNAME=IRS-P6 (RESOURCESAT-1) +TLE1=1 28051U 03046A 09337.37960337 .00000012 00000-0 25562-4 0 2102 +TLE2=2 28051 98.6998 50.9793 0002475 38.2155 321.9197 14.21636834318150 -[20436] +[25354] VERSION=1.1 -NAME=SPOT 2 -NICKNAME=SPOT 2 -TLE1=1 20436U 90005A 09310.19000549 .00000125 00000-0 31806-4 0 8922 -TLE2=2 20436 98.6527 24.4513 0154865 224.8038 134.0588 14.61908918 26294 +NAME=CHINASTAR 1 +NICKNAME=CHINASTAR 1 +TLE1=1 25354U 98033A 09336.90342150 -.00000190 00000-0 10000-3 0 6832 +TLE2=2 25354 0.0096 237.4601 0002321 24.8288 222.3397 1.00270309 46728 -[28939] +[32958] VERSION=1.1 -NAME=AKARI (ASTRO-F) -NICKNAME=AKARI (ASTRO-F) -TLE1=1 28939U 06005A 09308.58923336 .00000090 00000-0 29986-4 0 1271 -TLE2=2 28939 98.2498 310.6134 0009196 102.0287 258.1946 14.57573046196548 +NAME=FENGYUN 3A +NICKNAME=FENGYUN 3A +TLE1=1 32958U 08026A 09336.29679395 .00000167 00000-0 10000-3 0 4650 +TLE2=2 32958 98.7535 46.0211 0001077 56.1358 303.9878 14.19600412 78633 -[24277] +[32711] VERSION=1.1 -NAME=MIDORI (ADEOS) -NICKNAME=MIDORI (ADEOS) -TLE1=1 24277U 96046A 09309.85058299 .00000002 00000-0 17623-4 0 2004 -TLE2=2 24277 98.3836 268.7942 0000512 157.0905 203.0302 14.28602762689151 +NAME=GPS BIIRM-6 (PRN 07) +NICKNAME=GPS BIIRM-6 (PRN 07) +TLE1=1 32711U 08012A 09335.84842056 -.00000049 00000-0 10000-3 0 3231 +TLE2=2 32711 55.5608 31.4361 0032324 178.0930 181.9822 2.00567390 12618 -[25897] +[25260] VERSION=1.1 -NAME=YAMAL 102 -NICKNAME=YAMAL 102 -TLE1=1 25897U 99047B 09308.93580178 -.00000218 00000-0 10000-3 0 3250 -TLE2=2 25897 5.7617 68.4194 0003795 166.1887 236.4057 1.00271569 37314 +NAME=SPOT 4 +NICKNAME=SPOT 4 +TLE1=1 25260U 98017A 09337.16065727 -.00000010 00000-0 15927-4 0 7152 +TLE2=2 25260 98.6826 46.9957 0001559 103.8511 338.8995 14.20045370606312 -[25949] +[27941] VERSION=1.1 -NAME=TELSTAR 12 (ORION 2) -NICKNAME=TELSTAR 12 (ORION 2) -TLE1=1 25949U 99059A 09309.78335133 -.00000111 00000-0 10000-3 0 7508 -TLE2=2 25949 0.0468 99.1497 0003369 123.3992 89.6257 1.00271533 36792 +NAME=NIGERIASAT 1 +NICKNAME=NIGERIASAT 1 +TLE1=1 27941U 03042C 09337.14310696 .00000034 00000-0 15495-4 0 327 +TLE2=2 27941 97.9180 205.3832 0010936 330.0071 30.0507 14.63045323330243 -[26631] +[22117] VERSION=1.1 -NAME=EROS A1 -NICKNAME=EROS A1 -TLE1=1 26631U 00079A 09310.17393947 .00001379 00000-0 70568-4 0 3444 -TLE2=2 26631 97.4737 13.8922 0008453 203.3983 234.0849 15.18289440496067 +NAME=SATCOM C3 +NICKNAME=SATCOM C3 +TLE1=1 22117U 92060B 09336.45068103 -.00000219 00000-0 10000-3 0 2459 +TLE2=2 22117 4.7936 70.3732 0001993 182.0934 262.1813 1.00271613 63064 -[28622] +[25977] VERSION=1.1 -NAME=HIMAWARI 6 (MTSAT-1R) -NICKNAME=HIMAWARI 6 (MTSAT-1R) -TLE1=1 28622U 05006A 09307.58911491 -.00000266 00000-0 10000-3 0 2866 -TLE2=2 28622 0.0580 52.0371 0002366 354.2887 348.8282 1.00271215 17155 +NAME=HELIOS 1B +NICKNAME=HELIOS 1B +TLE1=1 25977U 99064A 09337.10453476 .00000594 00000-0 90622-4 0 8495 +TLE2=2 25977 98.3443 343.8449 0002189 118.7376 241.4054 14.77744675536872 -[26824] +[27845] VERSION=1.1 -NAME=INTELSAT 901 (IS-901) -NICKNAME=INTELSAT 901 (IS-901) -TLE1=1 26824U 01024A 09308.74551669 .00000000 00000-0 10000-3 0 4856 -TLE2=2 26824 0.0105 13.8125 0003149 203.6951 77.0175 1.00268233 30828 +NAME=QUAKESAT +NICKNAME=QUAKESAT +TLE1=1 27845U 03031F 09336.52342053 .00000095 00000-0 65023-4 0 7002 +TLE2=2 27845 98.7195 342.7596 0009525 40.0963 320.0907 14.20309160333068 -[26610] +[33322] VERSION=1.1 -NAME=STRV 1C -NICKNAME=STRV 1C -TLE1=1 26610U 00072C 09308.93623387 -.00000172 00000-0 10000-3 0 9978 -TLE2=2 26610 6.4890 238.3839 7338873 157.9101 265.8515 2.03459243 66683 +NAME=CZ-2C R/B +NICKNAME=CZ-2C R/B +TLE1=1 33322U 08041C 09336.88749360 .00132405 26495-5 21554-3 0 4588 +TLE2=2 33322 97.9842 108.9057 0114678 333.9170 25.6338 15.92019674 70364 -[24713] +[23227] VERSION=1.1 -NAME=AMC-2 (GE-2) -NICKNAME=AMC-2 (GE-2) -TLE1=1 24713U 97002A 09309.35934712 -.00000106 00000-0 00000+0 0 9773 -TLE2=2 24713 0.0711 95.3887 0002583 95.8942 241.8494 1.00271514 46769 +NAME=OPTUS B3 +NICKNAME=OPTUS B3 +TLE1=1 23227U 94055A 09336.31508641 -.00000056 00000-0 10000-3 0 4483 +TLE2=2 23227 1.8632 77.4723 0004186 175.7645 95.4885 1.00272350 55887 -[21701] +[28372] VERSION=1.1 -NAME=UARS -NICKNAME=UARS -TLE1=1 21701U 91063B 09309.79965782 .00007060 00000-0 90979-4 0 8084 -TLE2=2 21701 56.9687 102.8324 0079085 90.4657 270.5452 15.56693858 1264 +NAME=APRIZESAT 1 +NICKNAME=APRIZESAT 1 +TLE1=1 28372U 04025G 09336.12940669 .00000139 00000-0 48205-4 0 5331 +TLE2=2 28372 98.0030 357.9655 0046297 272.4688 87.1214 14.48183908286802 -[32953] +[25847] VERSION=1.1 -NAME=YUBILEINY (RS-30) -NICKNAME=YUBILEINY (RS-30) -TLE1=1 32953U 08025A 09310.09286610 .00000010 00000-0 00000+0 0 4469 -TLE2=2 32953 82.5031 168.3936 0018125 229.0450 130.9068 12.43003136 66022 +NAME=MOLNIYA 3-50 +NICKNAME=MOLNIYA 3-50 +TLE1=1 25847U 99036A 09336.80967586 .00000102 00000-0 10000-3 0 7426 +TLE2=2 25847 63.6756 250.6778 6956119 265.7166 19.1035 2.00647860 76236 -[25418] +[25771] VERSION=1.1 -NAME=ORBCOMM FM15 [+] -NICKNAME=ORBCOMM FM15 [+] -TLE1=1 25418U 98046F 09310.06573840 .00000343 00000-0 19374-3 0 2320 -TLE2=2 25418 45.0019 321.9809 0002678 324.5620 35.5041 14.27668379586963 +NAME=GLOBALSTAR M049 +NICKNAME=GLOBALSTAR M049 +TLE1=1 25771U 99031B 09336.20000299 -.00000086 00000-0 10000-3 0 2719 +TLE2=2 25771 51.9952 228.1273 0002027 56.5014 303.6047 12.62376207483387 -[27847] +[21576] VERSION=1.1 -NAME=CANX-1 -NICKNAME=CANX-1 -TLE1=1 27847U 03031H 09309.08432028 .00000024 00000-0 31425-4 0 6300 -TLE2=2 27847 98.7061 317.1972 0010172 77.2555 282.9757 14.20981509329309 +NAME=ORBCOMM-X [-] +NICKNAME=ORBCOMM-X [-] +TLE1=1 21576U 91050C 09337.04198561 .00000035 00000-0 25093-4 0 1816 +TLE2=2 21576 98.4896 287.6204 0002863 248.1759 111.9119 14.39976164964845 -[7338] +[24905] VERSION=1.1 -NAME=SL-8 R/B -NICKNAME=SL-8 R/B -TLE1=1 07338U 74044B 09309.47976476 .00006549 00000-0 12851-3 0 110 -TLE2=2 07338 82.8803 305.7429 0212239 294.6594 63.2667 15.26245653821134 +NAME=IRIDIUM 46 [+] +NICKNAME=IRIDIUM 46 [+] +TLE1=1 24905U 97043C 09336.52971084 .00000032 00000-0 44108-5 0 8648 +TLE2=2 24905 86.3948 326.6670 0002439 79.6532 280.4935 14.34215591643144 -[24931] +[27775] VERSION=1.1 -NAME=EUROBIRD 4 -NICKNAME=EUROBIRD 4 -TLE1=1 24931U 97049A 09305.58959260 -.00000080 00000-0 10000-3 0 645 -TLE2=2 24931 0.6840 81.1089 0010936 82.8986 165.1225 1.00272446 44620 +NAME=COSMOS 2397 +NICKNAME=COSMOS 2397 +TLE1=1 27775U 03015A 09337.16452293 -.00000273 00000-0 10000-3 0 1451 +TLE2=2 27775 3.8062 70.0867 0046470 204.3520 155.0616 1.00475522 24257 -[694] +[32393] VERSION=1.1 -NAME=ATLAS CENTAUR 2 -NICKNAME=ATLAS CENTAUR 2 -TLE1=1 00694U 63047A 09309.05679560 .00000236 00000-0 17974-4 0 1050 -TLE2=2 00694 30.3570 258.2156 0616677 161.5876 200.8106 13.95067573293136 +NAME=COSMOS 2434 (721) +NICKNAME=COSMOS 2434 (721) +TLE1=1 32393U 07065A 09336.49645809 -.00000025 00000-0 00000+0 0 4143 +TLE2=2 32393 65.1030 37.7075 0004582 149.3848 10.3829 2.13103286 15074 -[25158] +[28376] VERSION=1.1 -NAME=ORBCOMM FM03 [-] -NICKNAME=ORBCOMM FM03 [-] -TLE1=1 25158U 98007B 09310.19213278 .00000065 00000-0 81733-4 0 180 -TLE2=2 25158 107.9683 42.2913 0048517 42.8853 317.6052 14.25476973609752 +NAME=AURA +NICKNAME=AURA +TLE1=1 28376U 04026A 09336.51466867 .00000034 00000-0 17523-4 0 6640 +TLE2=2 28376 98.1952 278.0536 0000974 61.1623 298.9664 14.57118048286326 -[24842] +[25740] VERSION=1.1 -NAME=IRIDIUM 911 [-] -NICKNAME=IRIDIUM 911 [-] -TLE1=1 24842U 97030G 09309.46444660 .00000120 00000-0 29744-4 0 4789 -TLE2=2 24842 86.4429 75.1396 0013770 320.0244 39.9938 14.43194769651662 +NAME=NIMIQ 1 +NICKNAME=NIMIQ 1 +TLE1=1 25740U 99027A 09334.67085225 -.00000151 00000-0 10000-3 0 7124 +TLE2=2 25740 0.0540 64.0624 0004285 205.8938 310.1540 1.00270716 38611 -[25880] +[12585] VERSION=1.1 -NAME=TELKOM 1 -NICKNAME=TELKOM 1 -TLE1=1 25880U 99042A 09306.26271422 -.00000329 00000-0 10000-3 0 8179 -TLE2=2 25880 0.0115 276.9959 0002177 323.9228 3.3630 1.00274152 37518 +NAME=METEOR PRIRODA +NICKNAME=METEOR PRIRODA +TLE1=1 12585U 81065A 09336.64314953 .00000764 00000-0 54344-4 0 5253 +TLE2=2 12585 97.3869 16.3561 0018708 218.9574 141.0291 15.07339666545937 -[28981] +[28163] VERSION=1.1 -NAME=ST5-B -NICKNAME=ST5-B -TLE1=1 28981U 06008B 09310.20213414 .00009046 15143-5 30576-3 0 1930 -TLE2=2 28981 105.6613 333.3079 2325564 23.4418 345.7385 10.75838861141063 +NAME=MOLNIYA 1-93 +NICKNAME=MOLNIYA 1-93 +TLE1=1 28163U 04005A 09336.30122090 -.00000221 00000-0 10000-3 0 741 +TLE2=2 28163 64.8894 267.1669 7121621 273.7316 345.3806 2.00597497 42409 -[24792] +[28230] VERSION=1.1 -NAME=IRIDIUM 8 [+] -NICKNAME=IRIDIUM 8 [+] -TLE1=1 24792U 97020A 09309.33342186 .00000139 00000-0 42731-4 0 8198 -TLE2=2 24792 86.3972 40.9272 0002298 84.4762 275.6695 14.34219380654614 +NAME=GP-B +NICKNAME=GP-B +TLE1=1 28230U 04014A 09336.50944430 .00000113 00000-0 14110-4 0 6593 +TLE2=2 28230 89.9339 156.8280 0001778 78.1756 281.9641 14.76001822302608 -[19573] +[28485] VERSION=1.1 -NAME=COSMOS 1975 -NICKNAME=COSMOS 1975 -TLE1=1 19573U 88093A 09309.06145216 .00000111 00000-0 76316-5 0 6931 -TLE2=2 19573 82.5210 135.1535 0017376 344.1063 15.9593 14.95424064143091 +NAME=SWIFT +NICKNAME=SWIFT +TLE1=1 28485U 04047A 09336.79538701 .00000684 00000-0 26376-4 0 4501 +TLE2=2 28485 20.5573 122.3179 0014467 346.2278 13.7862 14.92616470274897 -[23185] +[25492] VERSION=1.1 -NAME=APSTAR 1 -NICKNAME=APSTAR 1 -TLE1=1 23185U 94043A 09310.15357628 -.00000259 00000-0 10000-3 0 3095 -TLE2=2 23185 4.7504 70.6653 0001194 148.3330 23.8242 1.00273019 56000 +NAME=SIRIUS 3 +NICKNAME=SIRIUS 3 +TLE1=1 25492U 98056B 09335.28452940 .00000055 00000-0 10000-3 0 5837 +TLE2=2 25492 0.8792 79.4365 0002127 175.7654 282.4629 1.00274008 40954 -[24834] +[28089] VERSION=1.1 -NAME=FENGYUN 2A -NICKNAME=FENGYUN 2A -TLE1=1 24834U 97029A 09306.57638696 -.00000124 00000-0 10000-3 0 4331 -TLE2=2 24834 8.7297 61.0605 0095405 76.4489 284.5397 0.96052200 45095 +NAME=YAMAL 202 +NICKNAME=YAMAL 202 +TLE1=1 28089U 03053A 09336.83453963 .00000136 00000-0 10000-3 0 7969 +TLE2=2 28089 0.0069 286.0885 0002897 311.6193 183.5335 1.00274607 22134 -[26410] +[25778] VERSION=1.1 -NAME=CLUSTER II-FM6 -NICKNAME=CLUSTER II-FM6 -TLE1=1 26410U 00041A 09306.58333333 .00000965 00000-0 00000-0 0 4059 -TLE2=2 26410 118.3143 199.9451 8708688 38.1413 2.8194 0.42038007 5181 +NAME=IRIDIUM 21 [+] +NICKNAME=IRIDIUM 21 [+] +TLE1=1 25778U 99032B 09336.42487025 .00000079 00000-0 21029-4 0 7289 +TLE2=2 25778 86.3926 294.8869 0004456 86.8819 273.2886 14.34215958553416 -[28187] +[25954] VERSION=1.1 -NAME=EUTELSAT W3A -NICKNAME=EUTELSAT W3A -TLE1=1 28187U 04008A 09307.17524306 .00000063 00000-0 10000-3 0 8616 -TLE2=2 28187 0.0686 0.4911 0003504 245.2348 226.9547 1.00273721 20711 +NAME=AMC-4 (GE-4) +NICKNAME=AMC-4 (GE-4) +TLE1=1 25954U 99060A 09334.52080616 -.00000091 00000-0 00000+0 0 7679 +TLE2=2 25954 0.0461 104.1274 0002317 148.8389 263.0776 1.00272597 36891 -[30582] +[28393] VERSION=1.1 -NAME=THEMIS C -NICKNAME=THEMIS C -TLE1=1 30582U 07004C 09309.00000000 -.00000876 00000-0 00000+0 0 4547 -TLE2=2 30582 7.3258 343.7576 9058768 359.0447 160.8340 0.22550607 5504 +NAME=AMAZONAS +NICKNAME=AMAZONAS +TLE1=1 28393U 04031A 09336.38446334 -.00000264 00000-0 10000-3 0 6959 +TLE2=2 28393 0.0669 59.8584 0001681 212.4316 236.4895 1.00269838 19556 -[25977] +[25853] VERSION=1.1 -NAME=HELIOS 1B -NICKNAME=HELIOS 1B -TLE1=1 25977U 99064A 09310.08760559 -.00000051 00000-0 65859-6 0 7737 -TLE2=2 25977 98.3465 315.8733 0001098 184.7463 175.3755 14.77734006532886 +NAME=GLOBALSTAR M051 +NICKNAME=GLOBALSTAR M051 +TLE1=1 25853U 99037C 09337.34161350 -.00000086 00000-0 10000-3 0 570 +TLE2=2 25853 52.0018 270.3312 0000389 347.0907 12.9945 12.62258988479763 -[25432] +[24944] VERSION=1.1 -NAME=IRIDIUM 76 [+] -NICKNAME=IRIDIUM 76 [+] -TLE1=1 25432U 98048B 09309.51027222 .00000057 00000-0 13274-4 0 6391 -TLE2=2 25432 86.3963 337.6662 0002587 95.8386 264.3114 14.34220628587044 +NAME=IRIDIUM 29 [+] +NICKNAME=IRIDIUM 29 [+] +TLE1=1 24944U 97051A 09336.50783101 .00000037 00000-0 60934-5 0 8133 +TLE2=2 24944 86.3963 357.9954 0002443 83.8482 276.3003 14.34222221639718 -[25758] +[33060] VERSION=1.1 -NAME=IRS-P4 (OCEANSAT 1) -NICKNAME=IRS-P4 (OCEANSAT 1) -TLE1=1 25758U 99029C 09309.23621209 .00000106 00000-0 37893-4 0 2918 -TLE2=2 25758 98.2767 41.9373 0000921 118.8526 241.2766 14.50855728553318 +NAME=ORBCOMM FM38 [S] +NICKNAME=ORBCOMM FM38 [S] +TLE1=1 33060U 08031A 09336.56526278 -.00000184 00000-0 18586-5 0 4729 +TLE2=2 33060 48.4481 7.1424 0006226 42.4966 317.6426 14.68758220 78083 -[20261] +[26463] VERSION=1.1 -NAME=INTERCOSMOS 24 -NICKNAME=INTERCOSMOS 24 -TLE1=1 20261U 89080A 09309.71730410 .00000066 00000-0 14152-4 0 114 -TLE2=2 20261 82.5925 7.7895 1216063 15.0894 348.3324 12.53446138917311 +NAME=CLUSTER II-FM5 +NICKNAME=CLUSTER II-FM5 +TLE1=1 26463U 00045A 09334.91666667 .00001339 00000-0 00000-0 0 4122 +TLE2=2 26463 121.6494 203.2558 8581731 37.3329 357.7639 0.42732082 5884 -[25163] +[15945] VERSION=1.1 -NAME=GLOBALSTAR M004 -NICKNAME=GLOBALSTAR M004 -TLE1=1 25163U 98008B 09309.75843995 -.00000086 00000-0 10000-3 0 4571 -TLE2=2 25163 51.9986 166.9062 0002012 246.8214 113.2440 12.63155946541073 +NAME=SL-14 R/B +NICKNAME=SL-14 R/B +TLE1=1 15945U 85069B 09337.08692016 .00000070 00000-0 57226-5 0 2320 +TLE2=2 15945 82.5262 188.0884 0020696 2.1447 357.9864 14.82444634312962 -[26766] +[24834] VERSION=1.1 -NAME=INTELSAT 10 (IS-10) -NICKNAME=INTELSAT 10 (IS-10) -TLE1=1 26766U 01019A 09308.94833648 -.00000014 00000-0 10000-3 0 4707 -TLE2=2 26766 0.0127 254.6081 0002080 270.3542 289.2888 1.00271780 31081 +NAME=FENGYUN 2A +NICKNAME=FENGYUN 2A +TLE1=1 24834U 97029A 09335.72587691 -.00000044 00000-0 10000-3 0 4384 +TLE2=2 24834 8.8016 60.7305 0095183 77.3008 283.6131 0.96050638 45378 -[25978] +[25311] VERSION=1.1 -NAME=CLEMENTINE -NICKNAME=CLEMENTINE -TLE1=1 25978U 99064B 09309.63028660 -.00000210 00000-0 -17604-4 0 7862 -TLE2=2 25978 98.1316 26.9891 0011264 31.7083 328.4816 14.85538907536918 +NAME=NILESAT 101 +NICKNAME=NILESAT 101 +TLE1=1 25311U 98024A 09334.76422028 -.00000034 00000-0 10000-3 0 7962 +TLE2=2 25311 0.0843 96.5752 0003339 163.9596 77.4105 1.00273221 42738 -[29640] +[27374] VERSION=1.1 -NAME=FENGYUN 2D -NICKNAME=FENGYUN 2D -TLE1=1 29640U 06053A 09308.90724310 -.00000182 00000-0 10000-3 0 7793 -TLE2=2 29640 0.1511 151.8896 0002475 155.0883 150.0359 1.00265125 10711 +NAME=IRIDIUM 94 [S] +NICKNAME=IRIDIUM 94 [S] +TLE1=1 27374U 02005C 09336.55530839 .00000072 00000-0 88178-5 0 3876 +TLE2=2 27374 86.5782 357.7925 0002510 82.3478 277.8015 14.66246580417834 -[22931] +[12389] VERSION=1.1 -NAME=THAICOM 1 -NICKNAME=THAICOM 1 -TLE1=1 22931U 93078B 09306.16316270 -.00000346 00000-0 10000-3 0 4801 -TLE2=2 22931 0.6629 76.0278 0002190 181.3365 322.9675 1.00274577 57707 +NAME=SL-8 R/B +NICKNAME=SL-8 R/B +TLE1=1 12389U 81033B 09336.14460121 .00003324 00000-0 10680-3 0 5174 +TLE2=2 12389 82.9149 174.5521 0406439 357.3515 2.5528 14.78057138461803 -[30581] +[24901] VERSION=1.1 -NAME=THEMIS B -NICKNAME=THEMIS B -TLE1=1 30581U 07004B 09309.00000000 -.00000941 00000-0 00000+0 0 2772 -TLE2=2 30581 10.4145 29.6504 7969504 306.3412 102.3174 0.09718346 6337 +NAME=AGILA 2 +NICKNAME=AGILA 2 +TLE1=1 24901U 97042A 09333.60090418 -.00000211 00000-0 10000-3 0 9320 +TLE2=2 24901 0.0520 110.7823 0004810 139.8081 180.3113 1.00270731 44972 -[28393] +[26095] VERSION=1.1 -NAME=AMAZONAS -NICKNAME=AMAZONAS -TLE1=1 28393U 04031A 09308.04261059 -.00000269 00000-0 10000-3 0 6865 -TLE2=2 28393 0.0701 60.1249 0001052 150.5540 147.1133 1.00270776 19263 +NAME=SUPERBIRD-B2 +NICKNAME=SUPERBIRD-B2 +TLE1=1 26095U 00012A 09335.26996266 -.00000070 00000-0 10000-3 0 7968 +TLE2=2 26095 0.0107 256.1243 0002666 341.3061 92.0458 1.00271803 35898 -[26082] +[20558] VERSION=1.1 -NAME=GLOBALSTAR M062 -NICKNAME=GLOBALSTAR M062 -TLE1=1 26082U 00008B 09308.58295089 -.00000086 00000-0 10000-3 0 9980 -TLE2=2 26082 52.0089 314.3552 0001185 87.3738 272.7255 12.62267311449411 +NAME=ASIASAT 1 +NICKNAME=ASIASAT 1 +TLE1=1 20558U 90030A 09336.15523593 -.00000144 00000-0 10000-3 0 7639 +TLE2=2 20558 9.4457 58.2520 0006023 214.1609 145.6800 0.99242558 71744 -[26071] +[28371] VERSION=1.1 -NAME=HISPASAT 1C -NICKNAME=HISPASAT 1C -TLE1=1 26071U 00007A 09309.22368343 -.00000207 00000-0 10000-3 0 3241 -TLE2=2 26071 0.0716 60.0396 0002775 151.1469 243.9714 1.00270518 35804 +NAME=SAUDISAT 2 +NICKNAME=SAUDISAT 2 +TLE1=1 28371U 04025F 09337.06995030 .00000004 00000-0 11408-4 0 1361 +TLE2=2 28371 98.0008 14.8467 0025129 243.0525 116.8113 14.52944598287894 -[25039] +[25160] VERSION=1.1 -NAME=IRIDIUM 43 [+] -NICKNAME=IRIDIUM 43 [+] -TLE1=1 25039U 97069A 09309.49226785 -.00000062 00000-0 -29362-4 0 7864 -TLE2=2 25039 86.3935 104.1924 0002075 79.8210 280.3218 14.34212799627750 +NAME=CELESTIS-02 +NICKNAME=CELESTIS-02 +TLE1=1 25160U 98007D 09337.15135874 -.00000071 00000-0 26307-4 0 2077 +TLE2=2 25160 107.9754 63.0953 0061362 37.0868 323.4477 14.20853635612449 -[27852] +[25104] VERSION=1.1 -NAME=ECHOSTAR 12 (RAINBOW 1) -NICKNAME=ECHOSTAR 12 (RAINBOW 1) -TLE1=1 27852U 03033A 09308.40323186 -.00000270 00000-0 10000-3 0 412 -TLE2=2 27852 0.0610 57.4027 0001497 186.6357 243.3142 1.00271385 23130 +NAME=IRIDIUM 45 [+] +NICKNAME=IRIDIUM 45 [+] +TLE1=1 25104U 97082A 09336.52337170 .00000006 00000-0 -50509-5 0 7671 +TLE2=2 25104 86.3937 326.3912 0002404 81.0352 279.1113 14.34215196625682 -[25491] +[33331] VERSION=1.1 -NAME=EUTELSAT W2 -NICKNAME=EUTELSAT W2 -TLE1=1 25491U 98056A 09305.78050550 .00000120 00000-0 10000-3 0 7777 -TLE2=2 25491 0.0829 79.0660 0006948 190.8043 68.2992 1.00273158 40593 +NAME=GEOEYE 1 +NICKNAME=GEOEYE 1 +TLE1=1 33331U 08042A 09337.27681359 .00000010 00000-0 10872-4 0 3818 +TLE2=2 33331 98.0917 49.2692 0009499 266.7795 93.2335 14.64456169 66221 -[28378] +[23027] VERSION=1.1 -NAME=ANIK F2 -NICKNAME=ANIK F2 -TLE1=1 28378U 04027A 09307.49875905 -.00000036 00000-0 10000-3 0 8710 -TLE2=2 28378 0.0156 301.7431 0001106 283.9347 245.6996 1.00272102 19494 +NAME=GPS BIIA-24 (PRN 06) +NICKNAME=GPS BIIA-24 (PRN 06) +TLE1=1 23027U 94016A 09335.88378704 .00000094 00000-0 10000-3 0 9851 +TLE2=2 23027 53.5196 148.5762 0060214 290.5664 68.8197 2.00563227115297 -[31598] +[23915] VERSION=1.1 -NAME=COSMO-SKYMED 1 -NICKNAME=COSMO-SKYMED 1 -TLE1=1 31598U 07023A 09310.16980163 .00000017 00000-0 86939-5 0 7081 -TLE2=2 31598 97.8620 136.5120 0001217 82.2884 277.8465 14.82168153130654 +NAME=INTELSAT 709 (IS-709) +NICKNAME=INTELSAT 709 (IS-709) +TLE1=1 23915U 96035A 09336.91743329 -.00000169 00000-0 10000-3 0 332 +TLE2=2 23915 0.0106 354.2096 0003126 256.4723 236.6388 1.00271433 49357 -[24798] +[26388] VERSION=1.1 -NAME=DFH 3-2 -NICKNAME=DFH 3-2 -TLE1=1 24798U 97021A 09307.72384819 -.00000339 00000-0 10000-3 0 7437 -TLE2=2 24798 5.4081 69.1403 0005185 324.6758 35.2003 1.00255181 45732 +NAME=TDRS 8 +NICKNAME=TDRS 8 +TLE1=1 26388U 00034A 09336.80603303 -.00000202 00000-0 10000-3 0 729 +TLE2=2 26388 1.7831 100.1720 0004662 138.4818 212.4156 1.00267155 34613 -[25307] +[28946] VERSION=1.1 -NAME=GLOBALSTAR M006 -NICKNAME=GLOBALSTAR M006 -TLE1=1 25307U 98023B 09310.12436260 -.00000086 00000-0 10000-3 0 1706 -TLE2=2 25307 51.9981 218.0403 0001480 54.0160 306.0581 12.62263052532146 +NAME=EUROBIRD 9A +NICKNAME=EUROBIRD 9A +TLE1=1 28946U 06007B 09334.89688644 .00000085 00000-0 10000-3 0 4064 +TLE2=2 28946 0.0365 16.0358 0004378 234.0994 151.6589 1.00274446 13727 -[27939] +[20453] VERSION=1.1 -NAME=MOZHAYETS 4 (RS-22) -NICKNAME=RS-22 -TLE1=1 27939U 03042A 09309.19386492 .00000171 00000-0 41863-4 0 9302 -TLE2=2 27939 97.9199 178.7538 0014503 49.9649 310.2826 14.63353893326197 +NAME=DELTA 2 R/B(1) +NICKNAME=DELTA 2 R/B(1) +TLE1=1 20453U 90008B 09336.27746423 .00001130 00000-0 89585-4 0 6471 +TLE2=2 20453 35.6322 260.0074 0375950 23.4792 338.2583 14.59609549 42608 -[26390] +[31127] VERSION=1.1 -NAME=SIRIUS-1 -NICKNAME=SIRIUS-1 -TLE1=1 26390U 00035A 09308.76546591 -.00000022 00000-0 10000-3 0 5761 -TLE2=2 26390 61.4120 253.8832 2664277 269.8781 59.8962 1.00282973 34257 +NAME=SAUDICOMSAT 4 +NICKNAME=SAUDICOMSAT 4 +TLE1=1 31127U 07012L 09336.21719619 .00000381 00000-0 89803-4 0 8073 +TLE2=2 31127 97.9723 30.0247 0071521 98.0741 262.8578 14.57988804139863 -[28492] +[25416] VERSION=1.1 -NAME=HELIOS-2A -NICKNAME=HELIOS-2A -TLE1=1 28492U 04049A 09310.18480512 .00000103 00000-0 28659-4 0 4672 -TLE2=2 28492 98.0983 244.4698 0000528 78.2314 281.8956 14.63848650260913 +NAME=ORBCOMM FM20 [+] +NICKNAME=ORBCOMM FM20 [+] +TLE1=1 25416U 98046D 09336.84677943 .00000132 00000-0 10909-3 0 5954 +TLE2=2 25416 44.9970 195.9377 0002461 77.0412 283.0683 14.27670924590756 -[36032] +[22314] VERSION=1.1 -NAME=NSS-12 -NICKNAME=NSS-12 -TLE1=1 36032U 09058A 09309.72113999 .00000077 00000-0 00000+0 0 105 -TLE2=2 36032 0.1200 182.8039 0013462 183.9757 356.3603 1.00222862 106 +NAME=TDRS 6 +NICKNAME=TDRS 6 +TLE1=1 22314U 93003B 09336.41278221 .00000104 00000-0 10000-3 0 5787 +TLE2=2 22314 9.5947 56.6262 0005339 337.4499 14.6118 1.00268054 61862 -[35931] +[8459] VERSION=1.1 -NAME=OCEANSAT 2 -NICKNAME=OCEANSAT 2 -TLE1=1 35931U 09051A 09309.82683248 .00006029 00000-0 15388-2 0 847 -TLE2=2 35931 98.3368 44.1256 0002247 53.6318 306.4599 14.50864068 6311 +NAME=SL-8 R/B +NICKNAME=SL-8 R/B +TLE1=1 08459U 75112B 09336.93008753 .00000012 00000-0 13297-4 0 8176 +TLE2=2 08459 74.0588 120.8226 0016898 260.8899 99.0345 14.35891898778913 -[13969] +[12139] VERSION=1.1 -NAME=TDRS 1 -NICKNAME=TDRS 1 -TLE1=1 13969U 83026B 09309.34332387 -.00000297 00000-0 10000-3 0 9589 -TLE2=2 13969 13.4420 8.1623 0032676 238.4255 225.8843 1.00279946 70419 +NAME=SL-8 R/B +NICKNAME=SL-8 R/B +TLE1=1 12139U 81003B 09336.94165953 .00000938 00000-0 53655-4 0 9247 +TLE2=2 12139 82.9560 285.0192 0594457 82.9846 283.8525 14.24495564451216 -[26561] +[28497] VERSION=1.1 -NAME=HETE-2 -NICKNAME=HETE-2 -TLE1=1 26561U 00061A 09305.09188273 .00001188 00000-0 32769-4 0 4839 -TLE2=2 26561 1.9452 287.0224 0023538 223.4010 136.4536 14.96104980495649 +NAME=ESSAIM-4 +NICKNAME=ESSAIM-4 +TLE1=1 28497U 04049F 09337.10584665 .00000164 00000-0 35885-4 0 6287 +TLE2=2 28497 98.2925 303.0687 0013161 70.1974 290.0652 14.70160785266089 -[25126] +[27389] VERSION=1.1 -NAME=HGS-1 (ASIASAT 3) -NICKNAME=HGS-1 (ASIASAT 3) -TLE1=1 25126U 97086A 09308.47312241 -.00000085 00000-0 10000-3 0 2980 -TLE2=2 25126 2.0150 113.3807 0045269 205.9964 154.0846 1.00166042 44297 +NAME=TDRS 9 +NICKNAME=TDRS 9 +TLE1=1 27389U 02011A 09336.42984735 -.00000257 00000-0 10000-3 0 4675 +TLE2=2 27389 2.0086 223.3412 0008446 131.4158 169.1481 1.00277762 29866 -[6909] +[28369] VERSION=1.1 -NAME=NNSS O-20 -NICKNAME=NNSS O-20 -TLE1=1 06909U 73081A 09309.63848701 .00000086 00000-0 78355-4 0 5094 -TLE2=2 06909 89.8613 356.0202 0160304 45.5283 315.8864 13.69764045998422 +NAME=SAUDICOMSAT 1 +NICKNAME=SAUDICOMSAT 1 +TLE1=1 28369U 04025D 09336.64030905 -.00000023 00000-0 49717-5 0 5486 +TLE2=2 28369 98.0008 6.8740 0032823 251.4829 108.2773 14.50659595287373 -[13068] +[24307] VERSION=1.1 -NAME=SL-3 R/B -NICKNAME=SL-3 R/B -TLE1=1 13068U 82013B 09309.79007285 -.00000008 00000-0 -24267-5 0 426 -TLE2=2 13068 81.2045 138.6152 0026262 86.0154 274.4018 15.00312818505766 +NAME=INMARSAT 3-F2 +NICKNAME=INMARSAT 3-F2 +TLE1=1 24307U 96053A 09332.76265698 -.00000098 00000-0 10000-3 0 66 +TLE2=2 24307 0.1088 290.1289 0005102 320.8203 75.9349 1.00272059 48434 -[26093] +[29079] VERSION=1.1 -NAME=PICOSAT 5 -NICKNAME=PICOSAT 5 -TLE1=1 26093U 00004L 09310.14256632 .00000168 00000-0 65114-4 0 4920 -TLE2=2 26093 100.2081 166.8491 0033157 110.6835 249.7889 14.45005597512557 +NAME=EROS B +NICKNAME=EROS B +TLE1=1 29079U 06014A 09337.09122845 .00001158 00000-0 59934-4 0 788 +TLE2=2 29079 97.4142 94.5933 0010179 177.0330 299.0917 15.18146341200146 -[26095] +[28187] VERSION=1.1 -NAME=SUPERBIRD-B2 -NICKNAME=SUPERBIRD-B2 -TLE1=1 26095U 00012A 09308.61530251 -.00000080 00000-0 10000-3 0 7865 -TLE2=2 26095 0.0409 111.2953 0002261 90.3181 225.9324 1.00271854 35634 +NAME=EUTELSAT W3A +NICKNAME=EUTELSAT W3A +TLE1=1 28187U 04008A 09332.76823265 .00000073 00000-0 10000-3 0 8683 +TLE2=2 28187 0.0741 328.9024 0003302 273.8840 108.6164 1.00275304 20963 -[11060] +[24903] VERSION=1.1 -NAME=TIROS N [P] -NICKNAME=TIROS N [P] -TLE1=1 11060U 78096A 09309.86630801 .00000005 00000-0 24923-4 0 3264 -TLE2=2 11060 98.9478 281.2088 0010813 336.7900 23.2780 14.17487600819025 +NAME=IRIDIUM 26 [+] +NICKNAME=IRIDIUM 26 [+] +TLE1=1 24903U 97043A 09336.48531767 .00000016 00000-0 -11756-5 0 9569 +TLE2=2 24903 86.3940 326.4423 0002459 79.5856 280.5613 14.34214975643169 -[28899] +[35873] VERSION=1.1 -NAME=INMARSAT 4-F2 -NICKNAME=INMARSAT 4-F2 -TLE1=1 28899U 05044A 09308.97245703 .00000146 00000-0 10000-3 0 9261 -TLE2=2 28899 2.2396 317.7988 0002994 9.3548 92.3430 1.00264670 14671 +NAME=NIMIQ 5 +NICKNAME=NIMIQ 5 +TLE1=1 35873U 09050A 09334.31805229 -.00000233 00000-0 00000+0 0 527 +TLE2=2 35873 0.0152 343.0880 0001746 256.0926 231.9600 1.00270915 770 -[902] +[30777] VERSION=1.1 -NAME=CALSPHERE 2 -NICKNAME=CALSPHERE 2 -TLE1=1 00902U 64063E 09309.46707940 .00000075 00000-0 10000-3 0 1985 -TLE2=2 00902 90.1564 332.3882 0016793 193.4825 166.5882 13.52468637 36465 +NAME=CFESAT +NICKNAME=CFESAT +TLE1=1 30777U 07006F 09335.92408176 .00000405 00000-0 32636-4 0 7265 +TLE2=2 30777 35.4318 166.2424 0003941 268.0563 91.9702 15.02879026150309 -[16882] +[26605] VERSION=1.1 -NAME=SL-14 R/B -NICKNAME=SL-14 R/B -TLE1=1 16882U 86055B 09309.98329061 .00000098 00000-0 94977-5 0 177 -TLE2=2 16882 82.5181 312.8250 0019487 193.1125 166.9596 14.81619690256026 +NAME=GPS BIIR-06 (PRN 14) +NICKNAME=GPS BIIR-06 (PRN 14) +TLE1=1 26605U 00071A 09335.57518383 -.00000052 00000-0 10000-3 0 6446 +TLE2=2 26605 56.5782 333.8134 0052821 240.2318 119.2624 2.00564370 66371 -[25492] +[22269] VERSION=1.1 -NAME=SIRIUS 3 -NICKNAME=SIRIUS 3 -TLE1=1 25492U 98056B 09308.05772481 .00000047 00000-0 10000-3 0 5771 -TLE2=2 25492 0.8173 81.1094 0001762 136.3919 211.6919 1.00271274 40685 +NAME=COSMOS 2224 +NICKNAME=COSMOS 2224 +TLE1=1 22269U 92088A 09335.95465940 -.00000069 00000-0 10000-3 0 5918 +TLE2=2 22269 10.7695 45.7940 0003091 160.6257 199.3694 1.00274297 61594 -[33380] +[25078] VERSION=1.1 -NAME=COSMOS 2444 (726) -NICKNAME=COSMOS 2444 (726) -TLE1=1 33380U 08046C 09309.26277742 .00000088 00000-0 10000-3 0 3188 -TLE2=2 33380 64.8040 158.5499 0028496 332.0009 143.9682 2.13102823 8641 +NAME=IRIDIUM 44 [-] +NICKNAME=IRIDIUM 44 [-] +TLE1=1 25078U 97077B 09336.35298739 .00000172 00000-0 51700-4 0 3204 +TLE2=2 25078 86.3941 88.1621 0001394 24.7531 335.3729 14.36579983628070 -[22907] +[29640] VERSION=1.1 -NAME=GORIZONT 29 -NICKNAME=GORIZONT 29 -TLE1=1 22907U 93072A 09302.82123546 -.00000026 00000-0 10000-3 0 7043 -TLE2=2 22907 11.0498 46.8254 0013709 202.5313 157.3803 1.00108900 58379 +NAME=FENGYUN 2D +NICKNAME=FENGYUN 2D +TLE1=1 29640U 06053A 09336.60237112 -.00000181 00000-0 10000-3 0 7946 +TLE2=2 29640 0.2006 126.7844 0000550 220.9390 27.2337 1.00277128 10999 -[24870] +[32404] VERSION=1.1 -NAME=IRIDIUM 17 [-] -NICKNAME=IRIDIUM 17 [-] -TLE1=1 24870U 97034B 09309.46201140 .00000096 00000-0 27052-4 0 8357 -TLE2=2 24870 86.3911 103.9163 0002397 72.3876 287.7578 14.34452765645378 +NAME=THURAYA-3 +NICKNAME=THURAYA-3 +TLE1=1 32404U 08001A 09336.86551612 -.00000290 00000-0 10000-3 0 3470 +TLE2=2 32404 5.4839 332.0476 0005100 269.6195 240.4174 1.00271115 6964 -[32060] +[25460] VERSION=1.1 -NAME=WORLDVIEW-1 (WV-1) -NICKNAME=WORLDVIEW-1 (WV-1) -TLE1=1 32060U 07041A 09310.12987606 .00000689 00000-0 30953-4 0 3907 -TLE2=2 32060 97.4203 26.3206 0001842 61.6690 27.3980 15.24441720118717 +NAME=ST-1 +NICKNAME=ST-1 +TLE1=1 25460U 98049A 09336.60060779 -.00000194 00000-0 10000-3 0 7394 +TLE2=2 25460 0.0143 300.6033 0004462 309.5968 125.6177 1.00271777 41318 -[26998] +[25025] VERSION=1.1 -NAME=TIMED -NICKNAME=TIMED -TLE1=1 26998U 01055B 09309.90120498 -.00000050 00000-0 -16972-5 0 4272 -TLE2=2 26998 74.0733 69.7455 0001115 170.7725 189.3482 14.84103797428545 +NAME=TEAMSAT +NICKNAME=TEAMSAT +TLE1=1 25025U 97066C 09335.43073487 -.00000150 00000-0 -48487-3 0 7910 +TLE2=2 25025 7.6054 129.6845 6531977 317.9921 7.1082 3.07909461136033 -[25693] +[26624] VERSION=1.1 -NAME=UOSAT 12 (UO-36) -NICKNAME=UO-36 -TLE1=1 25693U 99021A 09309.81807429 -.00000030 00000-0 15088-4 0 548 -TLE2=2 25693 64.5591 40.7246 0012983 334.1667 25.8815 14.78765336568786 +NAME=ANIK F1 +NICKNAME=ANIK F1 +TLE1=1 26624U 00076A 09335.28676407 -.00000053 00000-0 00000+0 0 5515 +TLE2=2 26624 0.0089 354.4009 0002089 253.9815 177.8483 1.00271976 33159 -[25860] +[16182] VERSION=1.1 -NAME=OKEAN-O -NICKNAME=OKEAN-O -TLE1=1 25860U 99039A 09309.07007446 .00000051 00000-0 15184-4 0 8280 -TLE2=2 25860 97.8037 284.7870 0001840 76.2973 283.8435 14.73595653553891 +NAME=SL-16 R/B +NICKNAME=SL-16 R/B +TLE1=1 16182U 85097B 09337.19174327 .00000215 00000-0 13308-3 0 169 +TLE2=2 16182 71.0032 38.8950 0009150 298.9299 61.0897 14.15965211246490 -[32729] +[32765] VERSION=1.1 -NAME=DIRECTV 11 -NICKNAME=DIRECTV 11 -TLE1=1 32729U 08013A 09309.39003918 -.00000117 00000-0 10000-3 0 3212 -TLE2=2 32729 0.0388 59.1299 0000160 121.0550 265.7738 1.00271166 6097 +NAME=C/NOFS +NICKNAME=C/NOFS +TLE1=1 32765U 08017A 09337.23113358 .00002317 00000-0 70056-4 0 4324 +TLE2=2 32765 13.0136 344.0830 0312948 211.6939 146.4150 14.81876658 88426 -[28238] +[6212] VERSION=1.1 -NAME=DIRECTV 7S -NICKNAME=DIRECTV 7S -TLE1=1 28238U 04016A 09308.80754370 .00000000 00000-0 10000-3 0 9947 -TLE2=2 28238 0.0198 142.7184 0002482 60.1654 13.0194 1.00271201 20248 +NAME=OPS 8180 (RADCAT) +NICKNAME=OPS 8180 (RADCAT) +TLE1=1 06212U 72076A 09336.40619843 .00002060 00000-0 75496-4 0 8902 +TLE2=2 06212 98.5847 10.4392 0004300 130.6523 229.5124 15.29466660148586 -[25050] +[33320] VERSION=1.1 -NAME=INDOSTAR 1 -NICKNAME=INDOSTAR 1 -TLE1=1 25050U 97071B 09306.26564527 -.00000326 00000-0 10000-3 0 1281 -TLE2=2 25050 3.9102 72.4838 0003757 166.8604 5.6594 1.00273646 43885 +NAME=HJ-1A +NICKNAME=HJ-1A +TLE1=1 33320U 08041A 09337.16012757 .00000118 00000-0 25050-4 0 3805 +TLE2=2 33320 97.9684 50.3274 0023703 258.2797 101.5757 14.75196376 66807 -[26930] +[29659] VERSION=1.1 -NAME=PICOSAT 9 -NICKNAME=PICOSAT 9 -TLE1=1 26930U 01043B 09309.83063574 -.00000094 00000-0 -39701-5 0 2875 -TLE2=2 26930 67.0030 36.6060 0008141 301.4159 58.6157 14.30054579422992 +NAME=SL-8 R/B +NICKNAME=SL-8 R/B +TLE1=1 29659U 06060B 09336.87205564 .00001134 00000-0 42558-4 0 8672 +TLE2=2 29659 98.0859 90.3226 0038431 13.9658 346.2627 15.29057392164807 -[22178] +[27378] VERSION=1.1 -NAME=MOLNIYA 3-42 -NICKNAME=MOLNIYA 3-42 -TLE1=1 22178U 92067A 09309.67673760 .00001403 00000-0 14811+0 0 7481 -TLE2=2 22178 61.9053 173.2699 7237666 265.2722 16.7470 2.00611988125015 +NAME=ECHOSTAR 7 +NICKNAME=ECHOSTAR 7 +TLE1=1 27378U 02006A 09334.27599390 .00000023 00000-0 10000-3 0 4521 +TLE2=2 27378 0.0165 349.4140 0001349 250.3508 169.9994 1.00273688 28479 -[28368] +[29398] VERSION=1.1 -NAME=DEMETER -NICKNAME=DEMETER -TLE1=1 28368U 04025C 09310.18379047 .00000017 00000-0 10894-4 0 906 -TLE2=2 28368 97.9967 12.5033 0001351 103.5465 256.5917 14.70180762286584 +NAME=ZHONGXING-22A +NICKNAME=ZHONGXING-22A +TLE1=1 29398U 06038A 09336.70924969 -.00000306 00000-0 10000-3 0 9797 +TLE2=2 29398 0.0705 69.1885 0002883 202.9469 158.1897 1.00273966 11875 -[25852] +[28773] VERSION=1.1 -NAME=GLOBALSTAR M032 -NICKNAME=GLOBALSTAR M032 -TLE1=1 25852U 99037B 09309.60526135 -.00000086 00000-0 10000-3 0 225 -TLE2=2 25852 52.0040 354.8538 0000381 198.6498 161.4360 12.62264467476264 +NAME=SUZAKU (ASTRO-EII) +NICKNAME=SUZAKU (ASTRO-EII) +TLE1=1 28773U 05025A 09337.22712488 .00000308 00000-0 17988-4 0 1366 +TLE2=2 28773 31.4064 278.3280 0006075 79.0188 281.1138 15.00885847241623 -[25469] +[25315] VERSION=1.1 -NAME=IRIDIUM 80 [+] -NICKNAME=IRIDIUM 80 [+] -TLE1=1 25469U 98051C 09309.52398269 -.00000112 00000-0 -47021-4 0 7075 -TLE2=2 25469 86.3932 104.1154 0002157 80.7017 279.4419 14.34212420584289 +NAME=COSMOS 2350 +NICKNAME=COSMOS 2350 +TLE1=1 25315U 98025A 09334.76553005 -.00000074 00000-0 10000-3 0 4159 +TLE2=2 25315 7.7652 60.3464 0004191 334.4839 25.3430 1.00286368 42464 -[31574] +[21906] VERSION=1.1 -NAME=GLOBALSTAR M072 -NICKNAME=GLOBALSTAR M072 -TLE1=1 31574U 07020D 09309.66672574 -.00000088 00000-0 85696-4 0 7581 -TLE2=2 31574 52.0127 355.5797 0001219 171.4254 188.6630 12.62266976112820 +NAME=GALAXY 5 +NICKNAME=GALAXY 5 +TLE1=1 21906U 92013A 09335.80352572 .00000092 00000-0 10000-3 0 9811 +TLE2=2 21906 4.6469 71.3778 0013203 278.8558 80.7027 0.99284730 56427 -[20465] +[7004] VERSION=1.1 -NAME=COSMOS 2058 -NICKNAME=COSMOS 2058 -TLE1=1 20465U 90010A 09309.32283279 .00000541 00000-0 52053-4 0 6204 -TLE2=2 20465 82.4948 26.0984 0016044 247.2271 112.7260 14.91010543 70142 +NAME=SL-8 R/B +NICKNAME=SL-8 R/B +TLE1=1 07004U 73107B 09336.95867365 .00000995 00000-0 42156-4 0 1873 +TLE2=2 07004 73.9580 280.9813 0427338 104.9139 259.9755 14.68691490825072 -[31571] +[19223] VERSION=1.1 -NAME=GLOBALSTAR M065 -NICKNAME=GLOBALSTAR M065 -TLE1=1 31571U 07020A 09309.96867821 -.00000069 00000-0 19351-3 0 7552 -TLE2=2 31571 51.9936 308.4219 0001348 48.5858 311.5117 12.62260714113626 +NAME=NOVA 11 +NICKNAME=NOVA 11 +TLE1=1 19223U 88052A 09336.67663252 .00000050 00000-0 10000-3 0 5858 +TLE2=2 19223 90.0215 91.0058 0029267 303.1653 56.6672 13.22420002 35912 -[25924] +[15936] VERSION=1.1 -NAME=ABS-1 (LMI 1) -NICKNAME=ABS-1 (LMI 1) -TLE1=1 25924U 99053A 09309.05376001 -.00000077 00000-0 10000-3 0 3859 -TLE2=2 25924 0.0285 124.5494 0002353 101.9347 272.2838 1.00272150 37062 +NAME=OSCAR 24 +NICKNAME=OSCAR 24 +TLE1=1 15936U 85066B 09336.70089995 .00000064 00000-0 10000-3 0 8664 +TLE2=2 15936 90.0473 20.6213 0171438 34.0688 327.1319 13.35165565185310 -[21922] +[26382] VERSION=1.1 -NAME=GORIZONT 25 -NICKNAME=GORIZONT 25 -TLE1=1 21922U 92017A 09309.20395593 -.00000193 00000-0 10000-3 0 2757 -TLE2=2 21922 11.7758 40.9285 0026531 302.5164 57.1741 0.99845896 64354 +NAME=FENGYUN 2B +NICKNAME=FENGYUN 2B +TLE1=1 26382U 00032A 09333.93940640 .00000136 00000-0 10000-3 0 2244 +TLE2=2 26382 4.7431 70.3864 0005791 194.1324 165.6018 1.00091178 34524 -[28380] +[23176] VERSION=1.1 -NAME=COSMOS 2407 -NICKNAME=COSMOS 2407 -TLE1=1 28380U 04028A 09309.37974659 .00000004 00000-0 -10800-4 0 5798 -TLE2=2 28380 82.9581 246.3359 0038046 298.3358 61.3961 13.75846565265602 +NAME=BS-3N +NICKNAME=BS-3N +TLE1=1 23176U 94040B 09334.64659176 -.00000327 00000-0 10000-3 0 773 +TLE2=2 23176 0.0424 45.9063 0000822 346.2360 20.2227 1.00271322 56200 -[26931] +[28790] VERSION=1.1 -NAME=PCSAT (N... [truncated message content] |
From: <cs...@us...> - 2009-12-02 15:14:52
|
Revision: 539 http://gpredict.svn.sourceforge.net/gpredict/?rev=539&view=rev Author: csete Date: 2009-12-02 15:14:39 +0000 (Wed, 02 Dec 2009) Log Message: ----------- Use popup menu for GtkEventList. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-event-list.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-02 15:12:44 UTC (rev 538) +++ trunk/ChangeLog 2009-12-02 15:14:39 UTC (rev 539) @@ -1,3 +1,14 @@ +2009-12-02 alexandru Csete <oz9aec at gmail.com> + + * src/gtk-event-list-popup.[ch]: + New files implementing popup menu for GtkEventList widget. + + * win32/Makefile: + * src/Makefile.am: + * src/gtk-event-list.c: + Enabled usage of gtk-event-list-popup. + + 2009-12-01 Alexandru csete <oz9aec at gmail.com> * src/config-keys.h: Modified: trunk/src/gtk-event-list.c =================================================================== --- trunk/src/gtk-event-list.c 2009-12-02 15:12:44 UTC (rev 538) +++ trunk/src/gtk-event-list.c 2009-12-02 15:14:39 UTC (rev 539) @@ -33,6 +33,7 @@ #include <glib/gi18n.h> #include "sgpsdp/sgp4sdp4.h" #include "gtk-event-list.h" +#include "gtk-event-list-popup.h" #include "sat-log.h" #include "config-keys.h" #include "sat-cfg.h" @@ -45,10 +46,7 @@ # include <build-config.h> #endif -/*** FIXME */ -#include "gtk-sat-list-popup.h" - #define EVENT_LIST_COL_DEF (EVENT_LIST_FLAG_NAME | EVENT_LIST_FLAG_AZ | EVENT_LIST_FLAG_EL | EVENT_LIST_FLAG_TIME) @@ -301,10 +299,10 @@ g_object_unref (model); -/* g_signal_connect (evlist->treeview, "button-press-event", + g_signal_connect (evlist->treeview, "button-press-event", G_CALLBACK (button_press_cb), widget); g_signal_connect (evlist->treeview, "popup-menu", - G_CALLBACK (popup_menu_cb), widget);*/ + G_CALLBACK (popup_menu_cb), widget); evlist->swin = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (evlist->swin), @@ -797,7 +795,7 @@ EVENT_LIST_COL_CATNUM, catnum, -1); - sat = SAT (g_hash_table_lookup (GTK_SAT_LIST (list)->satellites, catnum)); + sat = SAT (g_hash_table_lookup (GTK_EVENT_LIST (list)->satellites, catnum)); if (sat == NULL) { sat_log_log (SAT_LOG_LEVEL_MSG, @@ -806,8 +804,8 @@ } else { - gtk_sat_list_popup_exec (sat, GTK_SAT_LIST (list)->qth, event, - GTK_SAT_LIST (list)); + gtk_event_list_popup_exec (sat, GTK_EVENT_LIST (list)->qth, event, + GTK_EVENT_LIST (list)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-02 15:12:55
|
Revision: 538 http://gpredict.svn.sourceforge.net/gpredict/?rev=538&view=rev Author: csete Date: 2009-12-02 15:12:44 +0000 (Wed, 02 Dec 2009) Log Message: ----------- Added code implementing pop-up menu for GtkEventList. Modified Paths: -------------- trunk/src/Makefile.am trunk/win32/Makefile Added Paths: ----------- trunk/src/gtk-event-list-popup.c trunk/src/gtk-event-list-popup.h Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-12-01 10:46:35 UTC (rev 537) +++ trunk/src/Makefile.am 2009-12-02 15:12:44 UTC (rev 538) @@ -36,6 +36,7 @@ gpredict-utils.c gpredict-utils.h \ gtk-azel-plot.c gtk-azel-plot.h \ gtk-event-list.c gtk-event-list.h \ + gtk-event-list-popup.c gtk-event-list-popup.h \ gtk-freq-knob.c gtk-freq-knob.h \ gtk-polar-plot.c gtk-polar-plot.h \ gtk-polar-view.c gtk-polar-view.h \ Added: trunk/src/gtk-event-list-popup.c =================================================================== --- trunk/src/gtk-event-list-popup.c (rev 0) +++ trunk/src/gtk-event-list-popup.c 2009-12-02 15:12:44 UTC (rev 538) @@ -0,0 +1,272 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +/** \brief Pop-up menu used by GtkSatList. + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#include "sgpsdp/sgp4sdp4.h" +#include "sat-log.h" +#include "config-keys.h" +#include "sat-cfg.h" +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif +#include "orbit-tools.h" +#include "predict-tools.h" +#include "sat-pass-dialogs.h" +#include "gtk-event-list-popup.h" +#include "sat-info.h" + + + + +static void show_next_pass_cb (GtkWidget *menuitem, gpointer data); +static void show_future_passes_cb (GtkWidget *menuitem, gpointer data); + + +/** \brief Show satellite popup menu. + * \param sat Pointer to the satellite data. + * \param qth The current location. + * \param event The mouse-click related event info. + * \param toplevel The top level window. + */ +void gtk_event_list_popup_exec (sat_t *sat, qth_t *qth, GdkEventButton *event, GtkEventList *list) +{ + GtkWidget *menu; + GtkWidget *menuitem; + GtkWidget *label; + GtkWidget *image; + gchar *buff; + + + + menu = gtk_menu_new (); + + /* first menu item is the satellite name, centered */ + menuitem = gtk_image_menu_item_new (); + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); + buff = g_strdup_printf ("<b>%s</b>", sat->nickname); + gtk_label_set_markup (GTK_LABEL (label), buff); + g_free (buff); + gtk_container_add (GTK_CONTAINER (menuitem), label); + image = gtk_image_new_from_stock (GTK_STOCK_INFO, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + + /* attach data to menuitem and connect callback */ + g_object_set_data (G_OBJECT (menuitem), "sat", sat); + g_object_set_data (G_OBJECT (menuitem), "qth", qth); + g_signal_connect (menuitem, "activate", + G_CALLBACK (show_sat_info), + gtk_widget_get_toplevel (GTK_WIDGET (list))); + + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + /* next pass and predict passes */ + menuitem = gtk_image_menu_item_new_with_label (_("Show next pass")); + image = gtk_image_new_from_stock (GTK_STOCK_JUSTIFY_FILL, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + g_object_set_data (G_OBJECT (menuitem), "sat", sat); + g_object_set_data (G_OBJECT (menuitem), "qth", qth); + g_signal_connect (menuitem, "activate", + G_CALLBACK (show_next_pass_cb), + list); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + menuitem = gtk_image_menu_item_new_with_label (_("Future passes")); + image = gtk_image_new_from_stock (GTK_STOCK_INDEX, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + g_object_set_data (G_OBJECT (menuitem), "sat", sat); + g_object_set_data (G_OBJECT (menuitem), "qth", qth); + g_signal_connect (menuitem, "activate", + G_CALLBACK (show_future_passes_cb), + list); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + + + gtk_widget_show_all (menu); + + /* Note: event can be NULL here when called from view_onPopupMenu; + * gdk_event_get_time() accepts a NULL argument */ + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + (event != NULL) ? event->button : 0, + gdk_event_get_time ((GdkEvent*) event)); + + +} + + + + + +/** \brief Show details of the next pass. + * + */ +static void show_next_pass_cb (GtkWidget *menuitem, gpointer data) +{ + sat_t *sat; + qth_t *qth; + pass_t *pass; + GtkWidget *dialog; + GtkWindow *toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (data))); + GtkEventList *list = GTK_EVENT_LIST (data); + + + /* get next pass */ + sat = SAT(g_object_get_data (G_OBJECT (menuitem), "sat")); + qth = (qth_t *) (g_object_get_data (G_OBJECT (menuitem), "qth")); + + /* check wheather sat actially has AOS */ + if ((sat->otype != ORBIT_TYPE_GEO) && (sat->otype != ORBIT_TYPE_DECAYED) && + has_aos (sat, qth)) { + + if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { + pass = get_next_pass (sat, qth, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + } + else { + pass = get_pass (sat, qth, list->tstamp, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + } + + if (pass != NULL) { + show_pass (sat->nickname, qth, pass, GTK_WIDGET (toplevel)); + } + else { + /* show dialog that there are no passes within time frame */ + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + _("Satellite %s has no passes\n"\ + "within the next %d days"), + sat->nickname, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } + } + else { + /* show dialog telling that this sat never reaches AOS*/ + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Satellite %s has no passes for\n"\ + "the current ground station!\n\n"\ + "This can be because the satellite\n"\ + "is geostationary, decayed or simply\n"\ + "never comes above the horizon"), + sat->nickname); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } + +} + + +static void show_future_passes_cb (GtkWidget *menuitem, gpointer data) +{ + GtkWidget *dialog; + GtkWindow *toplevel = GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (data))); + GtkEventList *list = GTK_EVENT_LIST (data); + GSList *passes = NULL; + sat_t *sat; + qth_t *qth; + + + + sat = SAT(g_object_get_data (G_OBJECT (menuitem), "sat")); + qth = (qth_t *) (g_object_get_data (G_OBJECT (menuitem), "qth")); + + /* check wheather sat actially has AOS */ + if ((sat->otype != ORBIT_TYPE_GEO) && (sat->otype != ORBIT_TYPE_DECAYED) && + has_aos (sat, qth)) { + + if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { + passes = get_next_passes (sat, qth, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD), + sat_cfg_get_int (SAT_CFG_INT_PRED_NUM_PASS)); + } + else { + passes = get_passes (sat, qth, list->tstamp, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD), + sat_cfg_get_int (SAT_CFG_INT_PRED_NUM_PASS)); + } + + if (passes != NULL) { + show_passes (sat->nickname, qth, passes, GTK_WIDGET (toplevel)); + } + else { + /* show dialog that there are no passes within time frame */ + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_INFO, + GTK_BUTTONS_OK, + _("Satellite %s has no passes\n"\ + "within the next %d days"), + sat->nickname, + sat_cfg_get_int (SAT_CFG_INT_PRED_LOOK_AHEAD)); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } + + } + else { + /* show dialog */ + GtkWidget *dialog; + + dialog = gtk_message_dialog_new (toplevel, + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Satellite %s has no passes for\n"\ + "the current ground station!"), + sat->nickname); + + gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy (dialog); + } +} + + + Added: trunk/src/gtk-event-list-popup.h =================================================================== --- trunk/src/gtk-event-list-popup.h (rev 0) +++ trunk/src/gtk-event-list-popup.h 2009-12-02 15:12:44 UTC (rev 538) @@ -0,0 +1,42 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef GTK_EVENT_LIST_POPUP_H +#define GTK_EVENT_LIST_POPUP_H 1 + +#include <gtk/gtk.h> +#include "sgpsdp/sgp4sdp4.h" +#include "gtk-sat-data.h" +#include "gtk-event-list.h" + + +void gtk_event_list_popup_exec (sat_t *sat, qth_t *qth, + GdkEventButton *event, + GtkEventList *list); + + +#endif Modified: trunk/win32/Makefile =================================================================== --- trunk/win32/Makefile 2009-12-01 10:46:35 UTC (rev 537) +++ trunk/win32/Makefile 2009-12-02 15:12:44 UTC (rev 538) @@ -87,6 +87,7 @@ gpredict-utils.c \ gtk-azel-plot.c \ gtk-event-list.c \ + gtk-event-list-popup.c \ gtk-freq-knob.c \ gtk-polar-plot.c \ gtk-polar-view.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-01 10:46:44
|
Revision: 537 http://gpredict.svn.sourceforge.net/gpredict/?rev=537&view=rev Author: csete Date: 2009-12-01 10:46:35 +0000 (Tue, 01 Dec 2009) Log Message: ----------- Changed some field alignments for the satellite list. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-list.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-01 10:35:08 UTC (rev 536) +++ trunk/ChangeLog 2009-12-01 10:46:35 UTC (rev 537) @@ -5,7 +5,10 @@ Added configuration keys for GtkEventList. Curently only refresh rate is configurable. + * src/gtk-sat-list.c: + Changed some field alignments. + 2009-11-30 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module.c: Modified: trunk/src/gtk-sat-list.c =================================================================== --- trunk/src/gtk-sat-list.c 2009-12-01 10:35:08 UTC (rev 536) +++ trunk/src/gtk-sat-list.c 2009-12-01 10:46:35 UTC (rev 537) @@ -110,20 +110,20 @@ const gfloat SAT_LIST_COL_XALIGN[SAT_LIST_COL_NUMBER] = { 0.0, // name 0.5, // catnum - 0.0, // az - 0.0, // el + 1.0, // az + 1.0, // el 0.5, // direction 0.0, // RA 0.0, // dec - 0.0, // range - 0.0, // range rate + 1.0, // range + 1.0, // range rate 0.5, // next event 0.5, // AOS 0.5, // LOS - 0.0, // lat - 0.0, // lon - 0.0, // SSP - 0.0, // footprint + 1.0, // lat + 1.0, // lon + 0.5, // SSP + 0.5, // footprint 1.0, // alt 0.0, // vel 0.0, // doppler This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-01 10:35:15
|
Revision: 536 http://gpredict.svn.sourceforge.net/gpredict/?rev=536&view=rev Author: csete Date: 2009-12-01 10:35:08 +0000 (Tue, 01 Dec 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-12-01 10:33:10 UTC (rev 535) +++ trunk/ChangeLog 2009-12-01 10:35:08 UTC (rev 536) @@ -1,3 +1,11 @@ +2009-12-01 Alexandru csete <oz9aec at gmail.com> + + * src/config-keys.h: + * src/sat-cfg.[ch]: + Added configuration keys for GtkEventList. Curently only refresh rate is + configurable. + + 2009-11-30 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module.c: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-12-01 10:33:18
|
Revision: 535 http://gpredict.svn.sourceforge.net/gpredict/?rev=535&view=rev Author: csete Date: 2009-12-01 10:33:10 +0000 (Tue, 01 Dec 2009) Log Message: ----------- Added configuration keys for GtkEventList. Modified Paths: -------------- trunk/src/config-keys.h trunk/src/sat-cfg.c trunk/src/sat-cfg.h Modified: trunk/src/config-keys.h =================================================================== --- trunk/src/config-keys.h 2009-11-30 16:51:16 UTC (rev 534) +++ trunk/src/config-keys.h 2009-12-01 10:33:10 UTC (rev 535) @@ -127,4 +127,9 @@ #define MOD_CFG_SINGLE_SAT_REFRESH "REFRESH" #define MOD_CFG_SINGLE_SAT_FIELDS "FIELDS" +/* event list */ +#define MOD_CFG_EVENT_LIST_SECTION "EVENT_LIST" +#define MOD_CFG_EVENT_LIST_REFRESH "REFRESH" + + #endif Modified: trunk/src/sat-cfg.c =================================================================== --- trunk/src/sat-cfg.c 2009-11-30 16:51:16 UTC (rev 534) +++ trunk/src/sat-cfg.c 2009-12-01 10:33:10 UTC (rev 535) @@ -173,6 +173,7 @@ { "MODULES", "POLAR_INFO_COLOUR", 0x00007FFF}, { "MODULES", "SINGLE_SAT_REFRESH", 1}, { "MODULES", "SINGLE_SAT_FIELDS", SINGLE_SAT_FIELD_DEF}, + { "MODULES", "EVENT_LIST_REFRESH", 1}, { "PREDICT", "MINIMUM_ELEV", 5}, { "PREDICT", "NUMBER_OF_PASSES", 10}, { "PREDICT", "LOOK_AHEAD", 3}, Modified: trunk/src/sat-cfg.h =================================================================== --- trunk/src/sat-cfg.h 2009-11-30 16:51:16 UTC (rev 534) +++ trunk/src/sat-cfg.h 2009-12-01 10:33:10 UTC (rev 535) @@ -95,6 +95,7 @@ SAT_CFG_INT_POLAR_INFO_COL, /*!< Info colour. */ SAT_CFG_INT_SINGLE_SAT_REFRESH, /*!< Single-sat refresh rate (cycle). */ SAT_CFG_INT_SINGLE_SAT_FIELDS, /*!< Single-sat fields. */ + SAT_CFG_INT_EVENT_LIST_REFRESH, /*!< Event list refresh rate (cycle). */ SAT_CFG_INT_PRED_MIN_EL, /*!< Minimum elevation for passes. */ SAT_CFG_INT_PRED_NUM_PASS, /*!< Number of passes to predict. */ SAT_CFG_INT_PRED_LOOK_AHEAD, /*!< Look-ahead time limit in days. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-30 16:51:23
|
Revision: 534 http://gpredict.svn.sourceforge.net/gpredict/?rev=534&view=rev Author: csete Date: 2009-11-30 16:51:16 +0000 (Mon, 30 Nov 2009) Log Message: ----------- First functional version of GtkEventList. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-event-list.c trunk/src/gtk-event-list.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-30 14:31:50 UTC (rev 533) +++ trunk/ChangeLog 2009-11-30 16:51:16 UTC (rev 534) @@ -1,3 +1,12 @@ +2009-11-30 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-module.c: + Include support for GtkEventList views. + + * src/gtk-event-list.[ch]: + First functional version. + + 2009-11-29 Alexandru Csete <oz9aec at gmail.com> * src/gtk-event-list.[ch]: Modified: trunk/src/gtk-event-list.c =================================================================== --- trunk/src/gtk-event-list.c 2009-11-30 14:31:50 UTC (rev 533) +++ trunk/src/gtk-event-list.c 2009-11-30 16:51:16 UTC (rev 534) @@ -49,13 +49,17 @@ #include "gtk-sat-list-popup.h" +#define EVENT_LIST_COL_DEF (EVENT_LIST_FLAG_NAME | EVENT_LIST_FLAG_AZ | EVENT_LIST_FLAG_EL | EVENT_LIST_FLAG_TIME) + /** \brief Column titles indexed with column symb. refs. */ const gchar *EVENT_LIST_COL_TITLE[EVENT_LIST_COL_NUMBER] = { - N_("Sat"), + N_("Satellite"), N_("Catnum"), - N_("A/L"), - N_("Time") + N_("Az"), + N_("El"), + N_("Event"), + N_("AOS/LOS") }; @@ -63,17 +67,34 @@ const gchar *EVENT_LIST_COL_HINT[EVENT_LIST_COL_NUMBER] = { N_("Satellite Name"), N_("Catalogue Number"), + N_("Azimuth"), + N_("Elevation"), N_("Next event type (A: AOS, L: LOS)"), N_("Countdown until next event") }; +/* field alignments */ const gfloat EVENT_LIST_COL_XALIGN[EVENT_LIST_COL_NUMBER] = { 0.0, // name 0.5, // catnum + 1.0, // az + 1.0, // el 0.5, // event type - 0.5, // time + 1.0, // time }; +/* column head alignments */ +const gfloat EVENT_LIST_HEAD_XALIGN[EVENT_LIST_COL_NUMBER] = { + 0.0, // name + 0.5, // catnum + 0.5, // az + 0.5, // el + 0.5, // event type + 1.0, // time +}; + + + static void gtk_event_list_class_init (GtkEventListClass *class); static void gtk_event_list_init (GtkEventList *list); static void gtk_event_list_destroy (GtkObject *object); @@ -103,6 +124,12 @@ GtkTreeIter *iter, gpointer column); +static void degree_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column); + static gint event_cell_compare_function (GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, @@ -214,30 +241,18 @@ /* initialise column flags */ - evlist->flags = 0; -/* if (columns > 0) - evlist->flags = columns; - else - evlist->flags = mod_cfg_get_int (cfgdata, - MOD_CFG_EVLIST_SECTION, - MOD_CFG_EVLIST_COLUMNS, - SAT_CFG_INT_EVLIST_COLUMNS); - */ - - /* get refresh rate and cycle counter */ -/* evlist->refresh = mod_cfg_get_int (cfgdata, - MOD_CFG_EVLIST_SECTION, - MOD_CFG_EVLIST_REFRESH, - SAT_CFG_INT_EVLIST_REFRESH); - */ - evlist->refresh = 1000; + evlist->flags = EVENT_LIST_COL_DEF; + /* FIXME: Not used */ + evlist->refresh = 3; evlist->counter = 1; /* create the tree view and add columns */ evlist->treeview = gtk_tree_view_new (); - gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (evlist->treeview), FALSE); + /* visual appearance of table */ + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (evlist->treeview), TRUE); + gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (evlist->treeview), GTK_TREE_VIEW_GRID_LINES_NONE); /* create treeview columns */ for (i = 0; i < EVENT_LIST_COL_NUMBER; i++) { @@ -249,11 +264,12 @@ renderer, "text", i, NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (evlist->treeview), column, -1); /* only aligns the headers */ - gtk_tree_view_column_set_alignment (column, 0.5); + gtk_tree_view_column_set_alignment (column, EVENT_LIST_HEAD_XALIGN[i]); /* set sort id */ gtk_tree_view_column_set_sort_column_id (column, i); @@ -262,9 +278,9 @@ check_and_set_cell_renderer (column, renderer, i); /* hide columns that have not been specified */ - /*if (!(evlist->flags & (1 << i))) { + if (!(evlist->flags & (1 << i))) { gtk_tree_view_column_set_visible (column, FALSE); - }*/ + } } @@ -310,16 +326,17 @@ GtkListStore *liststore; - liststore = gtk_list_store_new (SAT_LIST_COL_NUMBER, + liststore = gtk_list_store_new (EVENT_LIST_COL_NUMBER, G_TYPE_STRING, // name G_TYPE_INT, // catnum + G_TYPE_DOUBLE, // az + G_TYPE_DOUBLE, // el G_TYPE_BOOLEAN, // TRUE if AOS, FALSE if LOS G_TYPE_DOUBLE); // time /* add each satellite from hash table */ g_hash_table_foreach (sats, event_list_add_satellites, liststore); - return GTK_TREE_MODEL (liststore); } @@ -343,6 +360,8 @@ gtk_list_store_set (store, &item, EVENT_LIST_COL_NAME, sat->nickname, EVENT_LIST_COL_CATNUM, sat->tle.catnr, + EVENT_LIST_COL_AZ, sat->az, + EVENT_LIST_COL_EL, sat->el, EVENT_LIST_COL_EVT, (sat->el >= 0) ? TRUE : FALSE, EVENT_LIST_COL_TIME, 0.0, -1); @@ -357,6 +376,7 @@ GtkEventList *evlist = GTK_EVENT_LIST (widget); + /* first, do some sanity checks */ if ((evlist == NULL) || !IS_GTK_EVENT_LIST (evlist)) { sat_log_log (SAT_LOG_LEVEL_BUG, @@ -364,7 +384,14 @@ __FUNCTION__); } + /* get and tranverse the model */ + model = gtk_tree_view_get_model (GTK_TREE_VIEW (evlist->treeview)); + /* update */ + gtk_tree_model_foreach (model, event_list_update_sats, evlist); + + +#if 0 /* check refresh rate */ if (evlist->counter < evlist->refresh) { evlist->counter++; @@ -378,6 +405,7 @@ /* update */ gtk_tree_model_foreach (model, event_list_update_sats, evlist); } +#endif } @@ -387,11 +415,10 @@ GtkTreeIter *iter, gpointer data) { - GtkEventList *satlist = GTK_EVENT_LIST (data); + GtkEventList *evlist = GTK_EVENT_LIST (data); guint *catnum; sat_t *sat; - gchar *buff; - gint retcode; + gdouble number, now; /* get the catalogue number for this row @@ -399,7 +426,7 @@ */ catnum = g_new0 (guint, 1); gtk_tree_model_get (model, iter, EVENT_LIST_COL_CATNUM, catnum, -1); - sat = SAT (g_hash_table_lookup (satlist->satellites, catnum)); + sat = SAT (g_hash_table_lookup (evlist->satellites, catnum)); if (sat == NULL) { /* satellite not tracked anymore => remove */ @@ -415,28 +442,34 @@ } else { - - /**** FIXME *****/ /* update data */ + now = evlist->tstamp; + if (sat->el > 0.0) { + if (sat->los > 0.0) { + number = sat->los - now; + } + else { + number = -1.0; /* Sat is staionary or no event */ + } + } + else { + if (sat->aos > 0.0) { + number = sat->aos - now; + } + else { + number = -1.0; /* Sat is staionary or no event */ + } + } + /* store new data */ -/* gtk_list_store_set (GTK_LIST_STORE (model), iter, - SAT_LIST_COL_AZ, sat->az, - SAT_LIST_COL_EL, sat->el, - SAT_LIST_COL_RANGE, sat->range, - SAT_LIST_COL_RANGE_RATE, sat->range_rate, - SAT_LIST_COL_LAT, sat->ssplat, - SAT_LIST_COL_LON, sat->ssplon, - SAT_LIST_COL_FOOTPRINT, sat->footprint, - SAT_LIST_COL_ALT, sat->alt, - SAT_LIST_COL_VEL, sat->velo, - SAT_LIST_COL_MA, sat->ma, - SAT_LIST_COL_PHASE, sat->phase, - SAT_LIST_COL_ORBIT, sat->orbit, + gtk_list_store_set (GTK_LIST_STORE (model), iter, + EVENT_LIST_COL_AZ, sat->az, + EVENT_LIST_COL_EL, sat->el, + EVENT_LIST_COL_EVT, (sat->el >= 0) ? TRUE : FALSE, + EVENT_LIST_COL_TIME, number, -1); -*/ - } g_free (catnum); @@ -458,6 +491,16 @@ switch (i) { /* Event type */ + case EVENT_LIST_COL_AZ: + case EVENT_LIST_COL_EL: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + degree_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + /* Event type */ case EVENT_LIST_COL_EVT: gtk_tree_view_column_set_cell_data_func (column, renderer, @@ -503,11 +546,11 @@ gtk_tree_model_get (model, iter, coli, &value, -1); - if (value = TRUE) { - buff = g_strdup ("L"); + if (value == TRUE) { + buff = g_strdup (_("LOS")); } else { - buff = g_strdup ("A"); + buff = g_strdup (_("AOS")); } /* render the cell */ @@ -527,16 +570,62 @@ gdouble number; gchar *buff; guint coli = GPOINTER_TO_UINT (column); - time_t t; - guint size; + guint h,m,s; + gchar *ch,*cm,*cs; + /* get cell data */ gtk_tree_model_get (model, iter, coli, &number, -1); /* format the time code */ - buff = g_strdup_printf ("%.6f", number); + if (number < 0.0) { + buff = g_strdup(_("Never")); + } + else { + /* convert julian date to seconds */ + s = (guint) (number * 86400); + + /* extract hours */ + h = (guint) floor (s/3600); + s -= 3600*h; + + /* leading zero */ + if ((h > 0) && (h < 10)) + ch = g_strdup ("0"); + else + ch = g_strdup (""); + + /* extract minutes */ + m = (guint) floor (s/60); + s -= 60*m; + + /* leading zero */ + if (m < 10) + cm = g_strdup ("0"); + else + cm = g_strdup (""); + + /* leading zero */ + if (s < 10) + cs = g_strdup (":0"); + else + cs = g_strdup (":"); + + if (h > 0) { + buff = g_strdup_printf ("%s%d:%s%d%s%d", ch, h, cm, m, cs, s); + } + else { + buff = g_strdup_printf ("%s%d%s%d", cm, m, cs, s); + } + + g_free (ch); + g_free (cm); + g_free (cs); + + } + /* render the cell */ g_object_set (renderer, "text", buff, NULL); g_free (buff); @@ -544,6 +633,31 @@ } + +/* general floats with 2 digits + degree char. Used for Az and El */ +static void degree_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + + /* get the value */ + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.2f\302\260", number); + + /* render column */ + g_object_set (renderer, "text", buff, NULL); + g_free (buff); +} + + /** \brief Function to compare to Event cells. * \param model Pointer to the GtkTreeModel. * \param a Pointer to the first element. Modified: trunk/src/gtk-event-list.h =================================================================== --- trunk/src/gtk-event-list.h 2009-11-30 14:31:50 UTC (rev 533) +++ trunk/src/gtk-event-list.h 2009-11-30 16:51:16 UTC (rev 534) @@ -85,6 +85,8 @@ typedef enum { EVENT_LIST_COL_NAME = 0, /*!< Satellite name. */ EVENT_LIST_COL_CATNUM, /*!< Catalogue number. */ + EVENT_LIST_COL_AZ, /*!< Satellite Azimuth. */ + EVENT_LIST_COL_EL, /*!< Satellite Elevation. */ EVENT_LIST_COL_EVT, /*!< Next event (AOS or LOS). */ EVENT_LIST_COL_TIME, /*!< Time countdown. */ EVENT_LIST_COL_NUMBER @@ -96,6 +98,8 @@ typedef enum { EVENT_LIST_FLAG_NAME = 1 << EVENT_LIST_COL_NAME, /*!< Satellite name. */ EVENT_LIST_FLAG_CATNUM = 1 << EVENT_LIST_COL_CATNUM, + EVENT_LIST_FLAG_AZ = 1 << EVENT_LIST_COL_AZ, + EVENT_LIST_FLAG_EL = 1 << EVENT_LIST_COL_EL, EVENT_LIST_FLAG_EVT = 1 << EVENT_LIST_COL_EVT, /*!< Next event (AOS or LOS) */ EVENT_LIST_FLAG_TIME = 1 << EVENT_LIST_COL_TIME, /*!< Time countdown */ } event_list_flag_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-30 14:31:58
|
Revision: 533 http://gpredict.svn.sourceforge.net/gpredict/?rev=533&view=rev Author: csete Date: 2009-11-30 14:31:50 +0000 (Mon, 30 Nov 2009) Log Message: ----------- Include new GtkEventList widget. Modified Paths: -------------- trunk/src/gtk-sat-module.c Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2009-11-30 14:24:21 UTC (rev 532) +++ trunk/src/gtk-sat-module.c 2009-11-30 14:31:50 UTC (rev 533) @@ -63,6 +63,7 @@ #include "gtk-sat-map.h" #include "gtk-polar-view.h" #include "gtk-single-sat.h" +#include "gtk-event-list.h" #include "gtk-rig-ctrl.h" #include "gtk-rot-ctrl.h" #include "compat.h" @@ -434,6 +435,13 @@ 0); break; + case GTK_SAT_MOD_VIEW_EVENT: + view = gtk_event_list_new (module->cfgdata, + module->satellites, + module->qth, + 0); + break; + default: sat_log_log (SAT_LOG_LEVEL_BUG, _("%s:%d: Invalid child type (%d). Using GtkSatList."), @@ -846,6 +854,11 @@ gtk_single_sat_update (child); } + else if (IS_GTK_EVENT_LIST(child)) { + GTK_EVENT_LIST (child)->tstamp = tstamp; + gtk_event_list_update (child); + } + else { sat_log_log (SAT_LOG_LEVEL_BUG, _("%f:%d: Unknown child type"), This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-30 14:24:29
|
Revision: 532 http://gpredict.svn.sourceforge.net/gpredict/?rev=532&view=rev Author: csete Date: 2009-11-30 14:24:21 +0000 (Mon, 30 Nov 2009) Log Message: ----------- First buildable revision with new GtkEventList. Modified Paths: -------------- trunk/src/gtk-event-list.c trunk/src/gtk-event-list.h trunk/src/sat-cfg.c Modified: trunk/src/gtk-event-list.c =================================================================== --- trunk/src/gtk-event-list.c 2009-11-30 14:23:51 UTC (rev 531) +++ trunk/src/gtk-event-list.c 2009-11-30 14:24:21 UTC (rev 532) @@ -45,8 +45,11 @@ # include <build-config.h> #endif +/*** FIXME */ +#include "gtk-sat-list-popup.h" + /** \brief Column titles indexed with column symb. refs. */ const gchar *EVENT_LIST_COL_TITLE[EVENT_LIST_COL_NUMBER] = { N_("Sat"), @@ -355,7 +358,7 @@ /* first, do some sanity checks */ - if ((evlist == NULL) || !IS_GTK_EVENT_LIST (satlist)) { + if ((evlist == NULL) || !IS_GTK_EVENT_LIST (evlist)) { sat_log_log (SAT_LOG_LEVEL_BUG, _("%s: Invalid GtkEventList!"), __FUNCTION__); @@ -373,7 +376,7 @@ model = gtk_tree_view_get_model (GTK_TREE_VIEW (evlist->treeview)); /* update */ - gtk_tree_model_foreach (model, event_list_update_sats, satlist); + gtk_tree_model_foreach (model, event_list_update_sats, evlist); } } @@ -412,9 +415,12 @@ } else { - /**** UPDATED UNTIL HERE *****/ + + /**** FIXME *****/ + /* update data */ + /* store new data */ - gtk_list_store_set (GTK_LIST_STORE (model), iter, +/* gtk_list_store_set (GTK_LIST_STORE (model), iter, SAT_LIST_COL_AZ, sat->az, SAT_LIST_COL_EL, sat->el, SAT_LIST_COL_RANGE, sat->range, @@ -428,67 +434,9 @@ SAT_LIST_COL_PHASE, sat->phase, SAT_LIST_COL_ORBIT, sat->orbit, -1); +*/ - if (satlist->flags & SAT_LIST_FLAG_NEXT_EVENT) { - gdouble number; - gchar buff[TIME_FORMAT_MAX_LENGTH]; - gchar *tfstr; - gchar *fmtstr; - gchar *alstr; - time_t t; - guint size; - - if (sat->aos > sat->los) { - /* next event is LOS */ - number = sat->los; - alstr = g_strdup ("LOS: "); - } - else { - /* next event is AOS */ - number = sat->aos; - alstr = g_strdup ("AOS: "); - } - - if (number == 0.0) { - gtk_list_store_set (GTK_LIST_STORE (model), iter, - SAT_LIST_COL_NEXT_EVENT, "--- N/A ---", - -1); - } - else { - - /* convert julian date to struct tm */ - t = (number - 2440587.5)*86400.; - - /* format the number */ - tfstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT); - fmtstr = g_strconcat (alstr, tfstr, NULL); - g_free (tfstr); - - /* format either local time or UTC depending on check box */ - if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) - size = strftime (buff, TIME_FORMAT_MAX_LENGTH, - fmtstr, localtime (&t)); - else - size = strftime (buff, TIME_FORMAT_MAX_LENGTH, - fmtstr, gmtime (&t)); - - if (size == 0) - /* size > MAX_LENGTH */ - buff[TIME_FORMAT_MAX_LENGTH-1] = '\0'; - - gtk_list_store_set (GTK_LIST_STORE (model), iter, - SAT_LIST_COL_NEXT_EVENT, buff, - -1); - - - g_free (fmtstr); - } - - g_free (alstr); - - } - } g_free (catnum); @@ -509,78 +457,24 @@ switch (i) { - /* general float with 2 dec. precision - no extra format besides a degree char - */ - case SAT_LIST_COL_AZ: - case SAT_LIST_COL_EL: - case SAT_LIST_COL_RA: - case SAT_LIST_COL_DEC: - case SAT_LIST_COL_MA: - case SAT_LIST_COL_PHASE: + /* Event type */ + case EVENT_LIST_COL_EVT: gtk_tree_view_column_set_cell_data_func (column, renderer, - degree_cell_data_function, + evtype_cell_data_function, GUINT_TO_POINTER (i), NULL); break; - /* LAT/LON format */ - case SAT_LIST_COL_LAT: - case SAT_LIST_COL_LON: + /* time countdown */ + case EVENT_LIST_COL_TIME: gtk_tree_view_column_set_cell_data_func (column, renderer, - latlon_cell_data_function, + time_cell_data_function, GUINT_TO_POINTER (i), NULL); break; - /* distances and velocities */ - case SAT_LIST_COL_RANGE: - case SAT_LIST_COL_ALT: - case SAT_LIST_COL_FOOTPRINT: - gtk_tree_view_column_set_cell_data_func (column, - renderer, - distance_cell_data_function, - GUINT_TO_POINTER (i), - NULL); - break; - - case SAT_LIST_COL_VEL: - case SAT_LIST_COL_RANGE_RATE: - gtk_tree_view_column_set_cell_data_func (column, - renderer, - range_rate_cell_data_function, - GUINT_TO_POINTER (i), - NULL); - break; - - case SAT_LIST_COL_DOPPLER: - gtk_tree_view_column_set_cell_data_func (column, - renderer, - float_to_int_cell_data_function, - GUINT_TO_POINTER (i), - NULL); - break; - - case SAT_LIST_COL_DELAY: - case SAT_LIST_COL_LOSS: - gtk_tree_view_column_set_cell_data_func (column, - renderer, - two_dec_cell_data_function, - GUINT_TO_POINTER (i), - NULL); - break; - - case SAT_LIST_COL_AOS: - case SAT_LIST_COL_LOS: - gtk_tree_view_column_set_cell_data_func (column, - renderer, - event_cell_data_function, - GUINT_TO_POINTER (i), - NULL); - break; - default: break; @@ -589,242 +483,64 @@ } -/* render column containg lat/lon - by using this instead of the default data function, we can - control the number of decimals and display the coordinates in a - fancy way, including degree sign and NWSE suffixes. - - Please note that this function only affects how the numbers are - displayed (rendered), the tree_store will still contain the - original flaoting point numbers. Very cool! -*/ -static void -latlon_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) +/** \brief Render column containg event type. + * + * Event type can be AOS or LOS depending on whether the satellite is within + * range or not. AOS will rendern an "A", LOS will render an "L". + */ +static void evtype_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) { - gdouble number = 0.0; - gchar *buff; - guint coli = GPOINTER_TO_UINT (column); - gchar hmf = ' '; + gboolean value; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); - gtk_tree_model_get (model, iter, coli, &number, -1); - /* check whether configuration requests the use - of N, S, E and W instead of signs - */ - if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_NSEW)) { + /* get field value from cell */ + gtk_tree_model_get (model, iter, coli, &value, -1); - if (coli == SAT_LIST_COL_LAT) { - if (number < 0.00) { - number = -number; - hmf = 'S'; - } - else { - hmf = 'N'; - } - } - else if (coli == SAT_LIST_COL_LON) { - if (number < 0.00) { - number = -number; - hmf = 'W'; - } - else { - hmf = 'E'; - } - } - else { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: Invalid column: %d"), - __FILE__, __LINE__, - coli); - hmf = '?'; - } - } - /* format the number */ - buff = g_strdup_printf ("%.2f\302\260%c", number, hmf); - g_object_set (renderer, - "text", buff, - NULL); - g_free (buff); -} - - -/* general floats with 2 digits + degree char */ -static void -degree_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) -{ - gdouble number; - gchar *buff; - guint coli = GPOINTER_TO_UINT (column); - - gtk_tree_model_get (model, iter, coli, &number, -1); - - /* format the number */ - buff = g_strdup_printf ("%.2f\302\260", number); - g_object_set (renderer, - "text", buff, - NULL); - g_free (buff); -} - - -/* distance and velocity, 0 decimal digits */ -static void -distance_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) -{ - gdouble number; - gchar *buff; - guint coli = GPOINTER_TO_UINT (column); - - gtk_tree_model_get (model, iter, coli, &number, -1); - - /* convert distance to miles? */ - if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { - number = KM_TO_MI(number); + if (value = TRUE) { + buff = g_strdup ("L"); } - - /* format the number */ - buff = g_strdup_printf ("%.0f", number); - g_object_set (renderer, - "text", buff, - NULL); - g_free (buff); -} - -/* range rate is special, because we may need to convert to miles - and want 2-3 decimal digits. -*/ -static void -range_rate_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) -{ - gdouble number; - gchar *buff; - guint coli = GPOINTER_TO_UINT (column); - - gtk_tree_model_get (model, iter, coli, &number, -1); - - /* convert distance to miles? */ - if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { - number = KM_TO_MI(number); + else { + buff = g_strdup ("A"); } - /* format the number */ - buff = g_strdup_printf ("%.3f", number); - g_object_set (renderer, - "text", buff, - NULL); + /* render the cell */ + g_object_set (renderer, "text", buff, NULL); g_free (buff); } -/* 0 decimal digits */ -static void -float_to_int_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) -{ - gdouble number; - gchar *buff; - guint coli = GPOINTER_TO_UINT (column); - gtk_tree_model_get (model, iter, coli, &number, -1); - /* format the number */ - buff = g_strdup_printf ("%.0f", number); - g_object_set (renderer, - "text", buff, - NULL); - g_free (buff); -} - -/* 2 decimal digits */ -static void -two_dec_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) +/* AOS/LOS; convert julian date to string */ +static void time_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) { gdouble number; gchar *buff; guint coli = GPOINTER_TO_UINT (column); - - gtk_tree_model_get (model, iter, coli, &number, -1); - - /* format the number */ - buff = g_strdup_printf ("%.2f", number); - g_object_set (renderer, - "text", buff, - NULL); - g_free (buff); -} - - -/* AOS/LOS; convert julian date to string */ -static void -event_cell_data_function (GtkTreeViewColumn *col, - GtkCellRenderer *renderer, - GtkTreeModel *model, - GtkTreeIter *iter, - gpointer column) -{ - gdouble number; - gchar buff[TIME_FORMAT_MAX_LENGTH]; - gchar *fmtstr; - guint coli = GPOINTER_TO_UINT (column); time_t t; guint size; + /* get cell data */ gtk_tree_model_get (model, iter, coli, &number, -1); - - if (number == 0.0) { - g_object_set (renderer, - "text", "--- N/A ---", - NULL); - } - else { - /* convert julian date to struct tm */ - t = (number - 2440587.5)*86400.; + /* format the time code */ + buff = g_strdup_printf ("%.6f", number); - /* format the number */ - fmtstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT); + /* render the cell */ + g_object_set (renderer, "text", buff, NULL); + g_free (buff); - /* format either local time or UTC depending on check box */ - if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) - size = strftime (buff, TIME_FORMAT_MAX_LENGTH, fmtstr, localtime (&t)); - else - size = strftime (buff, TIME_FORMAT_MAX_LENGTH, fmtstr, gmtime (&t)); - - if (size == 0) - /* size > TIME_FORMAT_MAX_LENGTH */ - buff[TIME_FORMAT_MAX_LENGTH-1] = '\0'; - - g_object_set (renderer, - "text", buff, - NULL); - - g_free (fmtstr); - } - } @@ -878,8 +594,7 @@ /** \brief Reload configuration */ -void -gtk_sat_list_reconf (GtkWidget *widget, GKeyFile *cfgdat) +void gtk_event_list_reconf (GtkWidget *widget, GKeyFile *cfgdat) { sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: FIXME I am not implemented")); } @@ -890,17 +605,12 @@ * \param treeview The tree view in the GtkSatList widget * \param list Pointer to the GtkSatList widget. * - * This function is called when the "popup-menu" signal is emitted. This - * usually happens if the user presses SHJIFT-F10? It is used as a wrapper - * for the function that actually creates the popup menu. */ -static gboolean -popup_menu_cb (GtkWidget *treeview, gpointer list) +static gboolean popup_menu_cb (GtkWidget *treeview, gpointer list) { /* if there is no selection, select the first row */ - view_popup_menu (treeview, NULL, list); return TRUE; /* we handled this */ @@ -913,8 +623,7 @@ * \param list Pointer to the GtkSatList widget. * */ -static gboolean -button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer list) +static gboolean button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer list) { /* single click with the right mouse button? */ @@ -955,8 +664,7 @@ } -static void -view_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer list) +static void view_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer list) { GtkTreeSelection *selection; GtkTreeModel *model; @@ -972,7 +680,7 @@ gtk_tree_model_get (model, &iter, - SAT_LIST_COL_CATNUM, catnum, + EVENT_LIST_COL_CATNUM, catnum, -1); sat = SAT (g_hash_table_lookup (GTK_SAT_LIST (list)->satellites, catnum)); @@ -1000,64 +708,12 @@ } -/*** FIXME: formalise with other copies, only need az,el and jul_utc */ -static void -Calculate_RADec (sat_t *sat, qth_t *qth, obs_astro_t *obs_set) -{ - /* Reference: Methods of Orbit Determination by */ - /* Pedro Ramon Escobal, pp. 401-402 */ - double phi,theta,sin_theta,cos_theta,sin_phi,cos_phi, - az,el,Lxh,Lyh,Lzh,Sx,Ex,Zx,Sy,Ey,Zy,Sz,Ez,Zz, - Lx,Ly,Lz,cos_delta,sin_alpha,cos_alpha; - geodetic_t geodetic; - geodetic.lon = qth->lon * de2ra; - geodetic.lat = qth->lat * de2ra; - geodetic.alt = qth->alt / 1000.0; - geodetic.theta = 0; - - - - az = sat->az * de2ra; - el = sat->el * de2ra; - phi = geodetic.lat; - theta = FMod2p(ThetaG_JD(sat->jul_utc) + geodetic.lon); - sin_theta = sin(theta); - cos_theta = cos(theta); - sin_phi = sin(phi); - cos_phi = cos(phi); - Lxh = -cos(az) * cos(el); - Lyh = sin(az) * cos(el); - Lzh = sin(el); - Sx = sin_phi * cos_theta; - Ex = -sin_theta; - Zx = cos_theta * cos_phi; - Sy = sin_phi * sin_theta; - Ey = cos_theta; - Zy = sin_theta*cos_phi; - Sz = -cos_phi; - Ez = 0; - Zz = sin_phi; - Lx = Sx*Lxh + Ex * Lyh + Zx*Lzh; - Ly = Sy*Lxh + Ey * Lyh + Zy*Lzh; - Lz = Sz*Lxh + Ez * Lyh + Zz*Lzh; - obs_set->dec = ArcSin(Lz); /* Declination (radians)*/ - cos_delta = sqrt(1 - Sqr(Lz)); - sin_alpha = Ly / cos_delta; - cos_alpha = Lx / cos_delta; - obs_set->ra = AcTan(sin_alpha,cos_alpha); /* Right Ascension (radians)*/ - obs_set->ra = FMod2p(obs_set->ra); - -} - - - - /** \brief Reload reference to satellites (e.g. after TLE update). */ void -gtk_sat_list_reload_sats (GtkWidget *satlist, GHashTable *sats) +gtk_event_list_reload_sats (GtkWidget *evlist, GHashTable *sats) { - GTK_SAT_LIST (satlist)->satellites = sats; + GTK_EVENT_LIST (evlist)->satellites = sats; } Modified: trunk/src/gtk-event-list.h =================================================================== --- trunk/src/gtk-event-list.h 2009-11-30 14:23:51 UTC (rev 531) +++ trunk/src/gtk-event-list.h 2009-11-30 14:24:21 UTC (rev 532) @@ -40,7 +40,7 @@ #endif /* __cplusplus */ -#define GTK_TYPE_EVENT_LIST (gtk_EVENT_list_get_type ()) +#define GTK_TYPE_EVENT_LIST (gtk_event_list_get_type ()) #define GTK_EVENT_LIST(obj) GTK_CHECK_CAST (obj,\ gtk_event_list_get_type (),\ GtkEventList) Modified: trunk/src/sat-cfg.c =================================================================== --- trunk/src/sat-cfg.c 2009-11-30 14:23:51 UTC (rev 531) +++ trunk/src/sat-cfg.c 2009-11-30 14:24:21 UTC (rev 532) @@ -144,10 +144,10 @@ { "VERSION", "MAJOR", 0}, { "VERSION", "MINOR", 0}, { "MODULES", "DATA_TIMEOUT", 300}, - { "MODULES", "LAYOUT", GTK_SAT_MOD_LAYOUT_3}, - { "MODULES", "VIEW_1", GTK_SAT_MOD_VIEW_MAP}, - { "MODULES", "VIEW_2", GTK_SAT_MOD_VIEW_POLAR}, - { "MODULES", "VIEW_3", GTK_SAT_MOD_VIEW_SINGLE}, + { "MODULES", "LAYOUT", 2}, /* FIXME */ + { "MODULES", "VIEW_1", GTK_SAT_MOD_VIEW_MAP}, /* FIXME */ + { "MODULES", "VIEW_2", GTK_SAT_MOD_VIEW_POLAR}, /* FIXME */ + { "MODULES", "VIEW_3", GTK_SAT_MOD_VIEW_SINGLE}, /* FIXME */ { "GLOBAL", "WARP", 1}, { "MODULES", "LIST_REFRESH", 1}, { "MODULES", "LIST_COLUMNS", LIST_COLUMNS_DEFAULTS}, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-30 14:23:58
|
Revision: 531 http://gpredict.svn.sourceforge.net/gpredict/?rev=531&view=rev Author: csete Date: 2009-11-30 14:23:51 +0000 (Mon, 30 Nov 2009) Log Message: ----------- Changed default of --enable-caches to NO Modified Paths: -------------- trunk/configure.ac Modified: trunk/configure.ac =================================================================== --- trunk/configure.ac 2009-11-30 14:23:25 UTC (rev 530) +++ trunk/configure.ac 2009-11-30 14:23:51 UTC (rev 531) @@ -59,7 +59,7 @@ AC_DEFINE(ENABLE_COV, 1, [Define if code coverage should be enabled.]) fi -AC_ARG_ENABLE(caches,[ --enable-caches Run update-* to update desktop and icon caches when installing (disable if you install as not root)],,[enable_caches="yes"]) +AC_ARG_ENABLE(caches,[ --enable-caches Run update-* to update desktop and icon caches when installing (disable if you install as not root)],,[enable_caches="no"]) AM_CONDITIONAL(UPDATE_CACHES, test x"$enable_caches" = "xyes") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-30 14:23:34
|
Revision: 530 http://gpredict.svn.sourceforge.net/gpredict/?rev=530&view=rev Author: csete Date: 2009-11-30 14:23:25 +0000 (Mon, 30 Nov 2009) Log Message: ----------- Include new files in build list. Modified Paths: -------------- trunk/src/Makefile.am trunk/win32/Makefile Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-11-29 16:07:38 UTC (rev 529) +++ trunk/src/Makefile.am 2009-11-30 14:23:25 UTC (rev 530) @@ -20,97 +20,98 @@ bin_PROGRAMS = gpredict gpredict_SOURCES = \ - sgpsdp/sgp4sdp4.c \ - sgpsdp/sgp4sdp4.h \ - sgpsdp/sgp_in.c \ - sgpsdp/sgp_math.c \ - sgpsdp/sgp_obs.c \ - sgpsdp/sgp_time.c \ - sgpsdp/solar.c \ - about.c about.h \ - compat.c compat.h config-keys.h \ - defaults.h \ - first-time.c first-time.h \ - gpredict-help.c gpredict-help.h \ - gpredict-url-hook.c gpredict-url-hook.h \ - gpredict-utils.c gpredict-utils.h \ - gtk-azel-plot.c gtk-azel-plot.h \ - gtk-freq-knob.c gtk-freq-knob.h \ - gtk-polar-plot.c gtk-polar-plot.h \ - gtk-polar-view.c gtk-polar-view.h \ - gtk-polar-view-popup.c gtk-polar-view-popup.h \ - gtk-rig-ctrl.c gtk-rig-ctrl.h \ - gtk-rot-ctrl.c gtk-rot-ctrl.h \ - gtk-rot-knob.c gtk-rot-knob.h \ - gtk-sat-data.c gtk-sat-data.h \ - gtk-sat-list.c gtk-sat-list.h \ - gtk-sat-list-col-sel.c gtk-sat-list-col-sel.h \ - gtk-sat-list-popup.c gtk-sat-list-popup.h \ - gtk-sat-map.c gtk-sat-map.h \ - gtk-sat-map-popup.c gtk-sat-map-popup.h \ - gtk-sat-map-ground-track.c gtk-sat-map-ground-track.h \ - gtk-sat-module.c gtk-sat-module.h \ - gtk-sat-module-popup.c gtk-sat-module-popup.h \ - gtk-sat-module-tmg.c gtk-sat-module-tmg.h \ + sgpsdp/sgp4sdp4.c \ + sgpsdp/sgp4sdp4.h \ + sgpsdp/sgp_in.c \ + sgpsdp/sgp_math.c \ + sgpsdp/sgp_obs.c \ + sgpsdp/sgp_time.c \ + sgpsdp/solar.c \ + about.c about.h \ + compat.c compat.h config-keys.h \ + defaults.h \ + first-time.c first-time.h \ + gpredict-help.c gpredict-help.h \ + gpredict-url-hook.c gpredict-url-hook.h \ + gpredict-utils.c gpredict-utils.h \ + gtk-azel-plot.c gtk-azel-plot.h \ + gtk-event-list.c gtk-event-list.h \ + gtk-freq-knob.c gtk-freq-knob.h \ + gtk-polar-plot.c gtk-polar-plot.h \ + gtk-polar-view.c gtk-polar-view.h \ + gtk-polar-view-popup.c gtk-polar-view-popup.h \ + gtk-rig-ctrl.c gtk-rig-ctrl.h \ + gtk-rot-ctrl.c gtk-rot-ctrl.h \ + gtk-rot-knob.c gtk-rot-knob.h \ + gtk-sat-data.c gtk-sat-data.h \ + gtk-sat-list.c gtk-sat-list.h \ + gtk-sat-list-col-sel.c gtk-sat-list-col-sel.h \ + gtk-sat-list-popup.c gtk-sat-list-popup.h \ + gtk-sat-map.c gtk-sat-map.h \ + gtk-sat-map-popup.c gtk-sat-map-popup.h \ + gtk-sat-map-ground-track.c gtk-sat-map-ground-track.h \ + gtk-sat-module.c gtk-sat-module.h \ + gtk-sat-module-popup.c gtk-sat-module-popup.h \ + gtk-sat-module-tmg.c gtk-sat-module-tmg.h \ gtk-sat-selector.c gtk-sat-selector.h \ - gtk-single-sat.c gtk-single-sat.h \ - gtk-sky-glance.c gtk-sky-glance.h \ - gui.c gui.h \ - loc-tree.c loc-tree.h \ - locator.c locator.h \ - main.c \ - map-selector.c map-selector.h \ - menubar.c menubar.h \ - mod-cfg.c mod-cfg.h \ - mod-cfg-get-param.c mod-cfg-get-param.h \ - mod-mgr.c mod-mgr.h \ - orbit-tools.c orbit-tools.h \ - pass-popup-menu.c pass-popup-menu.h \ - pass-to-txt.c pass-to-txt.h \ - predict-tools.c predict-tools.h \ + gtk-single-sat.c gtk-single-sat.h \ + gtk-sky-glance.c gtk-sky-glance.h \ + gui.c gui.h \ + loc-tree.c loc-tree.h \ + locator.c locator.h \ + main.c \ + map-selector.c map-selector.h \ + menubar.c menubar.h \ + mod-cfg.c mod-cfg.h \ + mod-cfg-get-param.c mod-cfg-get-param.h \ + mod-mgr.c mod-mgr.h \ + orbit-tools.c orbit-tools.h \ + pass-popup-menu.c pass-popup-menu.h \ + pass-to-txt.c pass-to-txt.h \ + predict-tools.c predict-tools.h \ qth-data.c qth-data.h \ - qth-editor.c qth-editor.h \ - radio-conf.c radio-conf.h \ - rotor-conf.c rotor-conf.h \ + qth-editor.c qth-editor.h \ + radio-conf.c radio-conf.h \ + rotor-conf.c rotor-conf.h \ trsp-conf.c trsp-conf.h \ - sat-cfg.c sat-cfg.h \ - sat-info.c sat-info.h \ - sat-log.c sat-log.h \ - sat-log-browser.c sat-log-browser.h \ - sat-monitor.c sat-monitor.h \ - sat-pass-dialogs.c sat-pass-dialogs.h \ - sat-pref.c sat-pref.h \ - sat-pref-general.c sat-pref-general.h \ - sat-pref-formats.c sat-pref-formats.h \ - sat-pref-qth.c sat-pref-qth.h sat-pref-qth-data.h \ - sat-pref-qth-editor.c sat-pref-qth-editor.h \ - sat-pref-tle.c sat-pref-tle.h \ - sat-pref-debug.c sat-pref-debug.h \ - sat-pref-help.c sat-pref-help.h \ - sat-pref-modules.c sat-pref-modules.h \ - sat-pref-layout.c sat-pref-layout.h \ + sat-cfg.c sat-cfg.h \ + sat-info.c sat-info.h \ + sat-log.c sat-log.h \ + sat-log-browser.c sat-log-browser.h \ + sat-monitor.c sat-monitor.h \ + sat-pass-dialogs.c sat-pass-dialogs.h \ + sat-pref.c sat-pref.h \ + sat-pref-general.c sat-pref-general.h \ + sat-pref-formats.c sat-pref-formats.h \ + sat-pref-qth.c sat-pref-qth.h sat-pref-qth-data.h \ + sat-pref-qth-editor.c sat-pref-qth-editor.h \ + sat-pref-tle.c sat-pref-tle.h \ + sat-pref-debug.c sat-pref-debug.h \ + sat-pref-help.c sat-pref-help.h \ + sat-pref-modules.c sat-pref-modules.h \ + sat-pref-layout.c sat-pref-layout.h \ sat-pref-layout-utils.c sat-pref-layout-utils.h \ - sat-pref-refresh.c sat-pref-refresh.h \ - sat-pref-map-view.c sat-pref-map-view.h \ - sat-pref-list-view.c sat-pref-list-view.h \ - sat-pref-polar-view.c sat-pref-polar-view.h \ - sat-pref-single-sat.c sat-pref-single-sat.h \ - sat-pref-interfaces.c sat-pref-interfaces.h \ - sat-pref-rig.c sat-pref-rig.h sat-pref-rig-data.h \ - sat-pref-rig-editor.c sat-pref-rig-editor.h \ - sat-pref-rot.c sat-pref-rot.h sat-pref-rot-data.h \ - sat-pref-rot-editor.c sat-pref-rot-editor.h \ - sat-pref-predict.c sat-pref-predict.h \ - sat-pref-conditions.c sat-pref-conditions.h \ - sat-pref-multi-pass.c sat-pref-multi-pass.h \ - sat-pref-single-pass.c sat-pref-single-pass.h \ - sat-pref-sky-at-glance.c sat-pref-sky-at-glance.h \ - sat-vis.c sat-vis.h \ - save-pass.c save-pass.h \ - time-tools.c time-tools.h \ - tle-tools.c tle-tools.h \ - tle-update.c tle-update.h \ - sat-debugger.c sat-debugger.h + sat-pref-refresh.c sat-pref-refresh.h \ + sat-pref-map-view.c sat-pref-map-view.h \ + sat-pref-list-view.c sat-pref-list-view.h \ + sat-pref-polar-view.c sat-pref-polar-view.h \ + sat-pref-single-sat.c sat-pref-single-sat.h \ + sat-pref-interfaces.c sat-pref-interfaces.h \ + sat-pref-rig.c sat-pref-rig.h sat-pref-rig-data.h \ + sat-pref-rig-editor.c sat-pref-rig-editor.h \ + sat-pref-rot.c sat-pref-rot.h sat-pref-rot-data.h \ + sat-pref-rot-editor.c sat-pref-rot-editor.h \ + sat-pref-predict.c sat-pref-predict.h \ + sat-pref-conditions.c sat-pref-conditions.h \ + sat-pref-multi-pass.c sat-pref-multi-pass.h \ + sat-pref-single-pass.c sat-pref-single-pass.h \ + sat-pref-sky-at-glance.c sat-pref-sky-at-glance.h \ + sat-vis.c sat-vis.h \ + save-pass.c save-pass.h \ + time-tools.c time-tools.h \ + tle-tools.c tle-tools.h \ + tle-update.c tle-update.h \ + sat-debugger.c sat-debugger.h Modified: trunk/win32/Makefile =================================================================== --- trunk/win32/Makefile 2009-11-29 16:07:38 UTC (rev 529) +++ trunk/win32/Makefile 2009-11-30 14:23:25 UTC (rev 530) @@ -86,6 +86,7 @@ gpredict-url-hook.c \ gpredict-utils.c \ gtk-azel-plot.c \ + gtk-event-list.c \ gtk-freq-knob.c \ gtk-polar-plot.c \ gtk-polar-view.c \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-29 16:07:52
|
Revision: 529 http://gpredict.svn.sourceforge.net/gpredict/?rev=529&view=rev Author: csete Date: 2009-11-29 16:07:38 +0000 (Sun, 29 Nov 2009) Log Message: ----------- Added new files with GtkEventList view (not finished). Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-module.h Added Paths: ----------- trunk/src/gtk-event-list.c trunk/src/gtk-event-list.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-29 12:36:54 UTC (rev 528) +++ trunk/ChangeLog 2009-11-29 16:07:38 UTC (rev 529) @@ -1,3 +1,12 @@ +2009-11-29 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-event-list.[ch]: + Added files containing new view listing upcoming events. + + * src/gtk-sat-module.[ch]: + Use new GtkEventList view. + + 2009-11-22 Alexandru Csete <oz9aec at gmail.com> * src/sat-cfg.c: Added: trunk/src/gtk-event-list.c =================================================================== --- trunk/src/gtk-event-list.c (rev 0) +++ trunk/src/gtk-event-list.c 2009-11-29 16:07:38 UTC (rev 529) @@ -0,0 +1,1063 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +/** \brief Satellite List Widget. + * + * More info... + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#include "sgpsdp/sgp4sdp4.h" +#include "gtk-event-list.h" +#include "sat-log.h" +#include "config-keys.h" +#include "sat-cfg.h" +#include "mod-cfg-get-param.h" +#include "gtk-sat-data.h" +#include "gpredict-utils.h" +#include "locator.h" +#include "sat-vis.h" +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif + + + +/** \brief Column titles indexed with column symb. refs. */ +const gchar *EVENT_LIST_COL_TITLE[EVENT_LIST_COL_NUMBER] = { + N_("Sat"), + N_("Catnum"), + N_("A/L"), + N_("Time") +}; + + +/** \brief Column title hints indexed with column symb. refs. */ +const gchar *EVENT_LIST_COL_HINT[EVENT_LIST_COL_NUMBER] = { + N_("Satellite Name"), + N_("Catalogue Number"), + N_("Next event type (A: AOS, L: LOS)"), + N_("Countdown until next event") +}; + +const gfloat EVENT_LIST_COL_XALIGN[EVENT_LIST_COL_NUMBER] = { + 0.0, // name + 0.5, // catnum + 0.5, // event type + 0.5, // time +}; + +static void gtk_event_list_class_init (GtkEventListClass *class); +static void gtk_event_list_init (GtkEventList *list); +static void gtk_event_list_destroy (GtkObject *object); +static GtkTreeModel *create_and_fill_model (GHashTable *sats); +static void event_list_add_satellites (gpointer key, + gpointer value, + gpointer user_data); +static gboolean event_list_update_sats (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, + gpointer data); + +/* cell rendering related functions */ +static void check_and_set_cell_renderer (GtkTreeViewColumn *column, + GtkCellRenderer *renderer, + gint i); + +static void evtype_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column); + +static void time_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column); + +static gint event_cell_compare_function (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data); + + +static gboolean popup_menu_cb (GtkWidget *treeview, + gpointer list); + +static gboolean button_press_cb (GtkWidget *treeview, + GdkEventButton *event, + gpointer list); + +static void view_popup_menu (GtkWidget *treeview, + GdkEventButton *event, + gpointer list); + + +static GtkVBoxClass *parent_class = NULL; + + +GType gtk_event_list_get_type () +{ + static GType gtk_event_list_type = 0; + + if (!gtk_event_list_type) + { + static const GTypeInfo gtk_event_list_info = + { + sizeof (GtkEventListClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_event_list_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkEventList), + 5, /* n_preallocs */ + (GInstanceInitFunc) gtk_event_list_init, + }; + + gtk_event_list_type = g_type_register_static (GTK_TYPE_VBOX, + "GtkEventList", + >k_event_list_info, + 0); + } + + return gtk_event_list_type; +} + + +static void gtk_event_list_class_init (GtkEventListClass *class) +{ + GObjectClass *gobject_class; + GtkObjectClass *object_class; + GtkWidgetClass *widget_class; + GtkContainerClass *container_class; + + gobject_class = G_OBJECT_CLASS (class); + object_class = (GtkObjectClass*) class; + widget_class = (GtkWidgetClass*) class; + container_class = (GtkContainerClass*) class; + + parent_class = g_type_class_peek_parent (class); + + object_class->destroy = gtk_event_list_destroy; + +} + + +static void gtk_event_list_init (GtkEventList *list) +{ + +} + + +static void gtk_event_list_destroy (GtkObject *object) +{ + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + + +/** \brief Create a new GtkEventList widget. + * \param cfgdata Pointer to the module configuration data. + * \param sats Hash table containing the satellites tracked by the parent module. + * \param qth Pointer to the QTH used by this module. + * \param columns Visible columns (currently not in use). + * + */ +GtkWidget *gtk_event_list_new (GKeyFile *cfgdata, GHashTable *sats, qth_t *qth, guint32 columns) +{ + GtkWidget *widget; + GtkEventList *evlist; + GtkTreeModel *model; + guint i; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + + + widget = g_object_new (GTK_TYPE_EVENT_LIST, NULL); + evlist = GTK_EVENT_LIST (widget); + + evlist->update = gtk_event_list_update; + + /* Read configuration data. */ + /* ... */ + + evlist->satellites = sats; + evlist->qth = qth; + + + /* initialise column flags */ + evlist->flags = 0; +/* if (columns > 0) + evlist->flags = columns; + else + evlist->flags = mod_cfg_get_int (cfgdata, + MOD_CFG_EVLIST_SECTION, + MOD_CFG_EVLIST_COLUMNS, + SAT_CFG_INT_EVLIST_COLUMNS); + */ + + /* get refresh rate and cycle counter */ +/* evlist->refresh = mod_cfg_get_int (cfgdata, + MOD_CFG_EVLIST_SECTION, + MOD_CFG_EVLIST_REFRESH, + SAT_CFG_INT_EVLIST_REFRESH); + */ + evlist->refresh = 1000; + + evlist->counter = 1; + + /* create the tree view and add columns */ + evlist->treeview = gtk_tree_view_new (); + + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (evlist->treeview), FALSE); + + /* create treeview columns */ + for (i = 0; i < EVENT_LIST_COL_NUMBER; i++) { + + renderer = gtk_cell_renderer_text_new (); + g_object_set (G_OBJECT (renderer), "xalign", EVENT_LIST_COL_XALIGN[i], NULL); + + column = gtk_tree_view_column_new_with_attributes (_(EVENT_LIST_COL_TITLE[i]), + renderer, + "text", i, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (evlist->treeview), + column, -1); + + /* only aligns the headers */ + gtk_tree_view_column_set_alignment (column, 0.5); + + /* set sort id */ + gtk_tree_view_column_set_sort_column_id (column, i); + + /* set cell data function; allows to format data before rendering */ + check_and_set_cell_renderer (column, renderer, i); + + /* hide columns that have not been specified */ + /*if (!(evlist->flags & (1 << i))) { + gtk_tree_view_column_set_visible (column, FALSE); + }*/ + + } + + /* create model and finalise treeview */ + model = create_and_fill_model (evlist->satellites); + gtk_tree_view_set_model (GTK_TREE_VIEW (evlist->treeview), model); + + /* The time sort function needs to be special */ + gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), + EVENT_LIST_COL_TIME, + event_cell_compare_function, + NULL, NULL); + + /* initial sorting criteria */ + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), + EVENT_LIST_COL_TIME, + GTK_SORT_ASCENDING), + + g_object_unref (model); + +/* g_signal_connect (evlist->treeview, "button-press-event", + G_CALLBACK (button_press_cb), widget); + g_signal_connect (evlist->treeview, "popup-menu", + G_CALLBACK (popup_menu_cb), widget);*/ + + evlist->swin = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (evlist->swin), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + gtk_container_add (GTK_CONTAINER (evlist->swin), evlist->treeview); + + gtk_container_add (GTK_CONTAINER (widget), evlist->swin); + gtk_widget_show_all (widget); + + return widget; +} + + +/** \brief Create and file the tree model for the even list. */ +static GtkTreeModel *create_and_fill_model (GHashTable *sats) +{ + GtkListStore *liststore; + + + liststore = gtk_list_store_new (SAT_LIST_COL_NUMBER, + G_TYPE_STRING, // name + G_TYPE_INT, // catnum + G_TYPE_BOOLEAN, // TRUE if AOS, FALSE if LOS + G_TYPE_DOUBLE); // time + + /* add each satellite from hash table */ + g_hash_table_foreach (sats, event_list_add_satellites, liststore); + + + return GTK_TREE_MODEL (liststore); +} + + +/** \brief Add satellites. This function is a g_hash_table_foreach() callback. + * \param key The key of the satellite in the hash table. + * \param value Pointer to the satellite (sat_t structure) that should be added. + * \param user_data Pointer to the GtkListStore where the satellite should be added + * + * This function is called by by the create_and_fill_models() function for adding + * the satellites to the internal liststore. + */ +static void event_list_add_satellites (gpointer key, gpointer value, gpointer user_data) +{ + GtkListStore *store = GTK_LIST_STORE (user_data); + GtkTreeIter item; + sat_t *sat = SAT (value); + + + gtk_list_store_append (store, &item); + gtk_list_store_set (store, &item, + EVENT_LIST_COL_NAME, sat->nickname, + EVENT_LIST_COL_CATNUM, sat->tle.catnr, + EVENT_LIST_COL_EVT, (sat->el >= 0) ? TRUE : FALSE, + EVENT_LIST_COL_TIME, 0.0, + -1); +} + + + +/** \brief Update satellites */ +void gtk_event_list_update (GtkWidget *widget) +{ + GtkTreeModel *model; + GtkEventList *evlist = GTK_EVENT_LIST (widget); + + + /* first, do some sanity checks */ + if ((evlist == NULL) || !IS_GTK_EVENT_LIST (satlist)) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: Invalid GtkEventList!"), + __FUNCTION__); + } + + + /* check refresh rate */ + if (evlist->counter < evlist->refresh) { + evlist->counter++; + } + else { + evlist->counter = 1; + + /* get and tranverse the model */ + model = gtk_tree_view_get_model (GTK_TREE_VIEW (evlist->treeview)); + + /* update */ + gtk_tree_model_foreach (model, event_list_update_sats, satlist); + } +} + + +/** \brief Update data in each column in a given row */ +static gboolean event_list_update_sats (GtkTreeModel *model, + GtkTreePath *path, + GtkTreeIter *iter, + gpointer data) +{ + GtkEventList *satlist = GTK_EVENT_LIST (data); + guint *catnum; + sat_t *sat; + gchar *buff; + gint retcode; + + + /* get the catalogue number for this row + then look it up in the hash table + */ + catnum = g_new0 (guint, 1); + gtk_tree_model_get (model, iter, EVENT_LIST_COL_CATNUM, catnum, -1); + sat = SAT (g_hash_table_lookup (satlist->satellites, catnum)); + + if (sat == NULL) { + /* satellite not tracked anymore => remove */ + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Failed to get data for #%d."), + __FUNCTION__, *catnum); + + gtk_list_store_remove (GTK_LIST_STORE (model), iter); + + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: Satellite #%d removed from list."), + __FUNCTION__, *catnum); + } + else { + + /**** UPDATED UNTIL HERE *****/ + /* store new data */ + gtk_list_store_set (GTK_LIST_STORE (model), iter, + SAT_LIST_COL_AZ, sat->az, + SAT_LIST_COL_EL, sat->el, + SAT_LIST_COL_RANGE, sat->range, + SAT_LIST_COL_RANGE_RATE, sat->range_rate, + SAT_LIST_COL_LAT, sat->ssplat, + SAT_LIST_COL_LON, sat->ssplon, + SAT_LIST_COL_FOOTPRINT, sat->footprint, + SAT_LIST_COL_ALT, sat->alt, + SAT_LIST_COL_VEL, sat->velo, + SAT_LIST_COL_MA, sat->ma, + SAT_LIST_COL_PHASE, sat->phase, + SAT_LIST_COL_ORBIT, sat->orbit, + -1); + + if (satlist->flags & SAT_LIST_FLAG_NEXT_EVENT) { + gdouble number; + gchar buff[TIME_FORMAT_MAX_LENGTH]; + gchar *tfstr; + gchar *fmtstr; + gchar *alstr; + time_t t; + guint size; + + + if (sat->aos > sat->los) { + /* next event is LOS */ + number = sat->los; + alstr = g_strdup ("LOS: "); + } + else { + /* next event is AOS */ + number = sat->aos; + alstr = g_strdup ("AOS: "); + } + + if (number == 0.0) { + gtk_list_store_set (GTK_LIST_STORE (model), iter, + SAT_LIST_COL_NEXT_EVENT, "--- N/A ---", + -1); + } + else { + + /* convert julian date to struct tm */ + t = (number - 2440587.5)*86400.; + + /* format the number */ + tfstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT); + fmtstr = g_strconcat (alstr, tfstr, NULL); + g_free (tfstr); + + /* format either local time or UTC depending on check box */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, + fmtstr, localtime (&t)); + else + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, + fmtstr, gmtime (&t)); + + if (size == 0) + /* size > MAX_LENGTH */ + buff[TIME_FORMAT_MAX_LENGTH-1] = '\0'; + + gtk_list_store_set (GTK_LIST_STORE (model), iter, + SAT_LIST_COL_NEXT_EVENT, buff, + -1); + + + g_free (fmtstr); + } + + g_free (alstr); + + } + + } + + g_free (catnum); + + /* Return value not documented what to return, but it seems that + FALSE continues to next row while TRUE breaks + */ + return FALSE; +} + + + +/** \brief Set cell renderer function. */ +static void check_and_set_cell_renderer (GtkTreeViewColumn *column, + GtkCellRenderer *renderer, + gint i) +{ + + switch (i) { + + /* general float with 2 dec. precision + no extra format besides a degree char + */ + case SAT_LIST_COL_AZ: + case SAT_LIST_COL_EL: + case SAT_LIST_COL_RA: + case SAT_LIST_COL_DEC: + case SAT_LIST_COL_MA: + case SAT_LIST_COL_PHASE: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + degree_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + /* LAT/LON format */ + case SAT_LIST_COL_LAT: + case SAT_LIST_COL_LON: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + latlon_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + /* distances and velocities */ + case SAT_LIST_COL_RANGE: + case SAT_LIST_COL_ALT: + case SAT_LIST_COL_FOOTPRINT: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + distance_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_VEL: + case SAT_LIST_COL_RANGE_RATE: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + range_rate_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_DOPPLER: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + float_to_int_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_DELAY: + case SAT_LIST_COL_LOSS: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + two_dec_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + case SAT_LIST_COL_AOS: + case SAT_LIST_COL_LOS: + gtk_tree_view_column_set_cell_data_func (column, + renderer, + event_cell_data_function, + GUINT_TO_POINTER (i), + NULL); + break; + + default: + break; + + } + +} + + +/* render column containg lat/lon + by using this instead of the default data function, we can + control the number of decimals and display the coordinates in a + fancy way, including degree sign and NWSE suffixes. + + Please note that this function only affects how the numbers are + displayed (rendered), the tree_store will still contain the + original flaoting point numbers. Very cool! +*/ +static void +latlon_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number = 0.0; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + gchar hmf = ' '; + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* check whether configuration requests the use + of N, S, E and W instead of signs + */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_NSEW)) { + + if (coli == SAT_LIST_COL_LAT) { + if (number < 0.00) { + number = -number; + hmf = 'S'; + } + else { + hmf = 'N'; + } + } + else if (coli == SAT_LIST_COL_LON) { + if (number < 0.00) { + number = -number; + hmf = 'W'; + } + else { + hmf = 'E'; + } + } + else { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Invalid column: %d"), + __FILE__, __LINE__, + coli); + hmf = '?'; + } + } + + /* format the number */ + buff = g_strdup_printf ("%.2f\302\260%c", number, hmf); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + + +/* general floats with 2 digits + degree char */ +static void +degree_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.2f\302\260", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + + +/* distance and velocity, 0 decimal digits */ +static void +distance_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* convert distance to miles? */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { + number = KM_TO_MI(number); + } + + /* format the number */ + buff = g_strdup_printf ("%.0f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + +/* range rate is special, because we may need to convert to miles + and want 2-3 decimal digits. +*/ +static void +range_rate_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* convert distance to miles? */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) { + number = KM_TO_MI(number); + } + + /* format the number */ + buff = g_strdup_printf ("%.3f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + +/* 0 decimal digits */ +static void +float_to_int_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.0f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + +/* 2 decimal digits */ +static void +two_dec_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar *buff; + guint coli = GPOINTER_TO_UINT (column); + + gtk_tree_model_get (model, iter, coli, &number, -1); + + /* format the number */ + buff = g_strdup_printf ("%.2f", number); + g_object_set (renderer, + "text", buff, + NULL); + g_free (buff); +} + + +/* AOS/LOS; convert julian date to string */ +static void +event_cell_data_function (GtkTreeViewColumn *col, + GtkCellRenderer *renderer, + GtkTreeModel *model, + GtkTreeIter *iter, + gpointer column) +{ + gdouble number; + gchar buff[TIME_FORMAT_MAX_LENGTH]; + gchar *fmtstr; + guint coli = GPOINTER_TO_UINT (column); + time_t t; + guint size; + + + gtk_tree_model_get (model, iter, coli, &number, -1); + + if (number == 0.0) { + g_object_set (renderer, + "text", "--- N/A ---", + NULL); + } + else { + + /* convert julian date to struct tm */ + t = (number - 2440587.5)*86400.; + + /* format the number */ + fmtstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT); + + /* format either local time or UTC depending on check box */ + if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_LOCAL_TIME)) + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, fmtstr, localtime (&t)); + else + size = strftime (buff, TIME_FORMAT_MAX_LENGTH, fmtstr, gmtime (&t)); + + if (size == 0) + /* size > TIME_FORMAT_MAX_LENGTH */ + buff[TIME_FORMAT_MAX_LENGTH-1] = '\0'; + + g_object_set (renderer, + "text", buff, + NULL); + + g_free (fmtstr); + } + +} + + +/** \brief Function to compare to Event cells. + * \param model Pointer to the GtkTreeModel. + * \param a Pointer to the first element. + * \param b Pointer to the second element. + * \param user_data Always NULL (TBC). + * \return See detailed description. + * + * This function is used by the SatList sort function to determine whether + * AOS/LOS cell a is greater than b or not. The cells a and b contain the + * time of the event in Julian days, thus the result can be computed by a + * simple comparison between the two numbers contained in the cells. + * + * The function returns -1 if a < b; +1 if a > b; 0 otherwise. + */ +static gint event_cell_compare_function (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer user_data) +{ + gint result; + gdouble ta,tb; + gint sort_col; + GtkSortType sort_type; + + + /* Since this function is used for both AOS and LOS columns, + we need to get the sort column */ + gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (model), + &sort_col, + &sort_type); + + /* get a and b */ + gtk_tree_model_get (model, a, sort_col, &ta, -1); + gtk_tree_model_get (model, b, sort_col, &tb, -1); + + if (ta < tb) { + result = -1; + } + else if (ta > tb) { + result = 1; + } + else { + result = 0; + } + + return result; +} + + +/** \brief Reload configuration */ +void +gtk_sat_list_reconf (GtkWidget *widget, GKeyFile *cfgdat) +{ + sat_log_log (SAT_LOG_LEVEL_WARN, _("%s: FIXME I am not implemented")); +} + + + +/** \brief Manage "popup-menu" events. + * \param treeview The tree view in the GtkSatList widget + * \param list Pointer to the GtkSatList widget. + * + * This function is called when the "popup-menu" signal is emitted. This + * usually happens if the user presses SHJIFT-F10? It is used as a wrapper + * for the function that actually creates the popup menu. + */ +static gboolean +popup_menu_cb (GtkWidget *treeview, gpointer list) +{ + + /* if there is no selection, select the first row */ + + + view_popup_menu (treeview, NULL, list); + + return TRUE; /* we handled this */ +} + + +/** \brief Manage button press events. + * \param treeview The tree view in the GtkSatList widget. + * \param event The event received. + * \param list Pointer to the GtkSatList widget. + * + */ +static gboolean +button_press_cb (GtkWidget *treeview, GdkEventButton *event, gpointer list) +{ + + /* single click with the right mouse button? */ + if (event->type == GDK_BUTTON_PRESS && event->button == 3) { + + /* optional: select row if no row is selected or only + * one other row is selected (will only do something + * if you set a tree selection mode as described later + * in the tutorial) */ + if (1) { + GtkTreeSelection *selection; + + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); + + /* Note: gtk_tree_selection_count_selected_rows() does not + * exist in gtk+-2.0, only in gtk+ >= v2.2 ! */ + if (gtk_tree_selection_count_selected_rows (selection) <= 1) { + GtkTreePath *path; + + /* Get tree path for row that was clicked */ + if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (treeview), + (gint) event->x, + (gint) event->y, + &path, NULL, NULL, NULL)) { + gtk_tree_selection_unselect_all (selection); + gtk_tree_selection_select_path (selection, path); + gtk_tree_path_free (path); + } + } + } /* end of optional bit */ + + view_popup_menu (treeview, event, list); + + return TRUE; /* we handled this */ + } + + return FALSE; /* we did not handle this */ +} + + +static void +view_popup_menu (GtkWidget *treeview, GdkEventButton *event, gpointer list) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + guint *catnum; + sat_t *sat; + + catnum = g_new0 (guint, 1); + + /* get selected satellite */ + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview)); + if (gtk_tree_selection_get_selected (selection, &model, &iter)) { + + + gtk_tree_model_get (model, &iter, + SAT_LIST_COL_CATNUM, catnum, + -1); + + sat = SAT (g_hash_table_lookup (GTK_SAT_LIST (list)->satellites, catnum)); + + if (sat == NULL) { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d Failed to get data for %d."), + __FILE__, __LINE__, catnum); + + } + else { + gtk_sat_list_popup_exec (sat, GTK_SAT_LIST (list)->qth, event, + GTK_SAT_LIST (list)); + } + + + } + else { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: There is no selection; skip popup."), + __FILE__, __LINE__); + } + + g_free (catnum); +} + + +/*** FIXME: formalise with other copies, only need az,el and jul_utc */ +static void +Calculate_RADec (sat_t *sat, qth_t *qth, obs_astro_t *obs_set) +{ + /* Reference: Methods of Orbit Determination by */ + /* Pedro Ramon Escobal, pp. 401-402 */ + + double phi,theta,sin_theta,cos_theta,sin_phi,cos_phi, + az,el,Lxh,Lyh,Lzh,Sx,Ex,Zx,Sy,Ey,Zy,Sz,Ez,Zz, + Lx,Ly,Lz,cos_delta,sin_alpha,cos_alpha; + geodetic_t geodetic; + + + geodetic.lon = qth->lon * de2ra; + geodetic.lat = qth->lat * de2ra; + geodetic.alt = qth->alt / 1000.0; + geodetic.theta = 0; + + + + az = sat->az * de2ra; + el = sat->el * de2ra; + phi = geodetic.lat; + theta = FMod2p(ThetaG_JD(sat->jul_utc) + geodetic.lon); + sin_theta = sin(theta); + cos_theta = cos(theta); + sin_phi = sin(phi); + cos_phi = cos(phi); + Lxh = -cos(az) * cos(el); + Lyh = sin(az) * cos(el); + Lzh = sin(el); + Sx = sin_phi * cos_theta; + Ex = -sin_theta; + Zx = cos_theta * cos_phi; + Sy = sin_phi * sin_theta; + Ey = cos_theta; + Zy = sin_theta*cos_phi; + Sz = -cos_phi; + Ez = 0; + Zz = sin_phi; + Lx = Sx*Lxh + Ex * Lyh + Zx*Lzh; + Ly = Sy*Lxh + Ey * Lyh + Zy*Lzh; + Lz = Sz*Lxh + Ez * Lyh + Zz*Lzh; + obs_set->dec = ArcSin(Lz); /* Declination (radians)*/ + cos_delta = sqrt(1 - Sqr(Lz)); + sin_alpha = Ly / cos_delta; + cos_alpha = Lx / cos_delta; + obs_set->ra = AcTan(sin_alpha,cos_alpha); /* Right Ascension (radians)*/ + obs_set->ra = FMod2p(obs_set->ra); + +} + + + + +/** \brief Reload reference to satellites (e.g. after TLE update). */ +void +gtk_sat_list_reload_sats (GtkWidget *satlist, GHashTable *sats) +{ + GTK_SAT_LIST (satlist)->satellites = sats; +} Added: trunk/src/gtk-event-list.h =================================================================== --- trunk/src/gtk-event-list.h (rev 0) +++ trunk/src/gtk-event-list.h 2009-11-29 16:07:38 UTC (rev 529) @@ -0,0 +1,119 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef __GTK_EVENT_LIST_H__ +#define __GTK_EVENT_LIST_H__ 1 + +#include <glib.h> +#include <glib/gi18n.h> +#include <gdk/gdk.h> +#include <gtk/gtkvbox.h> +#include "gtk-sat-data.h" + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +#define GTK_TYPE_EVENT_LIST (gtk_EVENT_list_get_type ()) +#define GTK_EVENT_LIST(obj) GTK_CHECK_CAST (obj,\ + gtk_event_list_get_type (),\ + GtkEventList) + +#define GTK_EVENT_LIST_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\ + gtk_event_list_get_type (),\ + GtkEventListClass) + +#define IS_GTK_EVENT_LIST(obj) GTK_CHECK_TYPE (obj, gtk_event_list_get_type ()) + + +typedef struct _gtk_event_list GtkEventList; +typedef struct _GtkEventListClass GtkEventListClass; + + +struct _gtk_event_list +{ + GtkVBox vbox; + + GtkWidget *treeview; /*!< the tree view itself */ + GtkWidget *swin; /*!< scrolled window */ + + GHashTable *satellites; /*!< Satellites. */ + qth_t *qth; /*!< Pointer to current location. */ + + guint32 flags; /*!< Flags indicating which columns are visible */ + guint refresh; /*!< Refresh rate, ie. how many cycles should pass between updates */ + guint counter; /*!< cycle counter */ + + gdouble tstamp; /*!< time stamp of calculations; set by GtkSatModule */ + + void (* update) (GtkWidget *widget); /*!< update function */ +}; + +struct _GtkEventListClass +{ + GtkVBoxClass parent_class; +}; + + +/** \brief Symbolic references to columns */ +typedef enum { + EVENT_LIST_COL_NAME = 0, /*!< Satellite name. */ + EVENT_LIST_COL_CATNUM, /*!< Catalogue number. */ + EVENT_LIST_COL_EVT, /*!< Next event (AOS or LOS). */ + EVENT_LIST_COL_TIME, /*!< Time countdown. */ + EVENT_LIST_COL_NUMBER +} event_list_col_t; + + + +/** \brief Column Flags */ +typedef enum { + EVENT_LIST_FLAG_NAME = 1 << EVENT_LIST_COL_NAME, /*!< Satellite name. */ + EVENT_LIST_FLAG_CATNUM = 1 << EVENT_LIST_COL_CATNUM, + EVENT_LIST_FLAG_EVT = 1 << EVENT_LIST_COL_EVT, /*!< Next event (AOS or LOS) */ + EVENT_LIST_FLAG_TIME = 1 << EVENT_LIST_COL_TIME, /*!< Time countdown */ +} event_list_flag_t; + + +GtkType gtk_event_list_get_type (void); +GtkWidget* gtk_event_list_new (GKeyFile *cfgdata, + GHashTable *sats, + qth_t *qth, + guint32 columns); +void gtk_event_list_update (GtkWidget *widget); +void gtk_event_list_reconf (GtkWidget *widget, GKeyFile *cfgdat); + +void gtk_event_list_reload_sats (GtkWidget *satlist, GHashTable *sats); + + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* __GTK_SAT_MODULE_H__ */ Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2009-11-29 12:36:54 UTC (rev 528) +++ trunk/src/gtk-sat-module.h 2009-11-29 16:07:38 UTC (rev 529) @@ -49,20 +49,22 @@ /** \brief Module layout */ -typedef enum { - GTK_SAT_MOD_LAYOUT_1 = 0, /*!< one view */ - GTK_SAT_MOD_LAYOUT_2, /*!< Two views, one above the other */ - GTK_SAT_MOD_LAYOUT_3, /*!< Three views, big one on top, two small one at bottom */ - GTK_SAT_MOD_LAYOUT_4 /*!< Three views, big one on bottom, small ones on top */ -} gtk_sat_mod_layout_t; +//typedef enum { +// GTK_SAT_MOD_LAYOUT_1 = 0, /*!< one view */ +// GTK_SAT_MOD_LAYOUT_2, /*!< Two views, one above the other */ +// GTK_SAT_MOD_LAYOUT_3, /*!< Three views, big one on top, two small one at bottom */ +// GTK_SAT_MOD_LAYOUT_4 /*!< Three views, big one on bottom, small ones on top */ +//} gtk_sat_mod_layout_t; + /** \brief View types */ typedef enum { GTK_SAT_MOD_VIEW_LIST = 0, /*!< GtkSatList */ GTK_SAT_MOD_VIEW_MAP, /*!< GtkSatMap */ GTK_SAT_MOD_VIEW_POLAR, /*!< GtkPolarView */ GTK_SAT_MOD_VIEW_SINGLE, /*!< GtkSingleSat */ + GTK_SAT_MOD_VIEW_EVENT, /*!< GtkEventList */ GTK_SAT_MOD_VIEW_NUM, /*!< Number of modules */ } gtk_sat_mod_view_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-29 12:37:03
|
Revision: 528 http://gpredict.svn.sourceforge.net/gpredict/?rev=528&view=rev Author: csete Date: 2009-11-29 12:36:54 +0000 (Sun, 29 Nov 2009) Log Message: ----------- Updated frequency for Sumbandila. Modified Paths: -------------- trunk/data/trsp/35870.trsp Modified: trunk/data/trsp/35870.trsp =================================================================== --- trunk/data/trsp/35870.trsp 2009-11-22 23:56:30 UTC (rev 527) +++ trunk/data/trsp/35870.trsp 2009-11-29 12:36:54 UTC (rev 528) @@ -1,7 +1,7 @@ [Mode V/U FM] -DOWN_LOW=435350000 -UP_LOW=145880000 -MODE=FM +DOWN_LOW=435345000 +UP_LOW=145875000 +MODE=FMN [Voice Beacon] DOWN_LOW=435300000 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-22 23:56:39
|
Revision: 527 http://gpredict.svn.sourceforge.net/gpredict/?rev=527&view=rev Author: csete Date: 2009-11-22 23:56:30 +0000 (Sun, 22 Nov 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/ChangeLog Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-22 22:45:34 UTC (rev 526) +++ trunk/ChangeLog 2009-11-22 23:56:30 UTC (rev 527) @@ -1,11 +1,24 @@ +2009-11-22 Alexandru Csete <oz9aec at gmail.com> + + * src/sat-cfg.c: + Minor formatting fixes. + + * src/sat-pref-layout.c: + First working version of the new layout configurator. + + * src/gtk-polar-view.c + * src/gtk-sat-map.c: + Changed default sized to allow scaling down to 100x100 grid cell size. + + 2009-11-19 Alexandru Csete <oz9aec at gmail.com> - * src/gtk-sat-module.[ch]: - * src/gtk-sat-module-popup.c: - * src/menuibar.c: - * src/mod-mgr.c: - Implemented new grid-based layout engine for GtkSatModule - (engine only, config is still TBD). + * src/gtk-sat-module.[ch]: + * src/gtk-sat-module-popup.c: + * src/menuibar.c: + * src/mod-mgr.c: + Implemented new grid-based layout engine for GtkSatModule + (engine only, config is still TBD). 2009-11-18 Alexandru Csete <oz9aec at gmail.com> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-22 22:45:42
|
Revision: 526 http://gpredict.svn.sourceforge.net/gpredict/?rev=526&view=rev Author: csete Date: 2009-11-22 22:45:34 +0000 (Sun, 22 Nov 2009) Log Message: ----------- Changed default sized to allow scaling down to 100x100 grid cell size. Modified Paths: -------------- trunk/src/gtk-polar-view.c trunk/src/gtk-sat-map.c Modified: trunk/src/gtk-polar-view.c =================================================================== --- trunk/src/gtk-polar-view.c 2009-11-22 22:31:10 UTC (rev 525) +++ trunk/src/gtk-polar-view.c 2009-11-22 22:45:34 UTC (rev 526) @@ -47,7 +47,7 @@ -#define POLV_DEFAULT_SIZE 300 +#define POLV_DEFAULT_SIZE 100 #define POLV_DEFAULT_MARGIN 25 /* extra size for line outside 0 deg circle (inside margin) */ Modified: trunk/src/gtk-sat-map.c =================================================================== --- trunk/src/gtk-sat-map.c 2009-11-22 22:31:10 UTC (rev 525) +++ trunk/src/gtk-sat-map.c 2009-11-22 22:45:34 UTC (rev 526) @@ -313,8 +313,8 @@ root = goo_canvas_group_model_new (NULL, NULL); /* map dimensions */ - satmap->width = gdk_pixbuf_get_width (satmap->origmap); - satmap->height = gdk_pixbuf_get_height (satmap->origmap); + satmap->width = 200; // was: gdk_pixbuf_get_width (satmap->origmap); + satmap->height = 100; // was: gdk_pixbuf_get_height (satmap->origmap); satmap->x0 = 0; satmap->y0 = 0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-22 22:31:35
|
Revision: 525 http://gpredict.svn.sourceforge.net/gpredict/?rev=525&view=rev Author: csete Date: 2009-11-22 22:31:10 +0000 (Sun, 22 Nov 2009) Log Message: ----------- first working version of the new layout configurator. Modified Paths: -------------- trunk/src/sat-cfg.c trunk/src/sat-pref-layout.c Modified: trunk/src/sat-cfg.c =================================================================== --- trunk/src/sat-cfg.c 2009-11-21 16:56:40 UTC (rev 524) +++ trunk/src/sat-cfg.c 2009-11-22 22:31:10 UTC (rev 525) @@ -305,8 +305,7 @@ * This function saves the configuration data currently stored in * memory to the gpredict.cfg file. */ -guint - sat_cfg_save () +guint sat_cfg_save () { gsize length; gsize written; @@ -396,8 +395,7 @@ * is called again. This function should only be called when the * program exits. */ -void - sat_cfg_close () +void sat_cfg_close () { if (config != NULL) { g_key_file_free (config); @@ -448,8 +446,7 @@ } /** \brief Get default value of boolean parameter */ -gboolean - sat_cfg_get_bool_def (sat_cfg_bool_e param) +gboolean sat_cfg_get_bool_def (sat_cfg_bool_e param) { gboolean value = FALSE; @@ -472,8 +469,7 @@ * This function stores a boolean configuration value in the configuration * table. */ -void - sat_cfg_set_bool (sat_cfg_bool_e param, gboolean value) +void sat_cfg_set_bool (sat_cfg_bool_e param, gboolean value) { if (param < SAT_CFG_BOOL_NUM) { @@ -529,8 +525,7 @@ * * Return a newly allocated gchar * which must be freed when no longer needed. */ -gchar * - sat_cfg_get_str (sat_cfg_str_e param) +gchar *sat_cfg_get_str (sat_cfg_str_e param) { gchar *value; GError *error = NULL; @@ -575,8 +570,7 @@ * * Returns a newly allocated gchar * which must be freed when no longer needed. */ -gchar * - sat_cfg_get_str_def (sat_cfg_str_e param) +gchar *sat_cfg_get_str_def (sat_cfg_str_e param) { gchar *value; @@ -596,8 +590,7 @@ /** \brief Store a str configuration value. */ -void - sat_cfg_set_str (sat_cfg_str_e param, const gchar *value) +void sat_cfg_set_str (sat_cfg_str_e param, const gchar *value) { if (param < SAT_CFG_STR_NUM) { @@ -632,8 +625,7 @@ } -void - sat_cfg_reset_str (sat_cfg_str_e param) +void sat_cfg_reset_str (sat_cfg_str_e param) { if (param < SAT_CFG_STR_NUM) { @@ -658,8 +650,7 @@ } } -gint - sat_cfg_get_int (sat_cfg_int_e param) +gint sat_cfg_get_int (sat_cfg_int_e param) { gint value = 0; GError *error = NULL; @@ -699,8 +690,7 @@ } -gint - sat_cfg_get_int_def (sat_cfg_int_e param) +gint sat_cfg_get_int_def (sat_cfg_int_e param) { gint value = 0; @@ -717,8 +707,7 @@ } -void - sat_cfg_set_int (sat_cfg_int_e param, gint value) +void sat_cfg_set_int (sat_cfg_int_e param, gint value) { if (param < SAT_CFG_INT_NUM) { @@ -743,8 +732,7 @@ } -void - sat_cfg_reset_int (sat_cfg_int_e param) +void sat_cfg_reset_int (sat_cfg_int_e param) { if (param < SAT_CFG_INT_NUM) { Modified: trunk/src/sat-pref-layout.c =================================================================== --- trunk/src/sat-pref-layout.c 2009-11-21 16:56:40 UTC (rev 524) +++ trunk/src/sat-pref-layout.c 2009-11-22 22:31:10 UTC (rev 525) @@ -40,32 +40,28 @@ -static gtk_sat_mod_layout_t layout = 0; static gboolean dirty = FALSE; static gboolean reset = FALSE; - -/* combo boxes for view seelctors */ -static GtkWidget *combo1,*combo2,*combo3; - -/* radio buttons for layout selector */ -static GtkWidget *but1,*but2,*but3,*but4; - /* check boxes for window positioning */ static GtkWidget *mwin,*mod,*state; +/* Text entry for layout string */ +static GtkWidget *gridstr; +/* private functions */ static void create_layout_selector (GKeyFile *cfg, GtkTable *table); static void layout_selected_cb (GtkToggleButton *but, gpointer data); -static void create_view_selectors (GKeyFile *cfg, GtkTable *table); static void create_window_placement (GtkBox *vbox); static void create_reset_button (GKeyFile *cfg, GtkBox *vbox); static GtkWidget *create_combo (void); static void combo_changed_cb (GtkComboBox *widget, gpointer data); static void reset_cb (GtkWidget *button, gpointer cfg); static void window_pos_toggle_cb (GtkWidget *toggle, gpointer data); +static void layout_code_changed (GtkWidget *widget, gpointer data); + /** \brief Create and initialise widgets for the layout view preferences tab. * * The widgets must be preloaded with values from config. If a config value @@ -90,18 +86,10 @@ /* separator */ gtk_table_attach (GTK_TABLE (table), gtk_hseparator_new (), - 0, 5, 2, 3, + 0, 5, 3, 4, GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0); - /* view selectors */ - create_view_selectors (cfg, GTK_TABLE (table)); - /* separator */ - gtk_table_attach (GTK_TABLE (table), - gtk_hseparator_new (), - 0, 5, 7, 8, - GTK_FILL | GTK_EXPAND, GTK_SHRINK, 0, 0); - /* create vertical box */ vbox = gtk_vbox_new (FALSE, 5); gtk_container_set_border_width (GTK_CONTAINER (vbox), 20); @@ -125,48 +113,33 @@ /** \brief User pressed cancel. Any changes to config must be cancelled. */ -void -sat_pref_layout_cancel (GKeyFile *cfg) +void sat_pref_layout_cancel (GKeyFile *cfg) { - layout = sat_cfg_get_int (SAT_CFG_INT_MODULE_LAYOUT); + gchar *str; + + str = sat_cfg_get_str (SAT_CFG_STR_MODULE_GRID); + gtk_entry_set_text (GTK_ENTRY (gridstr), str); + g_free (str); + dirty = FALSE; } /** \brief User pressed OK. Any changes should be stored in config. */ -void -sat_pref_layout_ok (GKeyFile *cfg) +void sat_pref_layout_ok (GKeyFile *cfg) { if (dirty) { /* we have new settings */ if (cfg != NULL) { - g_key_file_set_integer (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_LAYOUT, - layout); - g_key_file_set_integer (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_1, - gtk_combo_box_get_active (GTK_COMBO_BOX (combo1))); - g_key_file_set_integer (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_2, - gtk_combo_box_get_active (GTK_COMBO_BOX (combo2))); - g_key_file_set_integer (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_3, - gtk_combo_box_get_active (GTK_COMBO_BOX (combo3))); - + g_key_file_set_string (cfg, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_GRID, + gtk_entry_get_text (GTK_ENTRY (gridstr))); } else { - sat_cfg_set_int (SAT_CFG_INT_MODULE_LAYOUT, layout); - sat_cfg_set_int (SAT_CFG_INT_MODULE_VIEW_1, - gtk_combo_box_get_active (GTK_COMBO_BOX (combo1))); - sat_cfg_set_int (SAT_CFG_INT_MODULE_VIEW_2, - gtk_combo_box_get_active (GTK_COMBO_BOX (combo2))); - sat_cfg_set_int (SAT_CFG_INT_MODULE_VIEW_3, - gtk_combo_box_get_active (GTK_COMBO_BOX (combo3))); + sat_cfg_set_str (SAT_CFG_STR_MODULE_GRID, + gtk_entry_get_text (GTK_ENTRY (gridstr))); sat_cfg_set_bool (SAT_CFG_BOOL_MAIN_WIN_POS, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (mwin))); sat_cfg_set_bool (SAT_CFG_BOOL_MOD_WIN_POS, @@ -180,13 +153,8 @@ /* we have to reset the values to global or default settings */ if (cfg == NULL) { - /* views */ - sat_cfg_reset_int (SAT_CFG_INT_MODULE_VIEW_1); - sat_cfg_reset_int (SAT_CFG_INT_MODULE_VIEW_2); - sat_cfg_reset_int (SAT_CFG_INT_MODULE_VIEW_3); - /* layout */ - sat_cfg_reset_int (SAT_CFG_INT_MODULE_LAYOUT); + sat_cfg_reset_str (SAT_CFG_STR_MODULE_GRID); /* window placement */ sat_cfg_reset_bool (SAT_CFG_BOOL_MAIN_WIN_POS); @@ -194,26 +162,10 @@ sat_cfg_reset_bool (SAT_CFG_BOOL_MOD_STATE); } else { - - /* layout views */ - g_key_file_remove_key ((GKeyFile *)(cfg), - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_1, - NULL); - g_key_file_remove_key ((GKeyFile *)(cfg), - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_2, - NULL); - g_key_file_remove_key ((GKeyFile *)(cfg), - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_3, - NULL); - - /* layout */ - g_key_file_remove_key ((GKeyFile *)(cfg), - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_LAYOUT, - NULL); + g_key_file_remove_key ((GKeyFile *)(cfg), + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_GRID, + NULL); } } @@ -223,10 +175,10 @@ /** \brief Create layout selector. */ -static void -create_layout_selector (GKeyFile *cfg, GtkTable *table) +static void create_layout_selector (GKeyFile *cfg, GtkTable *table) { GtkWidget *label; + gchar *buffer; GtkWidget *image; gchar *fname; @@ -234,96 +186,42 @@ label = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_label_set_markup (GTK_LABEL (label), - _("<b>Default Layout:</b>")); + _("<b>Select Layout:</b>")); gtk_table_attach (GTK_TABLE (table), label, 0, 2, 0, 1, GTK_FILL, GTK_SHRINK, 0, 0); - /* layout 1 */ - but1 = gtk_radio_button_new (NULL); - gtk_table_attach (table, but1, 0, 1, 1, 2, - GTK_SHRINK, GTK_SHRINK, 0, 0); - fname = icon_file_name ("gpredict-layout-1.png"); - image = gtk_image_new_from_file (fname); - g_free (fname); - gtk_container_add (GTK_CONTAINER (but1), image); + /* layout string */ + label = gtk_label_new (_("Layout code:")); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + gtk_table_attach (GTK_TABLE (table), label, 0, 1, 2, 3, + GTK_SHRINK | GTK_FILL, GTK_EXPAND | GTK_FILL, 5, 0); - /* layout 2 */ - but2 = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (but1)); - gtk_table_attach (table, but2, 1, 2, 1, 2, - GTK_SHRINK, GTK_SHRINK, 0, 0); - fname = icon_file_name ("gpredict-layout-2.png"); - image = gtk_image_new_from_file (fname); - g_free (fname); - gtk_container_add (GTK_CONTAINER (but2), image); + if (cfg != NULL) { + buffer = mod_cfg_get_str (cfg, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_GRID, + SAT_CFG_STR_MODULE_GRID); + } + else { + buffer = sat_cfg_get_str (SAT_CFG_STR_MODULE_GRID); + } - /* layout 3 */ - but3 = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (but1)); - gtk_table_attach (table, but3, 2, 3, 1, 2, - GTK_SHRINK, GTK_SHRINK, 0, 0); - fname = icon_file_name ("gpredict-layout-3.png"); - image = gtk_image_new_from_file (fname); - g_free (fname); - gtk_container_add (GTK_CONTAINER (but3), image); + gridstr = gtk_entry_new (); + gtk_entry_set_text (GTK_ENTRY (gridstr), buffer); + g_free (buffer); - /* layout 4 */ - but4 = gtk_radio_button_new_from_widget (GTK_RADIO_BUTTON (but1)); - gtk_table_attach (table, but4, 3, 4, 1, 2, - GTK_SHRINK, GTK_SHRINK, 0, 0); - fname = icon_file_name ("gpredict-layout-4.png"); - image = gtk_image_new_from_file (fname); - g_free (fname); - gtk_container_add (GTK_CONTAINER (but4), image); + gtk_widget_set_tooltip_text (gridstr, + _("This entry holds the layout code for the module.\n"\ + "Consult the user manual for how to create custom layouts "\ + "using layout codes.")); - /* select current layout */ - if (cfg != NULL) { - layout = mod_cfg_get_int (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_LAYOUT, - SAT_CFG_INT_MODULE_LAYOUT); - } - else { - layout = sat_cfg_get_int (SAT_CFG_INT_MODULE_LAYOUT); - } + /* connect changed signal handler */ + g_signal_connect (gridstr, "changed", G_CALLBACK (layout_code_changed), NULL); - switch (layout) { + gtk_table_attach_defaults (GTK_TABLE (table), gridstr, 1, 2, 2, 3); - case GTK_SAT_MOD_LAYOUT_1: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but1), TRUE); - break; - case GTK_SAT_MOD_LAYOUT_2: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but2), TRUE); - break; - - case GTK_SAT_MOD_LAYOUT_3: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but3), TRUE); - break; - - case GTK_SAT_MOD_LAYOUT_4: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but4), TRUE); - break; - - default: - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s: Invalid module layout (%d)"), - __FUNCTION__, layout); - break; - } - - /* connect radio button signals */ - g_signal_connect (but1, "toggled", - G_CALLBACK (layout_selected_cb), - GINT_TO_POINTER (GTK_SAT_MOD_LAYOUT_1)); - g_signal_connect (but2, "toggled", - G_CALLBACK (layout_selected_cb), - GINT_TO_POINTER (GTK_SAT_MOD_LAYOUT_2)); - g_signal_connect (but3, "toggled", - G_CALLBACK (layout_selected_cb), - GINT_TO_POINTER (GTK_SAT_MOD_LAYOUT_3)); - g_signal_connect (but4, "toggled", - G_CALLBACK (layout_selected_cb), - GINT_TO_POINTER (GTK_SAT_MOD_LAYOUT_4)); } /** \brief Callback to manage radio button clicks. @@ -333,174 +231,19 @@ * newly selected radio button and the de-selected radio button. It must * therefore check whether the button is currently active or not */ -static void -layout_selected_cb (GtkToggleButton *but, gpointer data) +static void layout_selected_cb (GtkToggleButton *but, gpointer data) { - - /* update layout if this button is selected */ - if (gtk_toggle_button_get_active (but)) { - layout = GPOINTER_TO_INT (data); - dirty = TRUE; - /* enable/disable combos */ - switch (layout) { - - case GTK_SAT_MOD_LAYOUT_1: - gtk_widget_set_sensitive (combo2, FALSE); - gtk_widget_set_sensitive (combo3, FALSE); - break; - - case GTK_SAT_MOD_LAYOUT_2: - gtk_widget_set_sensitive (combo2, TRUE); - gtk_widget_set_sensitive (combo3, FALSE); - break; - - default: - gtk_widget_set_sensitive (combo2, TRUE); - gtk_widget_set_sensitive (combo3, TRUE); - break; - } - - } } -/** \brief Create view selectors. - * \param cfg Config data or NULL in global mode. - * \param table The container. - * - * This function creates and sets up the view selector combos. - */ -static void create_view_selectors (GKeyFile *cfg, GtkTable *table) -{ - GtkWidget *label; - gint idx; - /* create header */ - label = gtk_label_new (NULL); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_label_set_markup (GTK_LABEL (label), - _("<b>Views:</b>")); - gtk_table_attach (table, label, 0, 2, 3, 4, - GTK_FILL, GTK_SHRINK, 0, 0); - - /* labels */ - label = gtk_label_new (_("View 1:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (table, label, 0, 1, 4, 5, - GTK_FILL, GTK_SHRINK, 0, 0); - - label = gtk_label_new (_("View 2:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (table, label, 0, 1, 5, 6, - GTK_FILL, GTK_SHRINK, 0, 0); - - label = gtk_label_new (_("View 3:")); - gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); - gtk_table_attach (table, label, 0, 1, 6, 7, - GTK_FILL, GTK_SHRINK, 0, 0); - - /* combo boxes */ - combo1 = create_combo (); - if (cfg != NULL) { - idx = mod_cfg_get_int (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_1, - SAT_CFG_INT_MODULE_VIEW_1); - } - else { - idx = sat_cfg_get_int (SAT_CFG_INT_MODULE_VIEW_1); - } - gtk_combo_box_set_active (GTK_COMBO_BOX (combo1), idx); - gtk_table_attach (table, combo1, 1, 2, 4, 5, - GTK_FILL, GTK_SHRINK, 0, 0); - g_signal_connect (combo1, "changed", G_CALLBACK (combo_changed_cb), NULL); - - combo2 = create_combo (); - if (cfg != NULL) { - idx = mod_cfg_get_int (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_2, - SAT_CFG_INT_MODULE_VIEW_2); - } - else { - idx = sat_cfg_get_int (SAT_CFG_INT_MODULE_VIEW_2); - } - gtk_combo_box_set_active (GTK_COMBO_BOX (combo2), idx); - gtk_table_attach (table, combo2, 1, 2, 5, 6, - GTK_FILL, GTK_SHRINK, 0, 0); - g_signal_connect (combo2, "changed", G_CALLBACK (combo_changed_cb), NULL); - - combo3 = create_combo (); - if (cfg != NULL) { - idx = mod_cfg_get_int (cfg, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_VIEW_3, - SAT_CFG_INT_MODULE_VIEW_3); - } - else { - idx = sat_cfg_get_int (SAT_CFG_INT_MODULE_VIEW_3); - } - gtk_combo_box_set_active (GTK_COMBO_BOX (combo3), idx); - gtk_table_attach (table, combo3, 1, 2, 6, 7, - GTK_FILL, GTK_SHRINK, 0, 0); - g_signal_connect (combo3, "changed", G_CALLBACK (combo_changed_cb), NULL); - - /* enable/disable combos */ - switch (layout) { - - case GTK_SAT_MOD_LAYOUT_1: - gtk_widget_set_sensitive (combo2, FALSE); - gtk_widget_set_sensitive (combo3, FALSE); - break; - - case GTK_SAT_MOD_LAYOUT_2: - gtk_widget_set_sensitive (combo2, TRUE); - gtk_widget_set_sensitive (combo3, FALSE); - break; - - default: - gtk_widget_set_sensitive (combo2, TRUE); - gtk_widget_set_sensitive (combo3, TRUE); - break; - } -} - - -/** \brief Convenience function for creatring combo boxes - * - * note: texts must correspond to the order of gtk_sat_mod_view_t - */ -static GtkWidget * -create_combo (void) -{ - GtkWidget *combo; - - combo = gtk_combo_box_new_text (); - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("List View")); - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Map View")); - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Polar View")); - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Single Sat")); - - - return combo; -} - -static void -combo_changed_cb (GtkComboBox *widget, gpointer data) -{ - dirty = TRUE; -} - - - /** \brief Create window placement widgets. * \param vbox The GtkVBox into which the widgets should be packed. * */ -static void -create_window_placement (GtkBox *vbox) +static void create_window_placement (GtkBox *vbox) { GtkWidget *label; GtkTooltips *tips; @@ -565,8 +308,7 @@ * * This function creates and sets up the RESET button. */ -static void -create_reset_button (GKeyFile *cfg, GtkBox *vbox) +static void create_reset_button (GKeyFile *cfg, GtkBox *vbox) { GtkWidget *button; GtkWidget *butbox; @@ -607,66 +349,26 @@ * in "local" mode (when cfg != NULL) the function will reset the module settings to * the global settings. This is done by removing the corresponding key from the GKeyFile. */ -static void -reset_cb (GtkWidget *button, gpointer cfg) +static void reset_cb (GtkWidget *button, gpointer cfg) { gint idx; + gchar *buffer; /* views */ if (cfg == NULL) { /* global mode, get defaults */ - idx = sat_cfg_get_int_def (SAT_CFG_INT_MODULE_VIEW_1); - gtk_combo_box_set_active (GTK_COMBO_BOX (combo1), idx); - idx = sat_cfg_get_int_def (SAT_CFG_INT_MODULE_VIEW_2); - gtk_combo_box_set_active (GTK_COMBO_BOX (combo2), idx); - idx = sat_cfg_get_int_def (SAT_CFG_INT_MODULE_VIEW_3); - gtk_combo_box_set_active (GTK_COMBO_BOX (combo3), idx); + buffer = sat_cfg_get_str_def (SAT_CFG_STR_MODULE_GRID); + gtk_entry_set_text (GTK_ENTRY (gridstr), buffer); + g_free (buffer); } else { /* local mode, get global value */ - idx = sat_cfg_get_int (SAT_CFG_INT_MODULE_VIEW_1); - gtk_combo_box_set_active (GTK_COMBO_BOX (combo1), idx); - idx = sat_cfg_get_int (SAT_CFG_INT_MODULE_VIEW_2); - gtk_combo_box_set_active (GTK_COMBO_BOX (combo2), idx); - idx = sat_cfg_get_int (SAT_CFG_INT_MODULE_VIEW_3); - gtk_combo_box_set_active (GTK_COMBO_BOX (combo3), idx); + buffer = sat_cfg_get_str (SAT_CFG_STR_MODULE_GRID); + gtk_entry_set_text (GTK_ENTRY (gridstr), buffer); + g_free (buffer); } - /* read new layout */ - if (cfg == NULL) { - layout = sat_cfg_get_int_def (SAT_CFG_INT_MODULE_LAYOUT); - } - else { - layout = sat_cfg_get_int (SAT_CFG_INT_MODULE_LAYOUT); - } - - switch (layout) { - - case GTK_SAT_MOD_LAYOUT_1: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but1), TRUE); - break; - - case GTK_SAT_MOD_LAYOUT_2: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but2), TRUE); - break; - - case GTK_SAT_MOD_LAYOUT_3: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but3), TRUE); - break; - - case GTK_SAT_MOD_LAYOUT_4: - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (but4), TRUE); - break; - - default: - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s: Invalid module layout (%d)"), - __FUNCTION__, layout); - break; - } - - /* window placement settings */ if (cfg == NULL) { gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mwin), @@ -687,9 +389,43 @@ /** \brief Toggle window positioning settings. */ -static void -window_pos_toggle_cb (GtkWidget *toggle, gpointer data) +static void window_pos_toggle_cb (GtkWidget *toggle, gpointer data) { dirty = TRUE; } +/** \brief Manage layout code changes. + * + * This function is called when the contents of the lyout code changes. + * The purpose of this function is to check whether entered character is valid + * and to make the configuration "dirty". + */ +static void layout_code_changed (GtkWidget *widget, gpointer data) +{ + gchar *entry, *end, *j; + gint len, pos; + + + /* step 1: ensure that only valid characters are entered + (stolen from xlog, tnx pg4i) + */ + entry = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); + if ((len = g_utf8_strlen (entry, -1)) > 0) { + end = entry + g_utf8_strlen (entry, -1); + for (j = entry; j < end; ++j) { + switch (*j) { + case '0' ... '9': + case ';': + dirty = TRUE; + break; + default: + gdk_beep (); + pos = gtk_editable_get_position (GTK_EDITABLE (widget)); + gtk_editable_delete_text (GTK_EDITABLE (widget), + pos, pos+1); + break; + } + } + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-21 16:56:54
|
Revision: 524 http://gpredict.svn.sourceforge.net/gpredict/?rev=524&view=rev Author: csete Date: 2009-11-21 16:56:40 +0000 (Sat, 21 Nov 2009) Log Message: ----------- Added files contaiing utilities for the new layout engine. Modified Paths: -------------- trunk/src/Makefile.am Added Paths: ----------- trunk/src/sat-pref-layout-utils.c trunk/src/sat-pref-layout-utils.h Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-11-21 16:03:23 UTC (rev 523) +++ trunk/src/Makefile.am 2009-11-21 16:56:40 UTC (rev 524) @@ -89,6 +89,7 @@ sat-pref-help.c sat-pref-help.h \ sat-pref-modules.c sat-pref-modules.h \ sat-pref-layout.c sat-pref-layout.h \ + sat-pref-layout-utils.c sat-pref-layout-utils.h \ sat-pref-refresh.c sat-pref-refresh.h \ sat-pref-map-view.c sat-pref-map-view.h \ sat-pref-list-view.c sat-pref-list-view.h \ Added: trunk/src/sat-pref-layout-utils.c =================================================================== --- trunk/src/sat-pref-layout-utils.c (rev 0) +++ trunk/src/sat-pref-layout-utils.c 2009-11-21 16:56:40 UTC (rev 524) @@ -0,0 +1,111 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif +#include "compat.h" +#include "sat-log.h" +#include "gtk-sat-module.h" +#include "sat-pref-layout-utils.h" + + +/** \brief Check the correctness of a layout string. + * \param layout The layout string as stored in the config files + * "type1;left1;right1;top1;bottom1;type2; ... " + * \return LAYOUT_GOOD if the layout is valid, LAYOUT_BAD if the layout is invalid. + * + * A layout is invalid if it refers to a non-existent view type or if there is something wrong + * with the coordinates (e.g. left > right). + */ +gboolean sat_pref_layout_check (const gchar *layout) +{ + gchar **buffv; + guint length, nviews; + gint *grid; + guint i; + gboolean error = FALSE; + + + /* split layout string into an array of strings */ + buffv = g_strsplit (layout, ";", 0); + length = g_strv_length (buffv); + + /* check correct number of entries */ + if ((length == 0) || (length % 5 != 0)) { + error |= TRUE; + } + + nviews = length / 5; + grid = g_try_new0 (gint, length); + + /* convert string to array of integers */ + for (i = 0; i < length; i++) { + grid[i] = (gint) g_ascii_strtoll (buffv[i], NULL, 0); + } + + /* check each view record */ + for (i = 0; i < nviews; i++) { + + if ((grid[5*i] >= GTK_SAT_MOD_VIEW_NUM) || /* view type within range */ + (grid[5*i+1] >= grid[5*i+2]) || /* left < right */ + (grid[5*i+3] >= grid[5*i+4])) { /* top < bottom */ + + error |= TRUE; + } + + } + + g_free (grid); + g_strfreev (buffv); + + return (error ? LAYOUT_BAD : LAYOUT_GOOD); +} + + +/** \brief Generate a preview of the specified layout. + * \param layout The layout string as stored in the config files + * "type1;left1;right1;top1;bottom1;type2; ... " + * \return The preview of the layout or a label if invalid + */ +GtkWidget *sat_pref_layout_preview (const gchar *layout) +{ + GtkWidget *preview; + + if (sat_pref_layout_check (layout) == LAYOUT_BAD) { + preview = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (preview), _("<b>Invalid</b>")); + + return preview; + } + + preview = gtk_table_new (2, 2, TRUE); + + return preview; +} Added: trunk/src/sat-pref-layout-utils.h =================================================================== --- trunk/src/sat-pref-layout-utils.h (rev 0) +++ trunk/src/sat-pref-layout-utils.h 2009-11-21 16:56:40 UTC (rev 524) @@ -0,0 +1,41 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* + Gpredict: Real-time satellite tracking and orbit prediction program + + Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC. + + Authors: Alexandru Csete <oz...@gm...> + + Comments, questions and bugreports should be submitted via + http://sourceforge.net/projects/gpredict/ + More details can be found at the project home page: + + http://gpredict.oz9aec.net/ + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, visit http://www.fsf.org/ +*/ +#ifndef SAT_PREF_LAYOUT_UTILS_H +#define SAT_PREF_LAYOUT_UTILS_H 1 + + +typedef enum { + LAYOUT_BAD = FALSE, + LAYOUT_GOOD = TRUE +} layout_e; + +gboolean sat_pref_layout_check (const gchar *layout); +GtkWidget *sat_pref_layout_preview (const gchar *layout); + + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-21 16:03:31
|
Revision: 523 http://gpredict.svn.sourceforge.net/gpredict/?rev=523&view=rev Author: csete Date: 2009-11-21 16:03:23 +0000 (Sat, 21 Nov 2009) Log Message: ----------- Include number of views available. Modified Paths: -------------- trunk/src/gtk-sat-module.h Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2009-11-19 16:01:12 UTC (rev 522) +++ trunk/src/gtk-sat-module.h 2009-11-21 16:03:23 UTC (rev 523) @@ -63,7 +63,7 @@ GTK_SAT_MOD_VIEW_MAP, /*!< GtkSatMap */ GTK_SAT_MOD_VIEW_POLAR, /*!< GtkPolarView */ GTK_SAT_MOD_VIEW_SINGLE, /*!< GtkSingleSat */ - GTK_SAT_MOD_VIEW_MET, /*!< GtkMet */ + GTK_SAT_MOD_VIEW_NUM, /*!< Number of modules */ } gtk_sat_mod_view_t; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-19 16:01:22
|
Revision: 522 http://gpredict.svn.sourceforge.net/gpredict/?rev=522&view=rev Author: csete Date: 2009-11-19 16:01:12 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/NEWS Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-11-19 15:03:02 UTC (rev 521) +++ trunk/NEWS 2009-11-19 16:01:12 UTC (rev 522) @@ -2,6 +2,8 @@ * New satellite editor to manually add/edit/delete satellite data. * New transponder editor to edit transponder data. +* New layout engine that allows any combination of views to be created in a NxM grid. + Closes feature request TBD. * Feature request 2866570: Set operating mode via CAT. * Feature request 2873824: Flip Passes. * Feature request 2778735: Visual indicator for RX/TX/TRX. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-19 15:03:10
|
Revision: 521 http://gpredict.svn.sourceforge.net/gpredict/?rev=521&view=rev Author: csete Date: 2009-11-19 15:03:02 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Implemented new grid-based layout engine for GtkSatModule (engine only, config is still TBD). Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-module-popup.c trunk/src/gtk-sat-module.c trunk/src/gtk-sat-module.h trunk/src/menubar.c trunk/src/mod-mgr.c trunk/src/sat-cfg.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-19 08:33:05 UTC (rev 520) +++ trunk/ChangeLog 2009-11-19 15:03:02 UTC (rev 521) @@ -1,3 +1,13 @@ +2009-11-19 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-module.[ch]: + * src/gtk-sat-module-popup.c: + * src/menuibar.c: + * src/mod-mgr.c: + Implemented new grid-based layout engine for GtkSatModule + (engine only, config is still TBD). + + 2009-11-18 Alexandru Csete <oz9aec at gmail.com> * src/config-keys.h: @@ -5,12 +15,12 @@ Added config key for new GRID layout. * src/sat-info.c: - Pack transponder list into a scrolled window to prevent long transponder lists from - resizing the satellite info dialog. + Pack transponder list into a scrolled window to prevent long transponder + lists from resizing the satellite info dialog. * src/gtk-single-sat.c: - Changed satellite selector to list satellites in the main pop-up menu instead of a - submbenu (fewer mouse clicks). + Changed satellite selector to list satellites in the main pop-up menu + instead of a submbenu (fewer mouse clicks). 2009-11-06 Alexandru Csete <oz9aec at gmail.com> @@ -26,7 +36,6 @@ Applied patch 2893617 from Valentin Yakovenkov fixing various windows issues. - 2009-10-27 Alexandru Csete <oz9aec at gmail.com> * src/tle-update.c: Modified: trunk/src/gtk-sat-module-popup.c =================================================================== --- trunk/src/gtk-sat-module-popup.c 2009-11-19 08:33:05 UTC (rev 520) +++ trunk/src/gtk-sat-module-popup.c 2009-11-19 15:03:02 UTC (rev 521) @@ -11,17 +11,17 @@ More details can be found at the project home page: http://gpredict.oz9aec.net/ - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program; if not, visit http://www.fsf.org/ */ @@ -76,91 +76,91 @@ * */ void -gtk_sat_module_popup (GtkSatModule *module) + gtk_sat_module_popup (GtkSatModule *module) { - GtkWidget *menu; - GtkWidget *menuitem; - GtkWidget *image; - gchar *buff; + GtkWidget *menu; + GtkWidget *menuitem; + GtkWidget *image; + gchar *buff; - if ((module == NULL) || !IS_GTK_SAT_MODULE (module)) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: %s called with NULL parameter!"), - __FILE__, __LINE__, __FUNCTION__); + if ((module == NULL) || !IS_GTK_SAT_MODULE (module)) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: %s called with NULL parameter!"), + __FILE__, __LINE__, __FUNCTION__); - return; - } + return; + } - menu = gtk_menu_new (); + menu = gtk_menu_new (); - if (module->state == GTK_SAT_MOD_STATE_DOCKED) { + if (module->state == GTK_SAT_MOD_STATE_DOCKED) { - menuitem = gtk_image_menu_item_new_with_label (_("Detach module")); - buff = icon_file_name ("gpredict-notebook.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (docking_state_cb), module); - } - else { + menuitem = gtk_image_menu_item_new_with_label (_("Detach module")); + buff = icon_file_name ("gpredict-notebook.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (docking_state_cb), module); + } + else { - menuitem = gtk_image_menu_item_new_with_label (_("Attach module")); - buff = icon_file_name ("gpredict-notebook.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (docking_state_cb), module); + menuitem = gtk_image_menu_item_new_with_label (_("Attach module")); + buff = icon_file_name ("gpredict-notebook.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (docking_state_cb), module); - } + } - if (module->state == GTK_SAT_MOD_STATE_FULLSCREEN) { + if (module->state == GTK_SAT_MOD_STATE_FULLSCREEN) { - menuitem = gtk_image_menu_item_new_with_label (_("Leave fullscreen")); - image = gtk_image_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (screen_state_cb), module); - } - else { - menuitem = gtk_image_menu_item_new_with_label (_("Fullscreen")); - image = gtk_image_new_from_stock (GTK_STOCK_FULLSCREEN, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (screen_state_cb), module); - } + menuitem = gtk_image_menu_item_new_with_label (_("Leave fullscreen")); + image = gtk_image_new_from_stock (GTK_STOCK_LEAVE_FULLSCREEN, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (screen_state_cb), module); + } + else { + menuitem = gtk_image_menu_item_new_with_label (_("Fullscreen")); + image = gtk_image_new_from_stock (GTK_STOCK_FULLSCREEN, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (screen_state_cb), module); + } - /* separator */ - menuitem = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* sky at a glance */ - menuitem = gtk_image_menu_item_new_with_label (_("Sky at a glance")); - buff = icon_file_name ("gpredict-planner-small.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (sky_at_glance_cb), module); + /* sky at a glance */ + menuitem = gtk_image_menu_item_new_with_label (_("Sky at a glance")); + buff = icon_file_name ("gpredict-planner-small.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (sky_at_glance_cb), module); - /* time manager */ - menuitem = gtk_image_menu_item_new_with_label (_("Time Controller")); - buff = icon_file_name ("gpredict-clock-small.png"); - image = gtk_image_new_from_file (buff); - g_free (buff); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", G_CALLBACK (tmgr_cb), module); + /* time manager */ + menuitem = gtk_image_menu_item_new_with_label (_("Time Controller")); + buff = icon_file_name ("gpredict-clock-small.png"); + image = gtk_image_new_from_file (buff); + g_free (buff); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", G_CALLBACK (tmgr_cb), module); /* separator */ menuitem = gtk_separator_menu_item_new (); @@ -183,55 +183,55 @@ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); g_signal_connect (menuitem, "activate", G_CALLBACK (rotctrl_cb), module); - - /* separator */ - menuitem = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* configure */ - menuitem = gtk_image_menu_item_new_with_label (_("Configure")); - image = gtk_image_new_from_stock (GTK_STOCK_PROPERTIES, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (config_cb), module); + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* clone */ - menuitem = gtk_image_menu_item_new_with_label (_("Clone...")); - image = gtk_image_new_from_stock (GTK_STOCK_COPY, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (clone_cb), module); + /* configure */ + menuitem = gtk_image_menu_item_new_with_label (_("Configure")); + image = gtk_image_new_from_stock (GTK_STOCK_PROPERTIES, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (config_cb), module); - /* separator */ - menuitem = gtk_separator_menu_item_new (); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + /* clone */ + menuitem = gtk_image_menu_item_new_with_label (_("Clone...")); + image = gtk_image_new_from_stock (GTK_STOCK_COPY, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (clone_cb), module); - /* delete module */ - menuitem = gtk_image_menu_item_new_with_label (_("Delete")); - image = gtk_image_new_from_stock (GTK_STOCK_DELETE, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (delete_cb), module); + /* separator */ + menuitem = gtk_separator_menu_item_new (); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* close */ - menuitem = gtk_image_menu_item_new_with_label (_("Close")); - image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, - GTK_ICON_SIZE_MENU); - gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - g_signal_connect (menuitem, "activate", - G_CALLBACK (close_cb), module); + /* delete module */ + menuitem = gtk_image_menu_item_new_with_label (_("Delete")); + image = gtk_image_new_from_stock (GTK_STOCK_DELETE, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (delete_cb), module); - gtk_widget_show_all (menu); + /* close */ + menuitem = gtk_image_menu_item_new_with_label (_("Close")); + image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, + GTK_ICON_SIZE_MENU); + gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menuitem), image); + gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + g_signal_connect (menuitem, "activate", + G_CALLBACK (close_cb), module); - gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, - 0, gdk_event_get_time (NULL)); + gtk_widget_show_all (menu); + + gtk_menu_popup (GTK_MENU (menu), NULL, NULL, NULL, NULL, + 0, gdk_event_get_time (NULL)); } @@ -244,7 +244,7 @@ * */ static void -config_cb (GtkWidget *menuitem, gpointer data) + config_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); @@ -262,7 +262,7 @@ gtk_widget_destroy (dialog); } else { - gtk_sat_module_config_cb (menuitem, data); + gtk_sat_module_config_cb (menuitem, data); } } @@ -280,198 +280,177 @@ * */ static void -clone_cb (GtkWidget *menuitem, gpointer data) + clone_cb (GtkWidget *menuitem, gpointer data) { - GtkWidget *dialog; - GtkWidget *entry; - GtkWidget *label; - GtkWidget *toggle; - GtkTooltips *tooltips; - guint response; - GtkSatModule *module = GTK_SAT_MODULE (data); - GtkSatModule *newmod; - gchar *source,*target; - gchar *icon; /* icon file name */ - gchar *title; /* window title */ + GtkWidget *dialog; + GtkWidget *entry; + GtkWidget *label; + GtkWidget *toggle; + GtkTooltips *tooltips; + guint response; + GtkSatModule *module = GTK_SAT_MODULE (data); + GtkSatModule *newmod; + gchar *source,*target; + gchar *icon; /* icon file name */ + gchar *title; /* window title */ - dialog = gtk_dialog_new_with_buttons (_("Clone Module"), - GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (module))), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, - GTK_RESPONSE_OK, - NULL); - gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); + dialog = gtk_dialog_new_with_buttons (_("Clone Module"), + GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (module))), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, + GTK_RESPONSE_OK, + NULL); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - /* label */ - label = gtk_label_new (_("Name of new module:")); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 0); + /* label */ + label = gtk_label_new (_("Name of new module:")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 0); - /* name entry */ - entry = gtk_entry_new (); - gtk_entry_set_max_length (GTK_ENTRY (entry), 25); - gtk_entry_set_text (GTK_ENTRY (entry), module->name); - tooltips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips, entry, - _("Enter a short name for this module.\n"\ - "Allowed characters: 0..9, a..z, A..Z, - and _"), - _("The name will be used to identify the module "\ - "and it is also used a file name for saving the data."\ - "Max length is 25 characters.")); + /* name entry */ + entry = gtk_entry_new (); + gtk_entry_set_max_length (GTK_ENTRY (entry), 25); + gtk_entry_set_text (GTK_ENTRY (entry), module->name); + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, entry, + _("Enter a short name for this module.\n"\ + "Allowed characters: 0..9, a..z, A..Z, - and _"), + _("The name will be used to identify the module "\ + "and it is also used a file name for saving the data."\ + "Max length is 25 characters.")); - /* attach changed signal so that we can enable OK button when + /* attach changed signal so that we can enable OK button when a proper name has been entered oh, btw. disable OK button to begin with.... */ - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - FALSE); - g_signal_connect (entry, "changed", G_CALLBACK (name_changed), dialog); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - entry, FALSE, FALSE, 0); + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + FALSE); + g_signal_connect (entry, "changed", G_CALLBACK (name_changed), dialog); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + entry, FALSE, FALSE, 0); - /* check button */ - toggle = gtk_check_button_new_with_label (_("Open module when created")); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE); - tooltips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips, toggle, - _("If checked, the new module will be opened "\ - "after it has been created"), - NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - toggle, FALSE, FALSE, 20); - + /* check button */ + toggle = gtk_check_button_new_with_label (_("Open module when created")); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), TRUE); + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, toggle, + _("If checked, the new module will be opened "\ + "after it has been created"), + NULL); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + toggle, FALSE, FALSE, 20); - gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); - /* run dialog */ - response = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); - switch (response) { + /* run dialog */ + response = gtk_dialog_run (GTK_DIALOG (dialog)); - case GTK_RESPONSE_OK: - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Cloning %s => %s"), - __FILE__, __LINE__, module->name, - gtk_entry_get_text (GTK_ENTRY (entry))); + switch (response) { - /* build full file names */ - gchar *moddir = get_modules_dir (); - source = g_strconcat (moddir, G_DIR_SEPARATOR_S, - module->name, ".mod", NULL); - target = g_strconcat (moddir, G_DIR_SEPARATOR_S, - gtk_entry_get_text (GTK_ENTRY (entry)), ".mod", NULL); - g_free (moddir); + case GTK_RESPONSE_OK: + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Cloning %s => %s"), + __FILE__, __LINE__, module->name, + gtk_entry_get_text (GTK_ENTRY (entry))); - /* copy file */ - if (gpredict_file_copy (source, target)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: Failed to clone %s."), - __FILE__, __LINE__, module->name); - } - else { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Successfully cloned %s."), - __FILE__, __LINE__, module->name); + /* build full file names */ + gchar *moddir = get_modules_dir (); + source = g_strconcat (moddir, G_DIR_SEPARATOR_S, + module->name, ".mod", NULL); + target = g_strconcat (moddir, G_DIR_SEPARATOR_S, + gtk_entry_get_text (GTK_ENTRY (entry)), ".mod", NULL); + g_free (moddir); - /* open module if requested */ - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) { - - newmod = GTK_SAT_MODULE (gtk_sat_module_new (target)); - newmod->state = module->state; + /* copy file */ + if (gpredict_file_copy (source, target)) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to clone %s."), + __FILE__, __LINE__, module->name); + } + else { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Successfully cloned %s."), + __FILE__, __LINE__, module->name); - if (newmod->state == GTK_SAT_MOD_STATE_DOCKED) { + /* open module if requested */ + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (toggle))) { - /* add to module manager */ - mod_mgr_add_module (GTK_WIDGET (newmod), TRUE); + newmod = GTK_SAT_MODULE (gtk_sat_module_new (target)); + newmod->state = module->state; - /* try to reproduce divisions betwenn views */ - switch (module->layout) { + if (newmod->state == GTK_SAT_MOD_STATE_DOCKED) { - case GTK_SAT_MOD_LAYOUT_2: - gtk_paned_set_position (GTK_PANED (newmod->vpaned), - gtk_paned_get_position (GTK_PANED (module->vpaned))); - break; + /* add to module manager */ + mod_mgr_add_module (GTK_WIDGET (newmod), TRUE); - case GTK_SAT_MOD_LAYOUT_3: - case GTK_SAT_MOD_LAYOUT_4: - gtk_paned_set_position (GTK_PANED (newmod->vpaned), - gtk_paned_get_position (GTK_PANED (module->vpaned))); - gtk_paned_set_position (GTK_PANED (newmod->hpaned), - gtk_paned_get_position (GTK_PANED (module->hpaned))); - break; + } + else { + /* add to module manager */ + mod_mgr_add_module (GTK_WIDGET (newmod), FALSE); - default: - break; + /* create window */ + newmod->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (newmod->win), + newmod->name); + title = g_strconcat ("GPREDICT: ", + newmod->name, + " (", newmod->qth->name, ")", + NULL); + gtk_window_set_title (GTK_WINDOW (newmod->win), title); + g_free (title); - } + /* use size of source module */ + gtk_window_set_default_size (GTK_WINDOW (newmod->win), + GTK_WIDGET (module)->allocation.width, + GTK_WIDGET (module)->allocation.height); - } - else { - /* add to module manager */ - mod_mgr_add_module (GTK_WIDGET (newmod), FALSE); + g_signal_connect (G_OBJECT (newmod->win), "configure_event", + G_CALLBACK (module_window_config_cb), newmod); - /* create window */ - newmod->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_window_set_title (GTK_WINDOW (newmod->win), - newmod->name); - title = g_strconcat ("GPREDICT: ", - newmod->name, - " (", newmod->qth->name, ")", - NULL); - gtk_window_set_title (GTK_WINDOW (newmod->win), title); - g_free (title); + /* add module to window */ + gtk_container_add (GTK_CONTAINER (newmod->win), + GTK_WIDGET (newmod)); - /* use size of source module */ - gtk_window_set_default_size (GTK_WINDOW (newmod->win), - GTK_WIDGET (module)->allocation.width, - GTK_WIDGET (module)->allocation.height); + /* window icon */ + icon = icon_file_name ("gpredict-icon.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (newmod->win), icon, NULL); + } + g_free (icon); - g_signal_connect (G_OBJECT (newmod->win), "configure_event", - G_CALLBACK (module_window_config_cb), newmod); + /* show window */ + gtk_widget_show_all (newmod->win); - /* add module to window */ - gtk_container_add (GTK_CONTAINER (newmod->win), - GTK_WIDGET (newmod)); + } + } + } - /* window icon */ - icon = icon_file_name ("gpredict-icon.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (newmod->win), icon, NULL); - } - g_free (icon); + /* clean up */ + g_free (source); + g_free (target); - /* show window */ - gtk_widget_show_all (newmod->win); + break; - } - } - } - - /* clean up */ - g_free (source); - g_free (target); - - break; - case GTK_RESPONSE_CANCEL: - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Cloning cancelled by user."), - __FILE__, __LINE__); - break; + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Cloning cancelled by user."), + __FILE__, __LINE__); + break; default: - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Cloning interrupted."), - __FILE__, __LINE__); - break; - } + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Cloning interrupted."), + __FILE__, __LINE__); + break; + } - gtk_widget_destroy (dialog); + gtk_widget_destroy (dialog); } @@ -488,176 +467,165 @@ * action that has been performed. */ static void -docking_state_cb (GtkWidget *menuitem, gpointer data) + docking_state_cb (GtkWidget *menuitem, gpointer data) { - GtkWidget *module = GTK_WIDGET (data); - gint w,h; - gchar *icon; /* icon file name */ - gchar *title; /* window title */ + GtkWidget *module = GTK_WIDGET (data); + gint w,h; + gchar *icon; /* icon file name */ + gchar *title; /* window title */ - switch (GTK_SAT_MODULE (module)->state) { + switch (GTK_SAT_MODULE (module)->state) { - case GTK_SAT_MOD_STATE_DOCKED: + case GTK_SAT_MOD_STATE_DOCKED: /* get stored size; use size from main window if size not explicitly stoed */ if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_WIDTH, - NULL)) { + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_WIDTH, + NULL)) { w = g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_WIDTH, - NULL); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_WIDTH, + NULL); } else { w = module->allocation.width; } if (g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_HEIGHT, - NULL)) { + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_HEIGHT, + NULL)) { h = g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_HEIGHT, - NULL); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_HEIGHT, + NULL); } else { h = module->allocation.height; } - /* increase reference count of module */ - g_object_ref (module); + /* increase reference count of module */ + g_object_ref (module); - /* we don't need the positions */ - GTK_SAT_MODULE (module)->vpanedpos = -1; - GTK_SAT_MODULE (module)->hpanedpos = -1; + /* we don't need the positions */ + //GTK_SAT_MODULE (module)->vpanedpos = -1; + //GTK_SAT_MODULE (module)->hpanedpos = -1; - /* undock from mod-mgr */ - mod_mgr_undock_module (module); + /* undock from mod-mgr */ + mod_mgr_undock_module (module); - /* create window */ - GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - title = g_strconcat ("GPREDICT: ", - GTK_SAT_MODULE (module)->name, - " (", GTK_SAT_MODULE (module)->qth->name, ")", - NULL); - gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); - g_free (title); - gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), w, h); + /* create window */ + GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + title = g_strconcat ("GPREDICT: ", + GTK_SAT_MODULE (module)->name, + " (", GTK_SAT_MODULE (module)->qth->name, ")", + NULL); + gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); + g_free (title); + gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), w, h); g_signal_connect (G_OBJECT (GTK_SAT_MODULE (module)->win), "configure_event", G_CALLBACK (module_window_config_cb), module); - /* window icon */ - icon = icon_file_name ("gpredict-icon.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); - } - g_free (icon); + /* window icon */ + icon = icon_file_name ("gpredict-icon.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); + } + g_free (icon); /* move window to stored position if requested by configuration */ if (sat_cfg_get_bool (SAT_CFG_BOOL_MOD_WIN_POS) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_X, - NULL) && + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_X, + NULL) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_Y, - NULL)) { - + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_Y, + NULL)) { + gtk_window_move (GTK_WINDOW (GTK_SAT_MODULE (module)->win), g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_X, NULL), + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_X, NULL), g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_WIN_POS_Y, - NULL)); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_WIN_POS_Y, + NULL)); } - /* add module to window */ - gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); + /* add module to window */ + gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; /* store new state in configuration */ g_key_file_set_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_STATE, - GTK_SAT_MOD_STATE_WINDOW); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_STATE, + GTK_SAT_MOD_STATE_WINDOW); - /* decrease reference count of module */ - g_object_unref (module); + /* decrease reference count of module */ + g_object_unref (module); - /* show window */ - gtk_widget_show_all (GTK_SAT_MODULE (module)->win); + /* show window */ + gtk_widget_show_all (GTK_SAT_MODULE (module)->win); - /* reparent time manager window if visible */ - if (GTK_SAT_MODULE (module)->tmgActive) { - gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), - GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - } + /* reparent time manager window if visible */ + if (GTK_SAT_MODULE (module)->tmgActive) { + gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), + GTK_WINDOW (GTK_SAT_MODULE (module)->win)); + } - break; + break; case GTK_SAT_MOD_STATE_WINDOW: case GTK_SAT_MOD_STATE_FULLSCREEN: - /* increase referene count */ - g_object_ref (module); + /* increase referene count */ + g_object_ref (module); - /* store paned positions */ - if (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_2) { - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - } - else if ((GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_3) || - (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_4)) { + /* reparent time manager window if visible */ + if (GTK_SAT_MODULE (module)->tmgActive) { + gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), + GTK_WINDOW (app)); + } - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - GTK_SAT_MODULE (module)->hpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->hpaned)); - } - - /* reparent time manager window if visible */ - if (GTK_SAT_MODULE (module)->tmgActive) { - gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), - GTK_WINDOW (app)); - } + /* remove module from window, destroy window */ + gtk_container_remove (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); + gtk_widget_destroy (GTK_SAT_MODULE (module)->win); + GTK_SAT_MODULE (module)->win = NULL; - /* remove module from window, destroy window */ - gtk_container_remove (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); - gtk_widget_destroy (GTK_SAT_MODULE (module)->win); - GTK_SAT_MODULE (module)->win = NULL; + /* dock into mod-mgr */ + mod_mgr_dock_module (module); - /* dock into mod-mgr */ - mod_mgr_dock_module (module); - - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_DOCKED; + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_DOCKED; /* store new state in configuration */ g_key_file_set_integer (GTK_SAT_MODULE (module)->cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_STATE, - GTK_SAT_MOD_STATE_DOCKED); + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_STATE, + GTK_SAT_MOD_STATE_DOCKED); - /* decrease reference count of module */ - g_object_unref (module); + /* decrease reference count of module */ + g_object_unref (module); - break; + break; default: - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: Unknown module state: %d"), - __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); - break; + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Unknown module state: %d"), + __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); + break; - } + } } @@ -670,96 +638,75 @@ * and WINDOW state. */ static void -screen_state_cb (GtkWidget *menuitem, gpointer data) + screen_state_cb (GtkWidget *menuitem, gpointer data) { - GtkWidget *module = GTK_WIDGET (data); + GtkWidget *module = GTK_WIDGET (data); gint w,h; - gchar *icon; /* icon file name */ - gchar *title; /* window title */ + gchar *icon; /* icon file name */ + gchar *title; /* window title */ - switch (GTK_SAT_MODULE (module)->state) { + switch (GTK_SAT_MODULE (module)->state) { - case GTK_SAT_MOD_STATE_DOCKED: + case GTK_SAT_MOD_STATE_DOCKED: - /* increase reference count of module */ - g_object_ref (module); + /* increase reference count of module */ + g_object_ref (module); - /* we don't need the positions */ - GTK_SAT_MODULE (module)->vpanedpos = -1; - GTK_SAT_MODULE (module)->hpanedpos = -1; + /* undock from mod-mgr */ + mod_mgr_undock_module (module); - /* undock from mod-mgr */ - mod_mgr_undock_module (module); + /* create window */ + GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); + title = g_strconcat ("GPREDICT: ", + GTK_SAT_MODULE (module)->name, + " (", GTK_SAT_MODULE (module)->qth->name, ")", + NULL); + gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); + g_free (title); - /* create window */ - GTK_SAT_MODULE (module)->win = gtk_window_new (GTK_WINDOW_TOPLEVEL); - title = g_strconcat ("GPREDICT: ", - GTK_SAT_MODULE (module)->name, - " (", GTK_SAT_MODULE (module)->qth->name, ")", - NULL); - gtk_window_set_title (GTK_WINDOW (GTK_SAT_MODULE (module)->win), title); - g_free (title); + /* window icon */ + icon = icon_file_name ("gpredict-icon.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); + } + g_free (icon); - /* window icon */ - icon = icon_file_name ("gpredict-icon.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (GTK_SAT_MODULE (module)->win), icon, NULL); - } - g_free (icon); + /* add module to window */ + gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); - /* add module to window */ - gtk_container_add (GTK_CONTAINER (GTK_SAT_MODULE (module)->win), module); + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; + /* decrease reference count of module */ + g_object_unref (module); - /* decrease reference count of module */ - g_object_unref (module); + gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - - /* show window */ - gtk_widget_show_all (GTK_SAT_MODULE (module)->win); + /* show window */ + gtk_widget_show_all (GTK_SAT_MODULE (module)->win); - /* reparent time manager window if visible */ - if (GTK_SAT_MODULE (module)->tmgActive) { - gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), - GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - } + /* reparent time manager window if visible */ + if (GTK_SAT_MODULE (module)->tmgActive) { + gtk_window_set_transient_for (GTK_WINDOW (GTK_SAT_MODULE (module)->tmgWin), + GTK_WINDOW (GTK_SAT_MODULE (module)->win)); + } - break; + break; case GTK_SAT_MOD_STATE_WINDOW: + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; + gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); + gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), 800, 600); - /* we don't need the positions */ - GTK_SAT_MODULE (module)->vpanedpos = -1; - GTK_SAT_MODULE (module)->hpanedpos = -1; + break; - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_FULLSCREEN; - gtk_window_fullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); - gtk_window_set_default_size (GTK_WINDOW (GTK_SAT_MODULE (module)->win), 800, 600); - break; - - case GTK_SAT_MOD_STATE_FULLSCREEN: - - /* store paned positions */ - if (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_2) { - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - } - else if ((GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_3) || - (GTK_SAT_MODULE (module)->layout == GTK_SAT_MOD_LAYOUT_4)) { - - GTK_SAT_MODULE (module)->vpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->vpaned)); - GTK_SAT_MODULE (module)->hpanedpos = gtk_paned_get_position (GTK_PANED (GTK_SAT_MODULE (module)->hpaned)); - } - - /* change internal state */ - GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; + /* change internal state */ + GTK_SAT_MODULE (module)->state = GTK_SAT_MOD_STATE_WINDOW; gtk_window_unfullscreen (GTK_WINDOW (GTK_SAT_MODULE (module)->win)); /* get stored size; use some standard size if not explicitly specified */ @@ -781,26 +728,26 @@ if (sat_cfg_get_bool (SAT_CFG_BOOL_MOD_WIN_POS) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_X, NULL) && g_key_file_has_key (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_Y, NULL)) { - + gtk_window_move (GTK_WINDOW (GTK_SAT_MODULE (module)->win), g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_X, NULL), - g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_Y, NULL)); + g_key_file_get_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_WIN_POS_Y, NULL)); - } + } /* store new state in configuration */ g_key_file_set_integer (GTK_SAT_MODULE (module)->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_STATE, GTK_SAT_MOD_STATE_WINDOW); - break; + break; default: - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s:%d: Unknown module state: %d"), - __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); - break; + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s:%d: Unknown module state: %d"), + __FILE__, __LINE__, GTK_SAT_MODULE (module)->state); + break; - } + } } @@ -812,30 +759,30 @@ * tracked in the current module. */ static void -sky_at_glance_cb (GtkWidget *menuitem, gpointer data) + sky_at_glance_cb (GtkWidget *menuitem, gpointer data) { - GtkSatModule *module = GTK_SAT_MODULE (data); - GtkWidget *skg; - GtkWidget *window; - gchar *buff; + GtkSatModule *module = GTK_SAT_MODULE (data); + GtkWidget *skg; + GtkWidget *window; + gchar *buff; - /* create window */ - window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - buff = g_strdup_printf (_("The sky at a glance (%s)"), module->name); - gtk_window_set_title (GTK_WINDOW (window), buff); - g_free (buff); - g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (window_delete), NULL); + /* create window */ + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); + buff = g_strdup_printf (_("The sky at a glance (%s)"), module->name); + gtk_window_set_title (GTK_WINDOW (window), buff); + g_free (buff); + g_signal_connect (G_OBJECT (window), "delete_event", G_CALLBACK (window_delete), NULL); - /* window icon */ - buff = icon_file_name ("gpredict-planner.png"); - gtk_window_set_icon_from_file (GTK_WINDOW (window), buff, NULL); - g_free (buff); + /* window icon */ + buff = icon_file_name ("gpredict-planner.png"); + gtk_window_set_icon_from_file (GTK_WINDOW (window), buff, NULL); + g_free (buff); - /* if module is busy wait until done then go on */ - g_mutex_lock(module->busy); + /* if module is busy wait until done then go on */ + g_mutex_lock(module->busy); - /* create sky at a glance widget */ + /* create sky at a glance widget */ if (sat_cfg_get_bool (SAT_CFG_BOOL_PRED_USE_REAL_T0)) { skg = gtk_sky_glance_new (module->satellites, module->qth, 0.0); @@ -844,22 +791,22 @@ skg = gtk_sky_glance_new (module->satellites, module->qth, module->tmgCdnum); } - g_mutex_unlock(module->busy); + g_mutex_unlock(module->busy); - gtk_container_set_border_width (GTK_CONTAINER (window), 10); - gtk_container_add (GTK_CONTAINER (window), skg); + gtk_container_set_border_width (GTK_CONTAINER (window), 10); + gtk_container_add (GTK_CONTAINER (window), skg); - gtk_widget_show_all (window); + gtk_widget_show_all (window); } /** \brief Open time manager. */ static void -tmgr_cb (GtkWidget *menuitem, gpointer data) + tmgr_cb (GtkWidget *menuitem, gpointer data) { - GtkSatModule *module = GTK_SAT_MODULE (data); + GtkSatModule *module = GTK_SAT_MODULE (data); - tmg_create (module); + tmg_create (module); } /** \brief Open Radio control window. @@ -867,7 +814,7 @@ * \param data Pointer the GtkSatModule. */ static void -rigctrl_cb (GtkWidget *menuitem, gpointer data) + rigctrl_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); gchar *buff; @@ -888,7 +835,7 @@ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("You have no radio configuration!\n"\ "Please configure a radio first.") - ); + ); g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_window_set_title (GTK_WINDOW (dialog), _("ERROR")); @@ -926,7 +873,7 @@ * This function is called automatically when the window is destroyed. */ static void -destroy_rigctrl (GtkWidget *window, gpointer data) + destroy_rigctrl (GtkWidget *window, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); @@ -940,7 +887,7 @@ * \param data Pointer the GtkSatModule. */ static void -rotctrl_cb (GtkWidget *menuitem, gpointer data) + rotctrl_cb (GtkWidget *menuitem, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); gchar *buff; @@ -961,7 +908,7 @@ GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, _("You have no rotator configuration!\n"\ "Please configure an antenna rotator first.") - ); + ); g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_window_set_title (GTK_WINDOW (dialog), _("ERROR")); @@ -998,7 +945,7 @@ * This function is called automatically when the window is destroyed. */ static void -destroy_rotctrl (GtkWidget *window, gpointer data) + destroy_rotctrl (GtkWidget *window, gpointer data) { GtkSatModule *module = GTK_SAT_MODULE (data); @@ -1008,9 +955,9 @@ /* ensure that deleted top-level windows are destroyed */ static gint -window_delete (GtkWidget *widget, - GdkEvent *event, - gpointer data) + window_delete (GtkWidget *widget, + GdkEvent *event, + gpointer data) { return FALSE; } @@ -1024,9 +971,9 @@ * for gtk_sat_module_close_cb, which will close the current module. */ static void -close_cb (GtkWidget *menuitem, gpointer data) + close_cb (GtkWidget *menuitem, gpointer data) { - gtk_sat_module_close_cb (menuitem, data); + gtk_sat_module_close_cb (menuitem, data); } /** \brief Close and permanently delete module. @@ -1037,53 +984,53 @@ * whereafter the module file will be deleted from the disk. */ static void -delete_cb (GtkWidget *menuitem, gpointer data) + delete_cb (GtkWidget *menuitem, gpointer data) { - gchar *file; - GtkWidget *dialog; - gchar *moddir; + gchar *file; + GtkWidget *dialog; + gchar *moddir; - moddir = get_modules_dir (); - file = g_strconcat (moddir, G_DIR_SEPARATOR_S, - GTK_SAT_MODULE (data)->name, ".mod", NULL); - g_free (moddir); + moddir = get_modules_dir (); + file = g_strconcat (moddir, G_DIR_SEPARATOR_S, + GTK_SAT_MODULE (data)->name, ".mod", NULL); + g_free (moddir); - gtk_sat_module_close_cb (menuitem, data); + gtk_sat_module_close_cb (menuitem, data); - /* ask user to confirm removal */ - dialog = gtk_message_dialog_new_with_markup - (NULL, //GTK_WINDOW (parent), - GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - _("This operation will permanently delete\n<b>%s</b>\n"\ - "from the disk.\nDo you you want to proceed?"), - file); + /* ask user to confirm removal */ + dialog = gtk_message_dialog_new_with_markup + (NULL, //GTK_WINDOW (parent), + GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + _("This operation will permanently delete\n<b>%s</b>\n"\ + "from the disk.\nDo you you want to proceed?"), + file); - switch (gtk_dialog_run (GTK_DIALOG (dialog))) { + switch (gtk_dialog_run (GTK_DIALOG (dialog))) { - case GTK_RESPONSE_YES: + case GTK_RESPONSE_YES: - if (g_remove (file)) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: Failed to delete %s."), - __FILE__, __LINE__, file); - } - else { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: %s deleted permanently."), - __FILE__, __LINE__, file); - } - break; + if (g_remove (file)) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to delete %s."), + __FILE__, __LINE__, file); + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: %s deleted permanently."), + __FILE__, __LINE__, file); + } + break; default: - break; - } + break; + } - gtk_widget_destroy (dialog); + gtk_widget_destroy (dialog); - g_free (file); + g_free (file); } @@ -1094,55 +1041,55 @@ * of the name is greater than zero, if yes enable the OK button of the dialog. */ static void -name_changed (GtkWidget *widget, gpointer data) + name_changed (GtkWidget *widget, gpointer data) { - const gchar *text; - gchar *entry, *end, *j; - gint len, pos; - GtkWidget *dialog = GTK_WIDGET (data); + const gchar *text; + gchar *entry, *end, *j; + gint len, pos; + GtkWidget *dialog = GTK_WIDGET (data); - /* step 1: ensure that only valid characters are entered + /* step 1: ensure that only valid characters are entered (stolen from xlog, tnx pg4i) */ - entry = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); - if ((len = g_utf8_strlen (entry, -1)) > 0) - { - end = entry + g_utf8_strlen (entry, -1); - for (j = entry; j < end; ++j) - { - switch (*j) - { - case '0' ... '9': - case 'a' ... 'z': - case 'A' ... 'Z': - case '-': - case '_': - break; - default: - gdk_beep (); - pos = gtk_editable_get_position (GTK_EDITABLE (widget)); - gtk_editable_delete_text (GTK_EDITABLE (widget), - pos, pos+1); - break; - } - } - } + entry = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); + if ((len = g_utf8_strlen (entry, -1)) > 0) + { + end = entry + g_utf8_strlen (entry, -1); + for (j = entry; j < end; ++j) + { + switch (*j) + { + case '0' ... '9': + case 'a' ... 'z': + case 'A' ... 'Z': + case '-': + case '_': + break; + default: + gdk_beep (); + pos = gtk_editable_get_position (GTK_EDITABLE (widget)); + gtk_editable_delete_text (GTK_EDITABLE (widget), + pos, pos+1); + break; + } + } + } - /* step 2: if name seems all right, enable OK button */ - text = gtk_entry_get_text (GTK_ENTRY (widget)); + /* step 2: if name seems all right, enable OK button */ + text = gtk_entry_get_text (GTK_ENTRY (widget)); - if (g_utf8_strlen (text, -1) > 0) { - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - TRUE); - } - else { - gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), - GTK_RESPONSE_OK, - FALSE); - } + if (g_utf8_strlen (text, -1) > 0) { + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + TRUE); + } + else { + gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog), + GTK_RESPONSE_OK, + FALSE); + } } @@ -1165,7 +1112,7 @@ * */ gboolean -module_window_config_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data) + module_window_config_cb (GtkWidget *widget, GdkEventConfigure *event, gpointer data) { gint x, y; GtkSatModule *module = GTK_SAT_MODULE (data); @@ -1176,7 +1123,7 @@ gtk_window_get_position (GTK_WINDOW (widget), &x, &y); else return FALSE; /* carry on normally */ - + #ifdef G_OS_WIN32 /* Workaround for GTK+ bug # 169811 - "configure_event" is fired when the window is being maximized */ Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2009-11-19 08:33:05 UTC (rev 520) +++ trunk/src/gtk-sat-module.c 2009-11-19 15:03:02 UTC (rev 521) @@ -79,8 +79,6 @@ const gchar *cfgfile); static void gtk_sat_module_load_sats (GtkSatModule *module); -/* static gboolean gtk_sat_module_sats_are_equal (gconstpointer a, */ -/* gconstpointer b); */ static gboolean gtk_sat_module_timeout_cb (gpointer module); static void gtk_sat_module_update_sat (gpointer key, gpointer val, @@ -91,10 +89,9 @@ static void update_header (GtkSatModule *module); static void update_child (GtkWidget *child, gdouble tstamp); static void create_module_layout (GtkSatModule *module); - +static void get_grid_size (GtkSatModule *module, guint *rows, guint *cols); static GtkWidget *create_view (GtkSatModule *module, guint num); -static void fix_child_allocations (GtkWidget *widget, gpointer data); static void reload_sats_in_child (GtkWidget *widget, GtkSatModule *module); @@ -178,14 +175,8 @@ module->grid = NULL; module->views = NULL; - module->layout = GTK_SAT_MOD_LAYOUT_1; - module->view_1 = GTK_SAT_MOD_VIEW_MAP; - module->view_2 = GTK_SAT_MOD_VIEW_POLAR; - module->view_3 = GTK_SAT_MOD_VIEW_SINGLE; + module->nviews = 0; - module->vpanedpos = -1; - module->hpanedpos = -1; - module->timerid = 0; module->throttle = 1; @@ -271,8 +262,8 @@ /* create module widget */ widget = g_object_new (GTK_TYPE_SAT_MODULE, NULL); - g_signal_connect (widget, "realize", - G_CALLBACK (fix_child_allocations), NULL); +// g_signal_connect (widget, "realize", +// G_CALLBACK (fix_child_allocations), NULL); /* load configuration; note that this will also set the module name */ gtk_sat_module_read_cfg_data (GTK_SAT_MODULE (widget), cfgfile); @@ -365,121 +356,58 @@ /** \brief Create module layout and add views. * - * It is assumed that module->layout and module->view_x have - * sensible values. + * It is assumed that module->grid and module->nviews have + * coherent values. */ static void create_module_layout (GtkSatModule *module) { + GtkWidget *table; + GtkWidget *view; + guint rows,cols; + guint i; - switch (module->layout) { - - /* one child, no setup needed here */ - case GTK_SAT_MOD_LAYOUT_1: - module->child_1 = create_view (module, 1); - module->child_2 = NULL; - module->child_3 = NULL; - gtk_container_add (GTK_CONTAINER (module), module->child_1); - break; - /* two children, we need a vpaned - child_1 on top */ - case GTK_SAT_MOD_LAYOUT_2: - module->vpaned = gtk_vpaned_new (); - gtk_container_add (GTK_CONTAINER (module), module->vpaned); + /* calculate the number of rows and columns necessary */ + get_grid_size (module, &rows, &cols); + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Layout has %d columns and %d rows."), + __FUNCTION__, cols, rows); - module->child_1 = create_view (module, 1); - module->child_2 = create_view (module, 2); - module->child_3 = NULL; + table = gtk_table_new (rows, cols, TRUE); - gtk_paned_pack1 (GTK_PANED (module->vpaned), - module->child_1, TRUE, TRUE); - gtk_paned_pack2 (GTK_PANED (module->vpaned), - module->child_2, TRUE, TRUE); + for (i = 0; i < module->nviews; i++) { + /* create the view */ + ... [truncated message content] |
From: <cs...@us...> - 2009-11-19 08:33:14
|
Revision: 520 http://gpredict.svn.sourceforge.net/gpredict/?rev=520&view=rev Author: csete Date: 2009-11-19 08:33:05 +0000 (Thu, 19 Nov 2009) Log Message: ----------- Sync Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-module.c trunk/src/gtk-sat-module.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-18 22:30:19 UTC (rev 519) +++ trunk/ChangeLog 2009-11-19 08:33:05 UTC (rev 520) @@ -1,6 +1,7 @@ 2009-11-18 Alexandru Csete <oz9aec at gmail.com> * src/config-keys.h: + * src/sat-cfg.[ch]: Added config key for new GRID layout. * src/sat-info.c: @@ -9,7 +10,7 @@ * src/gtk-single-sat.c: Changed satellite selector to list satellites in the main pop-up menu instead of a - submbenu (fewer mouse clicks). + submbenu (fewer mouse clicks). 2009-11-06 Alexandru Csete <oz9aec at gmail.com> Modified: trunk/src/gtk-sat-module.c =================================================================== --- trunk/src/gtk-sat-module.c 2009-11-18 22:30:19 UTC (rev 519) +++ trunk/src/gtk-sat-module.c 2009-11-19 08:33:05 UTC (rev 520) @@ -176,6 +176,8 @@ module->state = GTK_SAT_MOD_STATE_DOCKED; module->busy = g_mutex_new(); + module->grid = NULL; + module->views = NULL; module->layout = GTK_SAT_MOD_LAYOUT_1; module->view_1 = GTK_SAT_MOD_VIEW_MAP; module->view_2 = GTK_SAT_MOD_VIEW_POLAR; @@ -233,6 +235,13 @@ module->satellites = NULL; } + if (module->grid) { + g_free (module->grid); + module->grid = NULL; + } + + /* FIXME: free module->views? */ + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); } @@ -528,6 +537,7 @@ gchar *qthfile; gchar *confdir; gchar **buffv; + guint length; GError *error = NULL; module->cfgdata = g_key_file_new (); @@ -615,7 +625,20 @@ MOD_CFG_TIMEOUT_KEY, SAT_CFG_INT_MODULE_TIMEOUT); - /* layout */ + /* get grid layout configuration (introduced in 1.2) */ + buffer = mod_cfg_get_str (module->cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_GRID, + SAT_CFG_STR_MODULE_GRID); + + /* convert to an integer list */ + buffv = g_strsplit (buffer, ";", 0); + length = g_strv_length (buffv); + if ((length == 0) || (length % 5 != 0)) { + + } + + module->layout = mod_cfg_get_int (module->cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_LAYOUT, Modified: trunk/src/gtk-sat-module.h =================================================================== --- trunk/src/gtk-sat-module.h 2009-11-18 22:30:19 UTC (rev 519) +++ trunk/src/gtk-sat-module.h 2009-11-19 08:33:05 UTC (rev 520) @@ -113,6 +113,10 @@ gint vpanedpos; /*!< Stored position of vpaned */ gint hpanedpos; /*!< Stored pos of hpaned */ + /* layout and children */ + gint *grid; + GSList *views; + /* children */ GtkWidget *child_1; GtkWidget *child_2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-18 22:30:25
|
Revision: 519 http://gpredict.svn.sourceforge.net/gpredict/?rev=519&view=rev Author: csete Date: 2009-11-18 22:30:19 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Added config keys for new GRID layout. Modified Paths: -------------- trunk/src/sat-cfg.c trunk/src/sat-cfg.h Modified: trunk/src/sat-cfg.c =================================================================== --- trunk/src/sat-cfg.c 2009-11-18 17:06:56 UTC (rev 518) +++ trunk/src/sat-cfg.c 2009-11-18 22:30:19 UTC (rev 519) @@ -213,6 +213,7 @@ { "GLOBAL", "DEFAULT_QTH", "sample.qth"}, { "GLOBAL", "OPEN_MODULES", "Amateur"}, { "GLOBAL", "HTML_BROWSER", NULL}, + { "MODULES", "GRID", "1;0;2;0;1;2;0;1;1;2;3;1;2;1;2"}, { "MODULES", "MAP_FILE", "nasa-bmng-07_1024.jpg"}, { "MODULES", "MAP_FONT", "Sans 8"}, { "MODULES", "POLAR_FONT", "Sans 10"}, Modified: trunk/src/sat-cfg.h =================================================================== --- trunk/src/sat-cfg.h 2009-11-18 17:06:56 UTC (rev 518) +++ trunk/src/sat-cfg.h 2009-11-18 22:30:19 UTC (rev 519) @@ -137,6 +137,7 @@ SAT_CFG_STR_DEF_QTH, /*!< Default QTH file. */ SAT_CFG_STR_OPEN_MODULES, /*!< Open modules. */ SAT_CFG_STR_WEB_BROWSER, /*!< Web browser string. */ + SAT_CFG_STR_MODULE_GRID, /*!< The grid layout of the module */ SAT_CFG_STR_MAP_FILE, /*!< Map file (abs or rel). */ SAT_CFG_STR_MAP_FONT, /*!< Map font. */ SAT_CFG_STR_POL_FONT, /*!< Polar view font. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-18 17:07:07
|
Revision: 518 http://gpredict.svn.sourceforge.net/gpredict/?rev=518&view=rev Author: csete Date: 2009-11-18 17:06:56 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Changed satellite selector to list satellites in the main pop-up menu instead of a submbenu (fewer mouse clicks). Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-single-sat.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-18 16:41:02 UTC (rev 517) +++ trunk/ChangeLog 2009-11-18 17:06:56 UTC (rev 518) @@ -7,7 +7,11 @@ Pack transponder list into a scrolled window to prevent long transponder lists from resizing the satellite info dialog. + * src/gtk-single-sat.c: + Changed satellite selector to list satellites in the main pop-up menu instead of a + submbenu (fewer mouse clicks). + 2009-11-06 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-11-18 16:41:02 UTC (rev 517) +++ trunk/NEWS 2009-11-18 17:06:56 UTC (rev 518) @@ -13,6 +13,7 @@ - Applied patch 2877918: Fixes segfault in TLE updater (thanks Charles Suprin AA1VS). - Applied patch 2881367: Updated Flags to Locks (thanks Charles Suprin AA1VS). - Applied patch 2893617: Patches for fixing Windows build (thanks Valentin Yakovenkov). +- Slightly improved UI for the single-satellite view. Changes in version 1.1 (5 Oct 2009) Modified: trunk/src/gtk-single-sat.c =================================================================== --- trunk/src/gtk-single-sat.c 2009-11-18 16:41:02 UTC (rev 517) +++ trunk/src/gtk-single-sat.c 2009-11-18 17:06:56 UTC (rev 518) @@ -791,7 +791,6 @@ { GtkSingleSat *single_sat = GTK_SINGLE_SAT (data); GtkWidget *menu; - GtkWidget *select_menu; GtkWidget *menuitem; GtkWidget *image; GtkWidget *label; @@ -833,7 +832,7 @@ menuitem = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - /* next pass and predict passes */ + /* Show next pass */ menuitem = gtk_image_menu_item_new_with_label (_("Show next pass")); image = gtk_image_new_from_stock (GTK_STOCK_JUSTIFY_FILL, GTK_ICON_SIZE_MENU); @@ -848,6 +847,7 @@ gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); + /* Show future passes */ menuitem = gtk_image_menu_item_new_with_label (_("Future passes")); image = gtk_image_new_from_stock (GTK_STOCK_INDEX, GTK_ICON_SIZE_MENU); @@ -879,8 +879,7 @@ menuitem = gtk_separator_menu_item_new (); gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - select_menu = gtk_menu_new (); - + /* select sat */ for (i = 0; i < n; i++) { sati = SAT (g_slist_nth_data (single_sat->sats, i)); @@ -899,16 +898,12 @@ g_signal_connect_after (menuitem, "activate", G_CALLBACK (select_satellite), single_sat); - gtk_menu_shell_append (GTK_MENU_SHELL (select_menu), menuitem); + //gtk_menu_shell_append (GTK_MENU_SHELL (select_menu), menuitem); + gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); //gtk_widget_show (menuitem); } - /* select sat */ - menuitem = gtk_menu_item_new_with_label (_("Select satellite")); - gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), select_menu); - gtk_menu_shell_append (GTK_MENU_SHELL(menu), menuitem); - gtk_widget_show_all (menu); /* Note: event can be NULL here when called from view_onPopupMenu; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-11-18 16:41:10
|
Revision: 517 http://gpredict.svn.sourceforge.net/gpredict/?rev=517&view=rev Author: csete Date: 2009-11-18 16:41:02 +0000 (Wed, 18 Nov 2009) Log Message: ----------- Pack transponder list into a scrolled window to prevent long transponder lists from resizing the satellite info dialog. Modified Paths: -------------- trunk/ChangeLog trunk/src/sat-info.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-11-18 16:13:55 UTC (rev 516) +++ trunk/ChangeLog 2009-11-18 16:41:02 UTC (rev 517) @@ -3,7 +3,11 @@ * src/config-keys.h: Added config key for new GRID layout. + * src/sat-info.c: + Pack transponder list into a scrolled window to prevent long transponder lists from + resizing the satellite info dialog. + 2009-11-06 Alexandru Csete <oz9aec at gmail.com> * src/gtk-rig-ctrl.c: Modified: trunk/src/sat-info.c =================================================================== --- trunk/src/sat-info.c 2009-11-18 16:13:55 UTC (rev 516) +++ trunk/src/sat-info.c 2009-11-18 16:41:02 UTC (rev 517) @@ -415,7 +415,7 @@ /** \brief Create transponder table. */ static GtkWidget *create_transponder_table (guint catnum) { - GtkWidget *vbox,*label; + GtkWidget *vbox,*label,*swin; GSList *trsplist = NULL; trsp_t *trsp = NULL; guint i,n; @@ -424,7 +424,7 @@ trsplist = read_transponders (catnum); if (trsplist == NULL) { - vbox = gtk_label_new (_("No transponders")); + swin = gtk_label_new (_("No transponders")); } else { vbox = gtk_vbox_new (FALSE, 0); @@ -498,8 +498,14 @@ } } free_transponders (trsplist); + + /* pack into a scrolled window */ + swin = gtk_scrolled_window_new (NULL,NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + //gtk_container_add (GTK_CONTAINER (swin), vbox); + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (swin), vbox); } - return vbox; + return swin; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |