gpredict-svn Mailing List for Gpredict (Page 22)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
You can subscribe to this list here.
2008 |
Jan
(24) |
Feb
|
Mar
(6) |
Apr
(14) |
May
(9) |
Jun
|
Jul
|
Aug
(25) |
Sep
(60) |
Oct
(26) |
Nov
|
Dec
(20) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
(2) |
Mar
(22) |
Apr
(61) |
May
(57) |
Jun
|
Jul
(3) |
Aug
(83) |
Sep
(35) |
Oct
(50) |
Nov
(28) |
Dec
(34) |
2010 |
Jan
(29) |
Feb
(15) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(2) |
Jul
(24) |
Aug
(2) |
Sep
(9) |
Oct
(43) |
Nov
(22) |
Dec
(6) |
2011 |
Jan
(24) |
Feb
(22) |
Mar
(31) |
Apr
(13) |
May
(10) |
Jun
(10) |
Jul
(43) |
Aug
(12) |
Sep
(18) |
Oct
(33) |
Nov
(18) |
Dec
(4) |
From: <cs...@us...> - 2009-09-27 13:45:44
|
Revision: 441 http://gpredict.svn.sourceforge.net/gpredict/?rev=441&view=rev Author: csete Date: 2009-09-27 13:45:38 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Synchronise satellite categories during TLE update. Modified Paths: -------------- trunk/ChangeLog trunk/src/tle-update.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-27 01:10:59 UTC (rev 440) +++ trunk/ChangeLog 2009-09-27 13:45:38 UTC (rev 441) @@ -1,3 +1,9 @@ +2009-09-27 Alexandru Csete <oz9aec at gmail.com> + + * src/tle-update.c: + Synchronise satellite categories during TLE update. + + 2009-09-25 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module-tmg.c: Modified: trunk/src/tle-update.c =================================================================== --- trunk/src/tle-update.c 2009-09-27 01:10:59 UTC (rev 440) +++ trunk/src/tle-update.c 2009-09-27 13:45:38 UTC (rev 441) @@ -709,13 +709,39 @@ guint catnr,i; guint *key = NULL; + /* category sync related */ + gchar *catname, *catpath, *buff, **buffv; + FILE *catfile; + gchar category[80]; + + path = g_strconcat (dir, G_DIR_SEPARATOR_S, fnam, NULL); fp = g_fopen (path, "r"); if (fp != NULL) { + /* Prepare .cat file for sync while we read data */ + buffv = g_strsplit (fnam, ".", 0); + catname = g_strconcat (buffv[0], ".cat", NULL); + g_strfreev (buffv); + catpath = sat_file_name (catname); + g_free (catname); + + /* read category name for catfile */ + catfile = g_fopen (catpath, "r"); + b = fgets (category, 80, catfile); + fclose (catfile); + + /* reopen a new catfile and write category name */ + catfile = g_fopen (catpath, "w"); + g_free (catpath); + fputs (category, catfile); + + /* .cat file now contains the category name; + satellite catnums will be added during update in the while loop */ + /* read 3 lines at a time */ while (fgets (tle_str[0], 80, fp)) { /* read second and third lines */ @@ -746,6 +772,11 @@ /* __FUNCTION__, */ /* catnr); */ + /* store catalog number in catfile */ + buff = g_strdup_printf ("%d\n", catnr); + fputs (buff, catfile); + g_free (buff); + /* add data to hash table */ key = g_try_new0 (guint, 1); *key = catnr; @@ -774,6 +805,9 @@ } + /* close category file */ + fclose (catfile); + /* close input TLE file */ fclose (fp); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-27 01:11:08
|
Revision: 440 http://gpredict.svn.sourceforge.net/gpredict/?rev=440&view=rev Author: csete Date: 2009-09-27 01:10:59 +0000 (Sun, 27 Sep 2009) Log Message: ----------- Updated satellite data. Modified Paths: -------------- trunk/data/satdata/amateur.cat trunk/data/satdata/cubesat.cat trunk/data/satdata/galileo.cat trunk/data/satdata/geo.cat trunk/data/satdata/glo-ops.cat trunk/data/satdata/gps-ops.cat trunk/data/satdata/molniya.cat trunk/data/satdata/musson.cat trunk/data/satdata/other-comm.cat trunk/data/satdata/resource.cat trunk/data/satdata/satellites.dat trunk/data/satdata/tle-new.cat trunk/data/satdata/visual.cat trunk/data/satdata/weather.cat Modified: trunk/data/satdata/amateur.cat =================================================================== --- trunk/data/satdata/amateur.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/amateur.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -61,3 +61,5 @@ 33493 33498 33499 +35693 +35694 Modified: trunk/data/satdata/cubesat.cat =================================================================== --- trunk/data/satdata/cubesat.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/cubesat.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,4 +1,4 @@ -CubeSats +Cubesat 27842 27844 27845 Modified: trunk/data/satdata/galileo.cat =================================================================== --- trunk/data/satdata/galileo.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/galileo.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,3 +1,3 @@ -Galileo +Galileo Nav. 28922 32781 Modified: trunk/data/satdata/geo.cat =================================================================== --- trunk/data/satdata/geo.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/geo.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -64,7 +64,6 @@ 23536 23553 23571 -23598 23613 23636 23653 @@ -157,7 +156,6 @@ 25880 25894 25897 -25913 25922 25924 25937 @@ -303,7 +301,6 @@ 28946 29045 29055 -29230 29236 29155 29162 @@ -383,3 +380,9 @@ 34779 34810 34941 +35362 +35491 +35493 +35496 +35755 +35756 Modified: trunk/data/satdata/glo-ops.cat =================================================================== --- trunk/data/satdata/glo-ops.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/glo-ops.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,6 +1,5 @@ Glonass Operational 28112 -28114 28509 28915 28916 Modified: trunk/data/satdata/gps-ops.cat =================================================================== --- trunk/data/satdata/gps-ops.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/gps-ops.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,7 +1,6 @@ GPS Operational 20959 21552 -21890 22014 22108 22700 @@ -30,3 +29,4 @@ 32384 32711 34661 +35752 Modified: trunk/data/satdata/molniya.cat =================================================================== --- trunk/data/satdata/molniya.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/molniya.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,5 +1,4 @@ Molniya -20813 21118 21196 21426 Modified: trunk/data/satdata/musson.cat =================================================================== --- trunk/data/satdata/musson.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/musson.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,4 +1,4 @@ -Russian LEO Nav +Russon LEO Nav 25590 26818 27436 Modified: trunk/data/satdata/other-comm.cat =================================================================== --- trunk/data/satdata/other-comm.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/other-comm.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -1,4 +1,4 @@ -Other Comm. +Other Comm 26390 26483 26626 Modified: trunk/data/satdata/resource.cat =================================================================== --- trunk/data/satdata/resource.cat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/resource.cat 2009-09-27 01:10:59 UTC (rev 440) @@ -76,3 +76,4 @@ 33446 33456 35578 +35681 Modified: trunk/data/satdata/satellites.dat =================================================================== --- trunk/data/satdata/satellites.dat 2009-09-27 01:09:50 UTC (rev 439) +++ trunk/data/satdata/satellites.dat 2009-09-27 01:10:59 UTC (rev 440) @@ -3,8503 +3,8552 @@ VERSION=1.1 NAME=SPOT 4 NICKNAME=SPOT 4 -TLE1=1 25260U 98017A 09219.21245068 .00000169 00000-0 10000-3 0 3577 -TLE2=2 25260 98.6953 291.1754 0001620 94.2235 358.3711 14.20040400589577 +TLE1=1 25260U 98017A 09269.74538729 .00000169 00000-0 10000-3 0 5144 +TLE2=2 25260 98.6886 340.8197 0000519 66.6241 92.2460 14.20044203596748 [26390] VERSION=1.1 NAME=SIRIUS-1 NICKNAME=SIRIUS-1 -TLE1=1 26390U 00035A 09218.01560992 .00000073 00000-0 10000-3 0 5248 -TLE2=2 26390 61.4927 254.8292 2712001 270.4724 59.0253 1.00279604 33348 +TLE1=1 26390U 00035A 09267.87782105 .00000011 00000-0 10000-3 0 5543 +TLE2=2 26390 61.4487 254.3079 2686470 270.1556 59.3454 1.00272425 33842 [24971] VERSION=1.1 NAME=IRS-1D NICKNAME=IRS-1D -TLE1=1 24971U 97057A 09219.19134202 -.00000014 00000-0 93931-5 0 5446 -TLE2=2 24971 98.2342 252.8247 0054967 141.6583 218.8531 14.32956650620133 +TLE1=1 24971U 97057A 09269.74501955 .00000005 00000-0 16708-4 0 6991 +TLE2=2 24971 98.2299 300.8903 0054063 353.0775 6.9656 14.32975318627375 -[23598] -VERSION=1.1 -NAME=DIRECTV 3 (DBS 3) -NICKNAME=DIRECTV 3 (DBS 3) -TLE1=1 23598U 95029A 09218.57231027 -.00000224 00000-0 10000-3 0 1231 -TLE2=2 23598 0.4087 83.9837 0003517 13.9665 47.8326 0.99004631 51796 - [25418] VERSION=1.1 NAME=ORBCOMM FM15 [+] NICKNAME=ORBCOMM FM15 [+] -TLE1=1 25418U 98046F 09218.88388133 -.00000125 00000-0 55438-5 0 1585 -TLE2=2 25418 45.0014 27.0752 0001117 299.9246 60.1501 14.27602307573932 +TLE1=1 25418U 98046F 09268.84897003 .00000322 00000-0 18555-3 0 2000 +TLE2=2 25418 44.9992 154.1412 0000474 159.3586 200.7257 14.27650379581077 [25285] VERSION=1.1 NAME=IRIDIUM 62 [+] NICKNAME=IRIDIUM 62 [+] -TLE1=1 25285U 98021A 09218.47184104 .00000114 00000-0 33714-4 0 6367 -TLE2=2 25285 86.3980 344.1427 0002360 82.7939 277.3526 14.34213741593416 +TLE1=1 25285U 98021A 09269.68185407 .00000093 00000-0 26089-4 0 6951 +TLE2=2 25285 86.3987 322.7617 0002375 80.9227 279.2233 14.34225270600754 [25354] VERSION=1.1 NAME=CHINASTAR 1 NICKNAME=CHINASTAR 1 -TLE1=1 25354U 98033A 09218.32223973 .00000000 00000-0 10000-3 0 5847 -TLE2=2 25354 0.0240 243.3002 0003058 223.1697 51.9202 1.00265038 45527 +TLE1=1 25354U 98033A 09269.72896039 -.00000218 00000-0 10000-3 0 6265 +TLE2=2 25354 0.0224 224.4571 0002163 294.6500 196.4888 1.00271221 46046 [27811] VERSION=1.1 NAME=HELLAS-SAT 2 NICKNAME=HELLAS-SAT 2 -TLE1=1 27811U 03020A 09218.77157549 .00000000 00000-0 10000-3 0 9702 -TLE2=2 27811 0.0190 267.4664 0002989 234.4932 130.2414 1.00272543 22734 +TLE1=1 27811U 03020A 09268.64162580 .00000140 00000-0 10000-3 0 9967 +TLE2=2 27811 0.0207 241.1842 0002922 285.5060 107.8568 1.00273173 23232 [23571] VERSION=1.1 NAME=INTELSAT 706 (IS-706) NICKNAME=INTELSAT 706 (IS-706) -TLE1=1 23571U 95023A 09218.57126086 .00000085 00000-0 10000-3 0 9742 -TLE2=2 23571 0.0233 326.0480 0003112 168.0369 81.6260 1.00271937 52078 +TLE1=1 23571U 95023A 09266.75879784 .00000073 00000-0 10000-3 0 9966 +TLE2=2 23571 0.0018 177.8698 0002734 356.6188 156.2522 1.00273145 52551 [12389] VERSION=1.1 NAME=SL-8 R/B NICKNAME=SL-8 R/B -TLE1=1 12389U 81033B 09218.59316623 .00002152 00000-0 68283-4 0 4146 -TLE2=2 12389 82.9166 278.2269 0409660 26.3345 335.8070 14.77450217444445 +TLE1=1 12389U 81033B 09269.04455892 .00001603 00000-0 51767-4 0 4581 +TLE2=2 12389 82.9169 233.7213 0406246 218.9615 138.1658 14.77648719451898 [28485] VERSION=1.1 NAME=SWIFT NICKNAME=SWIFT -TLE1=1 28485U 04047A 09218.34865476 .00000570 00000-0 15642-4 0 3599 -TLE2=2 28485 20.5593 216.0740 0014256 315.5778 44.3541 14.92560888257171 +TLE1=1 28485U 04047A 09268.94975398 .00000665 00000-0 24579-4 0 3982 +TLE2=2 28485 20.5593 228.4437 0014600 223.7338 136.1981 14.92577208264749 [29107] VERSION=1.1 NAME=CLOUDSAT NICKNAME=CLOUDSAT -TLE1=1 29107U 06016A 09218.19308204 .00000006 00000-0 11220-4 0 480 -TLE2=2 29107 98.1786 161.8074 0001531 97.2638 262.8739 14.57138415174156 +TLE1=1 29107U 06016A 09268.87093398 .00000013 00000-0 12977-4 0 933 +TLE2=2 29107 98.1858 211.6072 0001202 69.0520 291.0825 14.57120541181531 [25736] VERSION=1.1 NAME=MUBLCOM NICKNAME=MUBLCOM -TLE1=1 25736U 99026B 09218.87401934 .00000004 00000-0 12291-4 0 7996 -TLE2=2 25736 97.7647 145.7652 0004353 265.5798 94.4878 14.44569075538115 +TLE1=1 25736U 99026B 09269.36857621 .00000276 00000-0 90692-4 0 8391 +TLE2=2 25736 97.7664 191.9363 0006597 100.4570 259.7386 14.44582978545400 [28496] VERSION=1.1 NAME=ESSAIM-3 NICKNAME=ESSAIM-3 -TLE1=1 28496U 04049E 09219.15783397 .00000065 00000-0 19338-4 0 2161 -TLE2=2 28496 98.2706 183.2545 0010184 85.4511 274.7867 14.70161369248754 +TLE1=1 28496U 04049E 09269.86270901 -.00001623 00000-0 -26113-3 0 3719 +TLE2=2 28496 98.2820 234.7083 0007777 287.6200 72.4195 14.70153947256204 [902] VERSION=1.1 NAME=CALSPHERE 2 NICKNAME=CALSPHERE 2 -TLE1=1 00902U 64063E 09218.83787850 .00000075 00000-0 10000-3 0 1242 -TLE2=2 00902 90.1640 330.8990 0019731 98.3579 261.9808 13.52466473 24211 +TLE1=1 00902U 64063E 09269.66419411 .00000075 00000-0 10000-3 0 1659 +TLE2=2 00902 90.1632 331.7486 0017323 320.3591 39.6294 13.52467587 31088 [23711] VERSION=1.1 NAME=SURFSAT NICKNAME=SURFSAT -TLE1=1 23711U 95059B 09218.12118392 .00000054 00000-0 19271-3 0 2994 -TLE2=2 23711 100.3037 219.3652 0368334 4.7126 355.7405 13.12568218658987 +TLE1=1 23711U 95059B 09269.03744372 .00000067 00000-0 22326-3 0 3386 +TLE2=2 23711 100.3048 268.8011 0367807 248.4770 107.6796 13.12569694665662 [24842] VERSION=1.1 NAME=IRIDIUM 911 [-] NICKNAME=IRIDIUM 911 [-] -TLE1=1 24842U 97030G 09218.21916012 .00000077 00000-0 16987-4 0 3680 -TLE2=2 24842 86.4471 113.3247 0012498 254.5839 105.3985 14.43179533638506 +TLE1=1 24842U 97030G 09269.52747788 .00000085 00000-0 19183-4 0 4290 +TLE2=2 24842 86.4394 91.8556 0017272 82.8697 277.4460 14.43186731645901 [22220] VERSION=1.1 NAME=SL-16 R/B NICKNAME=SL-16 R/B -TLE1=1 22220U 92076B 09218.89794456 -.00000304 00000-0 -12912-3 0 9597 -TLE2=2 22220 71.0002 341.6914 0013739 319.6665 40.3424 14.16143055864248 +TLE1=1 22220U 92076B 09269.11957890 -.00000210 00000-0 -81984-4 0 9997 +TLE2=2 22220 70.9975 236.0240 0015066 251.6043 108.3404 14.16147478871350 [32388] VERSION=1.1 NAME=HORIZONS 2 NICKNAME=HORIZONS 2 -TLE1=1 32388U 07063B 09218.32734141 -.00000254 00000-0 10000-3 0 2523 -TLE2=2 32388 0.0113 310.8501 0002558 184.9219 223.0094 1.00273790 6110 +TLE1=1 32388U 07063B 09269.12145128 -.00000264 00000-0 10000-3 0 2743 +TLE2=2 32388 0.0189 255.8416 0002261 280.0485 158.8391 1.00270762 6627 [25772] VERSION=1.1 NAME=GLOBALSTAR M047 NICKNAME=GLOBALSTAR M047 -TLE1=1 25772U 99031C 09218.11730346 -.00000086 00000-0 10000-3 0 428 -TLE2=2 25772 51.9946 227.6537 0001159 184.6478 175.4382 12.62266082468479 +TLE1=1 25772U 99031C 09268.95362416 -.00000086 00000-0 10000-3 0 840 +TLE2=2 25772 51.9943 72.8702 0000772 63.7500 296.3439 12.62259940474897 [15427] VERSION=1.1 NAME=NOAA 9 [P] NICKNAME=NOAA 9 [P] -TLE1=1 15427U 84123A 09218.41176134 -.00000075 00000-0 -17479-4 0 7741 -TLE2=2 15427 98.4422 213.4729 0014008 275.4043 84.5554 14.15324684272062 +TLE1=1 15427U 84123A 09269.10014354 .00000236 00000-0 14210-3 0 8341 +TLE2=2 15427 98.4489 261.5138 0015568 126.0970 234.1650 14.15329701279236 [28190] VERSION=1.1 -NAME=GPS BIIR-11 (PRN 19) -NICKNAME=GPS BIIR-11 (PRN 19) -TLE1=1 28190U 04009A 09217.77295033 -.00000002 00000-0 10000-3 0 2325 -TLE2=2 28190 54.8647 160.3585 0058249 340.3266 19.4156 2.00568291 39445 +NAME=GPS BIIR-11 (DASS) +NICKNAME=GPS BIIR-11 (DASS) +TLE1=1 28190U 04009A 09268.62735647 -.00000029 00000-0 10000-3 0 2829 +TLE2=2 28190 54.8631 158.3447 0058787 342.9889 16.8801 2.00566061 40463 [25288] VERSION=1.1 NAME=IRIDIUM 65 [+] NICKNAME=IRIDIUM 65 [+] -TLE1=1 25288U 98021D 09218.42110111 .00000101 00000-0 29037-4 0 6440 -TLE2=2 25288 86.3977 344.1378 0002327 74.7783 285.3667 14.34213625593406 +TLE1=1 25288U 98021D 09269.70089149 .00000089 00000-0 24557-4 0 7014 +TLE2=2 25288 86.3983 322.7268 0002357 89.8193 270.3274 14.34224906600757 [25922] VERSION=1.1 NAME=GALAXY 27 (G-27) NICKNAME=GALAXY 27 (G-27) -TLE1=1 25922U 99052A 09216.55600830 .00000055 00000-0 10000-3 0 5259 -TLE2=2 25922 0.0133 76.3313 0002193 46.1670 261.8799 1.00271576 36113 +TLE1=1 25922U 99052A 09267.20932406 .00000046 00000-0 10000-3 0 5489 +TLE2=2 25922 0.0081 246.8355 0001994 295.0929 127.6005 1.00273912 36615 [26766] VERSION=1.1 NAME=INTELSAT 10 (IS-10) NICKNAME=INTELSAT 10 (IS-10) -TLE1=1 26766U 01019A 09217.62444905 .00000000 00000-0 10000-3 0 4271 -TLE2=2 26766 0.0129 277.2041 0002031 177.6497 152.7194 1.00270859 30151 +TLE1=1 26766U 01019A 09266.68907846 -.00000038 00000-0 10000-3 0 4552 +TLE2=2 26766 0.0329 266.9285 0000411 79.2451 333.0506 1.00273080 30650 [24841] VERSION=1.1 NAME=IRIDIUM 16 [-] NICKNAME=IRIDIUM 16 [-] -TLE1=1 24841U 97030F 09218.22907930 .00000125 00000-0 36636-4 0 7095 -TLE2=2 24841 86.4051 111.1321 0002239 28.1371 331.9945 14.35293904635450 +TLE1=1 24841U 97030F 09269.60984963 .00000090 00000-0 24623-4 0 7706 +TLE2=2 24841 86.3988 89.6510 0003544 113.3647 246.7922 14.35299830642821 [22970] VERSION=1.1 NAME=TUBSAT B NICKNAME=TUBSAT B -TLE1=1 22970U 94003B 09218.20212307 .00000051 00000-0 10000-3 0 1232 -TLE2=2 22970 82.5621 114.3639 0017033 119.8875 240.4012 13.16915040746567 +TLE1=1 22970U 94003B 09269.63722838 .00000051 00000-0 10000-3 0 1612 +TLE2=2 22970 82.5560 78.0490 0016124 359.2311 0.8749 13.16916351753339 [25331] VERSION=1.1 NAME=ECHOSTAR 4 NICKNAME=ECHOSTAR 4 -TLE1=1 25331U 98028A 09218.33066257 -.00000244 00000-0 10000-3 0 337 -TLE2=2 25331 1.2156 50.9902 0005154 70.5324 235.2990 1.00268671 41312 +TLE1=1 25331U 98028A 09268.25820225 -.00000255 00000-0 10000-3 0 620 +TLE2=2 25331 1.3223 53.2389 0004881 132.2145 194.8394 1.00272976 41812 [24794] VERSION=1.1 NAME=IRIDIUM 6 [+] NICKNAME=IRIDIUM 6 [+] -TLE1=1 24794U 97020C 09218.13311721 .00000104 00000-0 30116-4 0 5067 -TLE2=2 24794 86.3937 79.1969 0002399 72.6979 287.4479 14.34220055641545 +TLE1=1 24794U 97020C 09269.48279496 -.00000062 00000-0 -29337-4 0 5690 +TLE2=2 24794 86.3920 57.7063 0002221 87.9869 272.1577 14.34211610648909 [26464] VERSION=1.1 NAME=CLUSTER II-FM8 NICKNAME=CLUSTER II-FM8 -TLE1=1 26464U 00045B 09218.45833333 .00000347 00000-0 00000+0 0 3563 -TLE2=2 26464 109.3712 187.3308 8557009 31.5269 358.3203 0.42013901 4791 +TLE1=1 26464U 00045B 09268.41666667 -.00000185 00000-0 00000+0 0 3806 +TLE2=2 26464 110.9550 189.0765 8634758 31.8030 355.7477 0.42025804 4992 [26626] VERSION=1.1 NAME=SIRIUS-3 NICKNAME=SIRIUS-3 -TLE1=1 26626U 00077A 09217.35031233 -.00000137 00000-0 10000-3 0 4615 -TLE2=2 26626 64.1096 14.5856 2674785 269.7432 59.9035 1.00282415 31807 +TLE1=1 26626U 00077A 09269.20520763 -.00000156 00000-0 10000-3 0 4843 +TLE2=2 26626 64.1840 13.9960 2825100 269.5619 58.4262 1.00276674 32321 [28915] VERSION=1.1 NAME=COSMOS 2419 (714) NICKNAME=COSMOS 2419 (714) -TLE1=1 28915U 05050A 09218.19237948 .00000011 00000-0 10000-3 0 186 -TLE2=2 28915 64.8662 162.1422 0009309 326.2517 76.6245 2.13101827 28133 +TLE1=1 28915U 05050A 09269.80266880 -.00000020 00000-0 10000-3 0 560 +TLE2=2 28915 64.8626 160.4371 0008111 337.3914 59.0764 2.13101843 29232 [22826] VERSION=1.1 NAME=ITAMSAT (IO-26) -NICKNAME=ITAMSAT (IO-26) -TLE1=1 22826U 93061D 09217.97130768 -.00000023 00000-0 75386-5 0 383 -TLE2=2 22826 98.4332 170.5626 0009834 110.7733 249.4507 14.29522652827123 +NICKNAME=IO-26 +TLE1=1 22826U 93061D 09268.85649743 -.00000018 00000-0 94283-5 0 802 +TLE2=2 22826 98.4408 219.8657 0008557 329.2983 30.7701 14.29526403834395 [23705] VERSION=1.1 NAME=SL-16 R/B NICKNAME=SL-16 R/B -TLE1=1 23705U 95058B 09217.74669167 .00000026 00000-0 38202-4 0 9446 -TLE2=2 23705 71.0205 294.2437 0012093 347.5771 12.5073 14.14863007710879 +TLE1=1 23705U 95058B 09268.93292022 .00000212 00000-0 13434-3 0 9665 +TLE2=2 23705 71.0201 186.8926 0014232 275.1764 84.7708 14.14870035718119 [3230] VERSION=1.1 NAME=SL-8 R/B NICKNAME=SL-8 R/B -TLE1=1 03230U 68040B 09218.90780234 -.00000001 00000-0 43949-5 0 7173 -TLE2=2 03230 74.0345 200.0513 0034767 194.7743 165.2430 14.84219816208775 +TLE1=1 03230U 68040B 09268.71913884 .00000146 00000-0 21764-4 0 7614 +TLE2=2 03230 74.0340 101.3014 0033299 81.8856 278.6110 14.84231957216165 [28187] VERSION=1.1 NAME=EUTELSAT W3A NICKNAME=EUTELSAT W3A -TLE1=1 28187U 04008A 09216.60081120 .00000044 00000-0 10000-3 0 8300 -TLE2=2 28187 0.0703 357.3303 0004156 122.0330 57.1913 1.00273384 19801 +TLE1=1 28187U 04008A 09267.20673811 .00000036 00000-0 10000-3 0 8464 +TLE2=2 28187 0.0687 350.4014 0003864 191.0164 263.1783 1.00273586 20317 [27426] VERSION=1.1 NAME=DIRECTV 5 (TEMPO 1) NICKNAME=DIRECTV 5 (TEMPO 1) -TLE1=1 27426U 02023A 09218.43238100 -.00000057 00000-0 10000-3 0 3608 -TLE2=2 27426 0.0187 95.3343 0003080 37.7207 227.5552 1.00272017 26582 +TLE1=1 27426U 02023A 09268.49914787 -.00000068 00000-0 10000-3 0 3917 +TLE2=2 27426 0.0014 234.7650 0003020 309.2160 250.0538 1.00272559 27082 [28230] VERSION=1.1 NAME=GP-B NICKNAME=GP-B -TLE1=1 28230U 04014A 09218.34014324 .00000103 00000-0 12776-4 0 5723 -TLE2=2 28230 89.9452 157.6293 0002389 65.2338 294.9164 14.75982488285170 +TLE1=1 28230U 04014A 09268.78092169 -.00000058 00000-0 -10732-4 0 6103 +TLE2=2 28230 89.9421 157.3102 0003236 95.0357 265.1233 14.75988032292611 [27378] VERSION=1.1 NAME=ECHOSTAR 7 NICKNAME=ECHOSTAR 7 -TLE1=1 27378U 02006A 09217.60632291 -.00000003 00000-0 10000-3 0 4042 -TLE2=2 27378 0.0574 278.2481 0001394 209.0557 286.3297 1.00271946 27301 +TLE1=1 27378U 02006A 09266.55284444 -.00000013 00000-0 10000-3 0 4268 +TLE2=2 27378 0.0226 305.0423 0001186 233.5923 264.0150 1.00273139 27798 [29505] VERSION=1.1 NAME=SJ-6C NICKNAME=SJ-6C -TLE1=1 29505U 06046A 09219.19241053 .00000371 00000-0 43380-4 0 1369 -TLE2=2 29505 97.6880 224.6999 0001766 274.4143 85.6878 14.90666162151681 +TLE1=1 29505U 06046A 09269.73797244 .00000175 00000-0 23367-4 0 2942 +TLE2=2 29505 97.6911 273.9418 0004552 90.7885 269.3835 14.90672571159219 [22245] VERSION=1.1 NAME=GORIZONT 27 NICKNAME=GORIZONT 27 -TLE1=1 22245U 92082A 09216.86347532 -.00000301 00000-0 10000-3 0 4727 -TLE2=2 22245 11.3668 44.3627 0013807 223.0772 136.9119 1.00207880 65434 +TLE1=1 22245U 92082A 09267.76064779 -.00000370 00000-0 10000-3 0 4817 +TLE2=2 22245 11.4716 43.8084 0014692 222.9132 137.0012 1.00185241 65947 [22877] VERSION=1.1 NAME=GPS BIIA-23 (PRN 04) NICKNAME=GPS BIIA-23 (PRN 04) -TLE1=1 22877U 93068A 09218.01596993 .00000043 00000-0 10000-3 0 8433 -TLE2=2 22877 53.8743 216.3516 0086045 27.1764 333.2823 2.00551108115623 +TLE1=1 22877U 93068A 09267.37855438 .00000004 00000-0 10000-3 0 8996 +TLE2=2 22877 53.8615 214.3417 0086803 28.4437 332.0132 2.00548032116614 [25043] VERSION=1.1 NAME=IRIDIUM 38 [-] NICKNAME=IRIDIUM 38 [-] -TLE1=1 25043U 97069E 09218.31365358 .00000072 00000-0 18487-4 0 6975 -TLE2=2 25043 86.4013 141.5549 0001954 57.0415 303.0968 14.34703556614792 +TLE1=1 25043U 97069E 09269.64582838 .00000023 00000-0 11235-5 0 7591 +TLE2=2 25043 86.3928 120.1045 0002782 97.6703 262.4809 14.34707729622157 [23439] VERSION=1.1 NAME=RADIO ROSTO (RS-15) -NICKNAME=RADIO ROSTO (RS-15) -TLE1=1 23439U 94085A 09218.35652099 -.00000039 00000-0 10000-3 0 2200 -TLE2=2 23439 64.8133 183.6865 0148958 42.0398 319.1845 11.27553426601774 +NICKNAME=RS-15 +TLE1=1 23439U 94085A 09268.91066711 -.00000039 00000-0 10000-3 0 2689 +TLE2=2 23439 64.8127 101.9382 0150714 32.6092 328.4032 11.27553637607471 [26089] VERSION=1.1 NAME=GARUDA 1 NICKNAME=GARUDA 1 -TLE1=1 26089U 00011A 09218.83711767 -.00000359 00000-0 10000-3 0 4400 -TLE2=2 26089 1.2759 253.1503 0002542 248.0048 238.7305 1.00271029 34770 +TLE1=1 26089U 00011A 09267.76249958 -.00000371 00000-0 10000-3 0 4688 +TLE2=2 26089 1.1584 251.3166 0002988 317.3819 192.5215 1.00267160 35263 [27941] VERSION=1.1 NAME=NIGERIASAT 1 NICKNAME=NIGERIASAT 1 -TLE1=1 27941U 03042C 09219.16683331 .00000020 00000-0 12811-4 0 6765 -TLE2=2 27941 97.9369 92.0046 0011134 343.3807 16.7019 14.63027026312996 +TLE1=1 27941U 03042C 09269.77712950 .00000027 00000-0 14142-4 0 8305 +TLE2=2 27941 97.9265 140.6749 0011627 170.9809 189.1607 14.63033065320395 [28393] VERSION=1.1 NAME=AMAZONAS NICKNAME=AMAZONAS -TLE1=1 28393U 04031A 09216.27055630 -.00000287 00000-0 10000-3 0 6404 -TLE2=2 28393 0.0250 359.4076 0003188 116.1071 233.7761 1.00271214 18348 +TLE1=1 28393U 04031A 09269.18864949 -.00000294 00000-0 10000-3 0 6692 +TLE2=2 28393 0.0421 29.7625 0000551 188.8942 153.3258 1.00270176 18882 [28916] VERSION=1.1 NAME=COSMOS 2418 (713) NICKNAME=COSMOS 2418 (713) -TLE1=1 28916U 05050B 09218.94375946 .00000020 00000-0 10000-3 0 80 -TLE2=2 28916 64.8845 162.1524 0020129 331.2765 241.8891 2.13104318 28146 +TLE1=1 28916U 05050B 09269.61558435 -.00000020 00000-0 10000-3 0 481 +TLE2=2 28916 64.8813 160.4793 0018915 336.3459 230.9483 2.13104564 29225 [32763] VERSION=1.1 NAME=ICO G1 NICKNAME=ICO G1 -TLE1=1 32763U 08016A 09219.02280061 -.00000169 00000-0 10000-3 0 2978 -TLE2=2 32763 5.4563 329.4818 0003313 158.5933 102.9441 1.00271366 4848 +TLE1=1 32763U 08016A 09267.41666750 -.00000185 00000-0 10000-3 0 3189 +TLE2=2 32763 5.4108 329.7676 0002851 203.7427 247.0141 1.00271637 5339 [26892] VERSION=1.1 NAME=COSMOS 2379 NICKNAME=COSMOS 2379 -TLE1=1 26892U 01037A 09218.06054469 .00000083 00000-0 10000-3 0 3597 -TLE2=2 26892 4.9663 68.7067 0000394 178.5003 102.0874 1.00288458 29101 +TLE1=1 26892U 01037A 09269.06356713 .00000070 00000-0 10000-3 0 4025 +TLE2=2 26892 5.0860 68.0839 0001948 93.2282 238.8284 1.00268517 29613 [25276] VERSION=1.1 NAME=IRIDIUM 60 [+] NICKNAME=IRIDIUM 60 [+] -TLE1=1 25276U 98019E 09218.51026045 .00000034 00000-0 51489-5 0 6819 -TLE2=2 25276 86.3917 47.2860 0002375 79.3183 280.8280 14.34216392594464 +TLE1=1 25276U 98019E 09269.65072362 .00000200 00000-0 64309-4 0 7396 +TLE2=2 25276 86.3967 25.8977 0002274 84.5607 275.5849 14.34215206601797 [26610] VERSION=1.1 NAME=STRV 1C NICKNAME=STRV 1C -TLE1=1 26610U 00072C 09213.19754679 -.00000244 00000-0 00000+0 0 9650 -TLE2=2 26610 6.6517 269.3422 7322399 95.9763 343.5011 2.03458741 64735 +TLE1=1 26610U 00072C 09269.19593492 .00000075 00000-0 00000+0 0 9825 +TLE2=2 26610 6.5902 251.2811 7331514 132.0949 318.6585 2.03454365 65875 [28935] VERSION=1.1 NAME=ECHOSTAR 10 NICKNAME=ECHOSTAR 10 -TLE1=1 28935U 06003A 09218.56262535 -.00000057 00000-0 10000-3 0 7287 -TLE2=2 28935 0.0277 307.4073 0001533 192.4936 267.6589 1.00272377 12763 +TLE1=1 28935U 06003A 09269.40921971 -.00000067 00000-0 10000-3 0 7575 +TLE2=2 28935 0.0359 333.8786 0001530 209.2891 219.2746 1.00272196 13276 [25158] VERSION=1.1 NAME=ORBCOMM FM03 [-] NICKNAME=ORBCOMM FM03 [-] -TLE1=1 25158U 98007B 09218.19067792 .00000091 00000-0 92506-4 0 9464 -TLE2=2 25158 107.9731 216.0272 0052036 205.4517 154.4055 14.25442462596649 +TLE1=1 25158U 98007B 09269.13919671 .00000083 00000-0 89180-4 0 9876 +TLE2=2 25158 107.9724 319.1909 0049183 117.0609 243.5555 14.25459042603907 [26483] VERSION=1.1 NAME=SIRIUS-2 NICKNAME=SIRIUS-2 -TLE1=1 26483U 00051A 09218.67756884 .00000000 00000-0 10000-3 0 2188 -TLE2=2 26483 63.7265 134.6547 2714461 268.7015 60.4881 1.00246444 32690 +TLE1=1 26483U 00051A 09268.54548112 .00000034 00000-0 10000-3 0 2460 +TLE2=2 26483 63.7404 134.2536 2657742 270.3268 59.7045 1.00276559 33184 [24901] VERSION=1.1 NAME=AGILA 2 NICKNAME=AGILA 2 -TLE1=1 24901U 97042A 09216.62045868 -.00000239 00000-0 10000-3 0 8959 -TLE2=2 24901 0.0274 257.0569 0005027 228.9677 196.6019 1.00270468 43793 +TLE1=1 24901U 97042A 09267.64379068 -.00000247 00000-0 10000-3 0 9117 +TLE2=2 24901 0.0105 211.3167 0004177 323.2147 206.7915 1.00273259 44317 [23710] VERSION=1.1 NAME=RADARSAT-1 NICKNAME=RADARSAT-1 -TLE1=1 23710U 95059A 09219.22944641 .00000081 00000-0 48289-4 0 4678 -TLE2=2 23710 98.5778 225.2963 0001140 92.3827 327.2633 14.29982069718108 +TLE1=1 23710U 95059A 09269.75989413 .00000141 00000-0 71556-4 0 6231 +TLE2=2 23710 98.5818 275.1187 0001042 83.5270 35.0597 14.29978714725327 [25770] VERSION=1.1 NAME=GLOBALSTAR M025 NICKNAME=GLOBALSTAR M025 -TLE1=1 25770U 99031A 09218.39449241 -.00000086 00000-0 10000-3 0 9673 -TLE2=2 25770 51.9951 227.2245 0000872 181.0317 179.0542 12.62259071468501 +TLE1=1 25770U 99031A 09269.38919561 -.00000086 00000-0 10000-3 0 104 +TLE2=2 25770 51.9951 71.9593 0000859 88.6779 271.4186 12.62266203474941 [28463] VERSION=1.1 NAME=EXPRESS-AM 1 NICKNAME=EXPRESS-AM 1 -TLE1=1 28463U 04043A 09218.83833184 .00000150 00000-0 10000-3 0 5189 -TLE2=2 28463 0.0258 217.3722 0000620 203.3453 236.5756 1.00273725 17461 +TLE1=1 28463U 04043A 09269.65701714 .00000139 00000-0 10000-3 0 5534 +TLE2=2 28463 0.0188 91.4926 0001626 286.3218 264.3300 1.00273123 17979 [24906] VERSION=1.1 NAME=IRIDIUM 23 [+] NICKNAME=IRIDIUM 23 [+] -TLE1=1 24906U 97043D 09218.52584037 -.00000073 00000-0 -33112-4 0 7295 -TLE2=2 24906 86.3943 15.6029 0002356 77.5812 282.5646 14.34214097626232 +TLE1=1 24906U 97043D 09269.66618287 .00000270 00000-0 89222-4 0 7897 +TLE2=2 24906 86.4004 354.2449 0002379 83.0627 277.0855 14.34219817633560 [27651] VERSION=1.1 NAME=SORCE NICKNAME=SORCE -TLE1=1 27651U 03004A 09218.87345446 .00000009 00000-0 16892-4 0 9695 -TLE2=2 27651 39.9975 33.9936 0027335 334.9366 25.0074 14.82195448353816 +TLE1=1 27651U 03004A 09269.00366269 .00000019 00000-0 18159-4 0 108 +TLE2=2 27651 39.9957 117.4553 0027214 323.3033 36.5903 14.82207766361250 [27431] VERSION=1.1 NAME=FENGYUN 1D NICKNAME=FENGYUN 1D -TLE1=1 27431U 02024B 09218.98038380 -.00000331 00000-0 -16571-3 0 6500 -TLE2=2 27431 98.6287 206.5920 0014399 272.2172 87.7333 14.09281917371961 +TLE1=1 27431U 02024B 09268.82081236 -.00000045 00000-0 -16701-5 0 6921 +TLE2=2 27431 98.6371 254.3901 0015917 126.1668 234.0983 14.09284200378984 [25169] VERSION=1.1 NAME=IRIDIUM 52 [+] NICKNAME=IRIDIUM 52 [+] -TLE1=1 25169U 98010A 09218.39024369 .00000061 00000-0 14768-4 0 4214 -TLE2=2 25169 86.3960 110.6079 0002393 81.4039 278.7428 14.34218572600161 +TLE1=1 25169U 98010A 09269.60023165 -.00000098 00000-0 -42133-4 0 4801 +TLE2=2 25169 86.3894 89.1898 0002240 78.2251 281.9196 14.34217146607506 [25634] VERSION=1.1 NAME=ARGOS NICKNAME=ARGOS -TLE1=1 25634U 99008A 09219.02120106 -.00000069 00000-0 -11198-4 0 7842 -TLE2=2 25634 99.0082 256.9208 0010253 158.0061 202.1575 14.18910434541258 +TLE1=1 25634U 99008A 09269.08747703 .00000095 00000-0 67449-4 0 8232 +TLE2=2 25634 99.0016 307.7813 0010740 22.7075 337.4594 14.18913190548358 [15677] VERSION=1.1 NAME=GSTAR 1 NICKNAME=GSTAR 1 -TLE1=1 15677U 85035A 09216.56168526 -.00000102 00000-0 10000-3 0 1679 -TLE2=2 15677 10.7896 50.2710 0005567 265.9873 94.0454 1.00272515 63465 +TLE1=1 15677U 85035A 09268.41781998 -.00000105 00000-0 10000-3 0 1857 +TLE2=2 15677 10.9006 49.6738 0005479 256.2583 103.7248 1.00272402 63986 +[35931] +VERSION=1.1 +NAME=OCEANSAT 2 +NICKNAME=OCEANSAT 2 +TLE1=1 35931U 09051A 09269.27000761 .00006140 00000-0 15388-2 0 73 +TLE2=2 35931 98.3373 3.9527 0007134 263.1261 96.9094 14.51714908 432 + +[35756] +VERSION=1.1 +NAME=OPTUS D3 +NICKNAME=OPTUS D3 +TLE1=1 35756U 09044B 09267.62995983 -.00000161 00000-0 10000-3 0 329 +TLE2=2 35756 0.0562 344.0821 0002634 185.8089 216.3545 1.00270865 383 + [32266] VERSION=1.1 NAME=GLOBALSTAR M068 NICKNAME=GLOBALSTAR M068 -TLE1=1 32266U 07048D 09218.42171302 -.00000086 00000-0 10000-3 0 6488 -TLE2=2 32266 51.9875 317.7565 0000874 92.9571 267.1394 12.62260786 85951 +TLE1=1 32266U 07048D 09269.17887788 -.00000086 00000-0 10000-3 0 6905 +TLE2=2 32266 51.9835 163.1757 0001778 81.7981 278.3086 12.62261978 92367 [26113] VERSION=1.1 NAME=IMAGE NICKNAME=IMAGE -TLE1=1 26113U 00017A 09215.94619152 .00000321 00000-0 00000-0 0 8552 -TLE2=2 26113 91.2661 212.9791 7370906 278.7485 11.6823 1.68638721 57638 +TLE1=1 26113U 00017A 09265.75819952 .00000253 00000-0 10000-3 0 8734 +TLE2=2 26113 91.2524 213.4656 7345844 273.1823 13.1814 1.68638835 58476 [21118] VERSION=1.1 NAME=MOLNIYA 1-80 NICKNAME=MOLNIYA 1-80 -TLE1=1 21118U 91012A 09218.32418207 .00001368 00000-0 10000-3 0 6701 -TLE2=2 21118 61.9702 260.9446 7265977 253.2605 21.6473 2.00487573135342 +TLE1=1 21118U 91012A 09266.19328902 .00001155 00000-0 10000-3 0 6918 +TLE2=2 21118 61.9164 253.8758 7255619 253.9289 21.4505 2.00595461136305 [25884] VERSION=1.1 NAME=GLOBALSTAR M027 NICKNAME=GLOBALSTAR M027 -TLE1=1 25884U 99043B 09218.92632027 -.00000086 00000-0 10000-3 0 9565 -TLE2=2 25884 52.0091 2.9990 0001002 128.8015 231.2931 12.62265625460045 +TLE1=1 25884U 99043B 09269.28776602 -.00000086 00000-0 10000-3 0 9973 +TLE2=2 25884 52.0067 209.7045 0000954 44.0587 316.0351 12.62256982466404 [28899] VERSION=1.1 NAME=INMARSAT 4-F2 NICKNAME=INMARSAT 4-F2 -TLE1=1 28899U 05044A 09218.87308442 .00000139 00000-0 10000-3 0 7945 -TLE2=2 28899 2.2471 315.6568 0003114 182.8084 156.4401 1.00272845 13765 +TLE1=1 28899U 05044A 09269.82262602 .00000126 00000-0 10000-3 0 8669 +TLE2=2 28899 2.2311 316.9152 0002975 226.4279 143.6451 1.00274223 14289 [24948] VERSION=1.1 NAME=IRIDIUM 28 [-] NICKNAME=IRIDIUM 28 [-] -TLE1=1 24948U 97051E 09218.51660622 .00000256 00000-0 84430-4 0 5450 -TLE2=2 24948 86.3911 47.4612 0001831 72.2271 287.9155 14.34266370622794 +TLE1=1 24948U 97051E 09269.65511556 .00000094 00000-0 26372-4 0 6061 +TLE2=2 24948 86.3981 26.0755 0002736 87.3436 272.8074 14.34271140630127 [4327] VERSION=1.1 NAME=SERT 2 NICKNAME=SERT 2 -TLE1=1 04327U 70009A 09217.72089640 .00000032 00000-0 10000-3 0 560 -TLE2=2 04327 99.2075 87.9698 0004336 183.1478 176.9634 13.58228203957523 +TLE1=1 04327U 70009A 09268.69631743 .00000032 00000-0 10000-3 0 705 +TLE2=2 04327 99.1988 135.7352 0005632 59.8701 300.2994 13.58229655964444 [33460] VERSION=1.1 NAME=EUTELSAT W2M NICKNAME=EUTELSAT W2M -TLE1=1 33460U 08065B 09215.97706016 .00000015 00000-0 10000-3 0 1248 -TLE2=2 33460 0.0572 294.3213 0002574 167.3126 205.8752 1.00272254 2329 +TLE1=1 33460U 08065B 09267.18585715 .00000008 00000-0 10000-3 0 1454 +TLE2=2 33460 0.1084 51.0778 0002518 100.0151 282.0441 1.00273037 2841 [25531] VERSION=1.1 NAME=IRIDIUM 83 [+] NICKNAME=IRIDIUM 83 [+] -TLE1=1 25531U 98066E 09218.22533892 .00000229 00000-0 74666-4 0 5924 -TLE2=2 25531 86.3965 110.5200 0002503 71.3222 288.8245 14.34218256562715 +TLE1=1 25531U 98066E 09269.57487706 -.00000110 00000-0 -46375-4 0 6524 +TLE2=2 25531 86.3906 89.0419 0002212 77.3459 282.7983 14.34216634570075 [10953] VERSION=1.1 -NAME=GOES 3 -NICKNAME=GOES 3 -TLE1=1 10953U 78062A 09217.41789438 -.00000114 00000-0 10000-3 0 5902 -TLE2=2 10953 14.3771 359.6901 0002839 19.8091 340.2567 1.00265687 67168 +NAME=GOES 3 [P] +NICKNAME=GOES 3 [P] +TLE1=1 10953U 78062A 09268.28097211 -.00000112 00000-0 10000-3 0 6453 +TLE2=2 10953 14.3934 359.2696 0001788 332.9043 27.1041 1.00265759 67678 [27373] VERSION=1.1 NAME=IRIDIUM 90 [S] NICKNAME=IRIDIUM 90 [S] -TLE1=1 27373U 02005B 09218.41059850 .00000154 00000-0 40187-4 0 1548 -TLE2=2 27373 86.4494 110.2731 0004806 154.8423 205.3011 14.42959664397235 +TLE1=1 27373U 02005B 09269.58827937 -.00000161 00000-0 -54351-4 0 2146 +TLE2=2 27373 86.4424 88.8700 0006314 34.2370 325.9233 14.42947177404614 [27561] VERSION=1.1 NAME=RUBIN-3 & SL-8 R/B NICKNAME=RUBIN-3 & SL-8 R/B -TLE1=1 27561U 02054C 09219.13542928 .00000006 00000-0 11596-4 0 7447 -TLE2=2 27561 97.9404 51.9553 0048705 83.0967 277.5774 14.53764562354915 +TLE1=1 27561U 02054C 09268.96648032 .00000007 00000-0 12159-4 0 7879 +TLE2=2 27561 97.9374 99.2177 0046811 289.3133 70.3007 14.53769797362158 [7530] VERSION=1.1 NAME=OSCAR 7 (AO-7) -NICKNAME=OSCAR 7 (AO-7) -TLE1=1 07530U 74089B 09218.52640616 -.00000027 00000-0 10000-3 0 5487 -TLE2=2 07530 101.4244 241.3519 0011745 168.9775 191.1560 12.53576053589023 +NICKNAME=AO-7 +TLE1=1 07530U 74089B 09269.68230389 -.00000027 00000-0 10000-3 0 5909 +TLE2=2 07530 101.4224 290.6174 0012106 69.8933 290.3440 12.53576672595430 [25721] VERSION=1.1 NAME=ABRIXAS NICKNAME=ABRIXAS -TLE1=1 25721U 99022A 09218.75550938 -.00000769 00000-0 -20131-4 0 6285 -TLE2=2 25721 48.4430 64.0805 0020306 64.7927 295.5108 15.20235823568157 +TLE1=1 25721U 99022A 09268.90218375 -.00000508 00000-0 -83757-5 0 6660 +TLE2=2 25721 48.4408 170.1699 0020659 294.8915 64.9863 15.20283085575782 [16908] VERSION=1.1 NAME=EGP NICKNAME=EGP -TLE1=1 16908U 86061A 09218.39803131 -.00000083 00000-0 10000-3 0 9775 -TLE2=2 16908 50.0109 4.6189 0010968 346.0353 14.0178 12.44462402713851 +TLE1=1 16908U 86061A 09269.55576803 -.00000083 00000-0 10000-3 0 201 +TLE2=2 16908 50.0079 207.3272 0011433 115.6970 244.5047 12.44462882720221 [25395] VERSION=1.1 NAME=FASAT B NICKNAME=FASAT B -TLE1=1 25395U 98043B 09219.19326761 .00000030 00000-0 30767-4 0 5170 -TLE2=2 25395 98.3312 247.6866 0003798 63.4278 296.7292 14.24357425575706 +TLE1=1 25395U 98043B 09268.92823197 -.00000008 00000-0 14059-4 0 5576 +TLE2=2 25395 98.3303 294.8566 0001949 280.4892 79.6071 14.24361924582784 [33154] VERSION=1.1 NAME=BADR-6 NICKNAME=BADR-6 -TLE1=1 33154U 08034B 09217.75627156 .00000142 00000-0 10000-3 0 2027 -TLE2=2 33154 0.0487 328.1294 0001511 172.2628 112.2801 1.00274858 4006 +TLE1=1 33154U 08034B 09265.77450711 .00000131 00000-0 10000-3 0 2245 +TLE2=2 33154 0.0612 320.1689 0002526 263.8368 82.5497 1.00271431 4487 [25624] VERSION=1.1 NAME=GLOBALSTAR M038 NICKNAME=GLOBALSTAR M038 -TLE1=1 25624U 99004D 09218.90660537 -.00000086 00000-0 10000-3 0 177 -TLE2=2 25624 52.0037 2.3422 0001955 87.0513 273.0566 12.62260732484933 +TLE1=1 25624U 99004D 09269.34707538 -.00000086 00000-0 10000-3 0 589 +TLE2=2 25624 52.0004 208.7858 0000986 111.3356 248.7616 12.62261755491301 [26900] VERSION=1.1 NAME=INTELSAT 902 (IS-902) NICKNAME=INTELSAT 902 (IS-902) -TLE1=1 26900U 01039A 09218.11614701 .00000000 00000-0 10000-3 0 4372 -TLE2=2 26900 0.0184 21.0205 0003873 131.2552 266.3222 1.00270998 29091 +TLE1=1 26900U 01039A 09268.64101267 .00000021 00000-0 10000-3 0 4635 +TLE2=2 26900 0.0063 209.2927 0002783 317.1667 130.9083 1.00273269 29599 [21111] VERSION=1.1 NAME=COSMOS 2133 NICKNAME=COSMOS 2133 -TLE1=1 21111U 91010A 09217.02332030 -.00000146 00000-0 10000-3 0 1773 -TLE2=2 21111 11.3583 41.3998 0003335 7.7976 352.3024 1.00280505 67679 +TLE1=1 21111U 91010A 09268.87687490 -.00000159 00000-0 10000-3 0 1937 +TLE2=2 21111 11.4588 40.8707 0003159 3.5177 356.5164 1.00275329 68195 [23027] VERSION=1.1 NAME=GPS BIIA-24 (PRN 06) NICKNAME=GPS BIIA-24 (PRN 06) -TLE1=1 23027U 94016A 09217.22103167 -.00000013 00000-0 10000-3 0 8599 -TLE2=2 23027 53.5119 153.4449 0061448 285.0031 74.2931 2.00560098112912 +TLE1=1 23027U 94016A 09268.57532269 -.00000027 00000-0 10000-3 0 9093 +TLE2=2 23027 53.5108 151.3378 0060755 287.0393 72.3680 2.00560227113949 [27436] VERSION=1.1 NAME=COSMOS 2389 NICKNAME=COSMOS 2389 -TLE1=1 27436U 02026A 09218.99149165 .00000032 00000-0 17246-4 0 8297 -TLE2=2 27436 82.9460 45.0450 0046779 157.7937 202.5262 13.74734318360956 +TLE1=1 27436U 02026A 09268.77461719 .00000037 00000-0 22472-4 0 8720 +TLE2=2 27436 82.9534 8.2236 0047306 22.5501 337.7724 13.74734570367797 [27844] VERSION=1.1 NAME=CUTE-1 (CO-55) -NICKNAME=CUTE-1 (CO-55) -TLE1=1 27844U 03031E 09217.99761731 .00000024 00000-0 31243-4 0 6376 -TLE2=2 27844 98.7127 226.4591 0010424 5.1621 354.9675 14.20649539316334 +NICKNAME=CO-55 +TLE1=1 27844U 03031E 09269.27053268 .00000026 00000-0 32513-4 0 6758 +TLE2=2 27844 98.7140 277.0183 0009125 210.0338 150.0315 14.20657204323619 [25112] VERSION=1.1 NAME=ORBCOMM FM08 [+] NICKNAME=ORBCOMM FM08 [+] -TLE1=1 25112U 97084A 09218.20062065 -.00000123 00000-0 62898-5 0 2943 -TLE2=2 25112 45.0189 121.9543 0010661 346.4085 13.6473 14.34378458607430 +TLE1=1 25112U 97084A 09268.97454783 -.00000143 00000-0 -60692-6 0 3365 +TLE2=2 25112 45.0181 242.7000 0010310 250.2203 109.7528 14.34396955614727 [23880] VERSION=1.1 NAME=GORIZONT 32 NICKNAME=GORIZONT 32 -TLE1=1 23880U 96034A 09218.05081535 -.00000123 00000-0 10000-3 0 2679 -TLE2=2 23880 9.5433 55.8948 0001246 53.4242 209.3100 1.00267497 48338 +TLE1=1 23880U 96034A 09269.66105983 -.00000127 00000-0 10000-3 0 3086 +TLE2=2 23880 9.6594 55.2910 0001155 168.1020 5.6864 1.00273868 48857 [32395] VERSION=1.1 NAME=COSMOS 2436 (723) NICKNAME=COSMOS 2436 (723) -TLE1=1 32395U 07065C 09217.44745597 -.00000015 00000-0 10000-3 0 2965 -TLE2=2 32395 65.0470 41.7936 0017776 2.0114 358.0464 2.13103400 12470 +TLE1=1 32395U 07065C 09269.53504908 -.00000031 00000-0 10000-3 0 3184 +TLE2=2 32395 65.0800 40.0083 0016003 358.6675 1.3344 2.13103446 13584 [26083] VERSION=1.1 NAME=GLOBALSTAR M060 NICKNAME=GLOBALSTAR M060 -TLE1=1 26083U 00008C 09218.28309460 -.00000086 00000-0 10000-3 0 90 -TLE2=2 26083 52.0045 139.5156 0000570 352.4360 7.6498 12.62266638445517 +TLE1=1 26083U 00008C 09269.67358747 -.00000086 00000-0 10000-3 0 529 +TLE2=2 26083 52.0083 343.0799 0000676 142.1885 217.8932 12.62262962452003 [12458] VERSION=1.1 NAME=NOVA I NICKNAME=NOVA I -TLE1=1 12458U 81044A 09218.19943692 .00000050 00000-0 10000-3 0 8099 -TLE2=2 12458 90.0925 116.2945 0015478 12.3558 347.7964 13.22705205362451 +TLE1=1 12458U 81044A 09269.18504399 .00000050 00000-0 10000-3 0 8484 +TLE2=2 12458 90.0817 116.7342 0013129 220.4633 139.5480 13.22707714369199 [25106] VERSION=1.1 NAME=IRIDIUM 47 [+] NICKNAME=IRIDIUM 47 [+] -TLE1=1 25106U 97082C 09218.48776956 .00000001 00000-0 -65875-5 0 6245 -TLE2=2 25106 86.3935 15.6486 0002354 80.5463 279.5998 14.34214957608766 +TLE1=1 25106U 97082C 09269.69789697 .00000172 00000-0 54198-4 0 6838 +TLE2=2 25106 86.4008 354.2619 0002357 82.4237 277.7226 14.34219615616108 +[35868] +VERSION=1.1 +NAME=2009-049D +NICKNAME=2009-049D +TLE1=1 35868U 09049D 09269.16842928 .00000177 00000-0 10000-3 0 99 +TLE2=2 35868 98.8000 319.3255 0005055 45.3486 314.8102 14.22084898 1208 + [23461] VERSION=1.1 NAME=INTELSAT 704 (IS-704) NICKNAME=INTELSAT 704 (IS-704) -TLE1=1 23461U 95001A 09218.74222184 -.00000296 00000-0 10000-3 0 9881 -TLE2=2 23461 0.2520 70.6729 0002000 59.4619 229.8694 0.99183607 53409 +TLE1=1 23461U 95001A 09268.14593904 -.00000211 00000-0 10000-3 0 69 +TLE2=2 23461 0.3700 73.2057 0002573 86.9301 199.8849 0.99181233 53895 [28378] VERSION=1.1 NAME=ANIK F2 NICKNAME=ANIK F2 -TLE1=1 28378U 04027A 09218.56262404 -.00000051 00000-0 10000-3 0 8305 -TLE2=2 28378 0.0190 37.7955 0001831 71.6052 297.2681 1.00273181 18603 +TLE1=1 28378U 04027A 09268.49854760 -.00000062 00000-0 10000-3 0 8609 +TLE2=2 28378 0.0163 79.8013 0000888 90.6274 262.4231 1.00272638 19100 [22117] VERSION=1.1 NAME=SATCOM C3 NICKNAME=SATCOM C3 -TLE1=1 22117U 92060B 09218.47506127 -.00000237 00000-0 10000-3 0 1766 -TLE2=2 22117 4.5047 71.8457 0001454 60.8280 274.4309 1.00273067 61872 +TLE1=1 22117U 92060B 09269.24845978 -.00000244 00000-0 10000-3 0 2070 +TLE2=2 22117 4.6306 71.1687 0004692 71.2992 233.1886 1.00271050 62381 -[29230] -VERSION=1.1 -NAME=KAZSAT 1 -NICKNAME=KAZSAT 1 -TLE1=1 29230U 06022A 09218.65265259 -.00000288 00000-0 10000-3 0 6356 -TLE2=2 29230 0.1980 85.8185 0002617 53.3982 149.3090 1.00237269 11500 - [27528] VERSION=1.1 NAME=HISPASAT 1D NICKNAME=HISPASAT 1D -TLE1=1 27528U 02044A 09218.95845612 -.00000217 00000-0 10000-3 0 619 -TLE2=2 27528 0.0503 312.5197 0001858 152.9405 165.1965 1.00270836 25232 +TLE1=1 27528U 02044A 09267.85000000 -.00000228 00000-0 00000+0 0 781 +TLE2=2 27528 0.0320 293.9010 0002160 291.0480 54.8640 1.00275335 25727 [23227] VERSION=1.1 NAME=OPTUS B3 NICKNAME=OPTUS B3 -TLE1=1 23227U 94055A 09218.52570229 -.00000076 00000-0 10000-3 0 3836 -TLE2=2 23227 1.5718 79.0319 0004899 36.7444 192.6548 1.00272875 54700 +TLE1=1 23227U 94055A 09267.57078588 -.00000086 00000-0 10000-3 0 4142 +TLE2=2 23227 1.6917 78.3129 0003988 92.0422 202.6793 1.00272278 55197 [22827] VERSION=1.1 NAME=HEALTHSAT 1 NICKNAME=HEALTHSAT 1 -TLE1=1 22827U 93061E 09217.92464277 -.00000041 00000-0 31935-6 0 3223 -TLE2=2 22827 98.4267 171.7125 0009869 88.1545 272.0781 14.30166187827333 +TLE1=1 22827U 93061E 09269.76640189 -.00000064 00000-0 -83043-5 0 3558 +TLE2=2 22827 98.4375 221.9726 0008266 300.4673 59.5690 14.30170630834748 -[35637] -VERSION=1.1 -NAME=SL-8 R/B -NICKNAME=SL-8 R/B -TLE1=1 35637U 09039C 09218.98440496 .00000141 00000-0 10000-3 0 158 -TLE2=2 35637 82.9486 13.8036 0011228 216.1956 143.8450 13.90955452 2345 - [28892] VERSION=1.1 NAME=UWE-1 NICKNAME=UWE-1 -TLE1=1 28892U 05043C 09218.69164898 .00000127 00000-0 36096-4 0 3994 -TLE2=2 28892 98.0470 107.3206 0017292 186.1659 173.9332 14.59756969201210 +TLE1=1 28892U 05043C 09269.27794936 .00000137 00000-0 38198-4 0 4409 +TLE2=2 28892 98.0380 156.3986 0018022 34.2830 325.9525 14.59770154208598 [27807] VERSION=1.1 NAME=GSAT-2 NICKNAME=GSAT-2 -TLE1=1 27807U 03018A 09218.13487074 .00000000 00000-0 10000-3 0 478 -TLE2=2 27807 0.0193 4.7424 0008950 170.1981 236.4123 1.00273486 22937 +TLE1=1 27807U 03018A 09269.72531523 .00000113 00000-0 10000-3 0 754 +TLE2=2 27807 0.0250 213.8089 0003415 308.8218 152.1482 1.00274076 23439 [33105] VERSION=1.1 NAME=JASON 2 (OSTM) NICKNAME=JASON 2 (OSTM) -TLE1=1 33105U 08032A 09219.00133210 -.00000061 00000-0 00000+0 0 3874 -TLE2=2 33105 66.0451 325.3437 0007830 264.3734 95.6385 12.80930567 52857 +TLE1=1 33105U 08032A 09268.96993337 -.00000061 00000-0 00000+0 0 4306 +TLE2=2 33105 66.0415 221.5531 0007997 265.6417 94.3685 12.80929636 59250 [29671] VERSION=1.1 NAME=COSMOS 2426 (717) NICKNAME=COSMOS 2426 (717) -TLE1=1 29671U 06062B 09218.04646657 -.00000015 00000-0 10000-3 0 7457 -TLE2=2 29671 65.4311 41.2947 0019159 163.2877 342.2361 2.13103604 20332 +TLE1=1 29671U 06062B 09268.73202190 -.00000032 00000-0 10000-3 0 7806 +TLE2=2 29671 65.4607 39.5814 0020267 166.0701 343.7814 2.13103589 21413 [28874] VERSION=1.1 -NAME=GPS BIIRM-1 (PRN 17) -NICKNAME=GPS BIIRM-1 (PRN 17) -TLE1=1 28874U 05038A 09217.90858793 -.00000002 00000-0 10000-3 0 1981 -TLE2=2 28874 54.9982 157.1486 0046854 211.8442 147.8460 2.00558955 28312 +NAME=GPS IIR-14M (DASS) +NICKNAME=GPS IIR-14M (DASS) +TLE1=1 28874U 05038A 09268.76534976 -.00000027 00000-0 10000-3 0 2556 +TLE2=2 28874 54.9985 155.1442 0048679 210.9322 148.8494 2.00556443 29330 [27663] VERSION=1.1 -NAME=GPS BIIR-08 (PRN 16) -NICKNAME=GPS BIIR-08 (PRN 16) -TLE1=1 27663U 03005A 09218.13263878 -.00000001 00000-0 10000-3 0 7770 -TLE2=2 27663 55.5262 97.4131 0053918 340.5178 19.3566 2.00573444 47785 +NAME=GPS BIIR-08 (DASS) +NICKNAME=GPS BIIR-08 (DASS) +TLE1=1 27663U 03005A 09269.48445121 .00000020 00000-0 10000-3 0 8284 +TLE2=2 27663 55.5559 95.3808 0053368 341.6306 18.2305 2.00569736 48819 [27600] VERSION=1.1 NAME=MICRO LABSAT NICKNAME=MICRO LABSAT -TLE1=1 27600U 02056D 09218.18974426 -.00000005 00000-0 14506-4 0 8297 -TLE2=2 27600 98.3891 273.1157 0011817 100.8435 259.4104 14.28863362346584 +TLE1=1 27600U 02056D 09269.37854408 .00000020 00000-0 24613-4 0 8680 +TLE2=2 27600 98.3805 322.3455 0010255 314.6904 45.3463 14.28866678353893 [20442] VERSION=1.1 NAME=LUSAT (LO-19) -NICKNAME=LUSAT (LO-19) -TLE1=1 20442U 90005G 09218.00820543 -.00000000 00000-0 15117-4 0 5860 -TLE2=2 20442 98.2452 191.2235 0012242 23.9984 336.1784 14.32065018 20445 +NICKNAME=LO-19 +TLE1=1 20442U 90005G 09269.71159681 .00000093 00000-0 49907-4 0 6262 +TLE2=2 20442 98.2554 240.4273 0011270 221.5230 138.5088 14.32068905 27847 [26997] VERSION=1.1 NAME=JASON 1 NICKNAME=JASON 1 -TLE1=1 26997U 01055A 09217.87201700 -.00000038 00000-0 10000-3 0 636 -TLE2=2 26997 66.0454 327.2879 0007352 262.6293 97.3885 12.80931864358407 +TLE1=1 26997U 01055A 09268.46523289 -.00000038 00000-0 10000-3 0 849 +TLE2=2 26997 66.0412 222.2010 0007387 265.1681 94.8484 12.80929874364883 [21426] VERSION=1.1 NAME=MOLNIYA 1-81 NICKNAME=MOLNIYA 1-81 -TLE1=1 21426U 91043A 09217.08395730 .00000102 00000-0 10000-3 0 1221 -TLE2=2 21426 62.0084 232.7843 7245344 266.2933 16.2616 2.00619423132887 +TLE1=1 21426U 91043A 09268.92357074 .00000117 00000-0 10000-3 0 1483 +TLE2=2 21426 61.9917 225.3621 7225187 266.8294 16.2260 2.00611704133926 [27421] VERSION=1.1 NAME=SPOT 5 NICKNAME=SPOT 5 -TLE1=1 27421U 02021A 09219.17693285 -.00000009 00000-0 16506-4 0 2831 -TLE2=2 27421 98.7709 291.6703 0000801 106.5809 253.5472 14.20008613376407 +TLE1=1 27421U 02021A 09269.83889711 .00000043 00000-0 41074-4 0 4376 +TLE2=2 27421 98.7652 341.8690 0001269 87.8401 272.2910 14.20006397383595 [24846] VERSION=1.1 NAME=INTELSAT 802 (IS-802) NICKNAME=INTELSAT 802 (IS-802) -TLE1=1 24846U 97031A 09217.71268544 .00000153 00000-0 00000-0 0 8673 -TLE2=2 24846 0.0175 9.1036 0002563 127.5420 107.2098 1.00274372 44411 +TLE1=1 24846U 97031A 09267.00379341 .00000143 00000-0 00000+0 0 8878 +TLE2=2 24846 0.0326 302.3256 0002496 231.1927 223.7416 1.00272380 44910 [33063] VERSION=1.1 NAME=ORBCOMM FM39 [S] NICKNAME=ORBCOMM FM39 [S] -TLE1=1 33063U 08031D 09219.19497089 -.00000070 00000-0 21418-4 0 3773 -TLE2=2 33063 48.4459 196.6513 0010069 257.5021 102.4763 14.68167090 60821 +TLE1=1 33063U 08031D 09269.21742885 -.00000056 00000-0 23800-4 0 4185 +TLE2=2 33063 48.4484 323.1831 0009456 108.1568 252.0358 14.68175195 68177 [25944] VERSION=1.1 NAME=GLOBALSTAR M059 NICKNAME=GLOBALSTAR M059 -TLE1=1 25944U 99058B 09218.21138699 -.00000086 00000-0 10000-3 0 9421 -TLE2=2 25944 52.0041 138.6415 0000831 299.1739 60.9041 12.62262472452171 +TLE1=1 25944U 99058B 09269.12691454 -.00000086 00000-0 10000-3 0 9846 +TLE2=2 25944 52.0073 343.6509 0000790 105.6646 254.4309 12.62263115458606 [28446] VERSION=1.1 NAME=AMC-15 NICKNAME=AMC-15 -TLE1=1 28446U 04041A 09218.41775684 -.00000090 00000-0 00000+0 0 8779 -TLE2=2 28446 0.0425 242.7829 0002147 233.2216 244.3993 1.00272035 17657 +TLE1=1 28446U 04041A 09269.51527575 -.00000100 00000-0 00000+0 0 9100 +TLE2=2 28446 0.0068 168.6681 0002340 8.1384 269.0786 1.00271923 18168 [25777] VERSION=1.1 NAME=IRIDIUM 14 [S] NICKNAME=IRIDIUM 14 [S] -TLE1=1 25777U 99032A 09218.44310935 .00000066 00000-0 10405-4 0 6915 -TLE2=2 25777 86.5165 344.1869 0002891 94.8967 265.2570 14.54938877539234 +TLE1=1 25777U 99032A 09269.68108538 .00000191 00000-0 39442-4 0 7519 +TLE2=2 25777 86.5170 322.7951 0002297 66.6387 293.5059 14.54938708546683 [20776] VERSION=1.1 NAME=SKYNET 4C NICKNAME=SKYNET 4C -TLE1=1 20776U 90079A 09217.89316472 .00000029 00000-0 10000-3 0 9744 -TLE2=2 20776 9.9535 46.8310 0002838 75.1390 160.2965 1.00271584 69184 +TLE1=1 20776U 90079A 09266.86546946 .00000021 00000-0 10000-3 0 9906 +TLE2=2 20776 10.0559 46.3694 0005109 111.6229 162.4238 1.00273095 69674 [22041] VERSION=1.1 NAME=GORIZONT 26 NICKNAME=GORIZONT 26 -TLE1=1 22041U 92043A 09216.48386719 -.00000094 00000-0 10000-3 0 8639 -TLE2=2 22041 11.4565 43.2593 0029995 104.2766 256.1501 0.99240761 62353 +TLE1=1 22041U 92043A 09267.87041500 -.00000024 00000-0 10000-3 0 8839 +TLE2=2 22041 11.5594 42.7255 0030475 105.9116 254.4575 0.99239536 62863 [30798] VERSION=1.1 NAME=THEMIS E NICKNAME=THEMIS E -TLE1=1 30798U 07004E 09219.45833333 -.00000303 00000-0 00000+0 0 6400 -TLE2=2 30798 4.5672 242.3787 7494028 122.4984 355.1444 1.00276270 8403 +TLE1=1 30798U 07004E 09269.29166667 -.00000526 00000-0 00000+0 0 6885 +TLE2=2 30798 4.4509 238.8186 7498068 129.8507 341.6813 1.00279196 8909 [26064] VERSION=1.1 NAME=FALCONSAT NICKNAME=FALCONSAT -TLE1=1 26064U 00004D 09219.00696756 -.00000025 00000-0 11658-4 0 5508 -TLE2=2 26064 100.2167 12.8476 0038414 124.8912 235.5893 14.35421963499108 +TLE1=1 26064U 00004D 09269.05418653 .00000024 00000-0 28874-4 0 5827 +TLE2=2 26064 100.2248 72.0587 0038039 344.9500 15.0548 14.35425260506280 [27516] VERSION=1.1 NAME=KODAMA (DRTS) NICKNAME=KODAMA (DRTS) -TLE1=1 27516U 02042B 09218.95621670 -.00000236 00000-0 10000-3 0 2242 -TLE2=2 27516 0.0851 267.1879 0003752 212.0717 271.3278 1.00270754 25355 +TLE1=1 27516U 02042B 09266.85950477 -.00000247 00000-0 10000-3 0 2505 +TLE2=2 27516 0.0229 96.4799 0003404 55.2267 251.2712 1.00269178 25830 [25116] VERSION=1.1 NAME=ORBCOMM FM09 [+] NICKNAME=ORBCOMM FM09 [+] -TLE1=1 25116U 97084E 09219.12333684 -.00000125 00000-0 57976-5 0 1220 -TLE2=2 25116 45.0214 118.1655 0007161 315.0163 45.0104 14.34388924607568 +TLE1=1 25116U 97084E 09269.33988068 -.00000044 00000-0 34120-4 0 1607 +TLE2=2 25116 45.0205 241.5412 0005949 218.4649 141.5775 14.34404626614772 [25467] VERSION=1.1 NAME=IRIDIUM 82 [+] NICKNAME=IRIDIUM 82 [+] -TLE1=1 25467U 98051A 09218.29226592 .00000172 00000-0 54430-4 0 7677 -TLE2=2 25467 86.4029 142.2572 0002162 57.1825 302.9577 14.34220229574982 +TLE1=1 25467U 98051A 09269.64176813 -.00000048 00000-0 -24219-4 0 8253 +TLE2=2 25467 86.3965 120.8230 0002706 98.3117 261.8384 14.34221746582341 [28129] VERSION=1.1 NAME=GPS BIIR-10 (PRN 22) NICKNAME=GPS BIIR-10 (PRN 22) -TLE1=1 28129U 03058A 09217.32705227 -.00000009 00000-0 10000-3 0 2914 -TLE2=2 28129 53.8033 278.0598 0054207 252.7038 106.7902 2.00565055 41266 +TLE1=1 28129U 03058A 09269.17861338 -.00000004 00000-0 10000-3 0 3422 +TLE2=2 28129 53.7640 275.9042 0055254 253.1397 106.2744 2.00564808 42305 [31119] VERSION=1.1 NAME=SAUDICOMSAT 7 NICKNAME=SAUDICOMSAT 7 -TLE1=1 31119U 07012C 09219.03510021 .00000386 00000-0 88724-4 0 7031 -TLE2=2 31119 97.9918 279.4951 0063268 98.1677 262.6680 14.59449599122914 +TLE1=1 31119U 07012C 09268.67216313 .00000384 00000-0 88724-4 0 7445 +TLE2=2 31119 97.9829 327.2935 0061570 303.7442 55.7885 14.59455348130150 [24315] VERSION=1.1 NAME=AMC-1 (GE-1) NICKNAME=AMC-1 (GE-1) -TLE1=1 24315U 96054A 09218.45495841 -.00000103 00000-0 10000-3 0 1822 -TLE2=2 24315 0.0425 251.1225 0003518 233.2685 251.4990 1.00272225 47284 +TLE1=1 24315U 96054A 09269.46831052 -.00000113 00000-0 10000-3 0 2122 +TLE2=2 24315 0.0117 184.8401 0003256 347.5904 258.5660 1.00272427 47794 [27601] VERSION=1.1 NAME=H-2A R/B NICKNAME=H-2A R/B -TLE1=1 27601U 02056E 09217.82986722 -.00000004 00000-0 14396-4 0 6924 -TLE2=2 27601 98.5717 306.7930 0073600 135.5361 225.1762 14.30712968346967 +TLE1=1 27601U 02056E 09269.16207328 .00000011 00000-0 20574-4 0 7345 +TLE2=2 27601 98.5700 357.4030 0073285 345.7455 14.1659 14.30716913354303 [25468] VERSION=1.1 NAME=IRIDIUM 81 [+] NICKNAME=IRIDIUM 81 [+] -TLE1=1 25468U 98051B 09218.49520538 .00000177 00000-0 56107-4 0 5998 -TLE2=2 25468 86.4013 142.0142 0002320 75.8150 284.3304 14.34219697571234 +TLE1=1 25468U 98051B 09269.70518113 .00000042 00000-0 80291-5 0 6550 +TLE2=2 25468 86.3928 120.6322 0002390 78.0895 282.0568 14.34223230578577 [33108] VERSION=1.1 NAME=COSMOS 2440 NICKNAME=COSMOS 2440 -TLE1=1 33108U 08033A 09218.82643177 -.00000140 00000-0 10000-3 0 3317 -TLE2=2 33108 1.3648 289.5855 0001970 126.2512 277.3420 1.00274160 4063 +TLE1=1 33108U 08033A 09268.59398144 -.00000145 00000-0 10000-3 0 3660 +TLE2=2 33108 1.2562 291.2082 0000513 22.0266 344.7947 1.00265047 4562 [27858] VERSION=1.1 NAME=SCISAT 1 NICKNAME=SCISAT 1 -TLE1=1 27858U 03036A 09218.29388951 .00000071 00000-0 15779-4 0 8076 -TLE2=2 27858 73.9336 83.2138 0008103 134.3239 225.8601 14.74810589322104 +TLE1=1 27858U 03036A 09269.37234626 .00000035 00000-0 10418-4 0 8468 +TLE2=2 27858 73.9365 342.8087 0007881 10.1381 349.9951 14.74814484329633 [25163] VERSION=1.1 NAME=GLOBALSTAR M004 NICKNAME=GLOBALSTAR M004 -TLE1=1 25163U 98008B 09218.99822950 -.00000086 00000-0 10000-3 0 3810 -TLE2=2 25163 52.0009 83.6766 0004114 58.7788 301.3464 12.63153599529601 +TLE1=1 25163U 98008B 09269.08650207 -.00000086 00000-0 10000-3 0 4237 +TLE2=2 25163 52.0026 290.9369 0003689 157.6911 202.4118 12.63155183535936 [17589] VERSION=1.1 NAME=COSMOS 1833 NICKNAME=COSMOS 1833 -TLE1=1 17589U 87027A 09218.77195742 .00000287 00000-0 18038-3 0 3743 -TLE2=2 17589 70.9083 98.5612 0002345 305.2557 54.8341 14.12765027154753 +TLE1=1 17589U 87027A 09269.18396013 .00000037 00000-0 45808-4 0 4131 +TLE2=2 17589 70.9200 352.6537 0005099 266.2290 93.8252 14.12786522161871 [25578] VERSION=1.1 NAME=IRIDIUM 11 [S] NICKNAME=IRIDIUM 11 [S] -TLE1=1 25578U 98074B 09218.51563365 -.00000045 00000-0 -15520-4 0 7276 -TLE2=2 25578 86.5132 15.8411 0002479 80.4132 279.7353 14.54937759564863 +TLE1=1 25578U 98074B 09269.68484649 .00000256 00000-0 54647-4 0 7889 +TLE2=2 25578 86.5196 354.4771 0002448 84.5269 275.6219 14.54937506572300 [11849] VERSION=1.1 NAME=SL-3 R/B NICKNAME=SL-3 R/B -TLE1=1 11849U 80051B 09218.25779290 .00000366 00000-0 17450-4 0 8982 -TLE2=2 11849 97.7061 351.2716 0012567 79.8451 280.4177 15.25594232595304 +TLE1=1 11849U 80051B 09268.95811512 .00000618 00000-0 27362-4 0 9432 +TLE2=2 11849 97.7152 43.5322 0009670 257.9529 102.0639 15.25640496603031 [27775] VERSION=1.1 NAME=COSMOS 2397 NICKNAME=COSMOS 2397 -TLE1=1 27775U 03015A 09217.74906520 .00000125 00000-0 10000-3 0 1094 -TLE2=2 27775 3.5160 71.4078 0044290 201.6507 158.3023 1.00471244 23057 +TLE1=1 27775U 03015A 09267.50755612 -.00000067 00000-0 10000-3 0 1262 +TLE2=2 27775 3.6359 70.8471 0044941 202.4656 157.6038 1.00487885 23556 +[35817] +VERSION=1.1 +NAME=HTV-1 +NICKNAME=HTV-1 +TLE1=1 35817U 09048A 09268.81095679 .00014515 00000-0 10211-3 0 417 +TLE2=2 35817 51.6376 150.2386 0008950 127.4669 276.3001 15.74374153621802 + [14207] VERSION=1.1 NAME=COSMOS 1484 NICKNAME=COSMOS 1484 -TLE1=1 14207U 83075A 09218.85110146 .00001650 00000-0 36696-4 0 3814 -TLE2=2 14207 97.5422 338.6757 0017069 41.6846 318.5723 15.45109319869196 +TLE1=1 14207U 83075A 09269.42793777 .00002397 00000-0 52174-4 0 4202 +TLE2=2 14207 97.5481 31.2379 0015163 212.2325 147.8019 15.45286101877003 [24674] VERSION=1.1 NAME=INMARSAT 3-F3 NICKNAME=INMARSAT 3-F3 -TLE1=1 24674U 96070A 09218.43576528 .00000038 00000-0 10000-3 0 9080 -TLE2=2 24674 0.1357 295.6900 0004432 200.3425 153.9880 1.00272685 46242 +TLE1=1 24674U 96070A 09268.52556617 .00000029 00000-0 10000-3 0 9767 +TLE2=2 24674 0.0999 305.2461 0004301 238.4903 188.0643 1.00274381 46758 [6236] VERSION=1.1 NAME=OSCAR 6 (AO-6) -NICKNAME=OSCAR 6 (AO-6) -TLE1=1 06236U 72082B 09219.09288662 -.00000027 00000-0 10000-3 0 1859 -TLE2=2 06236 101.3928 230.4174 0003884 146.4545 213.6775 12.53078083683786 +NICKNAME=AO-6 +TLE1=1 06236U 72082B 09268.91185945 -.00000027 00000-0 10000-3 0 2204 +TLE2=2 06236 101.3939 278.2281 0004112 54.0269 306.1189 12.53078852690025 [25546] VERSION=1.1 NAME=BONUM 1 NICKNAME=BONUM 1 -TLE1=1 25546U 98068A 09218.91864444 .00000078 00000-0 10000-3 0 3569 -TLE2=2 25546 0.0546 100.0767 0003036 350.4146 251.7160 1.00271309 39293 +TLE1=1 25546U 98068A 09268.58291618 .00000067 00000-0 10000-3 0 3933 +TLE2=2 25546 0.0514 104.3461 0002612 31.9439 134.1219 1.00268503 39797 [28474] VERSION=1.1 -NAME=GPS BIIR-13 (PRN 02) -NICKNAME=GPS BIIR-13 (PRN 02) -TLE1=1 28474U 04045A 09218.05440833 .00000043 00000-0 10000-3 0 9345 -TLE2=2 28474 53.9194 215.3047 0090089 166.1729 194.0826 2.00561957 34897 +NAME=GPS BIIR-13 (DASS) +NICKNAME=GPS BIIR-13 (DASS) +TLE1=1 28474U 04045A 09268.91007269 -.00000009 00000-0 10000-3 0 9889 +TLE2=2 28474 53.9077 213.2313 0090847 167.5024 192.7127 2.00559269 35911 [27939] VERSION=1.1 NAME=MOZHAYETS 4 (RS-22) -NICKNAME=MOZHAYETS 4 (RS-22) -TLE1=1 27939U 03042A 09218.38823530 .00000022 00000-0 13177-4 0 8582 -TLE2=2 27939 97.9371 91.4129 0013160 338.8697 21.1965 14.63332813312913 +NICKNAME=RS-22 +TLE1=1 27939U 03042A 09269.74006224 .00000089 00000-0 26030-4 0 8991 +TLE2=2 27939 97.9255 140.8261 0013548 167.7244 192.4295 14.63342522320428 [31129] VERSION=1.1 NAME=POLYSAT CP3 NICKNAME=POLYSAT CP3 -TLE1=1 31129U 07012N 09219.16171431 .00000131 00000-0 40710-4 0 1129 -TLE2=2 31129 97.9868 269.7910 0103640 126.8398 234.2352 14.52153490122280 +TLE1=1 31129U 07012N 09269.66793685 .00000038 00000-0 19776-4 0 2204 +TLE2=2 31129 97.9769 317.8305 0102163 331.4983 28.0652 14.52163625129613 [24960] VERSION=1.1 NAME=MOLNIYA 1-90 NICKNAME=MOLNIYA 1-90 -TLE1=1 24960U 97054A 09219.10711720 -.00000134 00000-0 10000-3 0 5186 -TLE2=2 24960 63.7878 79.9435 7291481 253.9523 349.2707 2.00603656 87005 +TLE1=1 24960U 97054A 09268.95810249 .00000046 00000-0 10000-3 0 5786 +TLE2=2 24960 63.7877 72.8338 7319729 253.7522 349.5639 2.00598329 88009 [20625] VERSION=1.1 NAME=SL-16 R/B NICKNAME=SL-16 R/B -TLE1=1 20625U 90046B 09218.91879459 .00000171 00000-0 11391-3 0 3627 -TLE2=2 20625 70.9982 54.1211 0013778 154.6467 205.5320 14.14380611991820 +TLE1=1 20625U 90046B 09269.13263284 .00000220 00000-0 13965-3 0 4030 +TLE2=2 20625 71.0002 308.7776 0012560 70.4370 289.8097 14.14382352998923 [25346] VERSION=1.1 NAME=IRIDIUM 75 [+] NICKNAME=IRIDIUM 75 [+] -TLE1=1 25346U 98032E 09218.38938126 .00000102 00000-0 29316-4 0 6740 -TLE2=2 25346 86.3987 344.2941 0002375 84.7813 275.3653 14.34213902588054 +TLE1=1 25346U 98032E 09269.66917039 .00000106 00000-0 30691-4 0 7313 +TLE2=2 25346 86.3990 322.8851 0002347 82.2218 277.9244 14.34223346595405 [25639] VERSION=1.1 NAME=SKYNET 4E NICKNAME=SKYNET 4E -TLE1=1 25639U 99009B 09219.01729124 .00000149 00000-0 10000-3 0 6321 -TLE2=2 25639 5.5227 51.8329 0002674 68.6195 236.7846 1.00274044 38289 +TLE1=1 25639U 99009B 09268.15851697 .00000140 00000-0 10000-3 0 6591 +TLE2=2 25639 5.6306 51.5336 0003077 132.1275 273.1482 1.00280823 38785 [32052] VERSION=1.1 NAME=COSMOS 2429 NICKNAME=COSMOS 2429 -TLE1=1 32052U 07038A 09218.62799450 .00000089 00000-0 76682-4 0 6023 -TLE2=2 32052 82.9762 62.8110 0039316 145.3045 215.0679 13.74694469 95490 +TLE1=1 32052U 07038A 09269.86820956 .00000084 00000-0 72587-4 0 6475 +TLE2=2 32052 82.9801 25.0639 0038864 6.6467 353.5195 13.74695469102531 [25652] VERSION=1.1 NAME=GLOBALSTAR M037 NICKNAME=GLOBALSTAR M037 -TLE1=1 25652U 99012D 09218.38195344 -.00000086 00000-0 10000-3 0 22 -TLE2=2 25652 52.0006 184.0059 0001466 186.0675 174.0172 12.62267268479635 +TLE1=1 25652U 99012D 09269.37675391 -.00000086 00000-0 10000-3 0 460 +TLE2=2 25652 52.0045 28.7694 0000846 196.0667 164.0175 12.62258083486073 [28941] VERSION=1.1 NAME=CUTE-1.7+APD (CO-56) -NICKNAME=CUTE-1.7+APD (CO-56) -TLE1=1 28941U 06005C 09219.01333650 .00063893 42017-5 16698-3 0 3239 -TLE2=2 28941 98.1340 43.2760 ... [truncated message content] |
From: <cs...@us...> - 2009-09-27 01:10:01
|
Revision: 439 http://gpredict.svn.sourceforge.net/gpredict/?rev=439&view=rev Author: csete Date: 2009-09-27 01:09:50 +0000 (Sun, 27 Sep 2009) Log Message: ----------- convert.py script can now also be used for updating existing data in the repository. Modified Paths: -------------- trunk/data/satdata/scripts/convert.py Removed Paths: ------------- trunk/data/satdata/scripts/update.py Modified: trunk/data/satdata/scripts/convert.py =================================================================== --- trunk/data/satdata/scripts/convert.py 2009-09-26 10:54:34 UTC (rev 438) +++ trunk/data/satdata/scripts/convert.py 2009-09-27 01:09:50 UTC (rev 439) @@ -3,27 +3,136 @@ # This script was used to create the initial satellite data repository by # converting Celestrak TLE files into a satellited.dat and .cat files. # -# For updating the data in an existing repository use update.py +# 1. Copy this script into a temp folder +# 2. Create subdirectories ./in/ ./tmp/ and ./out/ +# 3. Run the script +# 4. You should have a .cat file for each category as well as a satellites.dat +# file in the ./out/ folder # # These scripts are only used during development and are not needed by # end users. # import os import string +import urllib +# Satellite groups +groups = { + "amateur" : "Amateur Radio", + "cubesat" : "Cubesat", + "dmc" : "Disaster Monitoring", + "education" : "Education", + "engineering" : "Engineering", + "galileo" : "Galileo Nav.", + "geo" : "Geostationary", + "geodetic" : "Geodetic", + "glo-ops" : "Glonass Operational", + "globalstar" : "Globalstar", + "goes" : "GOES", + "gorizont" : "Gorizont", + "gps-ops" : "GPS Operational", + "intelsat" : "Intelsat", + "iridium" : "Iridium", + "military" : "Military", + "molniya" : "Molniya", + "musson" : "Russon LEO Nav", + "nnss" : "Navy Nav. Sats", + "noaa" : "NOAA", + "orbcomm" : "Orbcomm", + "other-comm" : "Other Comm", + "other" : "Other", + "radar" : "Radar Calibration", + "raduga" : "Raduga", + "resource" : "Earth Resources", + "sarsat" : "Search & Rescue", + "sbas" : "SBAS", + "science" : "Space & Earth Science", + "tdrss" : "TDRSS", + "tle-new" : "Latest Launches", + "visual" : "Brightest", + "weather" : "Weather Satellites", + "x-comm" : "Experimental Comm." +} +# Satellite nicknames +nicknames = { + "4321" : "AO-5", + "6236" : "AO-6", + "7530" : "AO-7", + "10703" : "AO-8", + "14129" : "AO-10", + "14781" : "UO-11", + "16909" : "FO-12", + "20437" : "UO-14", + "20438" : "UO-15", + "20439" : "AO-16", + "20440" : "DO-17", + "20441" : "WO-18", + "20442" : "LO-19", + "20480" : "FO-20", + "21087" : "RS-14", + "21089" : "RS-12/13", + "21575" : "UO-22", + "22077" : "KO-23", + "22654" : "AO-24", + "22825" : "AO-27", + "22826" : "IO-26", + "22828" : "KO-25", + "22829" : "PO-28", + "23439" : "RS-15", + "24278" : "FO-29", + "24305" : "MO-30", + "25396" : "TO-31", + "25397" : "GO-32", + "25509" : "SO-33", + "25520" : "PO-34", + "25544" : "ISS", + "25636" : "SO-35", + "25693" : "UO-36", + "26063" : "OO-38", + "26545" : "SO-41", + "26548" : "MO-46", + "26549" : "SO-42", + "26609" : "AO-40", + "26931" : "NO-44", + "26932" : "NO-45", + "27607" : "SO-50", + "27844" : "CO-55", + "27848" : "CO-57", + "27939" : "RS-22", + "28375" : "AO-51", + "28650" : "VO-52", + "28894" : "XO-53", + "28895" : "CO-58", + "28941" : "CO-56" +} + +urlprefix = "http://celestrak.com/NORAD/elements/" + + +for group, name in groups.iteritems(): + webfile = urlprefix + group + ".txt" + localfile = "./in/" + group + ".txt" + print "Fetching " + webfile + " => " + localfile + urllib.urlretrieve (webfile, localfile) + +### CHK ### + # For each input file -for file in os.listdir("./in/"): +for group, name in groups.iteritems(): - print file + print name+':' # open TLE file for reading - tlefile = open('./in/'+file, 'r') + tlefile = open('./in/'+group+'.txt', 'r') # create category file - category = "./out/"+file.partition(".")[0]+".cat" + category = "./out/"+group+".cat" catfile = open(category, 'w') + # first line is the group name + catfile.write(name+'\n') + while 1: # read three lines at a time; strip trailing whitespaces line1 = tlefile.readline().strip() @@ -43,7 +152,10 @@ satfile.write('VERSION=1.1\n') satfile.write('NAME='+line1+'\n') - satfile.write('NICKNAME='+line1+'\n') + if catnum in nicknames: + satfile.write('NICKNAME='+nicknames[catnum]+'\n') + else: + satfile.write('NICKNAME='+line1+'\n') satfile.write('TLE1='+line2+'\n') satfile.write('TLE2='+line3+'\n') Deleted: trunk/data/satdata/scripts/update.py =================================================================== --- trunk/data/satdata/scripts/update.py 2009-09-26 10:54:34 UTC (rev 438) +++ trunk/data/satdata/scripts/update.py 2009-09-27 01:09:50 UTC (rev 439) @@ -1,15 +0,0 @@ -#!/usr/bin/python -# -# This Pythion script is used to update the satellite data in the repository -# with fresh data from CelesTrak. -# -# The script is not needed by end users. -# -# First, the script fetches the TLE data (.txt files) from CelesTrak. -# Then it loads the existing satellites.dat file into memory and replaces -# the TLE1 and TLE2 lines. At the same time, the contents of the .cat files -# are updated by adding new satellites to the .cat files. Satellites are -# not removed from the .cat files, since they could be added by user. The -# tle-new.cat is different: This file will simply contain the same satellites -# as the fresh tle-new.txt file. -# This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-26 10:54:43
|
Revision: 438 http://gpredict.svn.sourceforge.net/gpredict/?rev=438&view=rev Author: csete Date: 2009-09-26 10:54:34 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Updated with some comments. Modified Paths: -------------- trunk/data/satdata/scripts/convert.py Modified: trunk/data/satdata/scripts/convert.py =================================================================== --- trunk/data/satdata/scripts/convert.py 2009-09-26 10:54:02 UTC (rev 437) +++ trunk/data/satdata/scripts/convert.py 2009-09-26 10:54:34 UTC (rev 438) @@ -1,7 +1,13 @@ #!/usr/bin/python # -# This script was used to convert Celestrak TLE files into individual .sat and .cat files +# This script was used to create the initial satellite data repository by +# converting Celestrak TLE files into a satellited.dat and .cat files. # +# For updating the data in an existing repository use update.py +# +# These scripts are only used during development and are not needed by +# end users. +# import os import string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-26 10:54:16
|
Revision: 437 http://gpredict.svn.sourceforge.net/gpredict/?rev=437&view=rev Author: csete Date: 2009-09-26 10:54:02 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Added script that will contain code to update TLE data in repository. Added Paths: ----------- trunk/data/satdata/scripts/update.py Added: trunk/data/satdata/scripts/update.py =================================================================== --- trunk/data/satdata/scripts/update.py (rev 0) +++ trunk/data/satdata/scripts/update.py 2009-09-26 10:54:02 UTC (rev 437) @@ -0,0 +1,15 @@ +#!/usr/bin/python +# +# This Pythion script is used to update the satellite data in the repository +# with fresh data from CelesTrak. +# +# The script is not needed by end users. +# +# First, the script fetches the TLE data (.txt files) from CelesTrak. +# Then it loads the existing satellites.dat file into memory and replaces +# the TLE1 and TLE2 lines. At the same time, the contents of the .cat files +# are updated by adding new satellites to the .cat files. Satellites are +# not removed from the .cat files, since they could be added by user. The +# tle-new.cat is different: This file will simply contain the same satellites +# as the fresh tle-new.txt file. +# Property changes on: trunk/data/satdata/scripts/update.py ___________________________________________________________________ Added: svn:executable + * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-26 10:00:31
|
Revision: 436 http://gpredict.svn.sourceforge.net/gpredict/?rev=436&view=rev Author: csete Date: 2009-09-26 10:00:22 +0000 (Sat, 26 Sep 2009) Log Message: ----------- Moved script into own folder. Added Paths: ----------- trunk/data/satdata/scripts/ trunk/data/satdata/scripts/convert.py Removed Paths: ------------- trunk/data/satdata/convert.py Deleted: trunk/data/satdata/convert.py =================================================================== --- trunk/data/satdata/convert.py 2009-09-25 13:08:05 UTC (rev 435) +++ trunk/data/satdata/convert.py 2009-09-26 10:00:22 UTC (rev 436) @@ -1,68 +0,0 @@ -#!/usr/bin/python -# -# This script was used to convert Celestrak TLE files into individual .sat and .cat files -# -import os -import string - - -# For each input file -for file in os.listdir("./in/"): - - print file - - # open TLE file for reading - tlefile = open('./in/'+file, 'r') - - # create category file - category = "./out/"+file.partition(".")[0]+".cat" - catfile = open(category, 'w') - - while 1: - # read three lines at a time; strip trailing whitespaces - line1 = tlefile.readline().strip() - if not line1: break - line2 = tlefile.readline().strip() - line3 = tlefile.readline().strip() - - # catalog number; strip leading zeroes - catnum = line2[2:7].lstrip('0') - print " ... "+catnum - - # add satellite to category - catfile.write(catnum+'\n') - - # satellite file - satfile = open('./tmp/'+catnum+'.sat','w') - - satfile.write('VERSION=1.1\n') - satfile.write('NAME='+line1+'\n') - satfile.write('NICKNAME='+line1+'\n') - satfile.write('TLE1='+line2+'\n') - satfile.write('TLE2='+line3+'\n') - - satfile.close() - - # close TLE and CAT files - tlefile.close() - catfile.close() - -# now package the .sat files into one .dat file -datfile = open('./out/satellites.dat', 'w') -for file in os.listdir("./tmp/"): - - # open .sat file - satfile = open("./tmp/"+file, "r") - - # Create fake config group of catnum - catnum = file.partition(".")[0] - datfile.write("\n["+catnum+"]\n") - - # read lines from satfile and write them to datfile - text = satfile.readlines() - datfile.writelines(text) - - satfile.close(); - -datfile.close() - Copied: trunk/data/satdata/scripts/convert.py (from rev 435, trunk/data/satdata/convert.py) =================================================================== --- trunk/data/satdata/scripts/convert.py (rev 0) +++ trunk/data/satdata/scripts/convert.py 2009-09-26 10:00:22 UTC (rev 436) @@ -0,0 +1,68 @@ +#!/usr/bin/python +# +# This script was used to convert Celestrak TLE files into individual .sat and .cat files +# +import os +import string + + +# For each input file +for file in os.listdir("./in/"): + + print file + + # open TLE file for reading + tlefile = open('./in/'+file, 'r') + + # create category file + category = "./out/"+file.partition(".")[0]+".cat" + catfile = open(category, 'w') + + while 1: + # read three lines at a time; strip trailing whitespaces + line1 = tlefile.readline().strip() + if not line1: break + line2 = tlefile.readline().strip() + line3 = tlefile.readline().strip() + + # catalog number; strip leading zeroes + catnum = line2[2:7].lstrip('0') + print " ... "+catnum + + # add satellite to category + catfile.write(catnum+'\n') + + # satellite file + satfile = open('./tmp/'+catnum+'.sat','w') + + satfile.write('VERSION=1.1\n') + satfile.write('NAME='+line1+'\n') + satfile.write('NICKNAME='+line1+'\n') + satfile.write('TLE1='+line2+'\n') + satfile.write('TLE2='+line3+'\n') + + satfile.close() + + # close TLE and CAT files + tlefile.close() + catfile.close() + +# now package the .sat files into one .dat file +datfile = open('./out/satellites.dat', 'w') +for file in os.listdir("./tmp/"): + + # open .sat file + satfile = open("./tmp/"+file, "r") + + # Create fake config group of catnum + catnum = file.partition(".")[0] + datfile.write("\n["+catnum+"]\n") + + # read lines from satfile and write them to datfile + text = satfile.readlines() + datfile.writelines(text) + + satfile.close(); + +datfile.close() + Property changes on: trunk/data/satdata/scripts/convert.py ___________________________________________________________________ Added: svn:executable + * Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-25 13:08:14
|
Revision: 435 http://gpredict.svn.sourceforge.net/gpredict/?rev=435&view=rev Author: csete Date: 2009-09-25 13:08:05 +0000 (Fri, 25 Sep 2009) Log Message: ----------- Changed slider limit to +/- 2.5 hours. Modified Paths: -------------- trunk/src/gtk-sat-module-tmg.c Modified: trunk/src/gtk-sat-module-tmg.c =================================================================== --- trunk/src/gtk-sat-module-tmg.c 2009-09-25 13:04:29 UTC (rev 434) +++ trunk/src/gtk-sat-module-tmg.c 2009-09-25 13:08:05 UTC (rev 435) @@ -265,9 +265,9 @@ 2, 3, 4, 5, GTK_SHRINK, GTK_SHRINK, 0, 0); /* add slider */ - mod->tmgSlider = gtk_hscale_new_with_range (-0.208, +0.208, 0.0001); // +/- 5 hr + mod->tmgSlider = gtk_hscale_new_with_range (-0.1, +0.1, 0.0001); // +/- 2.5 hr gtk_widget_set_tooltip_text (mod->tmgSlider, - _("Drag the slider to change the time up to +/- 5 hours.\n"\ + _("Drag the slider to change the time up to +/- 2.5 hours.\n"\ "Resolution is ~ 8 seconds.")); gtk_scale_set_draw_value (GTK_SCALE (mod->tmgSlider), FALSE); gtk_range_set_value (GTK_RANGE (mod->tmgSlider), 0.0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-25 13:04:37
|
Revision: 434 http://gpredict.svn.sourceforge.net/gpredict/?rev=434&view=rev Author: csete Date: 2009-09-25 13:04:29 +0000 (Fri, 25 Sep 2009) Log Message: ----------- Finished implementation of the slider. It allows dragging of the time +/- 5 hours with a resolution of 8 seconds. It is complementary to the spin buttons. Modified Paths: -------------- trunk/ChangeLog trunk/NEWS trunk/src/gtk-sat-module-tmg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-25 10:47:21 UTC (rev 433) +++ trunk/ChangeLog 2009-09-25 13:04:29 UTC (rev 434) @@ -1,11 +1,20 @@ +2009-09-25 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-module-tmg.c: + Finished implementation of the slider. It allows dragging of the time + +/- 5 hours with a resolution of 8 seconds. It is complementary to the + spin buttons. + + 2009-09-24 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-selector.c: - Fixed a bug that caused tree models to be deleted when selecting a new satellite group. + Fixed a bug that caused tree models to be deleted when selecting a new + satellite group. * src/mod-cfg.c: - Added list of selected satellites and arrow buttons. New satellite selector is now fully - functional and replaces GtkSatTree. + Added list of selected satellites and arrow buttons. New satellite selector + is now fully functional and replaces GtkSatTree. * src/gtk-sat-tree.[ch]: Removed from build list. Modified: trunk/NEWS =================================================================== --- trunk/NEWS 2009-09-25 10:47:21 UTC (rev 433) +++ trunk/NEWS 2009-09-25 13:04:29 UTC (rev 434) @@ -1,15 +1,16 @@ Changes in version 1.1 (TBD) -- New satellite selector in the module config dialog that makes it easier - to locate and select satellites. +- New satellite selector in the module configuration dialog that makes + it easier to locate and select satellites. - User configuration on Unix is now stored in $HOME/.config/Gpredict/ The old configuration is imported automatically and one can still use Gpredict 1.0 with the old configuration stored in $HOME/.gpredict2/ - Distribution now includes all satellites from CelesTrak. * Added new Satellite Editor that allows adding/editing/deleting satellite - data in a convenient UI, includ + data in a convenient UI, including... +- Added a slider control to the Time Controller. - Fixed bug 2116693: List view does not sort properly for all time formats. -* Fixed bug 2836265: Time controls should wrap around their limits. +- Fixed bug 2836265: Time controls should wrap around their limits. * Binary packages for Windows, Mac OS X, Ubuntu and generic Linux. Modified: trunk/src/gtk-sat-module-tmg.c =================================================================== --- trunk/src/gtk-sat-module-tmg.c 2009-09-25 10:47:21 UTC (rev 433) +++ trunk/src/gtk-sat-module-tmg.c 2009-09-25 13:04:29 UTC (rev 434) @@ -46,6 +46,7 @@ static void tmg_reset (GtkWidget *widget, gpointer data); static void tmg_throttle (GtkWidget *widget, gpointer data); static void tmg_time_set (GtkWidget *widget, gpointer data); +static void slider_moved (GtkWidget *widget, gpointer data); static void tmg_hour_wrap (GtkWidget *widget, gpointer data); static void tmg_min_wrap (GtkWidget *widget, gpointer data); static void tmg_sec_wrap (GtkWidget *widget, gpointer data); @@ -264,9 +265,14 @@ 2, 3, 4, 5, GTK_SHRINK, GTK_SHRINK, 0, 0); /* add slider */ - mod->tmgSlider = gtk_hscale_new_with_range (-1.0, +1.0, 0.005); + mod->tmgSlider = gtk_hscale_new_with_range (-0.208, +0.208, 0.0001); // +/- 5 hr + gtk_widget_set_tooltip_text (mod->tmgSlider, + _("Drag the slider to change the time up to +/- 5 hours.\n"\ + "Resolution is ~ 8 seconds.")); gtk_scale_set_draw_value (GTK_SCALE (mod->tmgSlider), FALSE); gtk_range_set_value (GTK_RANGE (mod->tmgSlider), 0.0); + g_signal_connect (mod->tmgSlider, "value-changed", + G_CALLBACK (slider_moved), mod); /* create the vertical box */ @@ -430,6 +436,9 @@ mod->tmgPdnum = mod->rtPrev; mod->tmgCdnum = mod->rtNow; + /* RESET slider */ + gtk_range_set_value (GTK_RANGE (mod->tmgSlider), 0.0); + /* update widgets; widget signals will have no effect since the tmgReset flag is TRUE */ tmg_update_widgets (mod); @@ -471,6 +480,7 @@ guint year, month, day; gint hr, min, sec, msec; struct tm tim,utim; + gdouble slider; gdouble jd; @@ -515,11 +525,36 @@ jd = jd + (gdouble)msec/8.64e+7; - mod->tmgCdnum = jd; + /* get slider offset */ + slider = gtk_range_get_value (GTK_RANGE (mod->tmgSlider)); + + mod->tmgCdnum = jd + slider; } } +/** \brief Signal handler for slider "value-changed" signals + * \param widget The widget that was modified. + * \param data Pointer to the GtkSatModule structure. + * + * This function is called when the user moves the slider. + * If we are in manual control mode, the function simpley calls + * tmg_time_set(). In the other modes, the function switches over + * to amnual mode first. + */ +static void slider_moved (GtkWidget *widget, gpointer data) +{ + GtkSatModule *mod = GTK_SAT_MODULE (data); + + if (mod->throttle) { + /* "press" the stop button to trigger a transition into manual mode */ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mod->tmgStop), TRUE); + } + + tmg_time_set (widget, data); +} + + /** \brief Hour controller wrap * \param widget Pointer to the hour controller widget * \param data Pointer to the GtkSatModule structure. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-25 10:47:29
|
Revision: 433 http://gpredict.svn.sourceforge.net/gpredict/?rev=433&view=rev Author: csete Date: 2009-09-25 10:47:21 +0000 (Fri, 25 Sep 2009) Log Message: ----------- Minor layout and UI tweaks. Modified Paths: -------------- trunk/src/gtk-sat-selector.c trunk/src/mod-cfg.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-24 22:41:49 UTC (rev 432) +++ trunk/src/gtk-sat-selector.c 2009-09-25 10:47:21 UTC (rev 433) @@ -180,6 +180,7 @@ GtkCellRenderer *renderer; GtkTreeViewColumn *column; GtkWidget *table; + GtkWidget *frame; if (!flags) @@ -264,12 +265,19 @@ gtk_container_add (GTK_CONTAINER (GTK_SAT_SELECTOR (widget)->swin), GTK_SAT_SELECTOR (widget)->tree); + /* create a frame around the SWIN */ + frame = gtk_frame_new (NULL); + gtk_container_add (GTK_CONTAINER (frame), GTK_SAT_SELECTOR (widget)->swin); + table = gtk_table_new (7, 4, TRUE); /* Search */ - gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Search:")), 0, 1, 0, 1, + gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Search")), 0, 1, 0, 1, GTK_SHRINK, GTK_SHRINK, 0, 0); GTK_SAT_SELECTOR (widget)->search = gtk_entry_new (); + gtk_widget_set_tooltip_text (GTK_SAT_SELECTOR (widget)->search, + _("Start typing in this field to search for a satellite"\ + " in the selected group.")); /* this enables automatic search */ gtk_tree_view_set_search_entry (GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree), @@ -278,14 +286,14 @@ GTK_FILL, GTK_FILL, 0, 0); /* Group selector */ - gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Group:")), 0, 1, 1, 2, + gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Group")), 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->groups, 1, 4, 1, 2, GTK_FILL, GTK_SHRINK, 0, 0); /* satellite list */ - gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->swin, 0, 4, 2, 7, + gtk_table_attach (GTK_TABLE (table), frame, 0, 4, 2, 7, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); /* Add tabel to main container */ Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-24 22:41:49 UTC (rev 432) +++ trunk/src/mod-cfg.c 2009-09-25 10:47:21 UTC (rev 433) @@ -25,35 +25,6 @@ You should have received a copy of the GNU General Public License along with this program; if not, visit http://www.fsf.org/ */ -/* FIXME: Update diagram - -+------------------------------------+ -| +---------------------+ | -| Name | My Kool Module | | -| +---------------------+ | -| +-----------+---+ +---+ | -| Location | OZ9AEC | v | | + | | -| +-----------+---+ +---+ | -| ---------------------------------- | -| Satellites | -| +--------------------------+-----+ | -| | Available Satellites | Sel | | -| +--------------------------+-----+ | -| | > Amateur | | | -| | v Weather | | | -| | NOAA 14 | x | | -| | NOAA 15 | x | | -| | NOAA 17 | x | | -| | > Military | | | -| +--------------------------+-----+ | -| ---------------------------------- | -| +----------------------+ +------+ | -| | (not implemented) | | Find | | -| +----------------------+ +------+ | -| | -| Advanced Settings | -+------------------------------------+ -*/ #include <gtk/gtk.h> #include <glib/gi18n.h> #include "sat-log.h" @@ -469,9 +440,11 @@ GtkWidget *addbut, *delbut; GtkTooltips *tooltips; gchar *icon; /* window icon file name */ + GtkWidget *frame; + gboolean new = (modname != NULL) ? FALSE : TRUE; if (new) { @@ -544,8 +517,9 @@ /* ground station selector */ locw = create_loc_selector (cfgdata); + gtk_widget_set_tooltip_text (locw, _("Select a ground station for this module.")); - table = gtk_table_new (2, 3, FALSE); + table = gtk_table_new (2, 5, TRUE); gtk_table_set_row_spacings (GTK_TABLE (table), 5); gtk_table_set_col_spacings (GTK_TABLE (table), 5); @@ -559,16 +533,18 @@ gtk_table_attach_defaults (GTK_TABLE (table), locw, 1, 3, 1, 2); /* add button */ - add = gpredict_hstock_button (GTK_STOCK_ADD, NULL, _("Add new ground station")); + add = gpredict_hstock_button (GTK_STOCK_ADD, NULL, _("Add a new ground station")); g_signal_connect (add, "clicked", G_CALLBACK (add_qth_cb), dialog); - gtk_table_attach_defaults (GTK_TABLE (table), add, 4, 5, 1, 2); + gtk_table_attach (GTK_TABLE (table), add, 3, 4, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), gtk_hseparator_new (), FALSE, FALSE, 5); label = gtk_label_new (NULL); - gtk_label_set_markup (GTK_LABEL (label), _("<b>Select Satellites:</b>")); + gtk_label_set_markup (GTK_LABEL (label), _("<b>Satellites</b>")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 5); @@ -591,11 +567,23 @@ _("Remove satellite from the list of selected satellites.")); g_signal_connect (delbut, "clicked", G_CALLBACK (delbut_clicked_cb), NULL); + /* quick sat selecotr tutorial label */ + label = gtk_label_new (NULL); + gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_label_set_markup (GTK_LABEL (label), + _("<b>Hint: </b> Double click on any satellite\n"\ + "to move it to the other box.")); + + frame = gtk_frame_new (NULL); + gtk_container_add (GTK_CONTAINER (frame), swin); + table = gtk_table_new (7, 9, TRUE); gtk_table_attach_defaults (GTK_TABLE (table), selector, 0, 4, 0, 7); - gtk_table_attach_defaults (GTK_TABLE (table), swin, 5, 9, 2, 7); + gtk_table_attach_defaults (GTK_TABLE (table), frame, 5, 9, 2, 7); gtk_table_attach (GTK_TABLE (table), addbut, 4, 5, 4, 5, GTK_SHRINK, GTK_SHRINK, 2, 5); gtk_table_attach (GTK_TABLE (table), delbut, 4, 5, 5, 6, GTK_SHRINK, GTK_SHRINK, 2, 5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 5, 9, 0, 2); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-24 22:41:58
|
Revision: 432 http://gpredict.svn.sourceforge.net/gpredict/?rev=432&view=rev Author: csete Date: 2009-09-24 22:41:49 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Finished new module configuration dialog. Fully functional again. Modified Paths: -------------- trunk/ChangeLog trunk/src/Makefile.am trunk/src/gtk-sat-selector.c trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-24 16:14:31 UTC (rev 431) +++ trunk/ChangeLog 2009-09-24 22:41:49 UTC (rev 432) @@ -4,9 +4,13 @@ Fixed a bug that caused tree models to be deleted when selecting a new satellite group. * src/mod-cfg.c: - Added list of selected satellites. + Added list of selected satellites and arrow buttons. New satellite selector is now fully + functional and replaces GtkSatTree. + * src/gtk-sat-tree.[ch]: + Removed from build list. + 2009-09-23 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-selector.[ch]: Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-09-24 16:14:31 UTC (rev 431) +++ trunk/src/Makefile.am 2009-09-24 22:41:49 UTC (rev 432) @@ -52,8 +52,7 @@ 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-slector.h \ - gtk-sat-tree.c gtk-sat-tree.h \ + gtk-sat-selector.c gtk-sat-slector.h \ gtk-single-sat.c gtk-single-sat.h \ gtk-sky-glance.c gtk-sky-glance.h \ gui.c gui.h \ Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-24 16:14:31 UTC (rev 431) +++ trunk/src/gtk-sat-selector.c 2009-09-24 22:41:49 UTC (rev 432) @@ -264,11 +264,6 @@ gtk_container_add (GTK_CONTAINER (GTK_SAT_SELECTOR (widget)->swin), GTK_SAT_SELECTOR (widget)->tree); - - //gtk_container_add (GTK_CONTAINER (widget), GTK_SAT_TREE (widget)->swin); - //gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->groups, FALSE, FALSE, 0); - //gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->swin, TRUE, TRUE, 0); - table = gtk_table_new (7, 4, TRUE); /* Search */ @@ -286,7 +281,7 @@ gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Group:")), 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->groups, 1, 4, 1, 2, - GTK_FILL, GTK_FILL, 0, 0); + GTK_FILL, GTK_SHRINK, 0, 0); /* satellite list */ Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-24 16:14:31 UTC (rev 431) +++ trunk/src/mod-cfg.c 2009-09-24 22:41:49 UTC (rev 432) @@ -66,21 +66,18 @@ #include "config-keys.h" #include "sat-cfg.h" #include "sat-pref-modules.h" -#include "gtk-sat-tree.h" #include "qth-editor.h" #include "mod-cfg.h" - #include "gtk-sat-selector.h" + extern GtkWidget *app; - /* private widgets */ static GtkWidget *namew; /* GtkEntry widget for module name */ static GtkWidget *locw; /* GtkComboBox for location selection */ -static GtkWidget *tree; /* OBSOLETE GtkSatTree for selecting satellites */ static GtkWidget *satlist; /* list of selected satellites */ @@ -106,7 +103,13 @@ GtkTreeIter *b, gpointer userdata); +static void row_activated_cb (GtkTreeView *view, GtkTreePath *path, + GtkTreeViewColumn *column, gpointer data); +static void addbut_clicked_cb (GtkButton *button, GtkSatSelector *selector); +static void delbut_clicked_cb (GtkButton *button, GtkSatSelector *selector); + + /** \brief Create a new module. * * This function creates a new module. The name of the module is @@ -121,8 +124,8 @@ mod_cfg_status_t status; gboolean finished = FALSE; gsize num = 0; - guint *sats; + /* create cfg data */ cfgdata = g_key_file_new (); @@ -138,9 +141,9 @@ /* user pressed OK */ case GTK_RESPONSE_OK: - /* FIXME check that user has selected at least one satellite */ - sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); + num = gtk_tree_model_iter_n_children (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist)), NULL); + if (num > 0) { /* we have at least one sat selected */ gchar *filename,*confdir; @@ -198,8 +201,6 @@ finished = TRUE; } - - g_free (sats); } else { sat_log_log (SAT_LOG_LEVEL_DEBUG, @@ -224,7 +225,7 @@ break; /* bring up properties editor */ - case GTK_RESPONSE_HELP: + case GTK_RESPONSE_HELP: edit_advanced_settings (GTK_DIALOG (dialog), cfgdata); finished = FALSE; break; @@ -262,7 +263,6 @@ gint response; gboolean finished = FALSE; gsize num = 0; - guint *sats; mod_cfg_status_t status = MOD_CFG_CANCEL; @@ -279,14 +279,13 @@ case GTK_RESPONSE_OK: /* check that user has selected at least one satellite */ - sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); + num = gtk_tree_model_iter_n_children (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist)), NULL); if (num > 0) { /* we have at least one sat selected */ mod_cfg_apply (cfgdata); finished = TRUE; - g_free (sats); status = MOD_CFG_OK; } else { @@ -467,6 +466,7 @@ GtkWidget *table; GtkWidget *label; GtkWidget *swin; + GtkWidget *addbut, *delbut; GtkTooltips *tooltips; gchar *icon; /* window icon file name */ @@ -571,46 +571,7 @@ gtk_label_set_markup (GTK_LABEL (label), _("<b>Select Satellites:</b>")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 5); - /* OBSOLETE satellite selector */ - tree = gtk_sat_tree_new (0); - if (!new) { - /* select satellites */ - gint *sats = NULL; - gsize length; - GError *error = NULL; - guint i; - sats = g_key_file_get_integer_list (cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_SATS_KEY, - &length, - &error); - - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to get list of satellites (%s)"), - __FUNCTION__, error->message); - - g_clear_error (&error); - - /* GLib API says nothing about the contents in case of error */ - if (sats) { - g_free (sats); - } - - } - else { - for (i = 0; i < length; i++) { - gtk_sat_tree_select (GTK_SAT_TREE (tree), sats[i]); - } - g_free (sats); - } - - } - - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); - - /*** NEW CODE ***/ /* satellite selector */ GtkWidget *selector = gtk_sat_selector_new (0); g_signal_connect (selector, "sat-activated", @@ -622,10 +583,19 @@ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_container_add (GTK_CONTAINER (swin), satlist); + /* Add and Delete buttons */ + addbut = gpredict_hstock_button (GTK_STOCK_GO_FORWARD, NULL, + _("Add satellite to list of selected satellites.")); + g_signal_connect (addbut, "clicked", G_CALLBACK (addbut_clicked_cb), selector); + delbut = gpredict_hstock_button (GTK_STOCK_GO_BACK, NULL, + _("Remove satellite from the list of selected satellites.")); + g_signal_connect (delbut, "clicked", G_CALLBACK (delbut_clicked_cb), NULL); table = gtk_table_new (7, 9, TRUE); gtk_table_attach_defaults (GTK_TABLE (table), selector, 0, 4, 0, 7); gtk_table_attach_defaults (GTK_TABLE (table), swin, 5, 9, 2, 7); + gtk_table_attach (GTK_TABLE (table), addbut, 4, 5, 4, 5, GTK_SHRINK, GTK_SHRINK, 2, 5); + gtk_table_attach (GTK_TABLE (table), delbut, 4, 5, 5, 6, GTK_SHRINK, GTK_SHRINK, 2, 5); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); @@ -649,6 +619,8 @@ satlist = gtk_tree_view_new (); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (satlist), TRUE); + //gtk_tree_view_set_grid_lines (GTK_TREE_VIEW (satlist), GTK_TREE_VIEW_GRID_LINES_HORIZONTAL); renderer = gtk_cell_renderer_text_new (); column = gtk_tree_view_column_new_with_attributes (_("Selected Satellites"), renderer, @@ -673,6 +645,10 @@ gtk_tree_view_insert_column (GTK_TREE_VIEW (satlist), column, -1); gtk_tree_view_column_set_visible (column, FALSE); + /* "row-activated" signal is used to catch double click events, which means + a satellite has been selected. This will cause the satellite to be deleted */ + g_signal_connect (GTK_TREE_VIEW (satlist), "row-activated", + G_CALLBACK(row_activated_cb), NULL); /* create the model */ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, @@ -720,7 +696,6 @@ else { for (i = 0; i < length; i++) { add_selected_sat (store, sats[i]); - g_print ("ADD: %d\n", sats[i]); } g_free (sats); } @@ -963,11 +938,13 @@ */ static void mod_cfg_apply (GKeyFile *cfgdata) { - guint *sats; gsize num; guint i; + guint catnum; gchar *satstr = NULL; gchar *buff; + GtkTreeModel *model; + GtkTreeIter iter; /* store location */ @@ -993,20 +970,34 @@ g_free (buff); - /* store satellites */ - sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); + /* get number of satellites already in list */ + model = gtk_tree_view_get_model (GTK_TREE_VIEW (satlist)); + num = gtk_tree_model_iter_n_children (model, NULL); + + /* loop over list entries and check their catnums */ for (i = 0; i < num; i++) { + if (gtk_tree_model_iter_nth_child (model, &iter, NULL, i)) { + gtk_tree_model_get (model, &iter, + GTK_SAT_SELECTOR_COL_CATNUM, &catnum, + -1); - if (i) { - buff = g_strdup_printf ("%s;%d", satstr, sats[i]); - g_free (satstr); + if (i) { + buff = g_strdup_printf ("%s;%d", satstr, catnum); + g_free (satstr); + } + else { + buff = g_strdup_printf ("%d", catnum); + } + satstr = g_strdup (buff); + g_free (buff); } else { - buff = g_strdup_printf ("%d", sats[i]); + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Could not fetch entry %d in satellite list"), + __FILE__, __FUNCTION__, i); } - satstr = g_strdup (buff); - g_free (buff); + } g_key_file_set_string (cfgdata, @@ -1014,8 +1005,8 @@ MOD_CFG_SATS_KEY, satstr); g_free (satstr); - g_free (sats); + sat_log_log (SAT_LOG_LEVEL_MSG, _("%s: Applied changes to %s."), __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); @@ -1130,16 +1121,13 @@ */ static void sat_activated_cb (GtkSatSelector *selector, gint catnr, gpointer data) { - gchar *satname; - gint catnum; - gdouble epoch; + GtkListStore *store; - gtk_sat_selector_get_selected (selector, &catnum, &satname, &epoch); - /* Add satellite to selected list */ + store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist))); + add_selected_sat (store, catnr); - g_free (satname); } @@ -1172,3 +1160,79 @@ return ret; } + + +/** \brief Signal handler for managing satellite selection. + * \param view Pointer to the GtkTreeView object. + * \param path The path of the row that was activated. + * \param column The column where the activation occured. + * \param data Pointer to the GtkSatselector widget. + * + * This function is called when the user double clicks on a satellite in the + * list of satellites. The double clicked satellite is removed from the list. + */ +static void row_activated_cb (GtkTreeView *view, GtkTreePath *path, + GtkTreeViewColumn *column, gpointer data) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */ + + + /* get the selected row in the treeview */ + selection = gtk_tree_view_get_selection (view); + haveselection = gtk_tree_selection_get_selected (selection, &model, &iter); + + if (haveselection) { + gtk_list_store_remove (GTK_LIST_STORE(model), &iter); + } +} + + +/** \brief Signal handler for "->" button signals. + * \param button Pointer to the button that received the signal. + * \param selector Pointer to the GtkSatSelector. + */ +static void addbut_clicked_cb (GtkButton *button, GtkSatSelector *selector) +{ + GtkListStore *store; + gint catnum = 0; + gchar *name; + gdouble epoch; + + + /* get the selected row in the treeview */ + gtk_sat_selector_get_selected (selector, &catnum, &name, &epoch); + + if (catnum) { + /* Add satellite to selected list */ + store = GTK_LIST_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (satlist))); + add_selected_sat (store, catnum); + } + +} + + +/** \brief Signal handler for "<-" button signals. + * \param button Pointer to the button that received the signal. + * \param selector Pointer to the GtkSatSelector (not used). + */ +static void delbut_clicked_cb (GtkButton *button, GtkSatSelector *selector) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */ + + + /* get the selected row in the treeview */ + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (satlist)); + haveselection = gtk_tree_selection_get_selected (selection, &model, &iter); + + if (haveselection) { + gtk_list_store_remove (GTK_LIST_STORE(model), &iter); + } + +} + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-24 16:14:41
|
Revision: 431 http://gpredict.svn.sourceforge.net/gpredict/?rev=431&view=rev Author: csete Date: 2009-09-24 16:14:31 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Some progress with the satellite selector. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-selector.c trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-24 12:00:21 UTC (rev 430) +++ trunk/ChangeLog 2009-09-24 16:14:31 UTC (rev 431) @@ -1,3 +1,12 @@ +2009-09-24 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-selector.c: + Fixed a bug that caused tree models to be deleted when selecting a new satellite group. + + * src/mod-cfg.c: + Added list of selected satellites. + + 2009-09-23 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-selector.[ch]: Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-24 12:00:21 UTC (rev 430) +++ trunk/src/gtk-sat-selector.c 2009-09-24 16:14:31 UTC (rev 431) @@ -269,7 +269,7 @@ //gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->groups, FALSE, FALSE, 0); //gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->swin, TRUE, TRUE, 0); - table = gtk_table_new (5, 2, FALSE); + table = gtk_table_new (7, 4, TRUE); /* Search */ gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Search:")), 0, 1, 0, 1, @@ -279,18 +279,18 @@ /* this enables automatic search */ gtk_tree_view_set_search_entry (GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree), GTK_ENTRY (GTK_SAT_SELECTOR (widget)->search)); - gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 2, 0, 1, + gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 4, 0, 1, GTK_FILL, GTK_FILL, 0, 0); /* Group selector */ gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Group:")), 0, 1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0); - gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->groups, 1, 2, 1, 2, + gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->groups, 1, 4, 1, 2, GTK_FILL, GTK_FILL, 0, 0); /* satellite list */ - gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->swin, 0, 2, 2, 5, + gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->swin, 0, 4, 2, 7, GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); /* Add tabel to main container */ Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-24 12:00:21 UTC (rev 430) +++ trunk/src/mod-cfg.c 2009-09-24 16:14:31 UTC (rev 431) @@ -37,7 +37,7 @@ | ---------------------------------- | | Satellites | | +--------------------------+-----+ | -| | Name | Sel | | +| | Available Satellites | Sel | | | +--------------------------+-----+ | | | > Amateur | | | | | v Weather | | | @@ -96,9 +96,17 @@ static void edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata); +static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new); +static void add_selected_sat (GtkListStore *store, gint catnum); + static void sat_activated_cb (GtkSatSelector *selector, gint catnr, gpointer data); +static gint compare_func (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer userdata); + /** \brief Create a new module. * * This function creates a new module. The name of the module is @@ -239,7 +247,7 @@ /** \brief Edit configuration for an existing module. * \param modname The name of the module to edit. * \param cfgdata Configuration data for the module. - * \param toplevel Pointer to the topleve window. + * \param toplevel Pointer to the toplevel window. * * This function allows the user to edit the configuration * of the module specified by modname. The changes are stored @@ -456,8 +464,9 @@ { GtkWidget *dialog; GtkWidget *add; - GtkWidget *table; + GtkWidget *table; GtkWidget *label; + GtkWidget *swin; GtkTooltips *tooltips; gchar *icon; /* window icon file name */ @@ -602,18 +611,193 @@ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); /*** NEW CODE ***/ + /* satellite selector */ GtkWidget *selector = gtk_sat_selector_new (0); g_signal_connect (selector, "sat-activated", G_CALLBACK (sat_activated_cb), NULL); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), selector, TRUE, TRUE, 0); + /* list of selected satellites */ + satlist = create_selected_sats_list (cfgdata, new); + 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), satlist); + + table = gtk_table_new (7, 9, TRUE); + gtk_table_attach_defaults (GTK_TABLE (table), selector, 0, 4, 0, 7); + gtk_table_attach_defaults (GTK_TABLE (table), swin, 5, 9, 2, 7); + + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, TRUE, TRUE, 0); + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); return dialog; } +/** \brief Create the list containing the selected satellites. + * \param new Flag indicating whether the module config window is for a new module. + * \returns A newly created GtkTreeView widget. + * + */ +static GtkWidget *create_selected_sats_list (GKeyFile *cfgdata, gboolean new) +{ + GtkWidget *satlist; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkListStore *store; + + + satlist = gtk_tree_view_new (); + + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Selected Satellites"), renderer, + "text", GTK_SAT_SELECTOR_COL_NAME, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (satlist), column, -1); + gtk_tree_view_column_set_visible (column, TRUE); + + /* catalogue number */ + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Catnum"), renderer, + "text", GTK_SAT_SELECTOR_COL_CATNUM, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (satlist), column, -1); + gtk_tree_view_column_set_visible (column, FALSE); + + /* epoch */ + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Epoch"), renderer, + "text", GTK_SAT_SELECTOR_COL_EPOCH, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (satlist), column, -1); + gtk_tree_view_column_set_visible (column, FALSE); + + + /* create the model */ + store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, + G_TYPE_STRING, // name + G_TYPE_INT, // catnum + G_TYPE_DOUBLE // epoch + ); + + /* sort the list by name */ + gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (store), + GTK_SAT_SELECTOR_COL_NAME, + compare_func, + NULL, + NULL); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (store), + GTK_SAT_SELECTOR_COL_NAME, + GTK_SORT_ASCENDING); + + /* If we are editing an existing module, load the satellites into the list */ + if (!new) { + gint *sats = NULL; + gsize length; + GError *error = NULL; + guint i; + + sats = g_key_file_get_integer_list (cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_SATS_KEY, + &length, + &error); + + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to get list of satellites (%s)"), + __FUNCTION__, error->message); + + g_clear_error (&error); + + /* GLib API says nothing about the contents in case of error */ + if (sats) { + g_free (sats); + } + + } + else { + for (i = 0; i < length; i++) { + add_selected_sat (store, sats[i]); + g_print ("ADD: %d\n", sats[i]); + } + g_free (sats); + } + + } + + gtk_tree_view_set_model (GTK_TREE_VIEW (satlist), GTK_TREE_MODEL(store)); + g_object_unref (store); + + return satlist; +} + + +/** \brief Add a satellite to the list of selected satellites. + * \param store Pointer to the GtkListStore into which the new satellite should be inserted. + * \param catnum Catalog number of the satellite to be added. + */ +static void add_selected_sat (GtkListStore *store, gint catnum) +{ + gint i, sats = 0; + GtkTreeIter iter; + GtkTreeIter node; /* new top level node added to the tree store */ + gint catnr; + gboolean found = FALSE; + sat_t sat; + + + /* check if the satellite is already in the list */ + + /* get number of satellites already in list */ + sats = gtk_tree_model_iter_n_children (GTK_TREE_MODEL (store), NULL); + + /* loop over list entries and check their catnums */ + for (i = 0; i < sats; i++) { + if (gtk_tree_model_iter_nth_child (GTK_TREE_MODEL (store), &iter, NULL, i)) { + gtk_tree_model_get (GTK_TREE_MODEL (store), &iter, + GTK_SAT_SELECTOR_COL_CATNUM, &catnr, + -1); + if (catnum == catnr) { + found = TRUE; + } + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Could not fetch entry %d in satellite list"), + __FILE__, __FUNCTION__, i); + } + + } + + if (found) + return; + + /* if we have made it so far, satellite is not in list */ + + /* Get satellite data */ + if (gtk_sat_data_read_sat (catnum, &sat)) { + /* error */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Error reading satellite %d."), + __FILE__, __FUNCTION__, catnum); + } + else { + /* insert satellite into liststore */ + gtk_list_store_append (store, &node); + gtk_list_store_set (store, &node, + GTK_SAT_SELECTOR_COL_NAME, sat.nickname, + GTK_SAT_SELECTOR_COL_CATNUM, catnum, + GTK_SAT_SELECTOR_COL_EPOCH, sat.jul_epoch, + -1); + g_free (sat.name); + g_free (sat.nickname); + } +} + + + /** \brief Manage name changes. * * This function is called when the contents of the name entry changes. @@ -957,3 +1141,34 @@ g_free (satname); } + + +/** \brief Compare two rows of the GtkSatSelector. + * \param model The tree model of the GtkSatSelector. + * \param a The first row. + * \param b The second row. + * \param userdata Not used. + * + * This function is used by the sorting algorithm to compare two rows of the + * GtkSatSelector widget. The unctions works by comparing the character strings + * in the name column. + */ +static gint compare_func (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer userdata) +{ + gchar *sat1,*sat2; + gint ret = 0; + + + gtk_tree_model_get(model, a, GTK_SAT_SELECTOR_COL_NAME, &sat1, -1); + gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_NAME, &sat2, -1); + + ret = g_ascii_strcasecmp (sat1, sat2); + + g_free (sat1); + g_free (sat2); + + return ret; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-24 12:00:34
|
Revision: 430 http://gpredict.svn.sourceforge.net/gpredict/?rev=430&view=rev Author: csete Date: 2009-09-24 12:00:21 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Updated category names. Modified Paths: -------------- trunk/data/satdata/military.cat trunk/data/satdata/musson.cat trunk/data/satdata/nnss.cat trunk/data/satdata/other-comm.cat trunk/data/satdata/sbas.cat trunk/data/satdata/science.cat trunk/data/satdata/tdrss.cat trunk/data/satdata/visual.cat trunk/data/satdata/weather.cat trunk/data/satdata/x-comm.cat Modified: trunk/data/satdata/military.cat =================================================================== --- trunk/data/satdata/military.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/military.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Miscellaneous Military +Military 22698 23125 23126 Modified: trunk/data/satdata/musson.cat =================================================================== --- trunk/data/satdata/musson.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/musson.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Russian LEO Navigation +Russian LEO Nav 25590 26818 27436 Modified: trunk/data/satdata/nnss.cat =================================================================== --- trunk/data/satdata/nnss.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/nnss.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Navy Mav Sat System +Navy Nav. Sats 2807 2965 3133 Modified: trunk/data/satdata/other-comm.cat =================================================================== --- trunk/data/satdata/other-comm.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/other-comm.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Other Communication +Other Comm. 26390 26483 26626 Modified: trunk/data/satdata/sbas.cat =================================================================== --- trunk/data/satdata/sbas.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/sbas.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Satellite-based Augmentation System +SBAS 24307 25153 26863 Modified: trunk/data/satdata/science.cat =================================================================== --- trunk/data/satdata/science.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/science.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,5 +1,4 @@ Space & Earth Science - 424 10637 13777 Modified: trunk/data/satdata/tdrss.cat =================================================================== --- trunk/data/satdata/tdrss.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/tdrss.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Tracking & Data Relay Satellite System +TDRSS 13367 13969 14780 Modified: trunk/data/satdata/visual.cat =================================================================== --- trunk/data/satdata/visual.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/visual.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -100 (or so) Brightest +Brightest 694 733 877 Modified: trunk/data/satdata/weather.cat =================================================================== --- trunk/data/satdata/weather.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/weather.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Weather Satellites +Weather Sats 21140 22912 23522 Modified: trunk/data/satdata/x-comm.cat =================================================================== --- trunk/data/satdata/x-comm.cat 2009-09-24 11:52:05 UTC (rev 429) +++ trunk/data/satdata/x-comm.cat 2009-09-24 12:00:21 UTC (rev 430) @@ -1,4 +1,4 @@ -Experimental Communications +Experimental Comm. 20608 21577 22078 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-24 11:52:11
|
Revision: 429 http://gpredict.svn.sourceforge.net/gpredict/?rev=429&view=rev Author: csete Date: 2009-09-24 11:52:05 +0000 (Thu, 24 Sep 2009) Log Message: ----------- Fixed a bug that caused tree models to be deleted when selecting a new satellite group. Modified Paths: -------------- trunk/src/gtk-sat-selector.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-23 22:29:23 UTC (rev 428) +++ trunk/src/gtk-sat-selector.c 2009-09-24 11:52:05 UTC (rev 429) @@ -27,7 +27,6 @@ */ /** \brief Satellite selector. * - * FIXME: add search/lookup function */ #include <gtk/gtk.h> #include <glib/gi18n.h> @@ -561,21 +560,26 @@ static void group_selected_cb (GtkComboBox *combobox, gpointer data) { GtkSatSelector *selector = GTK_SAT_SELECTOR (data); - GtkTreeModel *model; + GtkTreeModel *newmodel; + GtkTreeModel *oldmodel; gint sel; sel = gtk_combo_box_get_active (combobox); - g_print ("%d\n", sel); - /*** FIXME ***/ + /* Frst, we need to reference the existing model, otherwise its + refcount will drop to 0 when we replace it */ + oldmodel = gtk_tree_view_get_model (GTK_TREE_VIEW (selector->tree)); + if (oldmodel != NULL) + g_object_ref (oldmodel); - model = GTK_TREE_MODEL (g_slist_nth_data (selector->models, sel)); - gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), model); - g_object_unref (model); + /* now replace oldmodel with newmodel */ + newmodel = GTK_TREE_MODEL (g_slist_nth_data (selector->models, sel)); + gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), newmodel); + g_object_unref (newmodel); /* We changed the GtkTreeModel so we need to reset the sort column ID */ - gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (newmodel), GTK_SAT_SELECTOR_COL_NAME, GTK_SORT_ASCENDING); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-23 22:29:31
|
Revision: 428 http://gpredict.svn.sourceforge.net/gpredict/?rev=428&view=rev Author: csete Date: 2009-09-23 22:29:23 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Updated. Modified Paths: -------------- trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h trunk/src/mod-cfg.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-23 20:45:38 UTC (rev 427) +++ trunk/src/gtk-sat-selector.c 2009-09-23 22:29:23 UTC (rev 428) @@ -28,7 +28,6 @@ /** \brief Satellite selector. * * FIXME: add search/lookup function - * FIXME: epoch not implemented */ #include <gtk/gtk.h> #include <glib/gi18n.h> @@ -181,6 +180,7 @@ GtkTreeModel *model; GtkCellRenderer *renderer; GtkTreeViewColumn *column; + GtkWidget *table; if (!flags) @@ -226,7 +226,7 @@ /* create tree view columns */ /* label column */ renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes (_("Satellite"), renderer, + column = gtk_tree_view_column_new_with_attributes (_("Available Satellites"), renderer, "text", GTK_SAT_SELECTOR_COL_NAME, NULL); gtk_tree_view_insert_column (GTK_TREE_VIEW (selector->tree), column, -1); @@ -267,10 +267,36 @@ //gtk_container_add (GTK_CONTAINER (widget), GTK_SAT_TREE (widget)->swin); - gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->groups, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->swin, TRUE, TRUE, 0); + //gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->groups, FALSE, FALSE, 0); + //gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->swin, TRUE, TRUE, 0); + table = gtk_table_new (5, 2, FALSE); + /* Search */ + gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Search:")), 0, 1, 0, 1, + GTK_SHRINK, GTK_SHRINK, 0, 0); + GTK_SAT_SELECTOR (widget)->search = gtk_entry_new (); + + /* this enables automatic search */ + gtk_tree_view_set_search_entry (GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree), + GTK_ENTRY (GTK_SAT_SELECTOR (widget)->search)); + gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 2, 0, 1, + GTK_FILL, GTK_FILL, 0, 0); + + /* Group selector */ + gtk_table_attach (GTK_TABLE (table), gtk_label_new (_("Group:")), 0, 1, 1, 2, + GTK_SHRINK, GTK_SHRINK, 0, 0); + gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->groups, 1, 2, 1, 2, + GTK_FILL, GTK_FILL, 0, 0); + + + /* satellite list */ + gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->swin, 0, 2, 2, 5, + GTK_FILL | GTK_EXPAND, GTK_FILL | GTK_EXPAND, 0, 0); + + /* Add tabel to main container */ + gtk_box_pack_start (GTK_BOX (widget), table, TRUE, TRUE, 0); + gtk_widget_show_all (widget); @@ -540,10 +566,20 @@ sel = gtk_combo_box_get_active (combobox); + g_print ("%d\n", sel); + + /*** FIXME ***/ + model = GTK_TREE_MODEL (g_slist_nth_data (selector->models, sel)); gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), model); g_object_unref (model); + /* We changed the GtkTreeModel so we need to reset the sort column ID */ + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), + GTK_SAT_SELECTOR_COL_NAME, + GTK_SORT_ASCENDING); + + } Modified: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h 2009-09-23 20:45:38 UTC (rev 427) +++ trunk/src/gtk-sat-selector.h 2009-09-23 22:29:23 UTC (rev 428) @@ -87,6 +87,7 @@ gulong handler_id; /*!< Toggle signale handler ID (FIXME): remove. */ GtkWidget *groups; /*!< Combo box for selecting satellite group. */ + GtkWidget *search; /*!< Text entry for searching. */ GSList *models; /*!< List of models with index corresponding to groups. */ }; Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-23 20:45:38 UTC (rev 427) +++ trunk/src/mod-cfg.c 2009-09-23 22:29:23 UTC (rev 428) @@ -78,9 +78,10 @@ /* private widgets */ -static GtkWidget *namew; /* GtkEntry widget for module name */ -static GtkWidget *locw; /* GtkComboBox for location selection */ -static GtkWidget *tree; /* GtkSatTree for selecting satellites */ +static GtkWidget *namew; /* GtkEntry widget for module name */ +static GtkWidget *locw; /* GtkComboBox for location selection */ +static GtkWidget *tree; /* OBSOLETE GtkSatTree for selecting satellites */ +static GtkWidget *satlist; /* list of selected satellites */ /* private functions prototype */ @@ -127,9 +128,9 @@ switch (response) { /* user pressed OK */ - case GTK_RESPONSE_OK: + case GTK_RESPONSE_OK: - /* check that user has selected at least one satellite */ + /* FIXME check that user has selected at least one satellite */ sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); if (num > 0) { @@ -458,7 +459,7 @@ GtkWidget *table; GtkWidget *label; GtkTooltips *tooltips; - gchar *icon; /* windo icon file name */ + gchar *icon; /* window icon file name */ @@ -561,7 +562,7 @@ gtk_label_set_markup (GTK_LABEL (label), _("<b>Select Satellites:</b>")); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 5); - /* satellite selector */ + /* OBSOLETE satellite selector */ tree = gtk_sat_tree_new (0); if (!new) { /* select satellites */ @@ -600,7 +601,7 @@ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); - /*** EXPERIMENTAL CODE ***/ + /*** NEW CODE ***/ GtkWidget *selector = gtk_sat_selector_new (0); g_signal_connect (selector, "sat-activated", G_CALLBACK (sat_activated_cb), NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-23 20:45:49
|
Revision: 427 http://gpredict.svn.sourceforge.net/gpredict/?rev=427&view=rev Author: csete Date: 2009-09-23 20:45:38 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Minor cleaning in the code. Modified Paths: -------------- trunk/src/gtk-sat-selector.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-23 20:43:04 UTC (rev 426) +++ trunk/src/gtk-sat-selector.c 2009-09-23 20:45:38 UTC (rev 427) @@ -181,10 +181,6 @@ GtkTreeModel *model; GtkCellRenderer *renderer; GtkTreeViewColumn *column; - GtkWidget *hbox; - GtkTooltips *tips; - GtkWidget *expbut; - GtkWidget *colbut; if (!flags) @@ -307,16 +303,10 @@ GtkListStore *store; /* the list store data structure */ GtkTreeIter node; /* new top level node added to the tree store */ GDir *dir; - GIOChannel *catfile; - GIOStatus status; - GError *error = NULL; gchar *dirname; sat_t sat; gint catnum; - gchar *path; - gchar *buff; - gchar *nodename; gchar **buffv; const gchar *fname; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-23 20:43:20
|
Revision: 426 http://gpredict.svn.sourceforge.net/gpredict/?rev=426&view=rev Author: csete Date: 2009-09-23 20:43:04 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Minor cleaning in the code. Modified Paths: -------------- trunk/src/mod-cfg.c Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-23 20:11:17 UTC (rev 425) +++ trunk/src/mod-cfg.c 2009-09-23 20:43:04 UTC (rev 426) @@ -25,7 +25,7 @@ You should have received a copy of the GNU General Public License along with this program; if not, visit http://www.fsf.org/ */ -/* +/* FIXME: Update diagram +------------------------------------+ | +---------------------+ | @@ -103,8 +103,7 @@ * This function creates a new module. The name of the module is * returned and it should be freed when no longer needed. */ -gchar * - mod_cfg_new () +gchar *mod_cfg_new () { GtkWidget *dialog; GKeyFile *cfgdata; @@ -330,8 +329,7 @@ * into a module configuration file called modname.mod placed in * the USER_CONF_DIR/modules/ directory. */ -mod_cfg_status_t - mod_cfg_save (gchar *modname, GKeyFile *cfgdata) +mod_cfg_status_t mod_cfg_save (gchar *modname, GKeyFile *cfgdata) { GError *error = NULL; /* Error handler */ gchar *datastream; /* cfgdata string */ @@ -441,15 +439,18 @@ * TRUE the user will be asked for confirmation first. The function returns * MOD_CFG_CANCEL if the user has cancelled the operation. */ -mod_cfg_status_t - mod_cfg_delete (gchar *modname, gboolean needcfm) +mod_cfg_status_t mod_cfg_delete (gchar *modname, gboolean needcfm) { return MOD_CFG_CANCEL; } - +/** \brief Create module configuration window. + * \param modname The name of the module (in edit mode) or NULL for a new module. + * \param cfgdata Pointer to the configuration data. + * \param toplevel Pointer to the toplevel window. + */ static GtkWidget *mod_cfg_editor_create (const gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) { GtkWidget *dialog; @@ -618,8 +619,7 @@ * The primary purpose of this function is to check whether the char length * of the name is greater than zero, if yes enable the OK button of the dialog. */ -static void - name_changed (GtkWidget *widget, gpointer data) +static void name_changed (GtkWidget *widget, gpointer data) { const gchar *text; gchar *entry, *end, *j; @@ -631,20 +631,17 @@ (stolen from xlog, tnx pg4i) */ entry = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1); - if ((len = g_utf8_strlen (entry, -1)) > 0) - { + 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 '_': + for (j = entry; j < end; ++j) { + switch (*j) { + case '0' ... '9': + case 'a' ... 'z': + case 'A' ... 'Z': + case '-': + case '_': break; - default: + default: gdk_beep (); pos = gtk_editable_get_position (GTK_EDITABLE (widget)); gtk_editable_delete_text (GTK_EDITABLE (widget), @@ -676,8 +673,7 @@ * This function creates the location selector combo box and initialises it * with the names of the existing locations. */ -static GtkWidget * - create_loc_selector (GKeyFile *cfgdata) +static GtkWidget *create_loc_selector (GKeyFile *cfgdata) { GtkWidget *combo; GDir *dir = NULL; @@ -780,8 +776,7 @@ * automatically, since there needs to be a possibility to * CANCEL any action. */ -static void - mod_cfg_apply (GKeyFile *cfgdata) +static void mod_cfg_apply (GKeyFile *cfgdata) { guint *sats; gsize num; @@ -852,8 +847,7 @@ * relevant sat-pref config modules, i.e. those which are relevant for * configuring GtkSatModules. */ -static void - edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata) +static void edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata) { GtkWidget *dialog; GtkWidget *contents; @@ -906,8 +900,7 @@ * \param data Pointer to the dialog window. * */ -static void - add_qth_cb (GtkWidget *button, gpointer data) +static void add_qth_cb (GtkWidget *button, gpointer data) { GtkWindow *parent = GTK_WINDOW (data); GtkResponseType response; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-23 20:11:25
|
Revision: 425 http://gpredict.svn.sourceforge.net/gpredict/?rev=425&view=rev Author: csete Date: 2009-09-23 20:11:17 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Changed sat-activated signal to include catalog number in callback. Modified Paths: -------------- trunk/src/gtk-sat-selector.c trunk/src/mod-cfg.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-23 19:55:56 UTC (rev 424) +++ trunk/src/gtk-sat-selector.c 2009-09-23 20:11:17 UTC (rev 425) @@ -130,9 +130,10 @@ G_STRUCT_OFFSET (GtkSatSelectorClass,gtksatselector), NULL, NULL, - g_cclosure_marshal_VOID__VOID, - G_TYPE_NONE, - 0); + g_cclosure_marshal_VOID__INT, + G_TYPE_NONE, // return type + 1, + G_TYPE_INT); // catnum } @@ -570,10 +571,25 @@ GtkTreeViewColumn *column, gpointer data) { GtkSatSelector *selector = GTK_SAT_SELECTOR (data); + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */ + gint catnum; /* catalog number of the selected satellite */ - /* emit the "sat-activated" signal for the GtkSatSelector */ - g_signal_emit (G_OBJECT (selector), gtksatsel_signals[SAT_ACTIVATED_SIGNAL], 0); + /* get the selected row in the treeview */ + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (selector->tree)); + haveselection = gtk_tree_selection_get_selected (selection, &model, &iter); + if (haveselection) { + /* get the name and catalog number of the selected saetllite */ + gtk_tree_model_get (model, &iter, + GTK_SAT_SELECTOR_COL_CATNUM, &catnum, + -1); + + /* emit the "sat-activated" signal for the GtkSatSelector */ + g_signal_emit (G_OBJECT (selector), gtksatsel_signals[SAT_ACTIVATED_SIGNAL], 0, catnum); + } } Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-23 19:55:56 UTC (rev 424) +++ trunk/src/mod-cfg.c 2009-09-23 20:11:17 UTC (rev 425) @@ -95,7 +95,7 @@ static void edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata); -static void sat_activated_cb (GtkSatSelector *selector, gpointer data); +static void sat_activated_cb (GtkSatSelector *selector, gint catnr, gpointer data); /** \brief Create a new module. @@ -950,18 +950,15 @@ * This function is called when the user has selected (i.e. double clicked) a satellite * in the GtkSatSelector. */ -static void sat_activated_cb (GtkSatSelector *selector, gpointer data) +static void sat_activated_cb (GtkSatSelector *selector, gint catnr, gpointer data) { gchar *satname; gint catnum; gdouble epoch; - /*** FIXME: Change callback to include catnum into callback (for other uses */ gtk_sat_selector_get_selected (selector, &catnum, &satname, &epoch); - g_print ("===> %s (%d) updated at %.4f\n", satname, catnum, epoch); - /* Add satellite to selected list */ g_free (satname); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-23 19:56:16
|
Revision: 424 http://gpredict.svn.sourceforge.net/gpredict/?rev=424&view=rev Author: csete Date: 2009-09-23 19:55:56 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Populate EPOCH field. Modified Paths: -------------- trunk/src/gtk-sat-selector.c Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-23 17:02:51 UTC (rev 423) +++ trunk/src/gtk-sat-selector.c 2009-09-23 19:55:56 UTC (rev 424) @@ -367,6 +367,7 @@ gtk_list_store_set (store, &node, GTK_SAT_SELECTOR_COL_NAME, sat.nickname, GTK_SAT_SELECTOR_COL_CATNUM, catnum, + GTK_SAT_SELECTOR_COL_EPOCH, sat.jul_epoch, -1); g_free (sat.name); @@ -441,7 +442,7 @@ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, G_TYPE_STRING, // name G_TYPE_INT, // catnum - G_TYPE_STRING // epoch + G_TYPE_DOUBLE // epoch ); selector->models = g_slist_append (selector->models, store); @@ -471,6 +472,7 @@ gtk_list_store_set (store, &node, GTK_SAT_SELECTOR_COL_NAME, sat.nickname, GTK_SAT_SELECTOR_COL_CATNUM, catnum, + GTK_SAT_SELECTOR_COL_EPOCH, sat.jul_epoch, -1); g_free (sat.name); g_free (sat.nickname); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-23 17:03:00
|
Revision: 423 http://gpredict.svn.sourceforge.net/gpredict/?rev=423&view=rev Author: csete Date: 2009-09-23 17:02:51 +0000 (Wed, 23 Sep 2009) Log Message: ----------- Implemeted custom sat-activated signal for GtkSatSelector. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-09-18 15:52:41 UTC (rev 422) +++ trunk/ChangeLog 2009-09-23 17:02:51 UTC (rev 423) @@ -1,3 +1,14 @@ +2009-09-23 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-selector.[ch]: + Changed EPOCH column type to G_TYPE_DOUBLE (consistent with sat_t). + Implemented "sat-activated" signal that is triggered when the user + double click on a satellite. + + * src/mod-cfg.c: + Connect GtkSatSelector's new "sat-activated" signal to signal handler. + + 2009-09-18 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-selector.[ch]: Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-09-18 15:52:41 UTC (rev 422) +++ trunk/src/gtk-sat-selector.c 2009-09-23 17:02:51 UTC (rev 423) @@ -54,6 +54,10 @@ static void create_and_fill_models (GtkSatSelector *selector); static void load_cat_file (GtkSatSelector *selector, const gchar *fname); static void group_selected_cb (GtkComboBox *combobox, gpointer data); +static void row_activated_cb (GtkTreeView *view, + GtkTreePath *path, + GtkTreeViewColumn *column, + gpointer data); static gint compare_func (GtkTreeModel *model, GtkTreeIter *a, @@ -63,6 +67,16 @@ static GtkVBoxClass *parent_class = NULL; +/** \brief GtkSatSelector signal IDs */ +enum { + SAT_ACTIVATED_SIGNAL, /*!< "sat-activated" signal */ + LAST_SIGNAL +}; + +/** \brief GtkSatSelector specific signals. */ +static guint gtksatsel_signals[LAST_SIGNAL] = { 0 }; + + GType gtk_sat_selector_get_type () { static GType gtk_sat_selector_type = 0; @@ -108,6 +122,17 @@ object_class->destroy = gtk_sat_selector_destroy; + /* create GtkSatSelector specific signals */ + gtksatsel_signals[SAT_ACTIVATED_SIGNAL] = + g_signal_new ("sat-activated", + G_TYPE_FROM_CLASS (class), + G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, + G_STRUCT_OFFSET (GtkSatSelectorClass,gtksatselector), + NULL, + NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); } @@ -198,7 +223,7 @@ /* we can now connect combobox signal handler */ g_signal_connect (GTK_SAT_SELECTOR (widget)->groups, "changed", - group_selected_cb, widget); + G_CALLBACK(group_selected_cb), widget); /* create tree view columns */ @@ -229,6 +254,10 @@ if (!(flags & GTK_SAT_SELECTOR_FLAG_EPOCH)) gtk_tree_view_column_set_visible (column, FALSE); + /* "row-activated" signal is used to catch double click events, which means + a satellite has been selected. This propagates to the TBD GtkSatSelector signal */ + g_signal_connect (selector->tree, "row-activated", + G_CALLBACK(row_activated_cb), selector); /* scrolled window */ GTK_SAT_SELECTOR (widget)->swin = gtk_scrolled_window_new (NULL, NULL); @@ -299,7 +328,7 @@ store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, G_TYPE_STRING, // name G_TYPE_INT, // catnum - G_TYPE_STRING // epoch + G_TYPE_DOUBLE // epoch ); selector->models = g_slist_append (selector->models, store); gtk_combo_box_append_text (GTK_COMBO_BOX (selector->groups), _("All satellites")); @@ -368,6 +397,7 @@ } + /** \brief Load satellites from a .cat file * \param selector Pointer to the GtkSatSelector * \param fname The name of the .cat file (name only, no path) @@ -522,3 +552,74 @@ g_object_unref (model); } + + +/** \brief Signal handler for managing satellite selection. + * \param view Pointer to the GtkTreeView object. + * \param path The path of the row that was activated. + * \param column The column where the activation occured. + * \param data Pointer to the GtkSatselector widget. + * + * This function is called when the user double clicks on a satellite in the + * satellite selector. It is used to trigger the "sat-activated" signal of + * the GtkSatSelector widget. + */ +static void row_activated_cb (GtkTreeView *view, GtkTreePath *path, + GtkTreeViewColumn *column, gpointer data) +{ + GtkSatSelector *selector = GTK_SAT_SELECTOR (data); + + /* emit the "sat-activated" signal for the GtkSatSelector */ + g_signal_emit (G_OBJECT (selector), gtksatsel_signals[SAT_ACTIVATED_SIGNAL], 0); + +} + + +/** \brief Get information about the selected satellite. + * \param selector Pointer to the GtkSatSelector widget. + * \param catnum Location where catnum will be stored (may be NULL). + * \param satname Location where the satellite name will be stored. May NOT be NULL. Must be g_freed after use. + * \param epoch Location where the satellite Epoch will be stored (may be NULL); + * + * This function can be used to retrieve information about the currently selected satellite + * a GtkSatSelector widget, e.g. after the "sat-activated" signal has been emitted. + */ +void gtk_sat_selector_get_selected (GtkSatSelector *selector, + gint *catnum, gchar **satname, gdouble *epoch) +{ + GtkTreeSelection *selection; + GtkTreeModel *model; + GtkTreeIter iter; + gboolean haveselection = FALSE; /* this flag is set to TRUE if there is a selection */ + gchar *l_satname; /* nickname of the selected satellite */ + gint l_catnum; /* catalog number of the selected satellite */ + gdouble l_epoch; /* TLE epoch of the selected satellite */ + + /* selector can not be NULL */ + g_return_if_fail ((selector != NULL) && (satname != NULL)); + + /* get the selected row in the treeview */ + selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (selector->tree)); + haveselection = gtk_tree_selection_get_selected (selection, &model, &iter); + + if (haveselection) { + /* get the name and catalog number of the selected saetllite */ + gtk_tree_model_get (model, &iter, + GTK_SAT_SELECTOR_COL_NAME, &l_satname, + GTK_SAT_SELECTOR_COL_CATNUM, &l_catnum, + GTK_SAT_SELECTOR_COL_EPOCH, &l_epoch, + -1); + + if (catnum != NULL) + *catnum = l_catnum; + + *satname = g_strdup (l_satname); + + if (epoch != NULL) + *epoch = l_epoch; + + g_free (l_satname); + } + +} + Modified: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h 2009-09-18 15:52:41 UTC (rev 422) +++ trunk/src/gtk-sat-selector.h 2009-09-23 17:02:51 UTC (rev 423) @@ -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/ */ @@ -39,18 +39,18 @@ /** \brief Column definitions in the tree. */ typedef enum { - GTK_SAT_SELECTOR_COL_NAME = 0, /*!< Satellite name. */ - GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ - GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ - GTK_SAT_SELECTOR_COL_NUM /*!< The number of columns. */ + GTK_SAT_SELECTOR_COL_NAME = 0, /*!< Satellite name. */ + GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ + GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ + GTK_SAT_SELECTOR_COL_NUM /*!< The number of columns. */ } gtk_sat_selector_col_t; - + /** \brief Flags used to indicate which columns should be visible. */ typedef enum { - GTK_SAT_SELECTOR_FLAG_NAME = 1 << GTK_SAT_SELECTOR_COL_NAME, /*!< Satellite name. */ - GTK_SAT_SELECTOR_FLAG_CATNUM = 1 << GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ - GTK_SAT_SELECTOR_FLAG_EPOCH = 1 << GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ + GTK_SAT_SELECTOR_FLAG_NAME = 1 << GTK_SAT_SELECTOR_COL_NAME, /*!< Satellite name. */ + GTK_SAT_SELECTOR_FLAG_CATNUM = 1 << GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ + GTK_SAT_SELECTOR_FLAG_EPOCH = 1 << GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ } gtk_sat_selector_flag_t; @@ -78,29 +78,30 @@ /** \brief The GtkSatSelector Structure definition */ struct _gtk_sat_selector { - GtkVBox vbox; + GtkVBox vbox; - GtkWidget *tree; /*!< The tree. */ - GtkWidget *swin; /*!< Scrolled window. */ - guint flags; /*!< Column visibility flags. */ - GSList *selection; /*!< List of selected satellites. FIXME: remove */ - gulong handler_id; /*!< Toggle signale handler ID (FIXME): remove. */ + GtkWidget *tree; /*!< The tree. */ + GtkWidget *swin; /*!< Scrolled window. */ + guint flags; /*!< Column visibility flags. */ + GSList *selection; /*!< List of selected satellites. FIXME: remove */ + gulong handler_id; /*!< Toggle signale handler ID (FIXME): remove. */ - GtkWidget *groups; /*!< Combo box for selecting satellite group. */ - GSList *models; /*!< List of models with index corresponding to groups. */ + GtkWidget *groups; /*!< Combo box for selecting satellite group. */ + GSList *models; /*!< List of models with index corresponding to groups. */ }; struct _GtkSatSelectorClass { - GtkVBoxClass parent_class; + GtkVBoxClass parent_class; + + void (* gtksatselector) (GtkSatSelector *sel); }; GtkType gtk_sat_selector_get_type (void); GtkWidget *gtk_sat_selector_new (guint flags); guint32 gtk_sat_selector_get_flags (GtkSatSelector *selector); -//void gtk_sat_selector_select (GtkSatTree *sat_tree, guint catnum); -guint *gtk_sat_selector_get_selected (GtkSatSelector *selector, gsize *size); +void gtk_sat_selector_get_selected (GtkSatSelector *selector, gint *catnum, gchar **satname, gdouble *epoch); #ifdef __cplusplus } Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-09-18 15:52:41 UTC (rev 422) +++ trunk/src/mod-cfg.c 2009-09-23 17:02:51 UTC (rev 423) @@ -95,7 +95,9 @@ static void edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata); +static void sat_activated_cb (GtkSatSelector *selector, gpointer data); + /** \brief Create a new module. * * This function creates a new module. The name of the module is @@ -246,8 +248,7 @@ * mod_cfg_save function. * */ -mod_cfg_status_t - mod_cfg_edit (gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) +mod_cfg_status_t mod_cfg_edit (gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) { GtkWidget *dialog; gint response; @@ -449,8 +450,7 @@ -static GtkWidget * - mod_cfg_editor_create (const gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) +static GtkWidget *mod_cfg_editor_create (const gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) { GtkWidget *dialog; GtkWidget *add; @@ -599,8 +599,13 @@ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), gtk_sat_selector_new (0), TRUE, TRUE, 0); + /*** EXPERIMENTAL CODE ***/ + GtkWidget *selector = gtk_sat_selector_new (0); + g_signal_connect (selector, "sat-activated", + G_CALLBACK (sat_activated_cb), NULL); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), selector, TRUE, TRUE, 0); + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); return dialog; @@ -935,3 +940,29 @@ /* g_key_file_free (data); */ } } + + + +/** \brief Signal handkler for "sat-activated" signals from the GtkSatSelector. + * \param selector Pointer to the GtkSatSelector widget. + * \param data Pointer to the TBD ... + * + * This function is called when the user has selected (i.e. double clicked) a satellite + * in the GtkSatSelector. + */ +static void sat_activated_cb (GtkSatSelector *selector, gpointer data) +{ + gchar *satname; + gint catnum; + gdouble epoch; + + /*** FIXME: Change callback to include catnum into callback (for other uses */ + + gtk_sat_selector_get_selected (selector, &catnum, &satname, &epoch); + + g_print ("===> %s (%d) updated at %.4f\n", satname, catnum, epoch); + + /* Add satellite to selected list */ + + g_free (satname); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-09-18 15:52:51
|
Revision: 422 http://gpredict.svn.sourceforge.net/gpredict/?rev=422&view=rev Author: csete Date: 2009-09-18 15:52:41 +0000 (Fri, 18 Sep 2009) Log Message: ----------- Implemented group selector. Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-08-23 16:34:15 UTC (rev 421) +++ trunk/ChangeLog 2009-09-18 15:52:41 UTC (rev 422) @@ -1,3 +1,9 @@ +2009-09-18 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-selector.[ch]: + Implemented satellite group selector. + + 2009-08-23 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-selector.[ch]: Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-08-23 16:34:15 UTC (rev 421) +++ trunk/src/gtk-sat-selector.c 2009-09-18 15:52:41 UTC (rev 422) @@ -52,6 +52,8 @@ static void gtk_sat_selector_destroy (GtkObject *object); static void create_and_fill_models (GtkSatSelector *selector); +static void load_cat_file (GtkSatSelector *selector, const gchar *fname); +static void group_selected_cb (GtkComboBox *combobox, gpointer data); static gint compare_func (GtkTreeModel *model, GtkTreeIter *a, @@ -167,6 +169,15 @@ selector->flags = flags; + /* create group selector combo box (needed by create_and_fill_models()) */ + GTK_SAT_SELECTOR (widget)->groups = gtk_combo_box_new_text (); + gtk_widget_set_tooltip_text (GTK_SAT_SELECTOR (widget)->groups, + _("Select a satellite group or category to narrow your search.")); + + /* combo box signal handler will be connected at the end after it has + been populated to avoid false triggering */ + + /* create list and model */ selector->tree = gtk_tree_view_new (); gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (selector->tree), TRUE); @@ -185,6 +196,11 @@ GTK_SAT_SELECTOR_COL_NAME, GTK_SORT_ASCENDING); + /* we can now connect combobox signal handler */ + g_signal_connect (GTK_SAT_SELECTOR (widget)->groups, "changed", + group_selected_cb, widget); + + /* create tree view columns */ /* label column */ renderer = gtk_cell_renderer_text_new (); @@ -219,10 +235,13 @@ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (GTK_SAT_SELECTOR (widget)->swin), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + gtk_container_add (GTK_CONTAINER (GTK_SAT_SELECTOR (widget)->swin), GTK_SAT_SELECTOR (widget)->tree); + //gtk_container_add (GTK_CONTAINER (widget), GTK_SAT_TREE (widget)->swin); + gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->groups, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->swin, TRUE, TRUE, 0); @@ -238,17 +257,35 @@ -/** FIXME: flags not needed here */ +/** \brief Create and fill data store models. + * \param selector Pointer to the GtkSatSelector widget + * + * this fuinction scan for satellite data and stores them in tree models + * that can be displayed in a tree view. The scan is performed in two iterations: + * + * (1) First, all .sat files are scanned, read and added to a pseudo-group called + * "all" satellites. + * (2) After the first scane, the function scans and reads .cat files and creates + * the groups accordingly. + * + * For each group (including the "all" group) and entry is added to the + * selector->groups GtkComboBox, where the index of the entry corresponds to + * the index of the group model in selector->models. + */ static void create_and_fill_models (GtkSatSelector *selector) { GtkListStore *store; /* the list store data structure */ GtkTreeIter node; /* new top level node added to the tree store */ GDir *dir; + GIOChannel *catfile; + GIOStatus status; + GError *error = NULL; gchar *dirname; sat_t sat; gint catnum; gchar *path; + gchar *buff; gchar *nodename; gchar **buffv; const gchar *fname; @@ -265,6 +302,8 @@ G_TYPE_STRING // epoch ); selector->models = g_slist_append (selector->models, store); + gtk_combo_box_append_text (GTK_COMBO_BOX (selector->groups), _("All satellites")); + gtk_combo_box_set_active (GTK_COMBO_BOX (selector->groups), 0); dirname = get_satdata_dir (); dir = g_dir_open (dirname, 0, NULL); @@ -278,7 +317,7 @@ return; } - /* Scan data directory for .tle files. + /* Scan data directory for .sat files. For each file scan through the file and add entry to the tree. */ @@ -318,95 +357,117 @@ while ((fname = g_dir_read_name (dir))) { if (g_strrstr (fname, ".cat")) { + load_cat_file (selector, fname); + } } g_dir_close (dir); g_free (dirname); +} -#if 0 - /* create a new tree store */ - store = gtk_tree_store_new (GTK_SAT_SELECTOR_COL_NUM, - G_TYPE_STRING, // name - G_TYPE_INT, // catnum - G_TYPE_STRING // epoch - ); +/** \brief Load satellites from a .cat file + * \param selector Pointer to the GtkSatSelector + * \param fname The name of the .cat file (name only, no path) + * + * This function is used to encapsulate reading the clear text name and the contents + * of a .cat file. It is used for building the satellite tree store models + */ +static void load_cat_file (GtkSatSelector *selector, const gchar *fname) +{ + GIOChannel *catfile; + GError *error = NULL; + GtkListStore *store; /* the list store data structure */ + GtkTreeIter node; /* new top level node added to the tree store */ - dirname = g_strconcat (g_get_home_dir (), - G_DIR_SEPARATOR_S, ".gpredict2", - G_DIR_SEPARATOR_S, "tle", - NULL); + gchar *path; + gchar *buff; + sat_t sat; + gint catnum; + guint num = 0; - /* debug message */ - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s:%d: Directory is: %s"), - __FILE__, __LINE__, dirname); - - dir = g_dir_open (dirname, 0, NULL); - - /* no tle files */ - if (!dir) { + /* .cat files contains clear text category name in the first line + then one satellite catalog number per line */ + path = sat_file_name (fname); + catfile = g_io_channel_new_file (path, "r", &error); + if (error != NULL) { sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: No .tle files found in %s."), - __FILE__, __LINE__, dirname); + _("%s:%s: Failed to open %s: %s"), + __FILE__, __FUNCTION__, fname, error->message); + g_clear_error (&error); + } + else { + /* read first line => category name */ - g_free (dirname); + if (g_io_channel_read_line (catfile, &buff, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) { + g_strstrip (buff); /* removes trailing newline */ + gtk_combo_box_append_text (GTK_COMBO_BOX (selector->groups), buff); + g_free (buff); - return GTK_TREE_MODEL (store);; - } + /* we can safely create the liststore for this category */ + store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, + G_TYPE_STRING, // name + G_TYPE_INT, // catnum + G_TYPE_STRING // epoch + ); + selector->models = g_slist_append (selector->models, store); - /* Scan data directory for .tle files. - For each file scan through the file and - add entry to the tree. - */ - while ((fname = g_dir_read_name (dir))) { - if (g_strrstr (fname, ".tle")) { - buffv = g_strsplit (fname, ".tle", 0); - nodename = g_strdup (buffv[0]); - nodename[0] = g_ascii_toupper (nodename[0]); + /* Remaining lines are catalog numbers for satellites. + Read line by line until the first error, which hopefully is G_IO_STATUS_EOF + */ + while (g_io_channel_read_line (catfile, &buff, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) { - /* create a new top level node in the tree */ - gtk_tree_store_append (store, &node, NULL); - gtk_tree_store_set (store, &node, - GTK_SAT_SELECTOR_COL_NAME, nodename, - -1); + /* stip trailing EOL */ + g_strstrip (buff); - /* build full path til file and sweep it for sats */ - path = g_strconcat (dirname, G_DIR_SEPARATOR_S, - fname, NULL); + /* catalog number to integer */ + catnum = (gint) g_ascii_strtoll (buff, NULL, 0); - num = scan_tle_file (path, store, &node); + /* try to read satellite data */ + if (gtk_sat_data_read_sat (catnum, &sat)) { + /* error */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Error reading satellite %d."), + __FILE__, __FUNCTION__, catnum); + } + else { + /* insert satellite into liststore */ + gtk_list_store_append (store, &node); + gtk_list_store_set (store, &node, + GTK_SAT_SELECTOR_COL_NAME, sat.nickname, + GTK_SAT_SELECTOR_COL_CATNUM, catnum, + -1); + g_free (sat.name); + g_free (sat.nickname); + num++; + } - g_free (path); - g_free (nodename); - g_strfreev (buffv); - + g_free (buff); + } sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s:%d: Read %d sats from %s "), - __FILE__, __LINE__, num, fname); + _("%s:%s: Read %d satellites from %s"), + __FILE__, __FUNCTION__, num, fname); } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Failed to read %s"), + __FILE__, __FUNCTION__, fname); + } } - g_dir_close (dir); - g_free (dirname); -#endif - - + g_free (path); + g_io_channel_shutdown (catfile, TRUE, NULL); } - - - - /** \brief Compare two rows of the GtkSatSelector. * \param model The tree model of the GtkSatSelector. * \param a The first row. @@ -437,3 +498,27 @@ return ret; } + +/** \brief Signal handler for managing satellite group selections. + * \param combobox The GtkcomboBox widget. + * \param data Pointer to the GtkSatSelector widget. + * + * This function is called when the user selects a new satellite group in the + * filter. The function is responsible for reloading the conctents of the satellite + * list according to the new selection. This task is very simple because the + * proper liststore has already been constructed and stored in selector->models[i] + * where i corresponds to the index of the newly selected group in the combo box. + */ +static void group_selected_cb (GtkComboBox *combobox, gpointer data) +{ + GtkSatSelector *selector = GTK_SAT_SELECTOR (data); + GtkTreeModel *model; + gint sel; + + sel = gtk_combo_box_get_active (combobox); + + model = GTK_TREE_MODEL (g_slist_nth_data (selector->models, sel)); + gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), model); + g_object_unref (model); + +} Modified: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h 2009-08-23 16:34:15 UTC (rev 421) +++ trunk/src/gtk-sat-selector.h 2009-09-18 15:52:41 UTC (rev 422) @@ -86,7 +86,8 @@ GSList *selection; /*!< List of selected satellites. FIXME: remove */ gulong handler_id; /*!< Toggle signale handler ID (FIXME): remove. */ - GSList *models; + GtkWidget *groups; /*!< Combo box for selecting satellite group. */ + GSList *models; /*!< List of models with index corresponding to groups. */ }; struct _GtkSatSelectorClass This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-08-23 16:34:41
|
Revision: 421 http://gpredict.svn.sourceforge.net/gpredict/?rev=421&view=rev Author: csete Date: 2009-08-23 16:34:15 +0000 (Sun, 23 Aug 2009) Log Message: ----------- sync Modified Paths: -------------- trunk/ChangeLog trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h trunk/src/mod-cfg.c Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2009-08-23 15:02:04 UTC (rev 420) +++ trunk/ChangeLog 2009-08-23 16:34:15 UTC (rev 421) @@ -1,3 +1,9 @@ +2009-08-23 Alexandru Csete <oz9aec at gmail.com> + + * src/gtk-sat-selector.[ch]: + Added files with new satellite selector. + + 2009-08-12 Alexandru Csete <oz9aec at gmail.com> * src/gtk-sat-module-tmg.c: Modified: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c 2009-08-23 15:02:04 UTC (rev 420) +++ trunk/src/gtk-sat-selector.c 2009-08-23 16:34:15 UTC (rev 421) @@ -35,7 +35,9 @@ #ifdef HAVE_CONFIG_H # include <build-config.h> #endif +#include "sgpsdp/sgp4sdp4.h" #include "sat-log.h" +#include "gtk-sat-data.h" #include "compat.h" #include "gtk-sat-selector.h" @@ -239,24 +241,90 @@ /** FIXME: flags not needed here */ static void create_and_fill_models (GtkSatSelector *selector) { - GtkTreeStore *store; /* the list store data structure */ + GtkListStore *store; /* the list store data structure */ GtkTreeIter node; /* new top level node added to the tree store */ GDir *dir; gchar *dirname; + sat_t sat; + gint catnum; + gchar *path; gchar *nodename; gchar **buffv; const gchar *fname; + guint num = 0; - /* load all satellites into solector->models[0] */ + /* load all satellites into selector->models[0] */ + store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM, + G_TYPE_STRING, // name + G_TYPE_INT, // catnum + G_TYPE_STRING // epoch + ); + selector->models = g_slist_append (selector->models, store); + dirname = get_satdata_dir (); + dir = g_dir_open (dirname, 0, NULL); + if (!dir) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%s: Failed to open satdata directory %s."), + __FILE__, __FUNCTION__, dirname); + g_free (dirname); + + return; + } + + /* Scan data directory for .tle files. + For each file scan through the file and + add entry to the tree. + */ + while ((fname = g_dir_read_name (dir))) { + + if (g_strrstr (fname, ".sat")) { + + buffv = g_strsplit (fname, ".", 0); + catnum = (gint) g_ascii_strtoll (buffv[0], NULL, 0); + + if (gtk_sat_data_read_sat (catnum, &sat)) { + /* error */ + } + else { + /* read satellite */ + + gtk_list_store_append (store, &node); + gtk_list_store_set (store, &node, + GTK_SAT_SELECTOR_COL_NAME, sat.nickname, + GTK_SAT_SELECTOR_COL_CATNUM, catnum, + -1); + + g_free (sat.name); + g_free (sat.nickname); + num++; + } + + g_strfreev (buffv); + } + } + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%s: Read %d satellites into MAIN group."), + __FILE__, __FUNCTION__, num); + /* load satellites from each .cat file into selector->models[i] */ + g_dir_rewind (dir); + while ((fname = g_dir_read_name (dir))) { + if (g_strrstr (fname, ".cat")) { + } + } + + g_dir_close (dir); + g_free (dirname); + + #if 0 /* create a new tree store */ store = gtk_tree_store_new (GTK_SAT_SELECTOR_COL_NUM, Modified: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h 2009-08-23 15:02:04 UTC (rev 420) +++ trunk/src/gtk-sat-selector.h 2009-08-23 16:34:15 UTC (rev 421) @@ -55,7 +55,7 @@ -#define GTK_SAT_SELECTOR_DEFAULT_FLAGS (GTK_SAT_SELECTOR_FLAG_NAME) +#define GTK_SAT_SELECTOR_DEFAULT_FLAGS (GTK_SAT_SELECTOR_FLAG_NAME | GTK_SAT_SELECTOR_COL_CATNUM) #define GTK_TYPE_SAT_SELECTOR (gtk_sat_selector_get_type ()) Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-08-23 15:02:04 UTC (rev 420) +++ trunk/src/mod-cfg.c 2009-08-23 16:34:15 UTC (rev 421) @@ -71,6 +71,8 @@ #include "mod-cfg.h" +#include "gtk-sat-selector.h" + extern GtkWidget *app; @@ -597,6 +599,8 @@ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), gtk_sat_selector_new (0), TRUE, TRUE, 0); + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); return dialog; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-08-23 15:02:12
|
Revision: 420 http://gpredict.svn.sourceforge.net/gpredict/?rev=420&view=rev Author: csete Date: 2009-08-23 15:02:04 +0000 (Sun, 23 Aug 2009) Log Message: ----------- Fixed indent. Modified Paths: -------------- trunk/src/mod-cfg.c Modified: trunk/src/mod-cfg.c =================================================================== --- trunk/src/mod-cfg.c 2009-08-23 14:22:39 UTC (rev 419) +++ trunk/src/mod-cfg.c 2009-08-23 15:02:04 UTC (rev 420) @@ -11,7 +11,7 @@ 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 @@ -83,8 +83,8 @@ /* private functions prototype */ static GtkWidget *mod_cfg_editor_create (const gchar *modname, - GKeyFile *cfgdata, - GtkWidget *toplevel); + GKeyFile *cfgdata, + GtkWidget *toplevel); static void mod_cfg_apply (GKeyFile *cfgdata); static void name_changed (GtkWidget *widget, gpointer data); static GtkWidget *create_loc_selector (GKeyFile *cfgdata); @@ -100,135 +100,135 @@ * returned and it should be freed when no longer needed. */ gchar * -mod_cfg_new () + mod_cfg_new () { - GtkWidget *dialog; - GKeyFile *cfgdata; - gchar *name = NULL; - gint response; - mod_cfg_status_t status; - gboolean finished = FALSE; - gsize num = 0; - guint *sats; + GtkWidget *dialog; + GKeyFile *cfgdata; + gchar *name = NULL; + gint response; + mod_cfg_status_t status; + gboolean finished = FALSE; + gsize num = 0; + guint *sats; - /* create cfg data */ - cfgdata = g_key_file_new (); + /* create cfg data */ + cfgdata = g_key_file_new (); - dialog = mod_cfg_editor_create (NULL, cfgdata, app); - gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 400); + dialog = mod_cfg_editor_create (NULL, cfgdata, app); + gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 400); - while (!finished) { + while (!finished) { - response = gtk_dialog_run (GTK_DIALOG (dialog)); + response = gtk_dialog_run (GTK_DIALOG (dialog)); - switch (response) { + switch (response) { - /* user pressed OK */ - case GTK_RESPONSE_OK: - - /* check that user has selected at least one satellite */ - sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); - - if (num > 0) { - /* we have at least one sat selected */ + /* user pressed OK */ + case GTK_RESPONSE_OK: + + /* check that user has selected at least one satellite */ + sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); + + if (num > 0) { + /* we have at least one sat selected */ gchar *filename,*confdir; - gboolean save = TRUE; + gboolean save = TRUE; - /* check if there is already a module with this name */ + /* check if there is already a module with this name */ confdir = get_modules_dir (); filename = g_strconcat (confdir, G_DIR_SEPARATOR_S, - gtk_entry_get_text (GTK_ENTRY (namew)), - ".mod", NULL); + gtk_entry_get_text (GTK_ENTRY (namew)), + ".mod", NULL); g_free (confdir); - if (g_file_test (filename, G_FILE_TEST_EXISTS)) { - GtkWidget *warn; + if (g_file_test (filename, G_FILE_TEST_EXISTS)) { + GtkWidget *warn; - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: Already have module %s. Ask user to confirm..."), - __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: Already have module %s. Ask user to confirm..."), + __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); - warn = gtk_message_dialog_new (//NULL, - GTK_WINDOW (app), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_QUESTION, - GTK_BUTTONS_YES_NO, - _("There is already a module called %s.\n"\ - "Do you want to overwrite this module?"), - gtk_entry_get_text (GTK_ENTRY (namew))); - switch (gtk_dialog_run (GTK_DIALOG (warn))) { + warn = gtk_message_dialog_new (//NULL, + GTK_WINDOW (app), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + _("There is already a module called %s.\n"\ + "Do you want to overwrite this module?"), + gtk_entry_get_text (GTK_ENTRY (namew))); + switch (gtk_dialog_run (GTK_DIALOG (warn))) { - case GTK_RESPONSE_YES: - save = TRUE; - break; + case GTK_RESPONSE_YES: + save = TRUE; + break; - default: - save = FALSE; - break; - } - gtk_widget_destroy (warn); - } + default: + save = FALSE; + break; + } + gtk_widget_destroy (warn); + } - g_free (filename); + g_free (filename); - if (save) { - name = g_strdup (gtk_entry_get_text (GTK_ENTRY (namew))); - mod_cfg_apply (cfgdata); - status = mod_cfg_save (name, cfgdata); - - if (status != MOD_CFG_OK) { - /* send an error message */ - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Error while saving module data (%d)."), - __FUNCTION__, status); - } + if (save) { + name = g_strdup (gtk_entry_get_text (GTK_ENTRY (namew))); + mod_cfg_apply (cfgdata); + status = mod_cfg_save (name, cfgdata); - finished = TRUE; - } + if (status != MOD_CFG_OK) { + /* send an error message */ + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Error while saving module data (%d)."), + __FUNCTION__, status); + } - g_free (sats); - } - else { - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: User tried to create module with no sats."), - __FUNCTION__); + finished = TRUE; + } - /* tell user to behave nicely */ - GtkWidget *errdialog; + g_free (sats); + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: User tried to create module with no sats."), + __FUNCTION__); - errdialog = gtk_message_dialog_new (NULL, - //GTK_WINDOW (app), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - _("Please select at least one satellite "\ - "from the list.")); - gtk_dialog_run (GTK_DIALOG (errdialog)); - gtk_widget_destroy (errdialog); - } - - break; - - /* bring up properties editor */ - case GTK_RESPONSE_HELP: - edit_advanced_settings (GTK_DIALOG (dialog), cfgdata); - finished = FALSE; - break; + /* tell user to behave nicely */ + GtkWidget *errdialog; - /* everything else is regarded CANCEL */ - default: - finished = TRUE; - break; - } - } + errdialog = gtk_message_dialog_new (NULL, + //GTK_WINDOW (app), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Please select at least one satellite "\ + "from the list.")); + gtk_dialog_run (GTK_DIALOG (errdialog)); + gtk_widget_destroy (errdialog); + } - /* clean up */ - g_key_file_free (cfgdata); - gtk_widget_destroy (dialog); + break; - return name; + /* bring up properties editor */ + case GTK_RESPONSE_HELP: + edit_advanced_settings (GTK_DIALOG (dialog), cfgdata); + finished = FALSE; + break; + + /* everything else is regarded CANCEL */ + default: + finished = TRUE; + break; + } + } + + /* clean up */ + g_key_file_free (cfgdata); + gtk_widget_destroy (dialog); + + return name; } @@ -245,77 +245,77 @@ * */ mod_cfg_status_t -mod_cfg_edit (gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) + mod_cfg_edit (gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) { - GtkWidget *dialog; - gint response; - gboolean finished = FALSE; - gsize num = 0; - guint *sats; - mod_cfg_status_t status = MOD_CFG_CANCEL; + GtkWidget *dialog; + gint response; + gboolean finished = FALSE; + gsize num = 0; + guint *sats; + mod_cfg_status_t status = MOD_CFG_CANCEL; - dialog = mod_cfg_editor_create (modname, cfgdata, toplevel); - gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 400); + dialog = mod_cfg_editor_create (modname, cfgdata, toplevel); + gtk_window_set_default_size (GTK_WINDOW (dialog), -1, 400); - while (!finished) { + while (!finished) { - response = gtk_dialog_run (GTK_DIALOG (dialog)); + response = gtk_dialog_run (GTK_DIALOG (dialog)); - switch (response) { + switch (response) { - /* user pressed OK */ - case GTK_RESPONSE_OK: + /* user pressed OK */ + case GTK_RESPONSE_OK: - /* check that user has selected at least one satellite */ - sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); - - if (num > 0) { + /* check that user has selected at least one satellite */ + sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); - /* we have at least one sat selected */ - mod_cfg_apply (cfgdata); - finished = TRUE; - g_free (sats); - status = MOD_CFG_OK; - } - else { - sat_log_log (SAT_LOG_LEVEL_DEBUG, - _("%s: User tried to create module with no sats."), - __FUNCTION__); + if (num > 0) { - /* tell user not to do that */ - GtkWidget *errdialog; + /* we have at least one sat selected */ + mod_cfg_apply (cfgdata); + finished = TRUE; + g_free (sats); + status = MOD_CFG_OK; + } + else { + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s: User tried to create module with no sats."), + __FUNCTION__); - errdialog = gtk_message_dialog_new (GTK_WINDOW (toplevel), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - _("Please select at least one satellite "\ - "from the list.")); - gtk_dialog_run (GTK_DIALOG (errdialog)); - gtk_widget_destroy (errdialog); - } + /* tell user not to do that */ + GtkWidget *errdialog; - break; - - /* bring up properties editor */ - case GTK_RESPONSE_HELP: - edit_advanced_settings (GTK_DIALOG (dialog), cfgdata); - finished = FALSE; - break; + errdialog = gtk_message_dialog_new (GTK_WINDOW (toplevel), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Please select at least one satellite "\ + "from the list.")); + gtk_dialog_run (GTK_DIALOG (errdialog)); + gtk_widget_destroy (errdialog); + } - /* everything else is regarded CANCEL */ - default: - finished = TRUE; - break; - } - } + break; - /* clean up */ - gtk_widget_destroy (dialog); + /* bring up properties editor */ + case GTK_RESPONSE_HELP: + edit_advanced_settings (GTK_DIALOG (dialog), cfgdata); + finished = FALSE; + break; - return status; + /* everything else is regarded CANCEL */ + default: + finished = TRUE; + break; + } + } + + /* clean up */ + gtk_widget_destroy (dialog); + + return status; } @@ -328,104 +328,104 @@ * the USER_CONF_DIR/modules/ directory. */ mod_cfg_status_t -mod_cfg_save (gchar *modname, GKeyFile *cfgdata) + mod_cfg_save (gchar *modname, GKeyFile *cfgdata) { - GError *error = NULL; /* Error handler */ - gchar *datastream; /* cfgdata string */ - GIOChannel *cfgfile; /* .mod file */ - gchar *filename; /* file name */ + GError *error = NULL; /* Error handler */ + gchar *datastream; /* cfgdata string */ + GIOChannel *cfgfile; /* .mod file */ + gchar *filename; /* file name */ gchar *confdir; - gsize length; /* length of the data stream */ - gsize written; /* number of bytes actually written */ - gboolean err; + gsize length; /* length of the data stream */ + gsize written; /* number of bytes actually written */ + gboolean err; - if (!modname) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s: Attempt to save data to empty file name."), - __FUNCTION__); + if (!modname) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: Attempt to save data to empty file name."), + __FUNCTION__); - return MOD_CFG_ERROR; - } - if (!cfgdata) { - sat_log_log (SAT_LOG_LEVEL_BUG, - _("%s: Attempt to save NULL data."), - __FUNCTION__); + return MOD_CFG_ERROR; + } + if (!cfgdata) { + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: Attempt to save NULL data."), + __FUNCTION__); - return MOD_CFG_ERROR; - } + return MOD_CFG_ERROR; + } - /* ok, go on and convert the data */ - datastream = g_key_file_to_data (cfgdata, &length, &error); + /* ok, go on and convert the data */ + datastream = g_key_file_to_data (cfgdata, &length, &error); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Could not create config data (%s)."), - __FUNCTION__, error->message); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Could not create config data (%s)."), + __FUNCTION__, error->message); - g_clear_error (&error); + g_clear_error (&error); - return MOD_CFG_ERROR; - } + return MOD_CFG_ERROR; + } - /* create file and write data stream */ + /* create file and write data stream */ confdir = get_modules_dir (); filename = g_strconcat (confdir, G_DIR_SEPARATOR_S, modname, ".mod", NULL); g_free (confdir); - cfgfile = g_io_channel_new_file (filename, "w", &error); + cfgfile = g_io_channel_new_file (filename, "w", &error); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Could not create config file (%s)."), - __FUNCTION__, error->message); + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Could not create config file (%s)."), + __FUNCTION__, error->message); - g_clear_error (&error); + g_clear_error (&error); - err = 1; - } - else { - g_io_channel_write_chars (cfgfile, - datastream, - length, - &written, - &error); + err = 1; + } + else { + g_io_channel_write_chars (cfgfile, + datastream, + length, + &written, + &error); - g_io_channel_shutdown (cfgfile, TRUE, NULL); - g_io_channel_unref (cfgfile); + g_io_channel_shutdown (cfgfile, TRUE, NULL); + g_io_channel_unref (cfgfile); - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Error writing config data (%s)."), - __FUNCTION__, error->message); - - g_clear_error (&error); - - err = 1; - } - else if (length != written) { - sat_log_log (SAT_LOG_LEVEL_WARN, - _("%s: Wrote only %d out of %d chars."), - __FUNCTION__, written, length); - - err = 1; - } - else { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Configuration saved for module %s."), - __FUNCTION__, modname); - - err = 0; - } - } + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Error writing config data (%s)."), + __FUNCTION__, error->message); - g_free (datastream); - g_free (filename); + g_clear_error (&error); - if (err) - return MOD_CFG_ERROR; + err = 1; + } + else if (length != written) { + sat_log_log (SAT_LOG_LEVEL_WARN, + _("%s: Wrote only %d out of %d chars."), + __FUNCTION__, written, length); - return MOD_CFG_OK; + err = 1; + } + else { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Configuration saved for module %s."), + __FUNCTION__, modname); + + err = 0; + } + } + + g_free (datastream); + g_free (filename); + + if (err) + return MOD_CFG_ERROR; + + return MOD_CFG_OK; } @@ -439,167 +439,167 @@ * MOD_CFG_CANCEL if the user has cancelled the operation. */ mod_cfg_status_t -mod_cfg_delete (gchar *modname, gboolean needcfm) + mod_cfg_delete (gchar *modname, gboolean needcfm) { - return MOD_CFG_CANCEL; + return MOD_CFG_CANCEL; } static GtkWidget * -mod_cfg_editor_create (const gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) + mod_cfg_editor_create (const gchar *modname, GKeyFile *cfgdata, GtkWidget *toplevel) { - GtkWidget *dialog; - GtkWidget *add; - GtkWidget *table; - GtkWidget *label; - GtkTooltips *tooltips; - gchar *icon; /* windo icon file name */ + GtkWidget *dialog; + GtkWidget *add; + GtkWidget *table; + GtkWidget *label; + GtkTooltips *tooltips; + gchar *icon; /* windo icon file name */ - gboolean new = (modname != NULL) ? FALSE : TRUE; + gboolean new = (modname != NULL) ? FALSE : TRUE; - if (new) { - dialog = gtk_dialog_new_with_buttons (_("Create New Module"), - GTK_WINDOW (toplevel), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_PROPERTIES, - GTK_RESPONSE_HELP, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, - GTK_RESPONSE_OK, - NULL); - } - else { - dialog = gtk_dialog_new_with_buttons (_("Edit Module"), - GTK_WINDOW (toplevel), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_PROPERTIES, - GTK_RESPONSE_HELP, - GTK_STOCK_CANCEL, - GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, - GTK_RESPONSE_OK, - NULL); - } + if (new) { + dialog = gtk_dialog_new_with_buttons (_("Create New Module"), + GTK_WINDOW (toplevel), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_PROPERTIES, + GTK_RESPONSE_HELP, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, + GTK_RESPONSE_OK, + NULL); + } + else { + dialog = gtk_dialog_new_with_buttons (_("Edit Module"), + GTK_WINDOW (toplevel), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_PROPERTIES, + GTK_RESPONSE_HELP, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + GTK_STOCK_OK, + GTK_RESPONSE_OK, + NULL); + } - gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); - /* window icon */ - icon = icon_file_name ("gpredict-sat-pref.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (dialog), - icon, - NULL); - } - g_free (icon); + /* window icon */ + icon = icon_file_name ("gpredict-sat-pref.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (dialog), + icon, + NULL); + } + g_free (icon); - /* module name */ - namew = gtk_entry_new (); + /* module name */ + namew = gtk_entry_new (); - if (!new) { - /* set module name and make entry insensitive */ - gtk_entry_set_text (GTK_ENTRY (namew), modname); - gtk_widget_set_sensitive (namew, FALSE); - } - else { - /* connect changed signal to text-checker */ - gtk_entry_set_max_length (GTK_ENTRY (namew), 25); - tooltips = gtk_tooltips_new (); - gtk_tooltips_set_tip (tooltips, namew, - _("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.")); + if (!new) { + /* set module name and make entry insensitive */ + gtk_entry_set_text (GTK_ENTRY (namew), modname); + gtk_widget_set_sensitive (namew, FALSE); + } + else { + /* connect changed signal to text-checker */ + gtk_entry_set_max_length (GTK_ENTRY (namew), 25); + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, namew, + _("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 - 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 (namew, "changed", G_CALLBACK (name_changed), dialog); - - } + /* 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 (namew, "changed", G_CALLBACK (name_changed), dialog); - /* ground station selector */ - locw = create_loc_selector (cfgdata); + } - table = gtk_table_new (2, 3, FALSE); - gtk_table_set_row_spacings (GTK_TABLE (table), 5); - gtk_table_set_col_spacings (GTK_TABLE (table), 5); + /* ground station selector */ + locw = create_loc_selector (cfgdata); - label = gtk_label_new (_("Module Name")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); - gtk_table_attach_defaults (GTK_TABLE (table), namew, 1, 3, 0, 1); - label = gtk_label_new (_("Ground Station")); - gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); - gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); - gtk_table_attach_defaults (GTK_TABLE (table), locw, 1, 3, 1, 2); + table = gtk_table_new (2, 3, FALSE); + gtk_table_set_row_spacings (GTK_TABLE (table), 5); + gtk_table_set_col_spacings (GTK_TABLE (table), 5); - /* add button */ - add = gpredict_hstock_button (GTK_STOCK_ADD, NULL, _("Add new ground station")); - g_signal_connect (add, "clicked", G_CALLBACK (add_qth_cb), dialog); - gtk_table_attach_defaults (GTK_TABLE (table), add, 4, 5, 1, 2); + label = gtk_label_new (_("Module Name")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 0, 1); + gtk_table_attach_defaults (GTK_TABLE (table), namew, 1, 3, 0, 1); + label = gtk_label_new (_("Ground Station")); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); + gtk_table_attach_defaults (GTK_TABLE (table), label, 0, 1, 1, 2); + gtk_table_attach_defaults (GTK_TABLE (table), locw, 1, 3, 1, 2); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, FALSE, FALSE, 0); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), - gtk_hseparator_new (), FALSE, FALSE, 5); + /* add button */ + add = gpredict_hstock_button (GTK_STOCK_ADD, NULL, _("Add new ground station")); + g_signal_connect (add, "clicked", G_CALLBACK (add_qth_cb), dialog); + gtk_table_attach_defaults (GTK_TABLE (table), add, 4, 5, 1, 2); - label = gtk_label_new (NULL); - gtk_label_set_markup (GTK_LABEL (label), _("<b>Select Satellites:</b>")); - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 5); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), table, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), + gtk_hseparator_new (), FALSE, FALSE, 5); - /* satellite selector */ - tree = gtk_sat_tree_new (0); - if (!new) { - /* select satellites */ - gint *sats = NULL; - gsize length; - GError *error = NULL; - guint i; + label = gtk_label_new (NULL); + gtk_label_set_markup (GTK_LABEL (label), _("<b>Select Satellites:</b>")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), label, FALSE, FALSE, 5); - sats = g_key_file_get_integer_list (cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_SATS_KEY, - &length, - &error); - - if (error != NULL) { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s: Failed to get list of satellites (%s)"), - __FUNCTION__, error->message); + /* satellite selector */ + tree = gtk_sat_tree_new (0); + if (!new) { + /* select satellites */ + gint *sats = NULL; + gsize length; + GError *error = NULL; + guint i; - g_clear_error (&error); + sats = g_key_file_get_integer_list (cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_SATS_KEY, + &length, + &error); - /* GLib API says nothing about the contents in case of error */ - if (sats) { - g_free (sats); - } + if (error != NULL) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s: Failed to get list of satellites (%s)"), + __FUNCTION__, error->message); - } - else { - for (i = 0; i < length; i++) { - gtk_sat_tree_select (GTK_SAT_TREE (tree), sats[i]); - } - g_free (sats); - } + g_clear_error (&error); - } + /* GLib API says nothing about the contents in case of error */ + if (sats) { + g_free (sats); + } - gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); + } + else { + for (i = 0; i < length; i++) { + gtk_sat_tree_select (GTK_SAT_TREE (tree), sats[i]); + } + g_free (sats); + } - gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); + } - return dialog; + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), tree, TRUE, TRUE, 0); + + gtk_widget_show_all (GTK_DIALOG (dialog)->vbox); + + return dialog; } @@ -610,55 +610,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 - (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; - } - } - } + /* 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; + } + } + } - /* 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); + } } @@ -668,97 +668,97 @@ * with the names of the existing locations. */ static GtkWidget * -create_loc_selector (GKeyFile *cfgdata) + create_loc_selector (GKeyFile *cfgdata) { - GtkWidget *combo; - GDir *dir = NULL; - GError *error = NULL; - gchar *dirname; - const gchar *filename; - gchar *defqth = NULL; - gchar **buffv; - gint idx = -1; - gint count = 0; + GtkWidget *combo; + GDir *dir = NULL; + GError *error = NULL; + gchar *dirname; + const gchar *filename; + gchar *defqth = NULL; + gchar **buffv; + gint idx = -1; + gint count = 0; - combo = gtk_combo_box_new_text (); + combo = gtk_combo_box_new_text (); - /* get qth file name from cfgdata; if cfg data has no QTH - set defqth = "** DEFAULT **" - */ + /* get qth file name from cfgdata; if cfg data has no QTH + set defqth = "** DEFAULT **" + */ - if (g_key_file_has_key (cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_QTH_FILE_KEY, NULL)) { - defqth = g_key_file_get_string (cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_QTH_FILE_KEY, - &error); - } - else { - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Module has no QTH; use default."), - __FUNCTION__); + if (g_key_file_has_key (cfgdata, MOD_CFG_GLOBAL_SECTION, MOD_CFG_QTH_FILE_KEY, NULL)) { + defqth = g_key_file_get_string (cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_QTH_FILE_KEY, + &error); + } + else { + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Module has no QTH; use default."), + __FUNCTION__); - defqth = g_strdup (_("** DEFAULT **")); - } + defqth = g_strdup (_("** DEFAULT **")); + } - /* scan for .qth files in the user config directory and - add the contents of each .qth file to the list store - */ + /* scan for .qth files in the user config directory and + add the contents of each .qth file to the list store + */ dirname = get_user_conf_dir (); - dir = g_dir_open (dirname, 0, &error); + dir = g_dir_open (dirname, 0, &error); - if (dir) { - while ((filename = g_dir_read_name (dir))) { + if (dir) { + while ((filename = g_dir_read_name (dir))) { - if (g_strrstr (filename, ".qth")) { + if (g_strrstr (filename, ".qth")) { - buffv = g_strsplit (filename, ".qth", 0); - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), buffv[0]); - g_strfreev (buffv); + buffv = g_strsplit (filename, ".qth", 0); + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), buffv[0]); + g_strfreev (buffv); - /* is this the QTH for this module? */ - if (!g_ascii_strcasecmp (defqth, filename)) { - idx = count; - } + /* is this the QTH for this module? */ + if (!g_ascii_strcasecmp (defqth, filename)) { + idx = count; + } - count++; - } + count++; + } - } + } - } - else { - sat_log_log (SAT_LOG_LEVEL_ERROR, - _("%s:%d: Failed to open user cfg dir %s (%s)"), - __FILE__, __LINE__, dirname, error->message); - g_clear_error (&error); - } + } + else { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: Failed to open user cfg dir %s (%s)"), + __FILE__, __LINE__, dirname, error->message); + g_clear_error (&error); + } - /* finally, add "** DEFAULT **" string; secting this will - clear the MOD_CFG_QTH_FILE_KEY module configuration - key ensuring that the module will use the default QTH - */ - gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("** DEFAULT **")); + /* finally, add "** DEFAULT **" string; secting this will + clear the MOD_CFG_QTH_FILE_KEY module configuration + key ensuring that the module will use the default QTH + */ + gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("** DEFAULT **")); - /* select the qth of this module; - if idx == -1 we should select the "** DEFAULT **" - string corresponding to index = count - */ - if (idx == -1) { - gtk_combo_box_set_active (GTK_COMBO_BOX (combo), count); - } - else { - gtk_combo_box_set_active (GTK_COMBO_BOX (combo), idx); - } + /* select the qth of this module; + if idx == -1 we should select the "** DEFAULT **" + string corresponding to index = count + */ + if (idx == -1) { + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), count); + } + else { + gtk_combo_box_set_active (GTK_COMBO_BOX (combo), idx); + } - g_free (defqth); - g_free (dirname); - g_dir_close (dir); + g_free (defqth); + g_free (dirname); + g_dir_close (dir); - return combo; + return combo; } @@ -772,64 +772,64 @@ * CANCEL any action. */ static void -mod_cfg_apply (GKeyFile *cfgdata) + mod_cfg_apply (GKeyFile *cfgdata) { - guint *sats; - gsize num; - guint i; - gchar *satstr = NULL; - gchar *buff; + guint *sats; + gsize num; + guint i; + gchar *satstr = NULL; + gchar *buff; - /* store location */ - buff = gtk_combo_box_get_active_text (GTK_COMBO_BOX (locw)); + /* store location */ + buff = gtk_combo_box_get_active_text (GTK_COMBO_BOX (locw)); - /* is buff == "** DEFAULT **" clear the configuration key - otherwise store the filename - */ - if (!g_ascii_strcasecmp (buff, _("** DEFAULT **"))) { - g_key_file_remove_key (cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_QTH_FILE_KEY, - NULL); - } - else { - satstr = g_strconcat (buff, ".qth", NULL); - g_key_file_set_string (cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_QTH_FILE_KEY, - satstr); - g_free (satstr); - } + /* is buff == "** DEFAULT **" clear the configuration key + otherwise store the filename + */ + if (!g_ascii_strcasecmp (buff, _("** DEFAULT **"))) { + g_key_file_remove_key (cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_QTH_FILE_KEY, + NULL); + } + else { + satstr = g_strconcat (buff, ".qth", NULL); + g_key_file_set_string (cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_QTH_FILE_KEY, + satstr); + g_free (satstr); + } - g_free (buff); + g_free (buff); - /* store satellites */ - sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); + /* store satellites */ + sats = gtk_sat_tree_get_selected (GTK_SAT_TREE (tree), &num); - for (i = 0; i < num; i++) { + for (i = 0; i < num; i++) { - if (i) { - buff = g_strdup_printf ("%s;%d", satstr, sats[i]); - g_free (satstr); - } - else { - buff = g_strdup_printf ("%d", sats[i]); - } - satstr = g_strdup (buff); - g_free (buff); - } + if (i) { + buff = g_strdup_printf ("%s;%d", satstr, sats[i]); + g_free (satstr); + } + else { + buff = g_strdup_printf ("%d", sats[i]); + } + satstr = g_strdup (buff); + g_free (buff); + } - g_key_file_set_string (cfgdata, - MOD_CFG_GLOBAL_SECTION, - MOD_CFG_SATS_KEY, - satstr); - g_free (satstr); - g_free (sats); + g_key_file_set_string (cfgdata, + MOD_CFG_GLOBAL_SECTION, + MOD_CFG_SATS_KEY, + satstr); + g_free (satstr); + g_free (sats); - sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Applied changes to %s."), - __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s: Applied changes to %s."), + __FUNCTION__, gtk_entry_get_text (GTK_ENTRY (namew))); } @@ -844,49 +844,49 @@ * configuring GtkSatModules. */ static void -edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata) + edit_advanced_settings (GtkDialog *parent, GKeyFile *cfgdata) { - GtkWidget *dialog; - GtkWidget *contents; - gchar *icon; /* window icon file name */ + GtkWidget *dialog; + GtkWidget *contents; + gchar *icon; /* window icon file name */ - dialog = gtk_dialog_new_with_buttons (_("Module Properties"), - GTK_WINDOW (parent), - GTK_DIALOG_MODAL | - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_STOCK_CANCEL, - GTK_RESPONSE_REJECT, - GTK_STOCK_OK, - GTK_RESPONSE_ACCEPT, - NULL); + dialog = gtk_dialog_new_with_buttons (_("Module Properties"), + GTK_WINDOW (parent), + GTK_DIALOG_MODAL | + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_REJECT, + GTK_STOCK_OK, + GTK_RESPONSE_ACCEPT, + NULL); - /* window icon */ - icon = icon_file_name ("gpredict-sat-pref.png"); - if (g_file_test (icon, G_FILE_TEST_EXISTS)) { - gtk_window_set_icon_from_file (GTK_WINDOW (dialog), - icon, - NULL); - } + /* window icon */ + icon = icon_file_name ("gpredict-sat-pref.png"); + if (g_file_test (icon, G_FILE_TEST_EXISTS)) { + gtk_window_set_icon_from_file (GTK_WINDOW (dialog), + icon, + NULL); + } - contents = sat_pref_modules_create (cfgdata); - gtk_widget_show_all (contents); + contents = sat_pref_modules_create (cfgdata); + gtk_widget_show_all (contents); - gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->vbox), contents); + gtk_box_pack_start_defaults (GTK_BOX (GTK_DIALOG (dialog)->vbox), contents); - /* execute dialog */ - switch (gtk_dialog_run (GTK_DIALOG (dialog))) { + /* execute dialog */ + switch (gtk_dialog_run (GTK_DIALOG (dialog))) { - case GTK_RESPONSE_ACCEPT: - sat_pref_modules_ok (cfgdata); - break; + case GTK_RESPONSE_ACCEPT: + sat_pref_modules_ok (cfgdata); + break; - default: - sat_pref_modules_cancel (cfgdata); - break; - } + default: + sat_pref_modules_cancel (cfgdata); + break; + } - gtk_widget_destroy (dialog); + gtk_widget_destroy (dialog); } @@ -898,36 +898,36 @@ * */ static void -add_qth_cb (GtkWidget *button, gpointer data) + add_qth_cb (GtkWidget *button, gpointer data) { - GtkWindow *parent = GTK_WINDOW (data); - GtkResponseType response; - qth_t qth; + GtkWindow *parent = GTK_WINDOW (data); + GtkResponseType response; + qth_t qth; - qth.name = NULL; - qth.loc = NULL; - qth.desc = NULL; - qth.wx = NULL; - qth.qra = NULL; - qth.data = NULL; + qth.name = NULL; + qth.loc = NULL; + qth.desc = NULL; + qth.wx = NULL; + qth.qra = NULL; + qth.data = NULL; - response = qth_editor_run (&qth, parent); + response = qth_editor_run (&qth, parent); - if (response == GTK_RESPONSE_OK) { - gtk_combo_box_prepend_text (GTK_COMBO_BOX (locw), qth.name); - gtk_combo_box_set_active (GTK_COMBO_BOX (locw), 0); + if (response == GTK_RESPONSE_OK) { + gtk_combo_box_prepend_text (GTK_COMBO_BOX (locw), qth.name); + gtk_combo_box_set_active (GTK_COMBO_BOX (locw), 0); - /* clean up */ - g_free (qth.name); - if (qth.loc != NULL) - g_free (qth.loc); - if (qth.desc != NULL) - g_free (qth.desc); - if (qth.wx != NULL) - g_free (qth.wx); - if (qth.qra != NULL) - g_free (qth.qra); - /* if (qth.data != NULL) */ - /* g_key_file_free (data); */ - } + /* clean up */ + g_free (qth.name); + if (qth.loc != NULL) + g_free (qth.loc); + if (qth.desc != NULL) + g_free (qth.desc); + if (qth.wx != NULL) + g_free (qth.wx); + if (qth.qra != NULL) + g_free (qth.qra); + /* if (qth.data != NULL) */ + /* g_key_file_free (data); */ + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-08-23 14:22:47
|
Revision: 419 http://gpredict.svn.sourceforge.net/gpredict/?rev=419&view=rev Author: csete Date: 2009-08-23 14:22:39 +0000 (Sun, 23 Aug 2009) Log Message: ----------- Added files for new satellite selector. Modified Paths: -------------- trunk/src/Makefile.am Added Paths: ----------- trunk/src/gtk-sat-selector.c trunk/src/gtk-sat-selector.h Modified: trunk/src/Makefile.am =================================================================== --- trunk/src/Makefile.am 2009-08-15 12:50:23 UTC (rev 418) +++ trunk/src/Makefile.am 2009-08-23 14:22:39 UTC (rev 419) @@ -52,6 +52,7 @@ 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-slector.h \ gtk-sat-tree.c gtk-sat-tree.h \ gtk-single-sat.c gtk-single-sat.h \ gtk-sky-glance.c gtk-sky-glance.h \ Added: trunk/src/gtk-sat-selector.c =================================================================== --- trunk/src/gtk-sat-selector.c (rev 0) +++ trunk/src/gtk-sat-selector.c 2009-08-23 14:22:39 UTC (rev 419) @@ -0,0 +1,371 @@ +/* -*- 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-2008 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 selector. + * + * FIXME: add search/lookup function + * FIXME: epoch not implemented + */ +#include <gtk/gtk.h> +#include <glib/gi18n.h> +#ifdef HAVE_CONFIG_H +# include <build-config.h> +#endif +#include "sat-log.h" +#include "compat.h" +#include "gtk-sat-selector.h" + + + + + + + +static void gtk_sat_selector_class_init (GtkSatSelectorClass *class); +static void gtk_sat_selector_init (GtkSatSelector *selector); +static void gtk_sat_selector_destroy (GtkObject *object); + +static void create_and_fill_models (GtkSatSelector *selector); + +static gint compare_func (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer userdata); + +static GtkVBoxClass *parent_class = NULL; + + +GType gtk_sat_selector_get_type () +{ + static GType gtk_sat_selector_type = 0; + + if (!gtk_sat_selector_type) + { + static const GTypeInfo gtk_sat_selector_info = + { + sizeof (GtkSatSelectorClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) gtk_sat_selector_class_init, + NULL, /* class_finalize */ + NULL, /* class_data */ + sizeof (GtkSatSelector), + 1, /* n_preallocs */ + (GInstanceInitFunc) gtk_sat_selector_init, + }; + + gtk_sat_selector_type = g_type_register_static (GTK_TYPE_VBOX, + "GtkSatSelector", + >k_sat_selector_info, + 0); + } + + return gtk_sat_selector_type; +} + + +static void gtk_sat_selector_class_init (GtkSatSelectorClass *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_sat_selector_destroy; + +} + + +/** \brief Initialise satellite selector widget */ +static void gtk_sat_selector_init (GtkSatSelector *selector) +{ + selector->models = NULL; +} + + + +/** \brief Clean up memory before destroying satellite selector widget */ +static void gtk_sat_selector_destroy (GtkObject *object) +{ + GtkSatSelector *selector = GTK_SAT_SELECTOR (object); + + /* clear list of selected satellites */ + /* crashes on 2. instance: g_slist_free (sat_tree->selection); */ + guint n,i; + gpointer data; + + n = g_slist_length (selector->models); + + for (i = 0; i < n; i++) { + /* get the first element and delete it */ + data = g_slist_nth_data (selector->models, 0); + selector->models = g_slist_remove (selector->models, data); + } + + + (* GTK_OBJECT_CLASS (parent_class)->destroy) (object); +} + + + +/** \brief Create a new GtkSatSelector widget + * \param flags Flags indicating which columns should be visible + * (see gtk_sat_selector_flag_t) + * \return A GtkSatSelector widget. + */ +GtkWidget *gtk_sat_selector_new (guint flags) +{ + GtkWidget *widget; + GtkSatSelector *selector; + GtkTreeModel *model; + GtkCellRenderer *renderer; + GtkTreeViewColumn *column; + GtkWidget *hbox; + GtkTooltips *tips; + GtkWidget *expbut; + GtkWidget *colbut; + + + if (!flags) + flags = GTK_SAT_SELECTOR_DEFAULT_FLAGS; + + widget = g_object_new (GTK_TYPE_SAT_SELECTOR, NULL); + selector = GTK_SAT_SELECTOR (widget); + + selector->flags = flags; + + /* create list and model */ + selector->tree = gtk_tree_view_new (); + gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (selector->tree), TRUE); + create_and_fill_models (selector); + model = GTK_TREE_MODEL (g_slist_nth_data (selector->models, 0)); + gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), model); + g_object_unref (model); + + /* sort the tree by name */ + gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), + GTK_SAT_SELECTOR_COL_NAME, + compare_func, + NULL, + NULL); + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), + GTK_SAT_SELECTOR_COL_NAME, + GTK_SORT_ASCENDING); + + /* create tree view columns */ + /* label column */ + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Satellite"), renderer, + "text", GTK_SAT_SELECTOR_COL_NAME, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (selector->tree), column, -1); + if (!(flags & GTK_SAT_SELECTOR_FLAG_NAME)) + gtk_tree_view_column_set_visible (column, FALSE); + + /* catalogue number */ + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Catnum"), renderer, + "text", GTK_SAT_SELECTOR_COL_CATNUM, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (selector->tree), column, -1); + if (!(flags & GTK_SAT_SELECTOR_FLAG_CATNUM)) + gtk_tree_view_column_set_visible (column, FALSE); + + /* epoch */ + renderer = gtk_cell_renderer_text_new (); + column = gtk_tree_view_column_new_with_attributes (_("Epoch"), renderer, + "text", GTK_SAT_SELECTOR_COL_EPOCH, + NULL); + gtk_tree_view_insert_column (GTK_TREE_VIEW (selector->tree), column, -1); + if (!(flags & GTK_SAT_SELECTOR_FLAG_EPOCH)) + gtk_tree_view_column_set_visible (column, FALSE); + + + /* scrolled window */ + GTK_SAT_SELECTOR (widget)->swin = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (GTK_SAT_SELECTOR (widget)->swin), + GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); + + gtk_container_add (GTK_CONTAINER (GTK_SAT_SELECTOR (widget)->swin), + GTK_SAT_SELECTOR (widget)->tree); + + //gtk_container_add (GTK_CONTAINER (widget), GTK_SAT_TREE (widget)->swin); + gtk_box_pack_start (GTK_BOX (widget), GTK_SAT_SELECTOR (widget)->swin, TRUE, TRUE, 0); + + + gtk_widget_show_all (widget); + + + /* initialise selection */ + //GTK_SAT_TREE (widget)->selection = NULL; + + + return widget; +} + + + +/** FIXME: flags not needed here */ +static void create_and_fill_models (GtkSatSelector *selector) +{ + GtkTreeStore *store; /* the list store data structure */ + GtkTreeIter node; /* new top level node added to the tree store */ + GDir *dir; + gchar *dirname; + gchar *path; + gchar *nodename; + gchar **buffv; + const gchar *fname; + guint num = 0; + + + + + /* load all satellites into solector->models[0] */ + + + /* load satellites from each .cat file into selector->models[i] */ + +#if 0 + /* create a new tree store */ + store = gtk_tree_store_new (GTK_SAT_SELECTOR_COL_NUM, + G_TYPE_STRING, // name + G_TYPE_INT, // catnum + G_TYPE_STRING // epoch + ); + + + dirname = g_strconcat (g_get_home_dir (), + G_DIR_SEPARATOR_S, ".gpredict2", + G_DIR_SEPARATOR_S, "tle", + NULL); + + + /* debug message */ + sat_log_log (SAT_LOG_LEVEL_DEBUG, + _("%s:%d: Directory is: %s"), + __FILE__, __LINE__, dirname); + + dir = g_dir_open (dirname, 0, NULL); + + /* no tle files */ + if (!dir) { + sat_log_log (SAT_LOG_LEVEL_ERROR, + _("%s:%d: No .tle files found in %s."), + __FILE__, __LINE__, dirname); + + g_free (dirname); + + return GTK_TREE_MODEL (store);; + } + + /* Scan data directory for .tle files. + For each file scan through the file and + add entry to the tree. + */ + while ((fname = g_dir_read_name (dir))) { + + if (g_strrstr (fname, ".tle")) { + + buffv = g_strsplit (fname, ".tle", 0); + nodename = g_strdup (buffv[0]); + nodename[0] = g_ascii_toupper (nodename[0]); + + /* create a new top level node in the tree */ + gtk_tree_store_append (store, &node, NULL); + gtk_tree_store_set (store, &node, + GTK_SAT_SELECTOR_COL_NAME, nodename, + -1); + + /* build full path til file and sweep it for sats */ + path = g_strconcat (dirname, G_DIR_SEPARATOR_S, + fname, NULL); + + num = scan_tle_file (path, store, &node); + + g_free (path); + g_free (nodename); + g_strfreev (buffv); + + sat_log_log (SAT_LOG_LEVEL_MSG, + _("%s:%d: Read %d sats from %s "), + __FILE__, __LINE__, num, fname); + } + + } + + g_dir_close (dir); + g_free (dirname); +#endif + + +} + + + + + + + + +/** \brief Compare two rows of the GtkSatSelector. + * \param model The tree model of the GtkSatSelector. + * \param a The first row. + * \param b The second row. + * \param userdata Not used. + * + * This function is used by the sorting algorithm to compare two rows of the + * GtkSatSelector widget. The unctions works by comparing the character strings + * in the name column. + */ +static gint compare_func (GtkTreeModel *model, + GtkTreeIter *a, + GtkTreeIter *b, + gpointer userdata) +{ + gchar *sat1,*sat2; + gint ret = 0; + + + gtk_tree_model_get(model, a, GTK_SAT_SELECTOR_COL_NAME, &sat1, -1); + gtk_tree_model_get(model, b, GTK_SAT_SELECTOR_COL_NAME, &sat2, -1); + + ret = g_ascii_strcasecmp (sat1, sat2); + + g_free (sat1); + g_free (sat2); + + return ret; +} + Added: trunk/src/gtk-sat-selector.h =================================================================== --- trunk/src/gtk-sat-selector.h (rev 0) +++ trunk/src/gtk-sat-selector.h 2009-08-23 14:22:39 UTC (rev 419) @@ -0,0 +1,109 @@ +/* -*- 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-2008 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_SAT_SELECTOR_H__ +#define __GTK_SAT_SELECTOR_H__ 1 + +#include <gtk/gtk.h> +//#include "gtk-sat-list.h" + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + +/** \brief Column definitions in the tree. */ +typedef enum { + GTK_SAT_SELECTOR_COL_NAME = 0, /*!< Satellite name. */ + GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ + GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ + GTK_SAT_SELECTOR_COL_NUM /*!< The number of columns. */ +} gtk_sat_selector_col_t; + + +/** \brief Flags used to indicate which columns should be visible. */ +typedef enum { + GTK_SAT_SELECTOR_FLAG_NAME = 1 << GTK_SAT_SELECTOR_COL_NAME, /*!< Satellite name. */ + GTK_SAT_SELECTOR_FLAG_CATNUM = 1 << GTK_SAT_SELECTOR_COL_CATNUM, /*!< Catalogue Number. */ + GTK_SAT_SELECTOR_FLAG_EPOCH = 1 << GTK_SAT_SELECTOR_COL_EPOCH, /*!< Element set epoch. */ +} gtk_sat_selector_flag_t; + + + +#define GTK_SAT_SELECTOR_DEFAULT_FLAGS (GTK_SAT_SELECTOR_FLAG_NAME) + + +#define GTK_TYPE_SAT_SELECTOR (gtk_sat_selector_get_type ()) +#define GTK_SAT_SELECTOR(obj) GTK_CHECK_CAST (obj,\ + gtk_sat_selector_get_type (),\ + GtkSatSelector) + +#define GTK_SAT_SELECTOR_CLASS(klass) GTK_CHECK_CLASS_CAST (klass,\ + gtk_sat_selector_get_type (),\ + GtkSatSelectorClass) + +#define IS_GTK_SAT_SELECTOR(obj) GTK_CHECK_TYPE (obj, gtk_sat_selector_get_type ()) + + +/** \brief The GtkSatSelector structure */ +typedef struct _gtk_sat_selector GtkSatSelector; +typedef struct _GtkSatSelectorClass GtkSatSelectorClass; + + +/** \brief The GtkSatSelector Structure definition */ +struct _gtk_sat_selector +{ + GtkVBox vbox; + + GtkWidget *tree; /*!< The tree. */ + GtkWidget *swin; /*!< Scrolled window. */ + guint flags; /*!< Column visibility flags. */ + GSList *selection; /*!< List of selected satellites. FIXME: remove */ + gulong handler_id; /*!< Toggle signale handler ID (FIXME): remove. */ + + GSList *models; +}; + +struct _GtkSatSelectorClass +{ + GtkVBoxClass parent_class; +}; + + +GtkType gtk_sat_selector_get_type (void); +GtkWidget *gtk_sat_selector_new (guint flags); +guint32 gtk_sat_selector_get_flags (GtkSatSelector *selector); +//void gtk_sat_selector_select (GtkSatTree *sat_tree, guint catnum); +guint *gtk_sat_selector_get_selected (GtkSatSelector *selector, gsize *size); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + + +#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-08-15 12:50:31
|
Revision: 418 http://gpredict.svn.sourceforge.net/gpredict/?rev=418&view=rev Author: csete Date: 2009-08-15 12:50:23 +0000 (Sat, 15 Aug 2009) Log Message: ----------- Adding new satellites appears to work. Cleaned for debug comments. Modified Paths: -------------- trunk/src/tle-update.c Modified: trunk/src/tle-update.c =================================================================== --- trunk/src/tle-update.c 2009-08-14 11:25:24 UTC (rev 417) +++ trunk/src/tle-update.c 2009-08-15 12:50:23 UTC (rev 418) @@ -343,6 +343,9 @@ sat_log_log (SAT_LOG_LEVEL_MSG, _("%s: TLE elements updated."), __FUNCTION__); + sat_log_log (SAT_LOG_LEVEL_BUG, + _("%s: FIXME: Sync of categories not implemented!"), + __FUNCTION__); } /* destroy hash tables */ @@ -364,13 +367,9 @@ GError *err = NULL; - g_print ("==> Add new sat %d?\n", ntle->catnum); - /* check if sat is new */ if (ntle->isnew) { - g_print ("-----> YES!\n"); - /* create config data */ satdata = g_key_file_new (); @@ -412,7 +411,7 @@ } else { sat_log_log (SAT_LOG_LEVEL_MSG, - _("%s: Satellite data written for %d."), + _("%s: Data for new sat %d successfully added."), __FUNCTION__, ntle->catnum); *num += 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cs...@us...> - 2009-08-14 11:25:30
|
Revision: 417 http://gpredict.svn.sourceforge.net/gpredict/?rev=417&view=rev Author: csete Date: 2009-08-14 11:25:24 +0000 (Fri, 14 Aug 2009) Log Message: ----------- Added slider. No functionality yet. Modified Paths: -------------- trunk/src/gtk-sat-module-tmg.c Modified: trunk/src/gtk-sat-module-tmg.c =================================================================== --- trunk/src/gtk-sat-module-tmg.c 2009-08-14 10:27:35 UTC (rev 416) +++ trunk/src/gtk-sat-module-tmg.c 2009-08-14 11:25:24 UTC (rev 417) @@ -263,17 +263,21 @@ gtk_table_attach (GTK_TABLE (table), mod->tmgFactor, 2, 3, 4, 5, GTK_SHRINK, GTK_SHRINK, 0, 0); + /* add slider */ + mod->tmgSlider = gtk_hscale_new_with_range (-1.0, +1.0, 0.005); + gtk_scale_set_draw_value (GTK_SCALE (mod->tmgSlider), FALSE); + gtk_range_set_value (GTK_RANGE (mod->tmgSlider), 0.0); + /* create the vertical box */ vbox = gtk_vbox_new (FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox), mod->tmgSlider, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new(), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); - /* add slider */ - /* create main window */ mod->tmgWin = gtk_window_new (GTK_WINDOW_TOPLEVEL); title = g_strconcat (_("Time Controller"), " / ", mod->name, NULL); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |