Thread: [Gpredict-svn] SF.net SVN: gpredict:[628] trunk (Page 8)
Real time satellite tracking and orbit prediction
Status: Beta
Brought to you by:
csete
|
From: <cs...@us...> - 2010-07-10 00:17:06
|
Revision: 628
http://gpredict.svn.sourceforge.net/gpredict/?rev=628&view=rev
Author: csete
Date: 2010-07-10 00:16:57 +0000 (Sat, 10 Jul 2010)
Log Message:
-----------
Fixed incorrect frequecies for HO-68 mode V/U packet.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/data/trsp/36122.trsp
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-09 13:02:43 UTC (rev 627)
+++ trunk/ChangeLog 2010-07-10 00:16:57 UTC (rev 628)
@@ -6,6 +6,9 @@
* src/gtk-rig-ctrl.c:
Added option for manual T/R switch for FT-817/857/897 (RIG_TYPE_TOGGLE_MAN).
The auto mode has been renamed to RIG_TYPE_TOGGLE_AUTO.
+
+ * data/trsp/36122.trsp:
+ Fixed incorrect V/U packet frequencies.
2010-06-18 Alexandru Csete <oz9aec at gmail.com>
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-07-09 13:02:43 UTC (rev 627)
+++ trunk/NEWS 2010-07-10 00:16:57 UTC (rev 628)
@@ -40,6 +40,7 @@
- Command line options for cleaning user's TLE and transponder data, see --help for list.
- Satellite Map: Added shadow to satellite marker and label to enhance visual appearance
over light background map regions.
+- Fixed incorrect uplink and downlink frequencies for HO-68, mode V/U packet.
Changes in version 1.1 (5 Oct 2009)
Modified: trunk/data/trsp/36122.trsp
===================================================================
--- trunk/data/trsp/36122.trsp 2010-07-09 13:02:43 UTC (rev 627)
+++ trunk/data/trsp/36122.trsp 2010-07-10 00:16:57 UTC (rev 628)
@@ -16,7 +16,7 @@
INVERT=true
[Mode V/U BBS AFSK]
-DOWN_LOW=145825000
-UP_LOW=435675000
+UP_LOW=145825000
+DOWN_LOW=435675000
MODE=AFSK
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-07-11 08:13:02
|
Revision: 630
http://gpredict.svn.sourceforge.net/gpredict/?rev=630&view=rev
Author: csete
Date: 2010-07-11 08:12:54 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Synchronise satellite database with Celestrak.
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/satdata/amateur.cat
trunk/data/satdata/geo.cat
trunk/data/satdata/geodetic.cat
trunk/data/satdata/glo-ops.cat
trunk/data/satdata/goes.cat
trunk/data/satdata/intelsat.cat
trunk/data/satdata/military.cat
trunk/data/satdata/musson.cat
trunk/data/satdata/satellites.dat
trunk/data/satdata/sbas.cat
trunk/data/satdata/science.cat
trunk/data/satdata/tdrss.cat
trunk/data/satdata/tle-new.cat
trunk/data/satdata/visual.cat
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/ChangeLog 2010-07-11 08:12:54 UTC (rev 630)
@@ -1,3 +1,9 @@
+2010-07-11 Alexandru Csete <oz9aec at gmail.com>
+
+ * data/satdata:
+ Synchronise satellite database with Celestrak.
+
+
2010-07-09 Alexandru Csete <oz9aec at gmail.com>
* src/radio-conf.h:
Modified: trunk/data/satdata/amateur.cat
===================================================================
--- trunk/data/satdata/amateur.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/amateur.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -62,7 +62,7 @@
33493
33498
33499
-35693
35694
35870
36122
+36575
Modified: trunk/data/satdata/geo.cat
===================================================================
--- trunk/data/satdata/geo.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/geo.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -45,7 +45,6 @@
22911
22912
22921
-22931
23051
23124
23175
@@ -65,7 +64,6 @@
23553
23571
23613
-23636
23653
23670
23680
@@ -101,7 +99,6 @@
24742
24748
24769
-24786
24798
24808
24812
@@ -118,6 +115,7 @@
25004
25010
25050
+25067
25071
25086
25126
@@ -135,7 +133,6 @@
25460
25462
25473
-25491
25492
25495
25515
@@ -391,3 +388,14 @@
35943
36032
36033
+36097
+36101
+36106
+36131
+36287
+36358
+36395
+36397
+36411
+36499
+36516
Modified: trunk/data/satdata/geodetic.cat
===================================================================
--- trunk/data/satdata/geodetic.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/geodetic.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -7,3 +7,4 @@
25398
27391
27392
+34602
Modified: trunk/data/satdata/glo-ops.cat
===================================================================
--- trunk/data/satdata/glo-ops.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/glo-ops.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -17,3 +17,9 @@
33466
33467
33468
+36111
+36112
+36113
+36400
+36401
+36402
Modified: trunk/data/satdata/goes.cat
===================================================================
--- trunk/data/satdata/goes.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/goes.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -13,3 +13,4 @@
26871
29155
35491
+36411
Modified: trunk/data/satdata/intelsat.cat
===================================================================
--- trunk/data/satdata/intelsat.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/intelsat.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -15,6 +15,7 @@
23816
23877
23915
+24732
24742
24812
24846
@@ -51,5 +52,7 @@
32253
32388
32951
+33153
36097
36106
+36397
Modified: trunk/data/satdata/military.cat
===================================================================
--- trunk/data/satdata/military.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/military.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -2,7 +2,6 @@
22698
23125
23126
-23605
23814
24953
25634
@@ -10,11 +9,6 @@
26102
26610
27434
-28492
-28494
-28495
-28496
-28497
29658
30773
30777
Modified: trunk/data/satdata/musson.cat
===================================================================
--- trunk/data/satdata/musson.cat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/musson.cat 2010-07-11 08:12:54 UTC (rev 630)
@@ -7,3 +7,4 @@
28521
32052
35635
+36519
Modified: trunk/data/satdata/satellites.dat
===================================================================
--- trunk/data/satdata/satellites.dat 2010-07-10 00:27:52 UTC (rev 629)
+++ trunk/data/satdata/satellites.dat 2010-07-11 08:12:54 UTC (rev 630)
@@ -1,8680 +1,8764 @@
-[25260]
+[31125]
VERSION=1.1
-NAME=SPOT 4
-NICKNAME=SPOT 4
-TLE1=1 25260U 98017A 09364.15266337 .00000038 00000-0 38903-4 0 7889
-TLE2=2 25260 98.6787 73.4511 0001357 75.2437 343.0344 14.19350902610144
+NAME=SAUDICOMSAT 3
+NICKNAME=SAUDICOMSAT 3
+TLE1=1 31125U 07012J 10191.62791711 .00000411 00000-0 88749-4 0 9949
+TLE2=2 31125 97.9510 249.9735 0046248 103.0810 257.5536 14.62640359172521
-[26390]
+[25478]
VERSION=1.1
-NAME=SIRIUS-1
-NICKNAME=SIRIUS-1
-TLE1=1 26390U 00035A 09361.61925365 .00000039 00000-0 10000-3 0 6100
-TLE2=2 26390 61.3474 253.6829 2725911 269.9260 59.4045 1.00279585 34789
+NAME=ORBCOMM FM24 [+]
+NICKNAME=ORBCOMM FM24 [+]
+TLE1=1 25478U 98053D 10190.83773413 -.00000098 00000-0 16156-4 0 9056
+TLE2=2 25478 45.0125 341.5915 0003194 136.4123 223.6980 14.29097167615402
-[24971]
+[25982]
VERSION=1.1
-NAME=IRS-1D
-NICKNAME=IRS-1D
-TLE1=1 24971U 97057A 09364.14916487 .00000022 00000-0 22562-4 0 9752
-TLE2=2 24971 98.2180 30.5295 0055081 70.5425 290.1702 14.32965799640892
+NAME=ORBCOMM FM32 [+]
+NICKNAME=ORBCOMM FM32 [+]
+TLE1=1 25982U 99065C 10191.28726353 -.00000269 00000-0 -50301-4 0 8882
+TLE2=2 25982 45.0226 140.5086 0007999 301.7412 58.2610 14.29374869552808
-[25418]
+[28894]
VERSION=1.1
-NAME=ORBCOMM FM15 [+]
-NICKNAME=ORBCOMM FM15 [+]
-TLE1=1 25418U 98046F 09363.59784878 .00000174 00000-0 12564-3 0 2721
-TLE2=2 25418 45.0001 72.3948 0004056 253.9833 106.0549 14.27685788594619
+NAME=SSETI EXPRESS (XO-53)
+NICKNAME=XO-53
+TLE1=1 28894U 05043E 10191.25446410 .00000011 00000-0 11651-4 0 8125
+TLE2=2 28894 98.0077 74.3777 0016738 212.8767 147.1388 14.59738400250467
-[25285]
+[33595]
VERSION=1.1
-NAME=IRIDIUM 62 [+]
-NICKNAME=IRIDIUM 62 [+]
-TLE1=1 25285U 98021A 09363.31114662 .00000188 00000-0 60163-4 0 8128
-TLE2=2 25285 86.3945 283.6029 0002322 76.6705 283.4762 14.34216263614172
+NAME=EXPRESS-AM 44
+NICKNAME=EXPRESS-AM 44
+TLE1=1 33595U 09007A 10190.90957546 -.00000082 00000-0 10000-3 0 3558
+TLE2=2 33595 0.0377 227.5644 0001368 280.3017 96.3197 1.00272143 5193
-[25354]
+[25291]
VERSION=1.1
-NAME=CHINASTAR 1
-NICKNAME=CHINASTAR 1
-TLE1=1 25354U 98033A 09362.03972506 -.00000184 00000-0 10000-3 0 7035
-TLE2=2 25354 0.0299 255.9403 0002913 41.2701 261.2706 1.00271408 46972
+NAME=IRIDIUM 68 [+]
+NICKNAME=IRIDIUM 68 [+]
+TLE1=1 25291U 98021G 10191.18932999 -.00000069 00000-0 -31877-4 0 449
+TLE2=2 25291 86.3944 203.0426 0002689 82.4302 277.7174 14.34218155641792
-[27811]
+[13923]
VERSION=1.1
-NAME=HELLAS-SAT 2
-NICKNAME=HELLAS-SAT 2
-TLE1=1 27811U 03020A 09361.77536119 .00000176 00000-0 10000-3 0 340
-TLE2=2 27811 0.0365 264.6690 0002903 358.1733 151.6924 1.00274622 24178
+NAME=NOAA 8 [-]
+NICKNAME=NOAA 8 [-]
+TLE1=1 13923U 83022A 10191.53458944 .00000000 00000-0 17325-4 0 3432
+TLE2=2 13923 98.5224 217.8063 0016528 51.7273 308.5403 14.27741472420260
-[23571]
+[24769]
VERSION=1.1
-NAME=INTELSAT 706 (IS-706)
-NICKNAME=INTELSAT 706 (IS-706)
-TLE1=1 23571U 95023A 09356.87910115 .00000105 00000-0 10000-3 0 364
-TLE2=2 23571 0.0152 12.3824 0002516 242.6294 207.8725 1.00273184 53466
+NAME=BSAT-1A
+NICKNAME=BSAT-1A
+TLE1=1 24769U 97016B 10190.60985367 -.00000342 00000-0 10000-3 0 1194
+TLE2=2 24769 0.0587 268.3842 0002429 238.4343 109.7737 1.00268692 48489
-[12389]
+[32062]
VERSION=1.1
-NAME=SL-8 R/B
-NICKNAME=SL-8 R/B
-TLE1=1 12389U 81033B 09363.83131703 .00002910 00000-0 95091-4 0 5407
-TLE2=2 12389 82.9179 150.1179 0403823 265.3862 90.1135 14.78194288465890
+NAME=CBERS 2B
+NICKNAME=CBERS 2B
+TLE1=1 32062U 07042A 10191.27729205 -.00000042 00000-0 42976-6 0 343
+TLE2=2 32062 98.4548 267.1020 0031470 238.2607 121.5518 14.38571968147203
-[28485]
+[6212]
VERSION=1.1
-NAME=SWIFT
-NICKNAME=SWIFT
-TLE1=1 28485U 04047A 09363.93316833 .00000707 00000-0 28615-4 0 4714
-TLE2=2 28485 20.5612 295.8736 0014175 322.8188 37.1304 14.92629354278959
+NAME=OPS 8180 (RADCAT)
+NICKNAME=OPS 8180 (RADCAT)
+TLE1=1 06212U 72076A 10191.77175206 .00002539 00000-0 87834-4 0 545
+TLE2=2 06212 98.5570 264.4811 0004484 102.0050 258.1703 15.31086627182287
-[29107]
+[27715]
VERSION=1.1
-NAME=CLOUDSAT
-NICKNAME=CLOUDSAT
-TLE1=1 29107U 06016A 09363.49707074 .00000081 00000-0 27984-4 0 1682
-TLE2=2 29107 98.2003 304.7128 0001402 87.6582 272.4780 14.57117351195315
+NAME=GALAXY 12 (G-12)
+NICKNAME=GALAXY 12 (G-12)
+TLE1=1 27715U 03013B 10190.56924947 .00000086 00000-0 10000-3 0 3156
+TLE2=2 27715 0.0200 25.6848 0002288 85.4467 248.1870 1.00272053 26629
-[25736]
+[27830]
VERSION=1.1
-NAME=MUBLCOM
-NICKNAME=MUBLCOM
-TLE1=1 25736U 99026B 09362.80594674 .00000127 00000-0 47746-4 0 9129
-TLE2=2 25736 97.7736 277.4332 0005292 168.9889 191.1415 14.44622288558897
+NAME=BSAT-2C
+NICKNAME=BSAT-2C
+TLE1=1 27830U 03028A 10189.96031763 -.00000341 00000-0 10000-3 0 1622
+TLE2=2 27830 0.0943 249.5067 0002381 283.7132 209.1841 1.00270239 25951
-[28496]
+[25170]
VERSION=1.1
-NAME=ESSAIM-3
-NICKNAME=ESSAIM-3
-TLE1=1 28496U 04049E 09342.61919833 -.00000015 00000-0 60751-5 0 5878
-TLE2=2 28496 98.2942 308.6273 0009789 59.1704 301.0444 14.70161453266892
+NAME=IRIDIUM 56 [+]
+NICKNAME=IRIDIUM 56 [+]
+TLE1=1 25170U 98010B 10191.41236766 .00000055 00000-0 12644-4 0 5650
+TLE2=2 25170 86.3969 329.3575 0002427 86.0361 274.1114 14.34215290648594
-[902]
+[35681]
VERSION=1.1
-NAME=CALSPHERE 2
-NICKNAME=CALSPHERE 2
-TLE1=1 00902U 64063E 09363.47466763 .00000075 00000-0 10000-3 0 2410
-TLE2=2 00902 90.1548 333.2262 0019803 44.9018 315.3726 13.52470384 43762
+NAME=DEIMOS-1
+NICKNAME=DEIMOS-1
+TLE1=1 35681U 09041A 10191.70278601 .00000097 00000-0 24776-4 0 627
+TLE2=2 35681 98.0956 89.3624 0001559 103.9704 256.1688 14.69370668 50830
-[23711]
+[28059]
VERSION=1.1
-NAME=SURFSAT
-NICKNAME=SURFSAT
-TLE1=1 23711U 95059B 09363.47930865 .00000189 00000-0 45624-3 0 4093
-TLE2=2 23711 100.3104 0.4956 0368462 33.0600 329.2958 13.12573531678055
+NAME=CZ-4B R/B
+NICKNAME=CZ-4B R/B
+TLE1=1 28059U 03049C 10191.81428207 -.00000007 00000-0 10463-4 0 9170
+TLE2=2 28059 98.5743 325.5686 0052004 30.1411 330.2767 14.51471888356041
-[24842]
+[36608]
VERSION=1.1
-NAME=IRIDIUM 911 [-]
-NICKNAME=IRIDIUM 911 [-]
-TLE1=1 24842U 97030G 09363.54547070 .00000111 00000-0 26885-4 0 5466
-TLE2=2 24842 86.4438 52.5230 0016347 125.7179 234.5554 14.43208081659464
+NAME=OFEQ 9
+NICKNAME=OFEQ 9
+TLE1=1 36608U 10031A 10191.55844731 .00010865 00000-0 17830-3 0 653
+TLE2=2 36608 141.7807 29.1256 0177788 192.6367 166.9889 15.33809065 2739
-[22220]
+[15362]
VERSION=1.1
-NAME=SL-16 R/B
-NICKNAME=SL-16 R/B
-TLE1=1 22220U 92076B 09363.77069655 .00000183 00000-0 11635-3 0 732
-TLE2=2 22220 70.9992 36.8832 0011150 110.1211 250.1125 14.16152442884759
+NAME=NOVA 3
+NICKNAME=NOVA 3
+TLE1=1 15362U 84110A 10190.69416914 .00000051 00000-0 10000-3 0 1387
+TLE2=2 15362 89.9882 50.2108 0032915 19.0547 341.1800 13.22498392242328
-[32388]
+[27948]
VERSION=1.1
-NAME=HORIZONS 2
-NICKNAME=HORIZONS 2
-TLE1=1 32388U 07063B 09362.43134821 -.00000230 00000-0 10000-3 0 3136
-TLE2=2 32388 0.0350 268.9782 0002804 10.2883 258.9970 1.00272122 7567
+NAME=EUROBIRD 3
+NICKNAME=EUROBIRD 3
+TLE1=1 27948U 03043A 10191.88120266 .00000158 00000-0 10000-3 0 2581
+TLE2=2 27948 0.0460 336.4802 0000448 71.0420 231.5113 1.00270523 24965
-[25772]
+[24931]
VERSION=1.1
-NAME=GLOBALSTAR M047
-NICKNAME=GLOBALSTAR M047
-TLE1=1 25772U 99031C 09363.89547552 -.00000086 00000-0 10000-3 0 1644
-TLE2=2 25772 51.9930 143.7991 0002671 126.4013 233.7095 12.62276547486884
+NAME=EUTELSAT W75
+NICKNAME=EUTELSAT W75
+TLE1=1 24931U 97049A 10190.78979003 -.00000084 00000-0 10000-3 0 2015
+TLE2=2 24931 1.2978 78.0665 0010726 34.8736 174.2295 1.00272579 47135
-[15427]
+[34779]
VERSION=1.1
-NAME=NOAA 9 [P]
-NICKNAME=NOAA 9 [P]
-TLE1=1 15427U 84123A 09363.05336407 -.00000188 00000-0 -75555-4 0 9536
-TLE2=2 15427 98.4550 350.5979 0014266 215.5160 144.5061 14.15336133292520
+NAME=BEIDOU G2
+NICKNAME=BEIDOU G2
+TLE1=1 34779U 09018A 10191.01631324 -.00000002 00000-0 10000-3 0 3272
+TLE2=2 34779 0.1467 45.5089 0015388 177.9403 136.4261 1.00292451 4727
-[28190]
+[24798]
VERSION=1.1
-NAME=GPS BIIR-11 (DASS)
-NICKNAME=GPS BIIR-11 (DASS)
-TLE1=1 28190U 04009A 09361.86133251 .00000092 00000-0 10000-3 0 3855
-TLE2=2 28190 54.8713 154.6526 0060247 347.2880 12.5478 2.00562616 42337
+NAME=DFH 3-2
+NICKNAME=DFH 3-2
+TLE1=1 24798U 97021A 10191.22061043 .00000073 00000-0 10000-3 0 8239
+TLE2=2 24798 6.0036 66.0556 0011577 340.2685 19.5938 1.00174774 48226
-[36113]
+[28638]
VERSION=1.1
-NAME=COSMOS 2458 [GLONASS-M]
-NICKNAME=COSMOS 2458 [GLONASS-M]
-TLE1=1 36113U 09070C 09364.20065851 -.00000004 00000-0 00000+0 0 309
-TLE2=2 36113 64.7988 277.3400 0006160 289.4656 227.8221 2.13308232 338
+NAME=APSTAR 6
+NICKNAME=APSTAR 6
+TLE1=1 28638U 05012A 10191.65262584 -.00000314 00000-0 10000-3 0 7334
+TLE2=2 28638 0.0384 79.8046 0002483 50.0633 167.5530 1.00271266 44057
-[25288]
+[28891]
VERSION=1.1
-NAME=IRIDIUM 65 [+]
-NICKNAME=IRIDIUM 65 [+]
-TLE1=1 25288U 98021D 09363.33017426 .00000103 00000-0 29798-4 0 8130
-TLE2=2 25288 86.3954 283.5677 0001966 83.9659 276.1777 14.34215765614176
+NAME=TOPSAT
+NICKNAME=TOPSAT
+TLE1=1 28891U 05043B 10191.74453248 .00000042 00000-0 18156-4 0 2612
+TLE2=2 28891 98.0022 74.1776 0016477 207.5251 152.5092 14.59820269250557
-[25922]
+[24278]
VERSION=1.1
-NAME=GALAXY 27 (G-27)
-NICKNAME=GALAXY 27 (G-27)
-TLE1=1 25922U 99052A 09362.09204954 .00000082 00000-0 10000-3 0 5808
-TLE2=2 25922 0.0185 321.2650 0002454 314.2109 85.3672 1.00272284 37579
+NAME=JAS-2 (FO-29)
+NICKNAME=FO-29
+TLE1=1 24278U 96046B 10191.10416615 -.00000023 00000-0 10232-4 0 3491
+TLE2=2 24278 98.5149 17.0662 0351473 64.4467 299.2568 13.52950947686205
-[26766]
+[28982]
VERSION=1.1
-NAME=INTELSAT 10 (IS-10)
-NICKNAME=INTELSAT 10 (IS-10)
-TLE1=1 26766U 01019A 09363.09326355 -.00000004 00000-0 10000-3 0 4907
-TLE2=2 26766 0.0115 205.4958 0002351 48.7630 305.4987 1.00272873 31626
+NAME=ST5-C
+NICKNAME=ST5-C
+TLE1=1 28982U 06008C 10191.34798376 .00009164 13773-5 35555-3 0 4124
+TLE2=2 28982 105.6647 219.0882 2316675 96.1931 290.5643 10.75700441167146
-[24841]
+[27718]
VERSION=1.1
-NAME=IRIDIUM 16 [-]
-NICKNAME=IRIDIUM 16 [-]
-TLE1=1 24841U 97030F 09363.23786516 .00000090 00000-0 24548-4 0 8903
-TLE2=2 24841 86.4011 50.5174 0002120 134.4758 225.6614 14.35313127656250
+NAME=ASIASAT 4
+NICKNAME=ASIASAT 4
+TLE1=1 27718U 03014A 10190.77687999 -.00000353 00000-0 10000-3 0 4425
+TLE2=2 27718 0.0062 41.4729 0000730 47.0770 240.9397 1.00271339 26566
-[22970]
+[36607]
VERSION=1.1
-NAME=TUBSAT B
-NICKNAME=TUBSAT B
-TLE1=1 22970U 94003B 09363.39052317 .00000051 00000-0 10000-3 0 2282
-TLE2=2 22970 82.5599 11.8751 0017167 117.3313 242.9556 13.16915130765678
+NAME=SL-24 DEB
+NICKNAME=SL-24 DEB
+TLE1=1 36607U 10030C 10191.16348052 .00002118 00000-0 86754-4 0 185
+TLE2=2 36607 97.4553 198.1613 0023489 273.3343 86.5208 15.25193085 2906
-[25331]
+[36287]
VERSION=1.1
-NAME=ECHOSTAR 4
-NICKNAME=ECHOSTAR 4
-TLE1=1 25331U 98028A 09363.05585334 -.00000225 00000-0 10000-3 0 1205
-TLE2=2 25331 1.5315 55.6887 0004605 205.5096 139.7462 1.00271323 42762
+NAME=BEIDOU G1
+NICKNAME=BEIDOU G1
+TLE1=1 36287U 10001A 10191.91045465 -.00000245 00000-0 10000-3 0 1431
+TLE2=2 36287 1.6356 327.0789 0000476 323.8129 110.0910 1.00274896 1842
-[24794]
+[27818]
VERSION=1.1
-NAME=IRIDIUM 6 [+]
-NICKNAME=IRIDIUM 6 [+]
-TLE1=1 24794U 97020C 09363.39117498 -.00000007 00000-0 -97055-5 0 6770
-TLE2=2 24794 86.3943 18.4601 0002146 84.3124 275.8312 14.34218602662368
+NAME=COSMOS 2398
+NICKNAME=COSMOS 2398
+TLE1=1 27818U 03023A 10191.28467689 .00000045 00000-0 33023-4 0 9709
+TLE2=2 27818 82.9491 103.0856 0029918 278.2584 81.5186 13.71967310355469
-[26464]
+[24714]
VERSION=1.1
-NAME=CLUSTER II-FM8
-NICKNAME=CLUSTER II-FM8
-TLE1=1 26464U 00045B 09364.25000000 .00001326 00000-0 00000+0 0 4198
-TLE2=2 26464 114.4207 192.8575 8728251 32.6500 357.4655 0.44227346 5405
+NAME=NAHUEL 1A
+NICKNAME=NAHUEL 1A
+TLE1=1 24714U 97002B 10190.35645757 -.00000086 00000-0 10000-3 0 1079
+TLE2=2 24714 2.7085 74.1377 0007823 27.5994 221.0734 0.99758003 49224
-[26626]
+[25546]
VERSION=1.1
-NAME=SIRIUS-3
-NICKNAME=SIRIUS-3
-TLE1=1 26626U 00077A 09360.95672545 -.00000105 00000-0 10000-3 0 5242
-TLE2=2 26626 64.2067 13.5320 2662544 270.6865 59.1988 1.00274457 33248
+NAME=BONUM 1
+NICKNAME=BONUM 1
+TLE1=1 25546U 98068A 10191.60195826 .00000083 00000-0 10000-3 0 6062
+TLE2=2 25546 0.0625 97.5404 0002544 323.8465 139.6626 1.00270871 42681
-[28915]
+[20873]
VERSION=1.1
-NAME=COSMOS 2419 (714)
-NICKNAME=COSMOS 2419 (714)
-TLE1=1 28915U 05050A 09363.14998428 .00000090 00000-0 10000-3 0 1233
-TLE2=2 28915 64.8650 157.3484 0007003 353.9069 15.3488 2.13101967 31220
+NAME=GALAXY 6
+NICKNAME=GALAXY 6
+TLE1=1 20873U 90091B 10189.53342510 -.00000262 00000-0 10000-3 0 4171
+TLE2=2 20873 7.1014 63.7384 0003288 25.2986 334.6459 0.99763181 66706
-[22826]
+[15935]
VERSION=1.1
-NAME=ITAMSAT (IO-26)
-NICKNAME=IO-26
-TLE1=1 22826U 93061D 09363.62715442 .00000012 00000-0 21436-4 0 1547
-TLE2=2 22826 98.4576 311.8262 0009651 48.3171 311.8836 14.29536125847938
+NAME=OSCAR 30
+NICKNAME=OSCAR 30
+TLE1=1 15935U 85066A 10191.07058502 .00000028 00000-0 31260-4 0 6181
+TLE2=2 15935 90.0624 25.0436 0170495 131.8316 229.7524 13.35283970212462
-[23705]
+[28629]
VERSION=1.1
-NAME=SL-16 R/B
-NICKNAME=SL-16 R/B
-TLE1=1 23705U 95058B 09362.53861414 -.00000193 00000-0 -75196-4 0 62
-TLE2=2 23705 71.0196 350.5832 0011473 144.1688 216.0185 14.14869119731353
+NAME=EXPRESS-AM 2
+NICKNAME=EXPRESS-AM 2
+TLE1=1 28629U 05010A 10191.85228352 -.00000133 00000-0 10000-3 0 4313
+TLE2=2 28629 0.0415 209.3843 0000544 356.9107 109.1839 1.00271305 19349
-[3230]
+[28361]
VERSION=1.1
-NAME=SL-8 R/B
-NICKNAME=SL-8 R/B
-TLE1=1 03230U 68040B 09363.82364599 .00000138 00000-0 20864-4 0 8415
-TLE2=2 03230 74.0378 272.7375 0035043 228.0301 131.7880 14.84273126230273
+NAME=GPS BIIR-12 (DASS)
+NICKNAME=GPS BIIR-12 (DASS)
+TLE1=1 28361U 04023A 10190.60231766 -.00000074 00000-0 10000-3 0 4341
+TLE2=2 28361 55.4411 322.9616 0068114 176.3282 183.7318 2.00563575 44305
-[28187]
+[26032]
VERSION=1.1
-NAME=EUTELSAT W3A
-NICKNAME=EUTELSAT W3A
-TLE1=1 28187U 04008A 09360.84948200 .00000073 00000-0 10000-3 0 8781
-TLE2=2 28187 0.0716 4.4252 0003093 252.8225 151.0418 1.00273451 21253
+NAME=ARIRANG 1 (KOMPSAT-1)
+NICKNAME=ARIRANG 1 (KOMPSAT-1)
+TLE1=1 26032U 99070A 10191.68204738 .00000101 00000-0 26885-4 0 646
+TLE2=2 26032 97.8683 62.2435 0006517 83.7624 276.4349 14.65720030564397
-[27426]
+[31307]
VERSION=1.1
-NAME=DIRECTV 5 (TEMPO 1)
-NICKNAME=DIRECTV 5 (TEMPO 1)
-TLE1=1 27426U 02023A 09362.54183597 -.00000034 00000-0 10000-3 0 4324
-TLE2=2 27426 0.0170 257.7725 0003549 23.8290 260.4958 1.00272925 28025
+NAME=GALAXY 17 (G-17)
+NICKNAME=GALAXY 17 (G-17)
+TLE1=1 31307U 07016B 10191.47828715 -.00000170 00000-0 10000-3 0 5216
+TLE2=2 31307 0.0164 356.8535 0002821 116.8809 255.7275 1.00271854 11719
-[28230]
+[33064]
VERSION=1.1
-NAME=GP-B
-NICKNAME=GP-B
-TLE1=1 28230U 04014A 09362.94984351 .00000185 00000-0 24605-4 0 6786
-TLE2=2 28230 89.9363 156.6319 0002801 97.5189 262.6382 14.76007212306509
+NAME=ORBCOMM FM37 [S]
+NICKNAME=ORBCOMM FM37 [S]
+TLE1=1 33064U 08031E 10191.68772341 -.00000136 00000-0 10020-4 0 6320
+TLE2=2 33064 48.4454 60.0096 0007378 248.2107 111.8008 14.68556526110433
-[27378]
+[27838]
VERSION=1.1
-NAME=ECHOSTAR 7
-NICKNAME=ECHOSTAR 7
-TLE1=1 27378U 02006A 09362.57731146 .00000022 00000-0 10000-3 0 4655
-TLE2=2 27378 0.0193 355.4466 0001706 258.0908 292.5648 1.00272493 28757
+NAME=ORBVIEW 3
+NICKNAME=ORBVIEW 3
+TLE1=1 27838U 03030A 10191.89734884 .00002351 00000-0 55594-4 0 6481
+TLE2=2 27838 97.0058 241.4843 0002539 87.1337 18.9817 15.42780657395289
-[29505]
+[7004]
VERSION=1.1
-NAME=SJ-6C
-NICKNAME=SJ-6C
-TLE1=1 29505U 06046A 09364.18271506 .00000527 00000-0 59248-4 0 5766
-TLE2=2 29505 97.6904 5.9325 0004088 126.5212 233.6380 14.90695858173282
+NAME=SL-8 R/B
+NICKNAME=SL-8 R/B
+TLE1=1 07004U 73107B 10190.73187577 .00002578 00000-0 10389-3 0 3748
+TLE2=2 07004 73.9591 213.8825 0423807 345.5913 13.3456 14.69882658857201
-[22245]
+[35865]
VERSION=1.1
-NAME=GORIZONT 27
-NICKNAME=GORIZONT 27
-TLE1=1 22245U 92082A 09356.61247811 -.00000203 00000-0 10000-3 0 5007
-TLE2=2 22245 11.6474 42.8744 0015690 231.7718 128.0784 1.00142453 66832
+NAME=METEOR-M 1
+NICKNAME=METEOR-M 1
+TLE1=1 35865U 09049A 10191.77914140 .00000176 00000-0 10000-3 0 4593
+TLE2=2 35865 98.7553 245.4075 0002251 320.8437 39.2530 14.21830889 42079
-[22877]
+[694]
VERSION=1.1
-NAME=GPS BIIA-23 (PRN 04)
-NICKNAME=GPS BIIA-23 (PRN 04)
-TLE1=1 22877U 93068A 09362.60213294 .00000113 00000-0 10000-3 0 56
-TLE2=2 22877 53.8393 210.4506 0090304 32.2406 328.3886 2.00571992118520
+NAME=ATLAS CENTAUR 2
+NICKNAME=ATLAS CENTAUR 2
+TLE1=1 00694U 63047A 10191.49343726 .00000415 00000-0 44864-4 0 3173
+TLE2=2 00694 30.3562 351.7141 0615582 124.8977 241.1032 13.95233226327716
-[25043]
+[1361]
VERSION=1.1
-NAME=IRIDIUM 38 [-]
-NICKNAME=IRIDIUM 38 [-]
-TLE1=1 25043U 97069E 09363.31253946 -.00000049 00000-0 -24330-4 0 8731
-TLE2=2 25043 86.3937 80.9136 0001998 108.9543 251.1859 14.34716899635586
+NAME=LCS 1
+NICKNAME=LCS 1
+TLE1=1 01361U 65034C 10191.51458001 .00000009 00000-0 10000-3 0 2025
+TLE2=2 01361 32.1445 317.0801 0012857 302.7857 57.1405 9.89278687633814
-[23439]
+[23343]
VERSION=1.1
-NAME=RADIO ROSTO (RS-15)
-NICKNAME=RS-15
-TLE1=1 23439U 94085A 09362.92361525 -.00000039 00000-0 10000-3 0 2743
-TLE2=2 23439 64.8213 309.9057 0153791 14.9053 345.6329 11.27553921618078
+NAME=SL-16 R/B
+NICKNAME=SL-16 R/B
+TLE1=1 23343U 94074B 10191.09543962 .00000176 00000-0 33854-4 0 8315
+TLE2=2 23343 98.0778 159.9190 0006027 262.5860 97.4694 14.75035703843047
-[26089]
+[26998]
VERSION=1.1
-NAME=GARUDA 1
-NICKNAME=GARUDA 1
-TLE1=1 26089U 00011A 09361.13122034 -.00000331 00000-0 10000-3 0 5068
-TLE2=2 26089 1.2891 251.0964 0002979 41.3171 333.5710 1.00266819 36205
+NAME=TIMED
+NICKNAME=TIMED
+TLE1=1 26998U 01055B 10191.81409673 .00000033 00000-0 82395-5 0 6192
+TLE2=2 26998 74.0748 301.3780 0001903 292.5801 67.5202 14.84186529465171
-[27941]
+[24786]
VERSION=1.1
-NAME=NIGERIASAT 1
-NICKNAME=NIGERIASAT 1
-TLE1=1 27941U 03042C 09364.15772996 -.00000004 00000-0 79771-5 0 1050
-TLE2=2 27941 97.9162 231.3181 0010441 235.5893 124.4322 14.63049567334196
+NAME=GOES 10
+NICKNAME=GOES 10
+TLE1=1 24786U 97019A 10191.20292043 .00000080 00000-0 10000-3 0 5120
+TLE2=2 24786 4.4761 68.4398 0008319 27.6947 332.1838 0.99068703 48377
-[28393]
+[6073]
VERSION=1.1
-NAME=AMAZONAS
-NICKNAME=AMAZONAS
-TLE1=1 28393U 04031A 09362.03111683 -.00000259 00000-0 00000+0 0 7080
-TLE2=2 28393 0.0429 45.9737 0002736 266.4367 94.4209 1.00271260 19815
+NAME=COSMOS 482 DESCENT CRAFT
+NICKNAME=COSMOS 482 DESCENT CRAFT
+TLE1=1 06073U 72023E 10191.77545591 .00013066 37802-5 96209-4 0 841
+TLE2=2 06073 52.0807 140.4129 2165047 107.8329 276.9271 11.26702262 58945
-[28916]
+[25732]
VERSION=1.1
-NAME=COSMOS 2418 (713)
-NICKNAME=COSMOS 2418 (713)
-TLE1=1 28916U 05050B 09363.66459068 .00000085 00000-0 10000-3 0 1170
-TLE2=2 28916 64.8834 157.3704 0017604 342.5857 16.7629 2.13104992 31220
+NAME=CZ-4B R/B
+NICKNAME=CZ-4B R/B
+TLE1=1 25732U 99025C 10191.35171728 -.00000015 00000-0 13668-4 0 4338
+TLE2=2 25732 98.6936 162.2581 0038224 125.8328 234.6410 14.17210049577687
-[32763]
+[27399]
VERSION=1.1
-NAME=ICO G1
-NICKNAME=ICO G1
-TLE1=1 32763U 08016A 09362.49172793 -.00000148 00000-0 10000-3 0 3697
-TLE2=2 32763 5.3170 330.4055 0003042 300.9855 269.8793 1.00271380 6280
+NAME=JCSAT-2A
+NICKNAME=JCSAT-2A
+TLE1=1 27399U 02015A 10190.45162843 -.00000158 00000-0 10000-3 0 4378
+TLE2=2 27399 0.0265 104.8658 0001924 6.1021 132.8853 1.00271187 30384
-[26892]
+[25287]
VERSION=1.1
-NAME=COSMOS 2379
-NICKNAME=COSMOS 2379
-TLE1=1 26892U 01037A 09363.02965856 .00000125 00000-0 10000-3 0 4739
-TLE2=2 26892 5.3186 67.0063 0001594 199.9139 218.2869 1.00303543 30563
+NAME=IRIDIUM 64 [+]
+NICKNAME=IRIDIUM 64 [+]
+TLE1=1 25287U 98021C 10191.16395503 -.00000035 00000-0 -19414-4 0 105
+TLE2=2 25287 86.3948 203.0117 0002606 80.3182 279.8298 14.34218497641799
-[25276]
+[25558]
VERSION=1.1
-NAME=IRIDIUM 60 [+]
-NICKNAME=IRIDIUM 60 [+]
-TLE1=1 25276U 98019E 09363.41946242 -.00000011 00000-0 -10834-4 0 8502
-TLE2=2 25276 86.3956 346.7164 0002319 83.0970 277.0476 14.34215391615237
+NAME=SATMEX 5
+NICKNAME=SATMEX 5
+TLE1=1 25558U 98070A 10190.34542184 -.00000005 00000-0 10000-3 0 6561
+TLE2=2 25558 0.0348 34.6287 0002324 70.1254 189.9793 1.00273503 42667
-[26610]
+[33313]
VERSION=1.1
-NAME=STRV 1C
-NICKNAME=STRV 1C
-TLE1=1 26610U 00072C 09361.33735694 .00000275 00000-0 10000-3 0 149
-TLE2=2 26610 6.2560 220.7472 7341834 192.5724 126.5167 2.03455323 67750
+NAME=RAPIDEYE 5
+NICKNAME=RAPIDEYE 5
+TLE1=1 33313U 08040B 10191.85032290 .00000003 00000-0 73719-5 0 879
+TLE2=2 33313 97.9531 278.1483 0018607 158.3742 201.8244 14.79925177100637
-[28935]
+[10953]
VERSION=1.1
-NAME=ECHOSTAR 10
-NICKNAME=ECHOSTAR 10
-TLE1=1 28935U 06003A 09362.54183635 -.00000033 00000-0 10000-3 0 8250
-TLE2=2 28935 0.0234 2.9312 0001738 247.3439 291.7061 1.00271458 14207
+NAME=GOES 3 [P]
+NICKNAME=GOES 3 [P]
+TLE1=1 10953U 78062A 10190.46951341 -.00000091 00000-0 10000-3 0 317
+TLE2=2 10953 14.4798 356.8684 0003831 34.4127 316.5811 1.00277876 70548
-[25158]
+[26352]
VERSION=1.1
-NAME=ORBCOMM FM03 [-]
-NICKNAME=ORBCOMM FM03 [-]
-TLE1=1 25158U 98007B 09363.24422080 .00000018 00000-0 61935-4 0 615
-TLE2=2 25158 107.9628 149.6824 0052465 310.1867 49.4671 14.25499562617314
+NAME=GOES 11
+NICKNAME=GOES 11
+TLE1=1 26352U 00022A 10191.34709594 .00000094 00000-0 10000-3 0 9105
+TLE2=2 26352 0.4315 261.7854 0004000 261.7094 114.3190 1.00273773 37299
-[26483]
+[14050]
VERSION=1.1
-NAME=SIRIUS-2
-NICKNAME=SIRIUS-2
-TLE1=1 26483U 00051A 09362.28043970 .00000110 00000-0 10000-3 0 2878
-TLE2=2 26483 63.7605 133.5441 2693045 268.8572 60.5036 1.00284251 34123
+NAME=GOES 6 [-]
+NICKNAME=GOES 6 [-]
+TLE1=1 14050U 83041A 10189.60143316 .00000029 00000-0 10000-3 0 5754
+TLE2=2 14050 13.7799 15.9941 0003764 30.6206 329.4310 1.00236165157687
-[24901]
+[28626]
VERSION=1.1
-NAME=AGILA 2
-NICKNAME=AGILA 2
-TLE1=1 24901U 97042A 09362.32795877 -.00000212 00000-0 10000-3 0 9413
-TLE2=2 24901 0.0421 200.2652 0005192 78.7317 81.9536 1.00270457 45267
+NAME=XM-3 (RHYTHM)
+NICKNAME=XM-3 (RHYTHM)
+TLE1=1 28626U 05008A 10191.13190716 -.00000200 00000-0 00000+0 0 7582
+TLE2=2 28626 0.0438 269.6369 0000272 236.2617 104.4406 1.00271106 19692
-[23710]
+[33051]
VERSION=1.1
-NAME=RADARSAT-1
-NICKNAME=RADARSAT-1
-TLE1=1 23710U 95059A 09364.14236281 .00000169 00000-0 82351-4 0 8976
-TLE2=2 23710 98.5799 8.1537 0001009 88.5535 347.6168 14.29982239738811
+NAME=CHINASAT 9
+NICKNAME=CHINASAT 9
+TLE1=1 33051U 08028A 10190.89650928 -.00000241 00000-0 10000-3 0 6065
+TLE2=2 33051 0.0368 79.7482 0006839 13.5936 249.3000 1.00269889 7650
-[25770]
+[33749]
VERSION=1.1
-NAME=GLOBALSTAR M025
-NICKNAME=GLOBALSTAR M025
-TLE1=1 25770U 99031A 09363.53901871 -.00000086 00000-0 10000-3 0 886
-TLE2=2 25770 51.9935 145.3010 0002575 122.4405 237.6720 12.62268341486837
+NAME=NSS-9
+NICKNAME=NSS-9
+TLE1=1 33749U 09008A 10190.24973398 .00000080 00000-0 00000+0 0 2539
+TLE2=2 33749 0.0087 11.1629 0001085 132.5981 56.2206 1.00274592 5181
-[28463]
+[33596]
VERSION=1.1
-NAME=EXPRESS-AM 1
-NICKNAME=EXPRESS-AM 1
-TLE1=1 28463U 04043A 09361.77578059 .00000174 00000-0 10000-3 0 6219
-TLE2=2 28463 0.0398 150.5147 0002033 129.1946 135.9719 1.00273620 18902
+NAME=EXPRESS-MD1
+NICKNAME=EXPRESS-MD1
+TLE1=1 33596U 09007B 10191.85228291 -.00000134 00000-0 10000-3 0 3954
+TLE2=2 33596 0.0119 233.5699 0002427 225.6681 216.3370 1.00271382 5237
-[24906]
+[26382]
VERSION=1.1
-NAME=IRIDIUM 23 [+]
-NICKNAME=IRIDIUM 23 [+]
-TLE1=1 24906U 97043D 09363.36527520 .00000094 00000-0 26427-4 0 9038
-TLE2=2 24906 86.3948 315.0796 0002280 81.0143 279.1334 14.34216374646999
+NAME=FENGYUN 2B
+NICKNAME=FENGYUN 2B
+TLE1=1 26382U 00032A 10189.73184168 .00000050 00000-0 10000-3 0 2894
+TLE2=2 26382 5.2741 67.6728 0002953 235.1295 124.7076 1.00072178 36736
-[27651]
+[27499]
VERSION=1.1
-NAME=SORCE
-NICKNAME=SORCE
-TLE1=1 27651U 03004A 09363.87219223 .00000117 00000-0 30075-4 0 879
-TLE2=2 27651 39.9986 314.1068 0026730 265.3470 94.4279 14.82242671375338
+NAME=HOT BIRD 6
+NICKNAME=HOT BIRD 6
+TLE1=1 27499U 02038A 10189.94090319 .00000096 00000-0 10000-3 0 7311
+TLE2=2 27499 0.0569 278.8905 0002258 198.1322 161.4619 1.00273045 28870
-[27431]
+[26609]
VERSION=1.1
-NAME=FENGYUN 1D
-NICKNAME=FENGYUN 1D
-TLE1=1 27431U 02024B 09364.02846458 .00000042 00000-0 48324-4 0 7689
-TLE2=2 27431 98.6459 345.7661 0014937 215.9394 144.0820 14.09287997392390
+NAME=PHASE 3D (AO-40)
+NICKNAME=AO-40
+TLE1=1 26609U 00072B 10189.53814780 -.00000004 00000-0 00000+0 0 4031
+TLE2=2 26609 9.5415 324.4504 7971662 327.0903 2.1817 1.25585038 44489
-[25169]
+[25152]
VERSION=1.1
-NAME=IRIDIUM 52 [+...
[truncated message content] |
|
From: <cs...@us...> - 2010-07-11 09:22:33
|
Revision: 631
http://gpredict.svn.sourceforge.net/gpredict/?rev=631&view=rev
Author: csete
Date: 2010-07-11 09:22:27 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Simplified exec_toggle_tx_cycle() to only do something while PTT=FALSE and without any dial feedback since dial feedback makes no sense when using such radios.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-rig-ctrl.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-11 08:12:54 UTC (rev 630)
+++ trunk/ChangeLog 2010-07-11 09:22:27 UTC (rev 631)
@@ -2,6 +2,11 @@
* data/satdata:
Synchronise satellite database with Celestrak.
+
+ * src/gtk-rig-ctrl.c:
+ Simplified exec_toggle_tx_cycle() to only do something while PTT=FALSE and
+ without any dial feedback since dial feedback makes no sense when using
+ such radios.
2010-07-09 Alexandru Csete <oz9aec at gmail.com>
Modified: trunk/src/gtk-rig-ctrl.c
===================================================================
--- trunk/src/gtk-rig-ctrl.c 2010-07-11 08:12:54 UTC (rev 630)
+++ trunk/src/gtk-rig-ctrl.c 2010-07-11 09:22:27 UTC (rev 631)
@@ -1603,112 +1603,47 @@
* \param ctrl Pointer to the GtkRigCtrl widget.
*
* This function executes a transmit cycle when the primary device is of RIG_TYPE_TOGGLE_AUTO.
+ * This applies to radios that support split operation (e.g. TX on VHF, RX on UHF) where the
+ * frequency can not be set via CAT while PTT is active.
+ *
+ * If PTT=TRUE we are in TX mode and hence there is nothing to do since the frequency is kept
+ * constant.
+ *
+ * If PTT=FALSE we are in RX mode and we should update the TX frequency by using set_freq_toggle()
+ *
+ * For these kind of radios there is no dial-feedback for the TX frequency.
*/
static void exec_toggle_tx_cycle (GtkRigCtrl *ctrl)
{
gdouble readfreq=0.0, tmpfreq, satfreqd, satfrequ;
gboolean ptt = TRUE;
- gboolean dialchanged = FALSE;
+
- /* Dial feedback:
- If radio device is engaged read frequency from radio and compare it to the
- last set frequency. If different, it means that user has changed frequency
- on the radio dial => update transponder knob
-
- Note: If ctrl->lasttxf = 0.0 the sync has been invalidated (e.g. user pressed "tune")
- and no need to execute the dial feedback.
- */
if (ctrl->engaged && ctrl->conf->ptt) {
ptt = get_ptt (ctrl, ctrl->conf);
}
- if ((ctrl->engaged) && (ctrl->lasttxf > 0.0)) {
-
- if (ptt == TRUE) {
- printf("PTT TRUE\n");
- if (!get_freq_toggle (ctrl, ctrl->conf, &readfreq)) {
- /* error => use a passive value */
- readfreq = ctrl->lasttxf;
- ctrl->errcnt++;
- }
- } else {
- readfreq = ctrl->lasttxf;
- }
-
- if (fabs (readfreq - ctrl->lasttxf) >= 1.0) {
- dialchanged = TRUE;
- printf("Dial Changed\n");
- printf("Readfreq %f\n",readfreq);
- printf("lastfreq %f\n",ctrl->lasttxf);
- /* user might have altered radio frequency => update transponder knob */
- gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreqUp), readfreq);
- ctrl->lasttxf = readfreq;
-
- /* doppler shift; only if we are tracking */
- if (ctrl->tracking) {
- satfrequ = readfreq - ctrl->du + ctrl->conf->loup;
- }
- else {
- satfrequ = readfreq + ctrl->conf->loup;
- }
- gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->SatFreqUp), satfrequ);
-
- /* Follow with downlink if transponder is locked */
- if (ctrl->trsplock) {
- track_uplink (ctrl);
- }
- }
- }
-
- /* now, forward tracking */
- if (dialchanged) {
- /* no need to forward track */
+
+ /* if we are in TX mode do nothing */
+ if (ptt == TRUE) {
return;
}
-
- /* If we are tracking, calculate the radio freq by applying both dopper shift
- and tranverter LO frequency. If we are not tracking, apply only LO frequency.
- */
- satfreqd = gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->SatFreqDown));
- satfrequ = gtk_freq_knob_get_value (GTK_FREQ_KNOB (ctrl->SatFreqUp));
- if (ctrl->tracking) {
- /* downlink */
- gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreqDown),
- satfreqd + ctrl->dd - ctrl->conf->lo);
- /* uplink */
- gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreqUp),
- satfrequ + ctrl->du - ctrl->conf->loup);
- }
- else {
- gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreqDown),
- satfreqd - ctrl->conf->lo);
- gtk_freq_knob_set_value (GTK_FREQ_KNOB (ctrl->RigFreqUp),
- satfrequ - ctrl->conf->loup);
- }
+ /* Get the desired uplink frequency from controller */
tmpfreq = gtk_freq_knob_get_value(GTK_FREQ_KNOB(ctrl->RigFreqUp));
/* if device is engaged, send freq command to radio */
- if ((ctrl->engaged) && (fabs(ctrl->lasttxf - tmpfreq) >= 1.0)) {
+ if ((ctrl->engaged) && (fabs(ctrl->lasttxf - tmpfreq) >= 10.0)) {
if (set_freq_toggle (ctrl, ctrl->conf, tmpfreq)) {
/* reset error counter */
- ctrl->errcnt = 0;
-
- /* give radio a chance to set frequency */
- g_usleep (WR_DEL);
-
- /* The actual frequency migh be different from what we have set because
- the tuning step is larger than what we work with (e.g. FT-817 has a
- smallest tuning step of 10 Hz). Therefore we read back the actual
- frequency from the rig. */
- if (ptt){
- get_freq_toggle (ctrl, ctrl->conf, &tmpfreq);
- }
- ctrl->lasttxf = tmpfreq;
+ ctrl->errcnt = 0;
}
else {
ctrl->errcnt++;
}
+
+ /* store the last sent frequency even if an error occurred */
+ ctrl->lasttxf = tmpfreq;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-07-11 11:07:29
|
Revision: 632
http://gpredict.svn.sourceforge.net/gpredict/?rev=632&view=rev
Author: csete
Date: 2010-07-11 11:07:23 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Added function to set_ptt(). Implemented controller for RIG_TYPE_ROGGLE_MAN (FT-817/857/897 manual TX).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-rig-ctrl.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-11 09:22:27 UTC (rev 631)
+++ trunk/ChangeLog 2010-07-11 11:07:23 UTC (rev 632)
@@ -7,6 +7,8 @@
Simplified exec_toggle_tx_cycle() to only do something while PTT=FALSE and
without any dial feedback since dial feedback makes no sense when using
such radios.
+ Added function to set_ptt().
+ Implemented controller for RIG_TYPE_ROGGLE_MAN (FT-817/857/897 manual TX).
2010-07-09 Alexandru Csete <oz9aec at gmail.com>
Modified: trunk/src/gtk-rig-ctrl.c
===================================================================
--- trunk/src/gtk-rig-ctrl.c 2010-07-11 09:22:27 UTC (rev 631)
+++ trunk/src/gtk-rig-ctrl.c 2010-07-11 11:07:23 UTC (rev 632)
@@ -99,8 +99,8 @@
static void downlink_changed_cb (GtkFreqKnob *knob, gpointer data);
static void uplink_changed_cb (GtkFreqKnob *knob, gpointer data);
static gboolean key_press_cb (GtkWidget *widget, GdkEventKey *pKey, gpointer data);
+static void manage_ptt_event (GtkRigCtrl *ctrl);
-
/* radio control functions */
static void exec_rx_cycle (GtkRigCtrl *ctrl);
static void exec_tx_cycle (GtkRigCtrl *ctrl);
@@ -116,6 +116,7 @@
static gboolean unset_toggle (GtkRigCtrl *ctrl, radio_conf_t *conf);
static gboolean get_freq_toggle (GtkRigCtrl *ctrl, radio_conf_t *conf, gdouble *freq);
static gboolean get_ptt (GtkRigCtrl *ctrl, radio_conf_t *conf);
+static gboolean set_ptt (GtkRigCtrl *ctrl, radio_conf_t *conf, gboolean ptt);
static gboolean set_vfo (GtkRigCtrl *ctrl, vfo_t vfo);
static void update_count_down (GtkRigCtrl *ctrl, gdouble t);
@@ -1168,6 +1169,7 @@
ctrl->lastrxf = 0.0;
switch (ctrl->conf->type) {
case RIG_TYPE_TOGGLE_AUTO:
+ case RIG_TYPE_TOGGLE_MAN:
unset_toggle (ctrl,ctrl->conf);
break;
default:
@@ -1213,17 +1215,11 @@
break;
case RIG_TYPE_TOGGLE_AUTO:
+ case RIG_TYPE_TOGGLE_MAN:
set_toggle (ctrl,ctrl->conf);
exec_toggle_cycle (ctrl);
break;
- case RIG_TYPE_TOGGLE_MAN:
- /** FIXME **/
- sat_log_log (SAT_LOG_LEVEL_BUG,
- _("%s: Controller for RIG_TYPE_TOGGLE_MAN not implemented"),
- __FUNCTION__);
- break;
-
default:
/* this is an error! */
ctrl->conf->type = RIG_TYPE_RX;
@@ -1306,16 +1302,10 @@
break;
case RIG_TYPE_TOGGLE_AUTO:
+ case RIG_TYPE_TOGGLE_MAN:
exec_toggle_cycle (ctrl);
break;
-
- case RIG_TYPE_TOGGLE_MAN:
- /** FIXME **/
- sat_log_log (SAT_LOG_LEVEL_BUG,
- _("%s: Controller for RIG_TYPE_TOGGLE_MAN not implemented"),
- __FUNCTION__);
- break;
-
+
default:
/* invalid mode */
sat_log_log (SAT_LOG_LEVEL_ERROR,
@@ -1591,12 +1581,18 @@
/** \brief Execute toggle mode cycle.
* \param ctrl Pointer to the GtkRigCtrl widget.
*
- * This function executes a controller cycle when the device is of RIG_TYPE_TOGGLE_AUTO.
+ * This function executes a controller cycle when the device is of RIG_TYPE_TOGGLE_AUTO
+ * and RIG_TYPE_TOGGLE_MAN.
*/
static void exec_toggle_cycle (GtkRigCtrl *ctrl)
{
exec_rx_cycle (ctrl);
- exec_toggle_tx_cycle (ctrl);
+
+ /* TX cycle is executed only if user selected RIG_TYPE_TOGGLE_AUTO
+ * In manual mode the TX freq update is performed only when TX isactivated
+ */
+ if (ctrl->conf->type == RIG_TYPE_TOGGLE_AUTO)
+ exec_toggle_tx_cycle (ctrl);
}
/** \brief Execute TX mode cycle.
@@ -1616,7 +1612,7 @@
static void exec_toggle_tx_cycle (GtkRigCtrl *ctrl)
{
- gdouble readfreq=0.0, tmpfreq, satfreqd, satfrequ;
+ gdouble tmpfreq;
gboolean ptt = TRUE;
@@ -2010,6 +2006,87 @@
}
+/** \brief Set PTT status
+ * \param ctrl Pointer to the GtkRigCtrl data
+ * \param conf Pointer to the radio conf data
+ * \param ptt The new PTT value (TRUE=ON, FALSE=OFF)
+ * \return TRUE if the operation was successful, FALSE if an error has occurred
+ */
+static gboolean set_ptt (GtkRigCtrl *ctrl, radio_conf_t *conf, gboolean ptt)
+{
+ gchar *buff;
+ gint written,size;
+ gint status;
+ struct hostent *h;
+ struct sockaddr_in ServAddr;
+ gint sock; /*!< Network socket */
+
+ /* create socket */
+ sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ if (sock < 0) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Failed to create socket"),
+ __FUNCTION__);
+ return FALSE;
+ }
+ else {
+ sat_log_log (SAT_LOG_LEVEL_DEBUG,
+ _("%s: Network socket created successfully"),
+ __FUNCTION__);
+ }
+
+ memset(&ServAddr, 0, sizeof(ServAddr)); /* Zero out structure */
+ ServAddr.sin_family = AF_INET; /* Internet address family */
+ h = gethostbyname(conf->host);
+ memcpy((char *) &ServAddr.sin_addr.s_addr, h->h_addr_list[0], h->h_length);
+ ServAddr.sin_port = htons(conf->port); /* Server port */
+
+ /* establish connection */
+ status = connect(sock, (struct sockaddr *) &ServAddr, sizeof(ServAddr));
+ if (status < 0) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Failed to connect to %s:%d"),
+ __FUNCTION__, conf->host, conf->port);
+ return FALSE;
+ }
+ else {
+ sat_log_log (SAT_LOG_LEVEL_DEBUG,
+ _("%s: Connection opened to %s:%d"),
+ __FUNCTION__, conf->host, conf->port);
+ }
+
+ /* send command */
+ if (ptt == TRUE) {
+ buff = g_strdup_printf ("T 1\x0aq\x0a");
+ }
+ else {
+ buff = g_strdup_printf ("T 0\x0aq\x0a");
+ }
+
+ size = 6;
+ written = send(sock, buff, size, 0);
+ if (written != size) {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: SIZE ERROR %d / %d"),
+ __FUNCTION__, written, size);
+ }
+ g_free (buff);
+
+#ifndef WIN32
+ shutdown (sock, SHUT_RDWR);
+#else
+ shutdown (sock, SD_BOTH);
+#endif
+
+ close (sock);
+
+ ctrl->wrops++;
+
+ return TRUE;
+}
+
+
+
/** \brief Set frequency in simplex mode
* \param ctrl Pointer to the GtkRigCtrl structure.
* \param freq The new frequency.
@@ -3026,21 +3103,25 @@
/* filter GDK_KEY_PRESS events */
if (pKey->type == GDK_KEY_PRESS) {
-
+
switch (pKey->keyval) {
+
/* keyvals not in API docs. See <gdk/gdkkeysyms.h> for a complete list */
case GDK_space:
sat_log_log (SAT_LOG_LEVEL_MSG,
_("%s: Detected SPACEBAR pressed event"),
__FUNCTION__);
+
+ /* manage PTT event */
+ manage_ptt_event (ctrl);
+ event_managed = TRUE;
- event_managed = TRUE;
break;
default:
sat_log_log (SAT_LOG_LEVEL_DEBUG,
- _("%s: Keypress value %i not managed by this function"),
- __FUNCTION__, pKey->keyval);
+ _("%s:%s: Keypress value %i not managed by this function"),
+ __FILE__, __FUNCTION__, pKey->keyval);
break;
}
@@ -3048,3 +3129,81 @@
return event_managed;
}
+
+
+/** \brief Maange PTT events
+ * \param ctrl Pointer to the radio controller data
+ *
+ * This function is used to manage PTT events, e.g. the user presses
+ * the spacebar. It is only useful for RIG_TYPE_TOGGLE_MAN.
+ *
+ * First, the function will try to lock the controller. If the lock is acquired
+ * the function checks the current PTT status.
+ * If PTT status is FALSE (off), it will set the TX frequency and set PTT to TRUE (on).
+ * If PTT status is TRUE (on) it will simply set the PTT to FALSE (off).
+ *
+ * \warning This function assumes that the radio supprot set/get PTT, otherwise
+ * ot makes no sense to use it!
+ */
+static void manage_ptt_event (GtkRigCtrl *ctrl)
+{
+ guint timeout = 1;
+ gboolean ptt = FALSE;
+
+
+ /* wait for controller to be idle or until the timeout triggers */
+ while (timeout < 5) {
+ if (g_static_mutex_trylock(&(ctrl->busy)) == TRUE) {
+ timeout = 17; /* use an arbitrary value that is large enough */
+ }
+ else {
+ /* wait for 100 msec */
+ g_usleep (100000);
+ timeout++;
+ }
+ }
+
+ if (timeout == 17) {
+ /* timeout did not expire, we've got the controller lock */
+ sat_log_log (SAT_LOG_LEVEL_DEBUG,
+ _("%s: Acquired controller lock"),
+ __FUNCTION__);
+
+ if (ctrl->engaged == FALSE) {
+ sat_log_log (SAT_LOG_LEVEL_MSG,
+ _("%s: Controller not engaged; PTT event ignored (Hint: Enable the Engage button)"),
+ __FUNCTION__);
+ }
+ else {
+
+ ptt = get_ptt (ctrl, ctrl->conf);
+
+ if (ptt == FALSE) {
+ /* PTT is OFF => set TX freq then set PTT to ON */
+ sat_log_log (SAT_LOG_LEVEL_DEBUG,
+ _("%s: PTT is OFF => Set TX freq and PTT=ON"),
+ __FUNCTION__);
+
+ exec_toggle_tx_cycle (ctrl);
+ set_ptt(ctrl, ctrl->conf, TRUE);
+ }
+ else {
+ /* PTT is ON => set to OFF */
+ sat_log_log (SAT_LOG_LEVEL_DEBUG,
+ _("%s: PTT is ON = Set PTT=OFF"),
+ __FUNCTION__);
+
+ set_ptt(ctrl, ctrl->conf, FALSE);
+ }
+ }
+
+ /* release controller lock */
+ g_static_mutex_unlock(&(ctrl->busy));
+ }
+ else {
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s: Failed to acquire controller lock; PTT event not handled"),
+ __FUNCTION__);
+ }
+
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-07-11 11:27:22
|
Revision: 633
http://gpredict.svn.sourceforge.net/gpredict/?rev=633&view=rev
Author: csete
Date: 2010-07-11 11:27:16 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Updated RIG_TYPE_TOGGLE_AUTO controller to perform TX frequency update only once every 10 seconds.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-rig-ctrl.c
trunk/src/gtk-rig-ctrl.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-11 11:07:23 UTC (rev 632)
+++ trunk/ChangeLog 2010-07-11 11:27:16 UTC (rev 633)
@@ -10,7 +10,12 @@
Added function to set_ptt().
Implemented controller for RIG_TYPE_ROGGLE_MAN (FT-817/857/897 manual TX).
+ * src/gtk-rig-ctrl.c:
+ * src/gtk-rig-ctrl.h:
+ Updated RIG_TYPE_TOGGLE_AUTO controller to perform TX frequency update only
+ once every 10 seconds.
+
2010-07-09 Alexandru Csete <oz9aec at gmail.com>
* src/radio-conf.h:
Modified: trunk/src/gtk-rig-ctrl.c
===================================================================
--- trunk/src/gtk-rig-ctrl.c 2010-07-11 11:07:23 UTC (rev 632)
+++ trunk/src/gtk-rig-ctrl.c 2010-07-11 11:27:16 UTC (rev 633)
@@ -204,6 +204,7 @@
ctrl->errcnt = 0;
ctrl->lastrxf = 0.0;
ctrl->lasttxf = 0.0;
+ ctrl->last_toggle_tx = -1;
}
static void gtk_rig_ctrl_destroy (GtkObject *object)
@@ -1217,6 +1218,7 @@
case RIG_TYPE_TOGGLE_AUTO:
case RIG_TYPE_TOGGLE_MAN:
set_toggle (ctrl,ctrl->conf);
+ ctrl->last_toggle_tx = -1;
exec_toggle_cycle (ctrl);
break;
@@ -1589,10 +1591,24 @@
exec_rx_cycle (ctrl);
/* TX cycle is executed only if user selected RIG_TYPE_TOGGLE_AUTO
- * In manual mode the TX freq update is performed only when TX isactivated
+ * In manual mode the TX freq update is performed only when TX is activated.
+ * Even in auto mode, the toggling is performed only once every 10 seconds.
*/
- if (ctrl->conf->type == RIG_TYPE_TOGGLE_AUTO)
- exec_toggle_tx_cycle (ctrl);
+ if (ctrl->conf->type == RIG_TYPE_TOGGLE_AUTO) {
+
+ GTimeVal current_time;
+
+ /* get the current time */
+ g_get_current_time (¤t_time);
+
+ if ((ctrl->last_toggle_tx == -1) || ((current_time.tv_sec - ctrl->last_toggle_tx) >= 10)) {
+ /* it's time to update TX freq */
+ exec_toggle_tx_cycle (ctrl);
+
+ /* store current time */
+ ctrl->last_toggle_tx = current_time.tv_sec;
+ }
+ }
}
/** \brief Execute TX mode cycle.
Modified: trunk/src/gtk-rig-ctrl.h
===================================================================
--- trunk/src/gtk-rig-ctrl.h 2010-07-11 11:07:23 UTC (rev 632)
+++ trunk/src/gtk-rig-ctrl.h 2010-07-11 11:27:16 UTC (rev 633)
@@ -106,6 +106,9 @@
gdouble lasttxf; /*!< Last frequency sent to tranmitter. */
gdouble du,dd; /*!< Last computed up/down Doppler shift; computed in update() */
+ glong last_toggle_tx; /*!< Last time when exec_toggle_tx_cycle() was executed (seconds)
+ -1 indicates that an update should be performed ASAP */
+
/* debug related */
guint wrops;
guint rdops;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-07-11 11:52:17
|
Revision: 634
http://gpredict.svn.sourceforge.net/gpredict/?rev=634&view=rev
Author: csete
Date: 2010-07-11 11:52:10 +0000 (Sun, 11 Jul 2010)
Log Message:
-----------
Automatically set PTT type for RIG_TYPE_TOGGLE_AUTO and RIG_TYPE_TOGGLE_MAN.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/sat-pref-rig-editor.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-11 11:27:16 UTC (rev 633)
+++ trunk/ChangeLog 2010-07-11 11:52:10 UTC (rev 634)
@@ -14,6 +14,9 @@
* src/gtk-rig-ctrl.h:
Updated RIG_TYPE_TOGGLE_AUTO controller to perform TX frequency update only
once every 10 seconds.
+
+ * src/sat-pref-rig-editor.c:
+ Automatically set PTT type for RIG_TYPE_TOGGLE_AUTO and RIG_TYPE_TOGGLE_MAN.
2010-07-09 Alexandru Csete <oz9aec at gmail.com>
Modified: trunk/src/sat-pref-rig-editor.c
===================================================================
--- trunk/src/sat-pref-rig-editor.c 2010-07-11 11:27:16 UTC (rev 633)
+++ trunk/src/sat-pref-rig-editor.c 2010-07-11 11:52:10 UTC (rev 634)
@@ -533,7 +533,10 @@
type_changed (GtkWidget *widget, gpointer data)
{
/* PTT consistency */
- if (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == RIG_TYPE_TRX) {
+ if ((gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == RIG_TYPE_TRX) ||
+ (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == RIG_TYPE_TOGGLE_AUTO) ||
+ (gtk_combo_box_get_active (GTK_COMBO_BOX (widget)) == RIG_TYPE_TOGGLE_MAN))
+ {
if (gtk_combo_box_get_active (GTK_COMBO_BOX (ptt)) == PTT_TYPE_NONE) {
gtk_combo_box_set_active (GTK_COMBO_BOX (ptt), PTT_TYPE_CAT);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-07-12 09:34:24
|
Revision: 638
http://gpredict.svn.sourceforge.net/gpredict/?rev=638&view=rev
Author: csete
Date: 2010-07-12 09:34:16 +0000 (Mon, 12 Jul 2010)
Log Message:
-----------
Require GooCanvas 0.15. Updated dependencies to match Ubuntu 9.10 Karmic.
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-12 08:53:24 UTC (rev 637)
+++ trunk/ChangeLog 2010-07-12 09:34:16 UTC (rev 638)
@@ -3,7 +3,10 @@
* src/mod-mgr.c:
Allow docked modules to be reordered by dragging the tabs.
+ * src/configure-ac:
+ Require GooCanvas 0.15. Updated dependencies to match Ubuntu 9.10 Karmic.
+
2010-07-11 Alexandru Csete <oz9aec at gmail.com>
* data/satdata:
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-07-12 08:53:24 UTC (rev 637)
+++ trunk/configure.ac 2010-07-12 09:34:16 UTC (rev 638)
@@ -21,7 +21,7 @@
fi
dnl check for glib, gtk, and goocanvas libraries
-pkg_modules="gtk+-2.0 >= 2.12.0 glib-2.0 >= 2.16.0 gthread-2.0 >= 2.14.0 goocanvas >= 0.9 libcurl >= 7.16.0"
+pkg_modules="gtk+-2.0 >= 2.18.0 glib-2.0 >= 2.22.0 gthread-2.0 >= 2.22.0 goocanvas >= 0.15 libcurl >= 7.19.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-07-12 21:19:28
|
Revision: 646
http://gpredict.svn.sourceforge.net/gpredict/?rev=646&view=rev
Author: csete
Date: 2010-07-12 21:19:22 +0000 (Mon, 12 Jul 2010)
Log Message:
-----------
Added satellite tooltips in map view showing current SSP Lat, Lon, Az, El and time to AOS/LOS.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-map.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-12 19:46:48 UTC (rev 645)
+++ trunk/ChangeLog 2010-07-12 21:19:22 UTC (rev 646)
@@ -21,7 +21,11 @@
* src/gtk-polar-view.c:
Added satellite tooltips showing current Az, El and time to LOS.
+ * src/gtk-sat-map.c:
+ Added satellite tooltips in map view showing current SSP Lat, Lon, Az, El
+ and time to AOS/LOS.
+
2010-07-11 Alexandru Csete <oz9aec at gmail.com>
* data/satdata:
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-07-12 19:46:48 UTC (rev 645)
+++ trunk/NEWS 2010-07-12 21:19:22 UTC (rev 646)
@@ -7,6 +7,7 @@
- Sky at a glance is now more interactive. Show pass summary when mouse hovers over pass and
click on pass shows the details.
- Added satellite tooltips in polar view showing current Az, El and time to LOS.
+- Added satellite tooltips in map view showing current SSP Lat, Lon, Az, El and time to AOS/LOS.
* Feature request 2866570: Set operating mode via CAT.
* Feature request 2873824: Flip Passes.
* Feature request 2778735: Visual indicator for RX/TX/TRX.
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2010-07-12 19:46:48 UTC (rev 645)
+++ trunk/src/gtk-sat-map.c 2010-07-12 21:19:22 UTC (rev 646)
@@ -102,6 +102,7 @@
static void update_selected (GtkSatMap *satmap, sat_t *sat);
static void draw_grid_lines (GtkSatMap *satmap, GooCanvasItemModel *root);
static void redraw_grid_lines (GtkSatMap *satmap);
+static gchar *aoslos_time_to_str (GtkSatMap *satmap, sat_t *sat);
static GtkVBoxClass *parent_class = NULL;
static GooCanvasPoints *points1;
@@ -252,6 +253,7 @@
/* create the canvas */
GTK_SAT_MAP (satmap)->canvas = goo_canvas_new ();
+ g_object_set (G_OBJECT (GTK_SAT_MAP (satmap)->canvas), "has-tooltip", TRUE, NULL);
/* safely load a background map */
load_map_file (GTK_SAT_MAP (satmap));
@@ -1656,6 +1658,7 @@
gint *catnum;
guint32 col,covcol,shadowcol;
gfloat x,y;
+ gchar *tooltip;
/* get satellite and SSP */
catnum = g_new0 (gint, 1);
@@ -1696,7 +1699,17 @@
MOD_CFG_MAP_SHADOW_ALPHA,
SAT_CFG_INT_MAP_SHADOW_ALPHA);
+ /* create tooltip */
+ tooltip = g_strdup_printf("<big><b>%s</b>\n</big>"\
+ "<tt>Lon: %5.1f\302\260\n" \
+ "Lat: %5.1f\302\260\n" \
+ " Az: %5.1f\302\260\n" \
+ " El: %5.1f\302\260</tt>",
+ sat->nickname,
+ sat->ssplon, sat->ssplat,
+ sat->az, sat->el);
+
/* create satellite marker and label + shadows. We create shadows first */
obj->shadowm = goo_canvas_rect_model_new (root,
x - MARKER_SIZE_HALF + 1,
@@ -1713,6 +1726,7 @@
2 * MARKER_SIZE_HALF,
"fill-color-rgba", col,
"stroke-color-rgba", col,
+ "tooltip", tooltip,
NULL);
obj->shadowl = goo_canvas_text_model_new (root, sat->nickname,
@@ -1730,8 +1744,10 @@
GTK_ANCHOR_NORTH,
"font", "Sans 8",
"fill-color-rgba", col,
+ "tooltip", tooltip,
NULL);
+ g_free (tooltip);
g_object_set_data (G_OBJECT (obj->marker), "catnum", GINT_TO_POINTER (*catnum));
g_object_set_data (G_OBJECT (obj->label), "catnum", GINT_TO_POINTER (*catnum));
@@ -1799,6 +1815,8 @@
GooCanvasItemModel *root;
gint idx;
guint32 col,covcol;
+ gchar *tooltip;
+ gchar *aosstr;
//gdouble sspla,ssplo;
@@ -1835,6 +1853,23 @@
//sat->ssplon = ssplo;
//sat->ssplat = sspla;
+ /* we update tooltips every time */
+ aosstr = aoslos_time_to_str(satmap, sat);
+ tooltip = g_strdup_printf("<big><b>%s</b>\n</big>"\
+ "<tt>Lon: %5.1f\302\260\n" \
+ "Lat: %5.1f\302\260\n" \
+ " Az: %5.1f\302\260\n" \
+ " El: %5.1f\302\260\n" \
+ "%s</tt>",
+ sat->nickname,
+ sat->ssplon, sat->ssplat,
+ sat->az, sat->el,
+ aosstr);
+ g_object_set (obj->marker, "tooltip", tooltip, NULL);
+ g_object_set (obj->label, "tooltip", tooltip, NULL);
+ g_free (tooltip);
+ g_free (aosstr);
+
lonlat_to_xy (satmap, sat->ssplon, sat->ssplat, &x, &y);
/* update only if satellite has moved at least
@@ -2312,3 +2347,42 @@
GTK_SAT_MAP (satmap)->ncat = 0;
}
+
+
+/** \brief Convert AOS or LOS timestamp to human readable countdown string */
+static gchar *aoslos_time_to_str (GtkSatMap *satmap, sat_t *sat)
+{
+ guint h,m,s;
+ gdouble number, now;
+ gchar *text = NULL;
+
+
+ now = satmap->tstamp;//get_current_daynum ();
+ if (sat->el > 0.0) {
+ number = sat->los - now;
+ }
+ else {
+ number = sat->aos - now;
+ }
+
+ /* convert julian date to seconds */
+ s = (guint) (number * 86400);
+
+ /* extract hours */
+ h = (guint) floor (s/3600);
+ s -= 3600*h;
+
+ /* extract minutes */
+ m = (guint) floor (s/60);
+ s -= 60*m;
+
+
+ if (sat->el > 0.0) {
+ text = g_strdup_printf (_("LOS in %d minutes"), m+60*h);
+ }
+ else {
+ text = g_strdup_printf (_("AOS in %d minutes"), m+60*h);
+ }
+
+ return text;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-08-21 06:55:06
|
Revision: 647
http://gpredict.svn.sourceforge.net/gpredict/?rev=647&view=rev
Author: csete
Date: 2010-08-21 06:55:00 +0000 (Sat, 21 Aug 2010)
Log Message:
-----------
Applied patch 3050047: Improve sat search and prediction of upcoming passes (Thanks to Patrick Strasser OE6PSE).
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-selector.c
trunk/src/predict-tools.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-07-12 21:19:22 UTC (rev 646)
+++ trunk/ChangeLog 2010-08-21 06:55:00 UTC (rev 647)
@@ -1,5 +1,16 @@
-2010-07-12 alexandru Csete >oz9aec at gmail.com>
+2010-08-21 Alexandru Csete <oz9aec at gmail.com>
+ * src/gtk-sat-selector.c:
+ Applied patch 3050047 from Patrick Strasser OE6PSE to improve searching
+ in the satellite selector.
+
+ * src/predict-tools.c:
+ Applied patch 3050047 from Patrick Strasser OE6PSE to include current
+ pass in the list of future passes.
+
+
+2010-07-12 Alexandru Csete <oz9aec at gmail.com>
+
* src/mod-mgr.c:
Allow docked modules to be reordered by dragging the tabs.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-07-12 21:19:22 UTC (rev 646)
+++ trunk/NEWS 2010-08-21 06:55:00 UTC (rev 647)
@@ -39,6 +39,7 @@
- Applied patch 3005548: Cut and Paste Error In print_pass.h (Thanks to Charles Suprin AA1VS).
- Applied patch 3009725: Delete Explicit Call to gtk_set_locale (Thanks to Charles Suprin AA1VS).
- Applied patch 3009727: Free satellite hash references (Thanks to Charles Suprin AA1VS).
+- Applied patch 3050047: Improve sat search and prediction of upcoming passes (Thanks to Patrick Strasser OE6PSE)
- Slightly improved UI for the single-satellite view.
- Command line options for cleaning user's TLE and transponder data, see --help for list.
- Satellite Map: Added shadow to satellite marker and label to enhance visual appearance
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2010-07-12 21:19:22 UTC (rev 646)
+++ trunk/src/gtk-sat-selector.c 2010-08-21 06:55:00 UTC (rev 647)
@@ -28,6 +28,7 @@
/** \brief Satellite selector.
*
*/
+#include "string.h"
#include <gtk/gtk.h>
#include <glib/gi18n.h>
#ifdef HAVE_CONFIG_H
@@ -39,13 +40,13 @@
#include "compat.h"
#include "sat-cfg.h"
#include "gtk-sat-selector.h"
+#include "gtk-sat-tree.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);
@@ -83,7 +84,37 @@
/** \brief GtkSatSelector specific signals. */
static guint gtksatsel_signals[LAST_SIGNAL] = { 0 };
+gboolean gtk_sat_selector_search_equal_func (GtkTreeModel *model,
+ gint column,
+ const gchar *key,
+ GtkTreeIter *iter,
+ gpointer search_data)
+{
+ gchar *name = NULL;
+ gchar *match;
+ gchar *NULLSTR = "NULL";
+ gtk_tree_model_get(model, iter, GTK_SAT_TREE_COL_NAME, &name, -1);
+ /* sat_log_log(SAT_LOG_LEVEL_MSG, "%s: key %s, name %s", */
+ /* __FUNCTION__, */
+ /* key, */
+ /* (name==NULL) ? NULLSTR : name); */
+ if (name == NULL){
+ sat_log_log(SAT_LOG_LEVEL_MSG, "%s:%s: name is NULL", __FILE__, __FUNCTION__);
+ return TRUE;
+ }
+ match = strstr(name, key);
+
+ if (match == NULL) {
+ //sat_log_log(SAT_LOG_LEVEL_BUG, "%s: no match", __FUNCTION__);
+ return TRUE;
+ }
+ else {
+ //sat_log_log(SAT_LOG_LEVEL_BUG, "%s: MATCH at %s", __FUNCTION__, match);
+ return FALSE;
+ }
+}
+
GType gtk_sat_selector_get_type ()
{
static GType gtk_sat_selector_type = 0;
@@ -293,6 +324,10 @@
/* 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_tree_view_set_search_equal_func(GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree),
+ gtk_sat_selector_search_equal_func,
+ NULL,
+ NULL);
gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 4, 0, 1,
GTK_SHRINK, GTK_SHRINK, 0, 0);
Modified: trunk/src/predict-tools.c
===================================================================
--- trunk/src/predict-tools.c 2010-07-12 21:19:22 UTC (rev 646)
+++ trunk/src/predict-tools.c 2010-08-21 06:55:00 UTC (rev 647)
@@ -445,7 +445,20 @@
*/
while (!done) {
+ /* Find los of next pass or of current pass */
+ los = find_los (sat, qth, t0, maxdt); // See if a pass is ongoing
aos = find_aos (sat, qth, t0, maxdt);
+ /* sat_log_log(SAT_LOG_LEVEL_MSG, "%s:%s:%d: found aos %f and los %f for t0=%f", */
+ /* __FILE__, */
+ /* __FUNCTION__, */
+ /* __LINE__, */
+ /* aos, */
+ /* los, */
+ /* t0); */
+ if (aos > los) {
+ // los is from an currently happening pass, find previous aos
+ aos = find_prev_aos(sat, qth, t0);
+ }
/* aos = 0.0 means no aos */
if (aos == 0.0) {
@@ -459,7 +472,7 @@
done = TRUE;
}
else {
- los = find_los (sat, qth, aos + 0.001, maxdt); // +1.5 min later
+ //los = find_los (sat, qth, aos + 0.001, maxdt); // +1.5 min later
dt = los - aos;
/* get time step, which will give us the max number of entries */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-10-12 09:54:47
|
Revision: 671
http://gpredict.svn.sourceforge.net/gpredict/?rev=671&view=rev
Author: csete
Date: 2010-10-12 09:54:41 +0000 (Tue, 12 Oct 2010)
Log Message:
-----------
Move unimplemented stuff from NEWS to TODO.
Modified Paths:
--------------
trunk/NEWS
trunk/TODO
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-10-12 09:53:05 UTC (rev 670)
+++ trunk/NEWS 2010-10-12 09:54:41 UTC (rev 671)
@@ -1,17 +1,11 @@
-Changes in version 1.2 (TBD)
+Changes in version 1.2 (12 Oct 2010)
-* New satellite editor to manually add/edit/delete satellite data.
-* New transponder editor to edit transponder data.
- New layout engine that allows any combination of views to be created in a NxM grid.
Closes feature request 2821408.
- Sky at a glance is now more interactive. Show pass summary when mouse hovers over pass and
click on pass shows the details.
- Added satellite tooltips in polar view showing current Az, El and time to LOS.
- Added satellite tooltips in map view showing current SSP Lat, Lon, Az, El and time to AOS/LOS.
-* Feature request 2866570: Set operating mode via CAT.
-* Feature request 2873824: Flip Passes.
-* Feature request 2778735: Visual indicator for RX/TX/TRX.
-* Feature request 2689352: Mutual Contact Window AOS/LOS.
- Fixed bug 2877974: Incorrect uplink Doppler.
- Fixed bug 2918672: Trailing whitespace and newline in satellite names.
- Fixed bug 2914679: Unable to save Future passes.
Modified: trunk/TODO
===================================================================
--- trunk/TODO 2010-10-12 09:53:05 UTC (rev 670)
+++ trunk/TODO 2010-10-12 09:54:41 UTC (rev 671)
@@ -1,5 +1,11 @@
Future plans for gpredict development include:
+* New satellite editor to manually add/edit/delete satellite data.
+* New transponder editor to edit transponder data.
+* Feature request 2866570: Set operating mode via CAT.
+* Feature request 2873824: Flip Passes.
+* Feature request 2778735: Visual indicator for RX/TX/TRX.
+* Feature request 2689352: Mutual Contact Window AOS/LOS.
* Show day/night on satmap.
* Added new Satellite Editor that allows adding/editing/deleting satellite
data in a convenient UI, including...
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-10-16 09:22:38
|
Revision: 682
http://gpredict.svn.sourceforge.net/gpredict/?rev=682&view=rev
Author: csete
Date: 2010-10-16 09:22:32 +0000 (Sat, 16 Oct 2010)
Log Message:
-----------
Diasbled legacy code.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/time-tools.c
trunk/src/time-tools.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-10-15 22:53:52 UTC (rev 681)
+++ trunk/ChangeLog 2010-10-16 09:22:32 UTC (rev 682)
@@ -1,3 +1,9 @@
+2010-10-16 Alexandru Csete <oz9aec at gmail.com>
+
+ * src/time-tools.[ch]:
+ Disabled legacy code.
+
+
2010-10-15 Alexandru Csete <oz9aec at gmail.com>
* src/gtk-sky-glance.[ch]:
Modified: trunk/src/time-tools.c
===================================================================
--- trunk/src/time-tools.c 2010-10-15 22:53:52 UTC (rev 681)
+++ trunk/src/time-tools.c 2010-10-16 09:22:32 UTC (rev 682)
@@ -63,10 +63,11 @@
}
+/* This function calculates the day number from m/d/y. */
+/* Legacy code no longer in use
long
get_daynum_from_dmy (int d, int m, int y)
{
- /* This function calculates the day number from m/d/y. */
long dn;
double mm, yy;
@@ -87,3 +88,4 @@
return dn;
}
+*/
Modified: trunk/src/time-tools.h
===================================================================
--- trunk/src/time-tools.h 2010-10-15 22:53:52 UTC (rev 681)
+++ trunk/src/time-tools.h 2010-10-16 09:22:32 UTC (rev 682)
@@ -29,7 +29,7 @@
#define TIME_TOOLS_H 1
gdouble get_current_daynum (void);
-long get_daynum_from_dmy (int d, int m, int y);
+//long get_daynum_from_dmy (int d, int m, int y);
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-10-16 13:28:18
|
Revision: 687
http://gpredict.svn.sourceforge.net/gpredict/?rev=687&view=rev
Author: csete
Date: 2010-10-16 13:28:12 +0000 (Sat, 16 Oct 2010)
Log Message:
-----------
Updated.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-10-16 13:27:53 UTC (rev 686)
+++ trunk/ChangeLog 2010-10-16 13:28:12 UTC (rev 687)
@@ -2,6 +2,15 @@
* src/time-tools.[ch]:
Disabled legacy code.
+
+ * src/gtk-sat-module.[ch]:
+ Store references to GtkSkyGlance widget and window the same way as we
+ store references to GtkRigCtrl and GtkRotCtrl.
+ Automatically refresh GtkSkyGlance every 60 seconds.
+
+ * src/gtk-sat-module-popup.c:
+ Allow only one GtkSkyGlance widget per module (consistent with
+ GtkRigCtrl and GtkRotCtrl).
2010-10-15 Alexandru Csete <oz9aec at gmail.com>
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-10-16 13:27:53 UTC (rev 686)
+++ trunk/NEWS 2010-10-16 13:28:12 UTC (rev 687)
@@ -1,3 +1,8 @@
+Changes in version 1.3 (TBD)
+
+- Automatically refresh the Sky at a glance view every minute.
+
+
Changes in version 1.2 (12 Oct 2010)
- New layout engine that allows any combination of views to be created in a NxM grid.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-11-07 08:56:18
|
Revision: 711
http://gpredict.svn.sourceforge.net/gpredict/?rev=711&view=rev
Author: csete
Date: 2010-11-07 08:56:11 +0000 (Sun, 07 Nov 2010)
Log Message:
-----------
Added explicit check for libm (required for FC13 and later).
Modified Paths:
--------------
trunk/ChangeLog
trunk/configure.ac
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-11-07 01:08:13 UTC (rev 710)
+++ trunk/ChangeLog 2010-11-07 08:56:11 UTC (rev 711)
@@ -1,3 +1,9 @@
+2010-11-07 Alexandru Csete <oz9aec at gmail.com>
+
+ * configura.ac:
+ Added implicit check for libm (required on Fedora core 13 and later).
+
+
2010-11-06 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-rot-ctrl.c
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-11-07 01:08:13 UTC (rev 710)
+++ trunk/configure.ac 2010-11-07 08:56:11 UTC (rev 711)
@@ -20,6 +20,9 @@
CFLAGS="${CFLAGS} -Wall"
fi
+dnl check for libm
+AC_CHECK_LIB([m], [sin],, AC_MSG_ERROR([Can't find libm. Check your libc installation]))
+
dnl check for glib, gtk, and goocanvas libraries
pkg_modules="gtk+-2.0 >= 2.18.0 glib-2.0 >= 2.22.0 gthread-2.0 >= 2.22.0 goocanvas >= 0.15 libcurl >= 7.19.0"
PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2010-12-26 16:18:02
|
Revision: 725
http://gpredict.svn.sourceforge.net/gpredict/?rev=725&view=rev
Author: csete
Date: 2010-12-26 16:17:56 +0000 (Sun, 26 Dec 2010)
Log Message:
-----------
Removed dead code which was nonsense anyway.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-map.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-12-11 12:22:43 UTC (rev 724)
+++ trunk/ChangeLog 2010-12-26 16:17:56 UTC (rev 725)
@@ -1,3 +1,8 @@
+2010-12-26 Alexandru Csete <oz9aec at gmail.com>
+
+ * src/gtk-sat-map.c:
+ Removed dead code in coordinate conversion (it was nonsense anyway).
+
2010-12-10 Charles Suprin <hamaa1vs at gmail.com>
* data/locations.dat
@@ -11,7 +16,7 @@
2010-11-24 Alexandru Csete <oz9aec at gmail.com>
* src/Makefile.am:
- Fixed PACKAGE_OCALE_DIR.
+ Fixed PACKAGE_LOCALE_DIR.
2010-11-23 Charles Suprin <hamaa1vs at gmail.com>
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2010-12-11 12:22:43 UTC (rev 724)
+++ trunk/src/gtk-sat-map.c 2010-12-26 16:17:56 UTC (rev 725)
@@ -723,16 +723,12 @@
* \param x The X coordinate on the screen (left to right)
* \param y The Y coordinate on the screen (top to bottom)
*
+ * Assumes that -180 <= lon <= 180 and -90 <= lat <= 90
*/
static void
lonlat_to_xy (GtkSatMap *p, gdouble lon, gdouble lat, gfloat *x, gfloat *y)
{
- *x = p->x0 + (180.0 - lon) * p->width / 360.0;
- if (*x < 0.0) /* west longitude */
- *x *= -1;
- else /* east longitude */
- *x = p->x0 + (180.0 + lon) * p->width / 360.0;
-
+ *x = p->x0 + (180.0 + lon) * p->width / 360.0;
*y = p->y0 + (90.0 - lat) * p->height / 180.0;;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2010-12-26 17:49:14
|
Revision: 726
http://gpredict.svn.sourceforge.net/gpredict/?rev=726&view=rev
Author: aa1vs
Date: 2010-12-26 17:49:08 +0000 (Sun, 26 Dec 2010)
Log Message:
-----------
Lead satellite when pointing rotator.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-rot-ctrl.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-12-26 16:17:56 UTC (rev 725)
+++ trunk/ChangeLog 2010-12-26 17:49:08 UTC (rev 726)
@@ -1,3 +1,9 @@
+2010-12-26 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-rot-ctrl.c
+ Make rotator lead satellite on update.
+ Restructure error handling for cleaner code.
+
2010-12-26 Alexandru Csete <oz9aec at gmail.com>
* src/gtk-sat-map.c:
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2010-12-26 16:17:56 UTC (rev 725)
+++ trunk/src/gtk-rot-ctrl.c 2010-12-26 17:49:08 UTC (rev 726)
@@ -867,11 +867,14 @@
{
GtkRotCtrl *ctrl = GTK_ROT_CTRL (data);
gdouble rotaz=0.0, rotel=0.0;
- gdouble setaz,setel;
+ gdouble setaz=0.0, setel=0.0;
gchar *text;
gboolean error = FALSE;
gboolean update_flag=FALSE;
sat_t sat_working, *sat;
+ /*parameters for path predictions*/
+ gdouble time_delta;
+ gdouble step_size;
if (g_static_mutex_trylock(&(ctrl->busy))==FALSE) {
@@ -904,24 +907,21 @@
setel=ctrl->target->el;
update_flag=TRUE;
}
- if (update_flag){
- /* if this is a flipped pass and the rotor supports it*/
- if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){
- setel=180-setel;
- if (setaz>180)
- setaz-=180;
- else
- setaz+=180;
- }
-
- if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) {
- gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), setaz- 360.0);
- }
- else {
- gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), setaz);
- }
- gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), setel);
+ /* if this is a flipped pass and the rotor supports it*/
+ if ((ctrl->flipped)&&(ctrl->conf->maxel>=180.0)){
+ setel=180-setel;
+ if (setaz>180)
+ setaz-=180;
+ else
+ setaz+=180;
}
+ if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) {
+ setaz = setaz- 360.0;
+ }
+
+ } else {
+ setaz = gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet));
+ setel = gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet));
}
if ((ctrl->engaged) && (ctrl->conf != NULL)) {
@@ -953,14 +953,83 @@
}
/* if tolerance exceeded */
- setaz = gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet));
- setel = gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet));
if ((fabs(setaz-rotaz) > ctrl->tolerance) ||
(fabs(setel-rotel) > ctrl->tolerance)) {
-
+
+ if (ctrl->tracking){
+ /*if we are in a pass try to lead the satellite
+ some so we are not always chasing it*/
+ if (ctrl->target->el>0.0) {
+ /*starting the rotator moving while we do some computation can lead to errors later*/
+ /*
+ compute a time in the future when the position is
+ within tolerance so and send the rotor there.
+ */
+
+ /*use a working copy so data does not get corrupted*/
+ sat=memcpy(&(sat_working),ctrl->target,sizeof(sat_t));
+
+ /*
+ compute az/el in the future that is past end of pass
+ or exceeds tolerance
+ */
+ if (ctrl->pass) {
+ /* the next point is before the end of the pass
+ if there is one.*/
+ time_delta=ctrl->pass->los-ctrl->t;
+ } else {
+ /* otherwise look 20 minutes into the future*/
+ time_delta=1.0/72.0;
+ }
+
+ step_size = time_delta / 2.0;
+
+ /*
+ find a time when satellite is above horizon and at the
+ edge of tolerance. the final step size needs to be smaller
+ than delay. otherwise the az/el could be further away than
+ tolerance the next time we enter the loop and we end up
+ pushing ourselves away from the satellite.
+ */
+ while (step_size > (ctrl->delay/1000.0/4.0/(secday))) {
+ predict_calc (sat,ctrl->qth,ctrl->t+time_delta);
+ /*update sat->az and sat->el to account for flips and az range*/
+ if ((ctrl->flipped) && (ctrl->conf->maxel >= 180.0)){
+ sat->el = 180.0-sat->el;
+ if (sat->az > 180.0)
+ sat->az -= 180.0;
+ else
+ sat->az += 180.0;
+ }
+ if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz > 180.0)) {
+ sat->az = sat->az - 360.0;
+ }
+ if ((sat->el < 0.0)||(sat->el > 180.0)||
+ (fabs(setaz - sat->az) > (ctrl->tolerance)) ||
+ (fabs(setel - sat->el) > (ctrl->tolerance))) {
+ time_delta -= step_size;
+ } else {
+ time_delta += step_size;
+ }
+ step_size /= 2.0;
+ }
+ setel = sat->el;
+ if (setel < 0.0) {
+ setel = 0.0;
+ }
+ if (setel > 180.0) {
+ setel = 180.0;
+ }
+ setaz = sat->az;
+ }
+ }
/* send controller values to rotator device */
+ /* this is the newly computed value which should be ahead of the current position */
if (!set_pos (ctrl, setaz, setel)) {
error = TRUE;
+ } else {
+ gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->AzSet), setaz);
+ gtk_rot_knob_set_value (GTK_ROT_KNOB (ctrl->ElSet), setel);
}
}
@@ -999,7 +1068,7 @@
/* update controller circle on polar plot */
if (ctrl->conf !=NULL){
- if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (rotaz < 0.0)) {
+ if ((ctrl->conf->aztype == ROT_AZ_TYPE_180) && (setaz < 0.0)) {
gtk_polar_plot_set_ctrl_pos (GTK_POLAR_PLOT (ctrl->plot),
gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->AzSet))+360.0,
gtk_rot_knob_get_value (GTK_ROT_KNOB (ctrl->ElSet)));
@@ -1100,12 +1169,57 @@
if (retcode==TRUE){
retval=(gint)g_strtod(buffback+4,NULL);
+ /*treat errors as soft errors unless there is good reason*/
+ /*good reasons come from operator experience or documentation*/
switch(retval) {
case 0:
/*no error case*/
break;
+ case -1:
+ /*RIG_EINVAL error*/
+ /*
+ Returned by gs232 (-m 601) driver when value sent to
+ rotator outside configured range.
+ Based on author's experiment.
+ */
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s:%d: rotctld returned error %d (%s). Check the limits in your configuration."),
+ __FILE__, __LINE__, retval, buffback);
+
+ retcode=FALSE;
+ break;
+
+ case -5:
+ /*RIG_ETIMEOUT error*/
+ /*
+ Returned by ea4tx interface when stuck
+ Based on comments on hamlib-discussion list.
+ */
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s:%d: rotctld returned error %d (%s)."),
+ __FILE__, __LINE__, retval, buffback);
+
+
+ retcode=FALSE;
+ break;
+
+
+ case -8:
+ /*RIG_EPROTO error*/
+ /*
+ Returned by gs232 (-m 601) driver when interface is turned off
+ Based on author's experiment.
+ */
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
+ _("%s:%d: rotctld returned error %d (%s). Check that interface power on."),
+ __FILE__, __LINE__, retval, buffback);
+
+
+ retcode=FALSE;
+ break;
+
default:
/*any other case*/
/*not sure what is a hard error or soft error*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-01-24 16:22:52
|
Revision: 741
http://gpredict.svn.sourceforge.net/gpredict/?rev=741&view=rev
Author: aa1vs
Date: 2011-01-24 16:22:46 +0000 (Mon, 24 Jan 2011)
Log Message:
-----------
Fixed bug from Ubuntu #706452:Update from local files won't work with files in UPPER case
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/tle-update.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-01-21 12:30:48 UTC (rev 740)
+++ trunk/ChangeLog 2011-01-24 16:22:46 UTC (rev 741)
@@ -1,3 +1,9 @@
+2010-01-24 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/tle-update.c
+ Fix bug where tle file suffix compare is case dependent.
+ <https://bugs.launchpad.net/bugs/706452>
+
2010-12-26 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-rot-ctrl.c
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-01-21 12:30:48 UTC (rev 740)
+++ trunk/NEWS 2011-01-24 16:22:46 UTC (rev 741)
@@ -7,6 +7,7 @@
- Fixed bug 2116691: Leave network connection open.
- Fixed bug 3099314: Rotator Thrashing.
- Fixed bug 2167508: problems in rotator controller.
+- Fixed bug from Ubuntu #706452:Update from local files won't work with files in UPPER case
Changes in version 1.2 (12 Oct 2010)
Modified: trunk/src/tle-update.c
===================================================================
--- trunk/src/tle-update.c 2011-01-21 12:30:48 UTC (rev 740)
+++ trunk/src/tle-update.c 2011-01-24 16:22:46 UTC (rev 741)
@@ -730,17 +730,18 @@
static gboolean is_tle_file (const gchar *dir, const gchar *fnam)
{
gchar *path;
+ gchar *fname_lower;
gboolean fileIsOk = FALSE;
-
path = g_strconcat (dir, G_DIR_SEPARATOR_S, fnam, NULL);
+ fname_lower=g_ascii_strdown(fnam,-1);
if (g_file_test (path, G_FILE_TEST_IS_REGULAR) &&
- (g_str_has_suffix(fnam, ".tle") || g_str_has_suffix(fnam, ".txt")))
+ (g_str_has_suffix(fname_lower, ".tle") || g_str_has_suffix(fname_lower, ".txt")))
{
fileIsOk = TRUE;
}
-
+ g_free (fname_lower);
g_free (path);
return fileIsOk;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-02-02 17:54:54
|
Revision: 756
http://gpredict.svn.sourceforge.net/gpredict/?rev=756&view=rev
Author: aa1vs
Date: 2011-02-02 17:54:48 +0000 (Wed, 02 Feb 2011)
Log Message:
-----------
Sort Satellites Groups alphabetically in combo box.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-sat-selector.c
trunk/src/mod-cfg.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-02-02 17:06:24 UTC (rev 755)
+++ trunk/ChangeLog 2011-02-02 17:54:48 UTC (rev 756)
@@ -3,6 +3,9 @@
* src/mod-cfg.c
Sort QTH list alphabetically when configuring module.
+ * src/gtk-sat-selector.c
+ Sort Satellites Groups alphabetically in combo box.
+
2011-02-01 Alexandru Csete <oz9aec at gmail.com>
* src/gtk-rig-ctrl.c:
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2011-02-02 17:06:24 UTC (rev 755)
+++ trunk/src/gtk-sat-selector.c 2011-02-02 17:54:48 UTC (rev 756)
@@ -67,6 +67,7 @@
GtkTreeIter *iter,
gpointer column);
+static gint cat_file_compare (const gchar *a, const gchar *b);
static GtkVBoxClass *parent_class = NULL;
@@ -379,12 +380,14 @@
gchar **buffv;
const gchar *fname;
+ gchar *nfname;
guint num = 0;
+ gint i,n;
+ GSList *cats = NULL;
-
/* load all satellites into selector->models[0] */
store = gtk_list_store_new (GTK_SAT_SELECTOR_COL_NUM,
G_TYPE_STRING, // name
@@ -447,11 +450,20 @@
g_dir_rewind (dir);
while ((fname = g_dir_read_name (dir))) {
if (g_str_has_suffix (fname, ".cat")) {
+ cats = g_slist_insert_sorted(cats,g_strdup(fname),(GCompareFunc)cat_file_compare);
+ }
+ }
- load_cat_file (selector, fname);
-
+ /*now load them into the combo box*/
+ n = g_slist_length (cats);
+ for (i = 0; i < n; i++) {
+ nfname = g_slist_nth_data (cats, i);
+ if (nfname) {
+ load_cat_file (selector, nfname);
}
+ g_free(nfname);
}
+ g_slist_free (cats);
g_dir_close (dir);
g_free (dirname);
@@ -806,3 +818,59 @@
return epoch;
}
+
+
+/** \brief Load category name from a .cat file
+ * \param fname The name of the .cat file (name only, no path)
+ * This function is a stripped down version of load_cat_file. It
+ * is needed to load the category name to created a sorted list
+ * of category names. With the existing user base already having
+ * .cat files in their directories, use of the file name directly
+ * for sorting will have problems.
+ */
+static gchar *load_cat_file_cat (const gchar *fname)
+{
+ GIOChannel *catfile;
+ GError *error = NULL;
+
+ gchar *path;
+ gchar *buff;
+
+ /* .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:%s: Failed to open %s: %s"),
+ __FILE__, __FUNCTION__, fname, error->message);
+ g_clear_error (&error);
+ }
+ else {
+ /* read first line => category name */
+
+ if (g_io_channel_read_line (catfile, &buff, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) {
+ g_strstrip (buff); /* removes trailing newline */
+ }
+ }
+
+ g_free (path);
+ g_io_channel_shutdown (catfile, TRUE, NULL);
+ return buff;
+}
+
+/* this is a quick function that loads the category name from two cat
+ files and compares them.
+*/
+gint cat_file_compare (const gchar *a,const gchar *b){
+ gchar *cat_a, *cat_b;
+ gint temp;
+
+ cat_a=load_cat_file_cat(a);
+ cat_b=load_cat_file_cat(b);
+ temp = g_ascii_strcasecmp(cat_a,cat_b);
+ g_free (cat_a);
+ g_free (cat_b);
+ return(temp);
+
+}
Modified: trunk/src/mod-cfg.c
===================================================================
--- trunk/src/mod-cfg.c 2011-02-02 17:06:24 UTC (rev 755)
+++ trunk/src/mod-cfg.c 2011-02-02 17:54:48 UTC (rev 756)
@@ -876,7 +876,7 @@
if (g_str_has_suffix (filename, ".qth")) {
buffv = g_strsplit (filename, ".qth", 0);
- qths=g_slist_insert_sorted(qths,g_strdup(buffv[0]),(GCompareFunc) qth_name_compare);
+ qths = g_slist_insert_sorted(qths,g_strdup(buffv[0]),(GCompareFunc) qth_name_compare);
g_strfreev (buffv);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-02-08 16:17:56
|
Revision: 759
http://gpredict.svn.sourceforge.net/gpredict/?rev=759&view=rev
Author: aa1vs
Date: 2011-02-08 16:17:50 +0000 (Tue, 08 Feb 2011)
Log Message:
-----------
Replace search capability with filter capability in gtk-sat-selector.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/src/gtk-sat-selector.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-02-02 20:10:06 UTC (rev 758)
+++ trunk/ChangeLog 2011-02-08 16:17:50 UTC (rev 759)
@@ -1,3 +1,8 @@
+2011-02-08 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-selector.c
+ Replace search capability with filter capability in gtk-sat-selector.
+
2011-02-02 Charles Suprin <hamaa1vs at gmail.com>
* src/mod-cfg.c
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-02-02 20:10:06 UTC (rev 758)
+++ trunk/NEWS 2011-02-08 16:17:50 UTC (rev 759)
@@ -8,6 +8,7 @@
- Fixed bug 3099314: Rotator Thrashing.
- Fixed bug 2167508: problems in rotator controller.
- Fixed bug from Ubuntu #706452:Update from local files won't work with files in UPPER case
+- Fixed bug 3171615: Searching for satellites in the satellite selector
Changes in version 1.2 (12 Oct 2010)
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2011-02-02 20:10:06 UTC (rev 758)
+++ trunk/src/gtk-sat-selector.c 2011-02-08 16:17:50 UTC (rev 759)
@@ -55,10 +55,14 @@
GtkTreeViewColumn *column,
gpointer data);
+static gboolean cb_entry_changed( GtkEditable *entry, GtkTreeView *treeview );
static gint compare_func (GtkTreeModel *model,
GtkTreeIter *a,
GtkTreeIter *b,
gpointer userdata);
+static gboolean sat_filter_func( GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkEntry *entry );
static void epoch_cell_data_function (GtkTreeViewColumn *col,
@@ -218,8 +222,8 @@
GtkTreeViewColumn *column;
GtkWidget *table;
GtkWidget *frame;
+ GtkTreeModel *filter;
-
if (!flags)
flags = GTK_SAT_SELECTOR_DEFAULT_FLAGS;
@@ -236,14 +240,12 @@
/* combo box signal handler will be connected at the end after it has
been populated to avoid false triggering */
+ /*create search widget early so it can be used for callback*/
+ GTK_SAT_SELECTOR (widget)->search = gtk_entry_new ();
/* 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),
@@ -255,6 +257,21 @@
GTK_SAT_SELECTOR_COL_NAME,
GTK_SORT_ASCENDING);
+ /*create a filtering tree*/
+ filter = gtk_tree_model_filter_new(model,NULL);
+ gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filter),
+ (GtkTreeModelFilterVisibleFunc) sat_filter_func,GTK_SAT_SELECTOR(widget)->search,NULL);
+
+ selector->tree = gtk_tree_view_new_with_model(filter);
+ gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (selector->tree), TRUE);
+
+ g_signal_connect( G_OBJECT(GTK_SAT_SELECTOR(widget)->search), "changed",
+ G_CALLBACK(cb_entry_changed),
+ GTK_TREE_VIEW( selector->tree));
+
+ g_object_unref (model);
+
+
/* we can now connect combobox signal handler */
g_signal_connect (GTK_SAT_SELECTOR (widget)->groups, "changed",
G_CALLBACK(group_selected_cb), widget);
@@ -310,21 +327,14 @@
table = gtk_table_new (7, 4, TRUE);
- /* Search */
+ /* Search */
+ /* Finish setting up the search entry*/
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),
- GTK_ENTRY (GTK_SAT_SELECTOR (widget)->search));
- gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW (GTK_SAT_SELECTOR (widget)->tree),
- gtk_sat_selector_search_equal_func,
- NULL,
- NULL);
gtk_table_attach (GTK_TABLE (table), GTK_SAT_SELECTOR (widget)->search, 1, 4, 0, 1,
GTK_SHRINK, GTK_SHRINK, 0, 0);
@@ -619,6 +629,7 @@
GtkSatSelector *selector = GTK_SAT_SELECTOR (data);
GtkTreeModel *newmodel;
GtkTreeModel *oldmodel;
+ GtkTreeModel *filter;
gint sel;
sel = gtk_combo_box_get_active (combobox);
@@ -632,15 +643,27 @@
/* 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 (newmodel),
GTK_SAT_SELECTOR_COL_NAME,
GTK_SORT_ASCENDING);
+ /*build a filter around the new model*/
+ filter = gtk_tree_model_filter_new(newmodel,NULL);
+ gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(filter),
+ (GtkTreeModelFilterVisibleFunc) sat_filter_func,GTK_SAT_SELECTOR(selector)->search,NULL);
+ /*install the filter tree and hookup callbacks*/
+ gtk_tree_view_set_model (GTK_TREE_VIEW (selector->tree), filter);
+ g_signal_connect( G_OBJECT(GTK_SAT_SELECTOR(selector)->search), "changed",
+ G_CALLBACK(cb_entry_changed),
+ GTK_TREE_VIEW( selector->tree));
+ g_object_unref (newmodel);
+ g_object_unref (filter);
+
+
+
}
@@ -874,3 +897,36 @@
return (temp);
}
+
+/** \brief Make the tree refilter after something entered in the search box
+ **/
+
+static gboolean cb_entry_changed( GtkEditable *entry,
+ GtkTreeView *treeview )
+{
+ GtkTreeModelFilter *filter;
+
+ filter = GTK_TREE_MODEL_FILTER( gtk_tree_view_get_model( treeview ) );
+ gtk_tree_model_filter_refilter( filter );
+
+ return( FALSE );
+}
+
+/** \brief Selects satellites whose name contains the substring in entry.
+ **/
+static gboolean sat_filter_func( GtkTreeModel *model,
+ GtkTreeIter *iter,
+ GtkEntry *entry )
+{
+ const gchar *searchstring;
+ gchar *satname;
+
+ gtk_tree_model_get( model, iter, GTK_SAT_SELECTOR_COL_NAME, &satname, -1 );
+ searchstring = gtk_entry_get_text( entry );
+
+ if( strcasestr( satname, searchstring ) != NULL )
+ return( TRUE );
+ else
+ return( FALSE );
+}
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-02-08 20:55:19
|
Revision: 760
http://gpredict.svn.sourceforge.net/gpredict/?rev=760&view=rev
Author: aa1vs
Date: 2011-02-08 20:55:11 +0000 (Tue, 08 Feb 2011)
Log Message:
-----------
Adjust icons and .desktop file to help with bug 3113190.
Modified Paths:
--------------
trunk/ChangeLog
trunk/data/desktop/gpredict.desktop.in
trunk/pixmaps/icons/Makefile.am
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-02-08 16:17:50 UTC (rev 759)
+++ trunk/ChangeLog 2011-02-08 20:55:11 UTC (rev 760)
@@ -3,6 +3,12 @@
* src/gtk-sat-selector.c
Replace search capability with filter capability in gtk-sat-selector.
+ * data/desktop/gpredict.desktop.in
+ * pixmaps/icons/Makefile.am
+ Install a copy of gpredict-icon.png to pixmaps directory.
+ Change gpredict.desktop to reference this new copy.
+ Resolves part of Bug 3113190.
+
2011-02-02 Charles Suprin <hamaa1vs at gmail.com>
* src/mod-cfg.c
Modified: trunk/data/desktop/gpredict.desktop.in
===================================================================
--- trunk/data/desktop/gpredict.desktop.in 2011-02-08 16:17:50 UTC (rev 759)
+++ trunk/data/desktop/gpredict.desktop.in 2011-02-08 20:55:11 UTC (rev 760)
@@ -2,7 +2,7 @@
Name=Gredict
Comment=Satellite tracker
Exec=gpredict
-Icon=$(datadir)/pixmaps/gpredict/icons/gpredict-icon.png
+Icon=gpredict-icon
Terminal=false
Type=Application
Categories=HamRadio;
Modified: trunk/pixmaps/icons/Makefile.am
===================================================================
--- trunk/pixmaps/icons/Makefile.am 2011-02-08 16:17:50 UTC (rev 759)
+++ trunk/pixmaps/icons/Makefile.am 2011-02-08 20:55:11 UTC (rev 760)
@@ -1,5 +1,8 @@
gpredict_iconsdir = $(datadir)/pixmaps/gpredict/icons
+gpredict_icons2dir = $(datadir)/pixmaps/
+gpredict_icons2_DATA = gpredict-icon.png
+
gpredict_icons_DATA = \
gpredict-antenna.png \
gpredict-antenna-small.png \
@@ -36,5 +39,5 @@
gpredict-shuttle.png \
gpredict-shuttle-small.png
-EXTRA_DIST = $(gpredict_icons_DATA)
+EXTRA_DIST = $(gpredict_icons_DATA) $(gpredict_icons2_DATA)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-02-09 01:22:09
|
Revision: 761
http://gpredict.svn.sourceforge.net/gpredict/?rev=761&view=rev
Author: aa1vs
Date: 2011-02-09 01:22:01 +0000 (Wed, 09 Feb 2011)
Log Message:
-----------
Update copyrights in about.c
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/about.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-02-08 20:55:11 UTC (rev 760)
+++ trunk/ChangeLog 2011-02-09 01:22:01 UTC (rev 761)
@@ -9,6 +9,9 @@
Change gpredict.desktop to reference this new copy.
Resolves part of Bug 3113190.
+ * src/about.c
+ Update copyright dates to 2011 from 2009.
+
2011-02-02 Charles Suprin <hamaa1vs at gmail.com>
* src/mod-cfg.c
Modified: trunk/src/about.c
===================================================================
--- trunk/src/about.c 2011-02-08 20:55:11 UTC (rev 760)
+++ trunk/src/about.c 2011-02-09 01:22:01 UTC (rev 761)
@@ -2,7 +2,7 @@
/*
Gpredict: Real-time satellite tracking and orbit prediction program
- Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC.
+ Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC.
Authors: Alexandru Csete <oz...@gm...>
@@ -62,7 +62,7 @@
};
-const gchar license[] = N_("Copyright (C) 2001-2009 Alexandru Csete OZ9AEC and contributors.\n"\
+const gchar license[] = N_("Copyright (C) 2001-2011 Alexandru Csete OZ9AEC and contributors.\n"\
"Contact: oz9aec at googlemail.com\n\n"\
"Gpredict is free software; you can redistribute it and "\
"mofdify it under the terms of the GNU General Public License "\
@@ -97,7 +97,7 @@
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (dialog), _("GPREDICT"));
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (dialog), VERSION);
gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (dialog),
- _("Copyright (C) 2001-2009 Alexandru Csete OZ9AEC\n\n"\
+ _("Copyright (C) 2001-2011 Alexandru Csete OZ9AEC\n\n"\
"Gpredict is available free of charge from:"));
gtk_about_dialog_set_url_hook (gpredict_url_hook_cb, NULL, NULL);
gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (dialog),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-03-20 15:05:16
|
Revision: 788
http://gpredict.svn.sourceforge.net/gpredict/?rev=788&view=rev
Author: aa1vs
Date: 2011-03-20 15:05:07 +0000 (Sun, 20 Mar 2011)
Log Message:
-----------
Merged gpsd_testing branch into trunk.
Modified Paths:
--------------
trunk/ChangeLog
trunk/NEWS
trunk/configure.ac
trunk/src/config-keys.h
trunk/src/gtk-polar-view.c
trunk/src/gtk-rot-ctrl.c
trunk/src/gtk-sat-map.c
trunk/src/gtk-sat-module.c
trunk/src/gtk-sat-module.h
trunk/src/mod-mgr.c
trunk/src/predict-tools.c
trunk/src/predict-tools.h
trunk/src/qth-data.c
trunk/src/qth-data.h
trunk/src/qth-editor.c
trunk/src/sat-pref-qth-data.h
trunk/src/sat-pref-qth-editor.c
trunk/src/sat-pref-qth.c
Property Changed:
----------------
trunk/
trunk/data/satdata/scripts/convert.py
trunk/data/trsp/20439.trsp
trunk/data/trsp/20442.trsp
trunk/data/trsp/22825.trsp
trunk/data/trsp/22826.trsp
trunk/data/trsp/23439.trsp
trunk/data/trsp/24278.trsp
trunk/data/trsp/24786.trsp
trunk/data/trsp/25338.trsp
trunk/data/trsp/25397.trsp
trunk/data/trsp/25544.trsp
trunk/data/trsp/26352.trsp
trunk/data/trsp/26536.trsp
trunk/data/trsp/26871.trsp
trunk/data/trsp/26931.trsp
trunk/data/trsp/27453.trsp
trunk/data/trsp/27607.trsp
trunk/data/trsp/27844.trsp
trunk/data/trsp/27848.trsp
trunk/data/trsp/27939.trsp
trunk/data/trsp/28375.trsp
trunk/data/trsp/28650.trsp
trunk/data/trsp/28654.trsp
trunk/data/trsp/28895.trsp
trunk/data/trsp/32785.trsp
trunk/data/trsp/32787.trsp
trunk/data/trsp/32789.trsp
trunk/data/trsp/32791.trsp
trunk/data/trsp/33493.trsp
trunk/data/trsp/33498.trsp
trunk/data/trsp/33499.trsp
trunk/data/trsp/7530.trsp
trunk/src/gtk-rig-ctrl.c
trunk/src/gtk-rig-ctrl.h
trunk/src/gtk-rot-ctrl.c
trunk/src/gtk-rot-ctrl.h
Property changes on: trunk
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/gpsd_testing:728-787
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/ChangeLog 2011-03-20 15:05:07 UTC (rev 788)
@@ -1,3 +1,25 @@
+2011-03-20 Charles Suprin <hamaa1vs at gmail.com>
+
+ Merged gpsd_testing branch into trunk.
+
+2011-03-20 Charles Suprin <hamaa1vs at gmail.com>
+
+ * doc/man/gpredict.1.in
+ Update Copyright to 2011
+
+2011-03-13 Charles Suprin <hamaa1vs at gmail.com>
+
+ * data/locations.dat
+ Added more locations to locations.dat
+
+ * configure.ac
+ Changed version to 1.4svn
+
+2011-03-12 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/predict-tools.c
+ Added check for slope of elevation in find_los.
+
2011-03-01 Alexandru Csete <oz9aec at gmail.com>
* data/satdata:
@@ -2,6 +24,6 @@
Updated satellite data.
-
+
* po:
Synchronised with translations from launchpad.net
-
+
* configure.ac:
@@ -96,7 +118,115 @@
Fix bug where tle file suffix compare is case dependent.
<https://bugs.launchpad.net/bugs/706452>
+ * ChangeLog
+ * src/gtk-sat-map.c
+ * src/gtk-sat-module.c
+ * src/gtk-polar-view.c
+ Code cleanup and comments.
+ Update Changelog
+2011-01-21 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/predict-tools.c
+ Eliminate segfault if pass being returned is NULL in get_pass routines.
+
+2011-01-20 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-module.c
+ Convert gps update time to seconds.
+
+2011-01-19 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-module.c
+ * src/qth-data.c
+ * src/qth-data.h
+ * src/sat-pref-qth-editor.c
+ * src/sat-pref-qth.c
+ Added initial GPSD API version 5 support.
+ Added engineering gui support for GPSD.
+
+2011-01-16 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/qth-data.c
+ Added more QTH validation
+
+2011-01-14 Charles Suprin <hamaa1vs at gmail.com>
+
+ * NEWS
+ * src/config-keys.h
+ * src/gtk-polar-view.c
+ * src/gtk-rot-ctrl.c
+ * src/gtk-sat-map.c
+ * src/gtk-sat-module.c
+ * src/gtk-sat-module.h
+ * src/mod-mgr.c
+ * src/predict-tools.c
+ * src/predict-tools.h
+ * src/qth-data.c
+ * src/qth-data.h
+ * src/sat-pref-qth-data.h
+ * src/sat-pref-qth.c
+ Updated copyright information.
+ Added handling for new QTH fields into saving and loading routines.
+ Updated qth preference guis. (Still not complete)
+ Conditioned gpsd calls on GPSD_API_MAJOR_VERSION as requested in libgps man page.
+ Update NEWS and Changelog in anticipation of merge with trunk.
+ Corrected minor typos in comments.
+
+2011-01-11 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-rot-ctrl.c
+ Add support for changing qth to gtk-rot-ctrl.c to update pass in polar view
+
+2011-01-09 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-polar-view.c
+ * src/gtk-sat-module.c
+ * src/gtk-sat-module.h
+ Add position based updates for sky-at-a-glance.
+ Move qth updates so they occur all the time.
+
+2011-01-08 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-polar-view.c
+ * src/predict-tools.c
+ * src/predict-tools.h
+ * src/qth-data.c
+ * src/gtk-sat-map.c
+ * src/gtk-sat-module.c
+ * src/gtk-sat-module.h
+ * src/qth-data.h
+ Make gpsd code safer for multiple modules.
+ Add position comparison for event updates.
+ Fix segfault when gpsd not connected.
+ Make gtk-polar-view update pass if qth has moved significantly.
+ Add qth_small_t element to pass to check if pass data is old.
+
+2011-01-05 Charles Suprin <hamaa1vs at gmail.com>
+
+ * src/gtk-sat-module.c
+ * src/qth-data.c
+ * src/qth-data.h
+ Update AOS information when qth changes and make distinction between qth_data and qth_data_update in function names
+
+ 2011-01-02 Charles Suprin <hamaa1vs at gmail.com>
+ * configure.ac
+ * src/config-keys.h
+ * src/gtk-sat-module.c
+ * src/gtk-sat-module.h
+ * src/qth-data.c
+ * src/qth-data.h
+ * src/sat-pref-qth-editor.c
+ Second version of qpsd qth moved things into qth-data.c and started working on the qth editing gui to support these new interfaces
+
+2010-12-30 Charles Suprin <hamaa1vs at gmail.com>
+
+ * configure.ac
+ * src/gtk-sat-map.c
+ * src/gtk-sat-module.c
+ * src/gtk-sat-module.h
+ Initial GPSD hack.
+
2010-12-26 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-rot-ctrl.c
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/NEWS 2011-03-20 15:05:07 UTC (rev 788)
@@ -1,3 +1,7 @@
+Changes in version 1.4 (TBD)
+
+- Feature request 3141555: gpsd support.
+
Changes in version 1.3 (1 Mar 2011)
- Feature request 2873824: Flip Passes.
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/configure.ac 2011-03-20 15:05:07 UTC (rev 788)
@@ -29,7 +29,18 @@
AC_SUBST(PACKAGE_CFLAGS)
AC_SUBST(PACKAGE_LIBS)
+dnl optional check for libgps
+PKG_CHECK_MODULES(LIBGPS, [ libgps >= 2.90 ], [
+ CFLAGS="$CFLAGS $LIBGPS_CFLAGS";
+ LIBS="$LIBS $LIBGPS_LIBS";
+ havelibgps=true;
+ AC_DEFINE(HAS_LIBGPS, 1, [Define if libgps is available])
+ ], [
+ havelibgps=false;
+ AC_DEFINE(HAS_LIBGPS, 0, [Define if libgps is unvailable])
+])
+
dnl Hamlib not needed if we go for the TCP based I/F
dnl check for hamlib
dnl PKG_CHECK_MODULES(HAMLIB, hamlib, [
@@ -75,6 +86,9 @@
GTK_V=`pkg-config --modversion gtk+-2.0`
GOOC_V=`pkg-config --modversion goocanvas`
CURL_V=`pkg-config --modversion libcurl`
+if test "$havelibgps" = true ; then
+ GPS_V=`pkg-config --modversion libgps`
+fi
dnl SQL_V=`pkg-config --modversion sqlite3`
dnl if test "$havehamlib" = true ; then
dnl HAML_V=`pkg-config --modversion hamlib`
@@ -113,7 +127,10 @@
echo Gdk version........ : $GDK_V
echo Gtk+ version....... : $GTK_V
echo GooCanvas version.. : $GOOC_V
-echo Liburl version..... : $CURL_V
+echo Libcurl version..... : $CURL_V
+if test "$havelibgps" = true ; then
+ echo Libgps version..... : $GPS_V
+fi
dnl echo SQLite version..... : $SQL_V
dnl if test "$havehamlib" = true ; then
dnl echo Hamlib version..... : $HAML_V
Property changes on: trunk/data/satdata/scripts/convert.py
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/20439.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/20442.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/22825.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/22826.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/23439.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/24278.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/24786.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/25338.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/25397.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/25544.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/26352.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/26536.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/26871.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/26931.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/27453.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/27607.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/27844.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/27848.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/27939.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/28375.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/28650.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/28654.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/28895.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/32785.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/32787.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/32789.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/32791.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/33493.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/33498.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/33499.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Property changes on: trunk/data/trsp/7530.trsp
___________________________________________________________________
Deleted: svn:mergeinfo
-
Modified: trunk/src/config-keys.h
===================================================================
--- trunk/src/config-keys.h 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/src/config-keys.h 2011-03-20 15:05:07 UTC (rev 788)
@@ -2,9 +2,10 @@
/*
Gpredict: Real-time satellite tracking and orbit prediction program
- Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC.
+ Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC.
Authors: Alexandru Csete <oz...@gm...>
+ Charles Suprin <ham...@gm...>
Comments, questions and bugreports should be submitted via
http://sourceforge.net/projects/gpredict/
@@ -56,8 +57,10 @@
#define QTH_CFG_LAT_KEY "LAT"
#define QTH_CFG_LON_KEY "LON"
#define QTH_CFG_ALT_KEY "ALT"
+#define QTH_CFG_GPSD_SERVER_KEY "GPSDSERVER"
+#define QTH_CFG_GPSD_PORT_KEY "GPSDPORT"
+#define QTH_CFG_TYPE_KEY "QTH_TYPE"
-
/* Module files (.mod) */
/* global */
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/src/gtk-polar-view.c 2011-03-20 15:05:07 UTC (rev 788)
@@ -2,9 +2,10 @@
/*
Gpredict: Real-time satellite tracking and orbit prediction program
- Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC.
+ Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC.
Authors: Alexandru Csete <oz...@gm...>
+ Charles Suprin <ham...@gm...>
Comments, questions and bugreports should be submitted via
http://sourceforge.net/projects/gpredict/
@@ -685,6 +686,7 @@
}
/* check refresh rate and refresh sats if time */
+ /* FIXME need to add location based update*/
if (polv->counter < polv->refresh) {
polv->counter++;
}
@@ -846,6 +848,7 @@
/* free pass info */
free_pass (obj->pass);
+ obj->pass=NULL;
/* if this was the selected satellite we need to
clear the info text
@@ -914,8 +917,42 @@
g_free (text);
}
+ /*check if pass was computed near current qth otherwise update*/
+ if (obj->pass) {
+ /* FIXME once again threshold should be user configurable*/
+ if (qth_small_dist(polv->qth,(obj->pass->qth_comp))>1.0){
+
+ root = goo_canvas_get_root_item_model (GOO_CANVAS (polv->canvas));
+ /* remove sky track */
+ if (obj->showtrack) {
+ idx = goo_canvas_item_model_find_child (root, obj->track);
+ if (idx != -1)
+ goo_canvas_item_model_remove_child (root, idx);
+
+ for (i = 0; i < TRACK_TICK_NUM; i++) {
+ idx = goo_canvas_item_model_find_child (root, obj->trtick[i]);
+ if (idx != -1)
+ goo_canvas_item_model_remove_child (root, idx);
+ }
+ }
+
+ /* free pass info */
+ free_pass (obj->pass);
+ obj->pass=NULL;
+
+ /*compute new pass */
+ obj->pass = get_current_pass (sat, polv->qth, now);
+
+ /* Finally, create the sky track if necessary */
+ if (obj->showtrack)
+ create_track (polv, obj, sat);
+
+ }
+ }
g_free (losstr);
g_free (catnum); // FIXME: why free here, what about else?
+
+
}
else {
/* add sat to canvas */
Property changes on: trunk/src/gtk-rig-ctrl.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/continuous_network/src/gtk-rig-ctrl.c:655-689
+ /branches/continuous_network/src/gtk-rig-ctrl.c:655-689
/branches/gpsd_testing/src/gtk-rig-ctrl.c:728-787
Property changes on: trunk/src/gtk-rig-ctrl.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/continuous_network/src/gtk-rig-ctrl.h:655-689
+ /branches/continuous_network/src/gtk-rig-ctrl.h:655-689
/branches/gpsd_testing/src/gtk-rig-ctrl.h:728-787
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/src/gtk-rot-ctrl.c 2011-03-20 15:05:07 UTC (rev 788)
@@ -2,9 +2,10 @@
/*
Gpredict: Real-time satellite tracking and orbit prediction program
- Copyright (C) 2001-2010 Alexandru Csete, OZ9AEC.
+ Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC.
Authors: Alexandru Csete <oz...@gm...>
+ Charles Suprin <ham...@gm...>
Comments, questions and bugreports should be submitted via
http://sourceforge.net/projects/gpredict/
@@ -303,8 +304,20 @@
g_free (buff);
update_count_down (ctrl, t);
+
+ /*if the current pass is too far away*/
+ if ((ctrl->pass!=NULL)&& (ctrl->qth!=NULL))
+ if (qth_small_dist(ctrl->qth,ctrl->pass->qth_comp)>1.0){
+ free_pass (ctrl->pass);
+ ctrl->pass=NULL;
+ ctrl->pass = get_pass (ctrl->target, ctrl->qth, t, 3.0);
+ if (ctrl->pass) {
+ set_flipped_pass(ctrl);
+ /* update polar plot */
+ gtk_polar_plot_set_pass (GTK_POLAR_PLOT (ctrl->plot), ctrl->pass);
+ }
+ }
-
/* update next pass if necessary */
if (ctrl->pass != NULL) {
/*if we are not in the current pass*/
@@ -977,14 +990,12 @@
/* otherwise look 20 minutes into the future*/
time_delta=1.0/72.0;
}
+
/* have a minimum time delta*/
- if (time_delta<(ctrl->delay/1000.0/secday)){
- time_delta=ctrl->delay/1000.0/secday;
+ step_size = time_delta / 2.0;
+ if (step_size<ctrl->delay/1000.0/(secday)){
+ step_size=ctrl->delay/1000.0/(secday);
}
-
-
- step_size = time_delta / 2.0;
-
/*
find a time when satellite is above horizon and at the
edge of tolerance. the final step size needs to be smaller
@@ -1024,6 +1035,7 @@
setaz = sat->az;
}
}
+
/* send controller values to rotator device */
/* this is the newly computed value which should be ahead of the current position */
if (!set_pos (ctrl, setaz, setel)) {
Property changes on: trunk/src/gtk-rot-ctrl.c
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/continuous_network/src/gtk-rot-ctrl.c:655-689
+ /branches/continuous_network/src/gtk-rot-ctrl.c:655-689
/branches/gpsd_testing/src/gtk-rot-ctrl.c:728-787
Property changes on: trunk/src/gtk-rot-ctrl.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/continuous_network/src/gtk-rot-ctrl.h:655-689
+ /branches/continuous_network/src/gtk-rot-ctrl.h:655-689
/branches/gpsd_testing/src/gtk-rot-ctrl.h:728-787
Modified: trunk/src/gtk-sat-map.c
===================================================================
--- trunk/src/gtk-sat-map.c 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/src/gtk-sat-map.c 2011-03-20 15:05:07 UTC (rev 788)
@@ -4,9 +4,11 @@
Copyright (C) 2001-2009 Alexandru Csete, OZ9AEC.
Copyright (C) 2006-2007 William J Beksi, KC2EXL.
+ Copyright (C) 2011 Charles Suprin, AA1VS.
Authors: Alexandru Csete <oz...@gm...>
William J Beksi <wj...@us...>
+ Charles Suprin <ham...@gm...>
Comments, questions and bugreports should be submitted via
http://sourceforge.net/projects/gpredict/
@@ -608,12 +610,44 @@
gint *catnr;
guint h, m, s;
gchar *ch, *cm, *cs;
+ gfloat x,y;
+ gdouble oldx,oldy;
+
/* check whether there are any pending resize requests */
if (satmap->resize)
update_map_size (satmap);
- /* check refresh rate and refresh sats if time */
+ /* check if qth has moved significantly if so move it*/
+ lonlat_to_xy (satmap, satmap->qth->lon, satmap->qth->lat, &x, &y);
+ g_object_get (satmap->qthmark,
+ "x", &oldx,
+ "y", &oldy,
+ NULL);
+
+ if ((fabs (oldx-x) >= 2*MARKER_SIZE_HALF) ||
+ (fabs (oldy-y) >= 2*MARKER_SIZE_HALF)) {
+
+ /* update qth mark */
+ g_object_set (satmap->qthmark,
+ "x", x - MARKER_SIZE_HALF,
+ "y", y - MARKER_SIZE_HALF,
+ NULL);
+ g_object_set (satmap->qthlabel,
+ "x", x,
+ "y", y+2,
+ NULL);
+
+ /* QTH info */
+ g_object_set (satmap->locnam,
+ "x", (gdouble) satmap->x0 + 2,
+ "y", (gdouble) satmap->y0 + 1,
+ NULL);
+ satmap->counter=satmap->refresh;
+ }
+
+ /* check refresh rate and refresh sats/qth if time */
+ /* FIXME add location check*/
if (satmap->counter < satmap->refresh) {
satmap->counter++;
}
@@ -622,6 +656,25 @@
satmap->counter = 1;
satmap->naos = 2458849.5;
+ /* QTH */
+ /*update for accuracy*/
+ lonlat_to_xy (satmap, satmap->qth->lon, satmap->qth->lat, &x, &y);
+ g_object_set (satmap->qthmark,
+ "x", x - MARKER_SIZE_HALF,
+ "y", y - MARKER_SIZE_HALF,
+ NULL);
+ g_object_set (satmap->qthlabel,
+ "x", x,
+ "y", y+2,
+ NULL);
+
+ /* QTH info */
+ g_object_set (satmap->locnam,
+ "x", (gdouble) satmap->x0 + 2,
+ "y", (gdouble) satmap->y0 + 1,
+ NULL);
+
+
/* update sats */
g_hash_table_foreach (satmap->sats, update_sat, satmap);
Modified: trunk/src/gtk-sat-module.c
===================================================================
--- trunk/src/gtk-sat-module.c 2011-03-19 18:44:47 UTC (rev 787)
+++ trunk/src/gtk-sat-module.c 2011-03-20 15:05:07 UTC (rev 788)
@@ -4,7 +4,9 @@
Copyright (C) 2001-2010 Alexandru Csete, OZ9AEC.
+
Authors: Alexandru Csete <oz...@gm...>
+ Charles Suprin <ham...@gm...>
Comments, questions and bugreports should be submitted via
http://sourceforge.net/projects/gpredict/
@@ -159,9 +161,7 @@
module->win = NULL;
module->qth = g_try_new0 (qth_t, 1);
- module->qth->lat = 0.0;
- module->qth->lon = 0.0;
- module->qth->alt = 0;
+ qth_init(module->qth);
module->satellites = g_hash_table_new_full (g_int_hash,
g_int_equal,
@@ -179,6 +179,10 @@
module->state = GTK_SAT_MOD_STATE_DOCKED;
module->busy = g_mutex_new();
+ /* open the gpsd device */
+ module->gps_data = NULL;
+
+
module->grid = NULL;
module->views = NULL;
module->nviews = 0;
@@ -282,16 +286,18 @@
/* load configuration; note that this will also set the module name */
gtk_sat_module_read_cfg_data (GTK_SAT_MODULE (widget), cfgfile);
-
- /*check that we loaded some reasonable data*/
- if (GTK_SAT_MODULE(widget)->cfgdata==NULL){
- sat_log_log (SAT_LOG_LEVEL_ERROR,
+
+ /*check that we loaded some reasonable data*/
+ if (GTK_SAT_MODULE(widget)->cfgdata==NULL){
+ sat_log_log (SAT_LOG_LEVEL_ERROR,
_("%s: Module %s has problems."),
__FUNCTION__, cfgfile);
-
+
return NULL;
- }
-
+ }
+ /*initialize the qth engine and get position*/
+ qth_data_update_init(GTK_SAT_MODULE(widget)->qth);
+
/* module state */
if ((g_key_file_has_key (GTK_SAT_MODULE (widget)->cfgdata,
MOD_CFG_GLOBAL_SECTION,
@@ -564,11 +570,7 @@
__FUNCTION__, buffer);
/* settings are really screwed up; we need some safe values here */
- module->qth->name = g_strdup (_("Error"));
- module->qth->loc = g_strdup (_("Error"));
- module->qth->lat = 0.0;
- module->qth->lon = 0.0;
- module->qth->alt = 0;
+ qth_safe(module->qth);
}
}
@@ -748,8 +750,9 @@
GdkWindowState state;
gdouble delta;
guint i;
+ /*update the qth position*/
+ qth_data_update(mod->qth,mod->tmgCdnum);
-
/* in docked state, update only if tab is visible */
switch (mod->state) {
@@ -773,19 +776,19 @@
}
if (needupdate) {
-
- if (g_mutex_trylock(mod->busy)==FALSE) {
-
- sat_log_log (SAT_LOG_LEVEL_WARN,
- _("%s: Previous cycle missed it's deadline."),
- __FUNCTION__);
-
- return TRUE;
-
- }
-
+
+ if (g_mutex_trylock(mod->busy)==FALSE) {
+
+ sat_log_log (SAT_LOG_LEVEL_WARN,
+ _("%s: Previous cycle missed it's deadline."),
+ __FUNCTION__);
+
+ return TRUE;
+
+ }
+
mod->rtNow = get_current_daynum ();
-
+
/* Update time if throttle != 0 */
if (mod->throttle) {
@@ -799,7 +802,7 @@
/* time to update header? */
mod->head_count++;
- if (mod->head_count == mod->head_timeout) {
+ if (mod->head_count >= mod->head_timeout) {
/* reset counter */
mod->head_count = 0;
@@ -815,7 +818,19 @@
*/
mod->event_count = 0;
}
-
+ /*only trigger an update if adequate movement has occurred*/
+ /*FIXME position threshhold should be configurable*/
+ if (qth_small_dist(mod->qth,mod->qth_event)>1.0) {
+ /* reset counter, this will make gtk_sat_module_update_sat
+ recalculate events
+ */
+ mod->event_count = 0;
+ }
+
+ /*if the events are going to be recalculated store the position*/
+ if (mod->event_count == 0){
+ qth_small_save(mod->qth,&(mod->qth_event));
+ }
/* update satellite data */
g_hash_table_foreach (mod->satellites,
gtk_sat_module_update_sat,
@@ -939,6 +954,7 @@
sat = SAT(val);
module = GTK_SAT_MODULE (data);
+
/* get current time (real or simulated */
@@ -965,7 +981,7 @@
}
- /*** FIXME: we don't need to do this every time! */
+ /*data may have been updated by gpsd*/
obs_geodetic.lon = module->qth->lon * de2ra;
obs_geodetic.lat = module->qth->lat * de2ra;
obs_geodetic.alt = module->qth->alt / 1000.0;
@@ -1029,7 +1045,7 @@
/** \brief Module options
*
* Invoke module-wide popup menu
- */
+ */
static void
gtk_sat_module_popup_cb (GtkWidget *button, gpointer data)
{
@@ -1334,9 +1350,9 @@
time_t t;
guint size;
gchar buff[TIME_FORMAT_MAX_LENGTH+1];
+ gchar *buff2;
-
t = (module->tmgCdnum - 2440587.5)*86400.;
fmtstr = sat_cfg_get_str (SAT_CFG_STR_TIME_FORMAT);
@@ -1351,8 +1367,17 @@
buff[size]='\0';
else
buff[TIME_FORMAT_MAX_LENGTH]='\0';
+
+ if (module->qth->type==QTH_GPSD_TYPE) {
+ buff2=g_strdup_printf("%s GPS %0.3f seconds old", buff,fabs(module->tmgCdnum-module->qth->gpsd_update)*(24*3600));
+ gtk_label_set_text (GTK_LABEL (module->header), buff2);
+ g_free(buff2);
+ }
+ else
+ gtk_label_set_text (GTK_LABEL (module->header), buff);
+
- gtk_label_set_text (GTK_LABEL (module->header), buff);
+
g_free (fmtstr);
if (module->tmgActive)
@@ -1487,8 +1512,12 @@
/** \brief Update GtkSkyGlance view
* \param module Pointer to the GtkSatModule widget
*
- * This function checks how long ago the GtkSkyGlance widget has been updated
- * and performs an update if necessary. The current timeout is set to 60 sec.
+ * This function checks to see if the sky-at-a-glance display needs to be updated
+ * due to time or qth moving. It checks how long ago the GtkSkyGlance widget was
+ * updated and performs an update if necessary. The current timeout is set to 60 sec.
+ * It also checks how far away the qth is from where the GtkSkyGlance
+ * widget was last updated and triggers an update if necessary. The current
+ * distance is s...
[truncated message content] |
|
From: <aa...@us...> - 2011-03-30 23:16:08
|
Revision: 802
http://gpredict.svn.sourceforge.net/gpredict/?rev=802&view=rev
Author: aa1vs
Date: 2011-03-30 23:16:02 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Check-in 1.3 windows packaging diff.
Modified Paths:
--------------
trunk/src/gpredict-utils.c
trunk/src/gpredict-utils.h
trunk/src/gtk-sat-map-popup.c
trunk/src/gtk-sat-selector.c
trunk/src/qth-data.c
trunk/src/qth-editor.c
trunk/src/sat-pref-qth-editor.c
trunk/src/sat-pref-qth.c
trunk/win32/Makefile
trunk/win32/build-config.h
trunk/win32/config.mk
Modified: trunk/src/gpredict-utils.c
===================================================================
--- trunk/src/gpredict-utils.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/gpredict-utils.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -498,3 +498,18 @@
return strnatcasecmp(s1,s2);
#endif
}
+
+char * gpredict_strcasestr(const char *s1, const char *s2)
+{
+ size_t s1_len = strlen(s1);
+ size_t s2_len = strlen(s2);
+ while (s1_len >= s2_len) {
+ if (strncasecmp(s1, s2, s2_len) == 0)
+ return (char *) s1;
+
+ s1++;
+ s1_len--;
+ }
+
+ return NULL;
+}
Modified: trunk/src/gpredict-utils.h
===================================================================
--- trunk/src/gpredict-utils.h 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/gpredict-utils.h 2011-03-30 23:16:02 UTC (rev 802)
@@ -63,4 +63,5 @@
void gdk2rgba (const GdkColor *color, guint16 alpha, guint *rgba);
gchar *rgba2html (guint rgba);
int gpredict_strcmp (const char *s1, const char *s2);
+char *gpredict_strcasestr(const char *s1, const char *s2);
#endif
Modified: trunk/src/gtk-sat-map-popup.c
===================================================================
--- trunk/src/gtk-sat-map-popup.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/gtk-sat-map-popup.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -345,7 +345,7 @@
sat = SAT(g_object_get_data (G_OBJECT (menuitem), "sat"));
qth = (qth_t *) (g_object_get_data (G_OBJECT (menuitem), "qth"));
- /* check wheather sat actially has AOS */
+ /* check whether sat actually has AOS */
if (has_aos (sat, qth)) {
if (sat_cfg_get_bool(SAT_CFG_BOOL_PRED_USE_REAL_T0)) {
Modified: trunk/src/gtk-sat-selector.c
===================================================================
--- trunk/src/gtk-sat-selector.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/gtk-sat-selector.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -924,7 +924,7 @@
/*if it is already selected then remove it from the available list*/
if (selected)
return( FALSE);
- if( strcasestr( satname, searchstring ) != (char *)NULL )
+ if( gpredict_strcasestr( satname, searchstring ) != (char *)NULL )
return( TRUE );
else
return( FALSE );
Modified: trunk/src/qth-data.c
===================================================================
--- trunk/src/qth-data.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/qth-data.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -41,7 +41,7 @@
#include "time-tools.h"
#include "locator.h"
#if HAS_LIBGPS
-#include <gps.h>
+# include <gps.h>
#endif
void qth_validate(qth_t*qth);
Modified: trunk/src/qth-editor.c
===================================================================
--- trunk/src/qth-editor.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/qth-editor.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -348,10 +348,10 @@
gtk_table_attach_defaults (GTK_TABLE (table), alt, 1, 2, 6, 7);
if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) {
- label = gtk_label_new (_("ft asl"));
+ label = gtk_label_new (_("ft above sea level"));
}
else {
- label = gtk_label_new (_("m asl"));
+ label = gtk_label_new (_("m above sea level"));
}
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 6, 7);
@@ -376,6 +376,7 @@
GUINT_TO_POINTER (SELECTION_MODE_WX));
gtk_table_attach_defaults (GTK_TABLE (table), wxbut, 3, 4, 7, 8);
+# if HAS_LIBGPS
/* GPSD enabled*/
label = gtk_label_new (_("QTH Type"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -414,8 +415,8 @@
_("Set the port for GPSD to use. Default for gpsd is 2947."),
NULL);
gtk_table_attach_defaults (GTK_TABLE (table), port, 1, 2, 10, 11);
+# endif
-
if (qth->name != NULL)
update_widgets (qth);
Modified: trunk/src/sat-pref-qth-editor.c
===================================================================
--- trunk/src/sat-pref-qth-editor.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/sat-pref-qth-editor.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -333,10 +333,10 @@
gtk_table_attach_defaults (GTK_TABLE (table), alt, 1, 2, 6, 7);
if (sat_cfg_get_bool (SAT_CFG_BOOL_USE_IMPERIAL)) {
- label = gtk_label_new (_("ft asl"));
+ label = gtk_label_new (_("ft above sea level"));
}
else {
- label = gtk_label_new (_("m asl"));
+ label = gtk_label_new (_("m above sea level"));
}
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
gtk_table_attach_defaults (GTK_TABLE (table), label, 2, 3, 6, 7);
@@ -360,6 +360,8 @@
G_CALLBACK (select_location),
GUINT_TO_POINTER (SELECTION_MODE_WX));
gtk_table_attach_defaults (GTK_TABLE (table), wxbut, 3, 4, 7, 8);
+
+# if HAS_LIBGPS
/* GPSD enabled*/
label = gtk_label_new (_("QTH Type"));
gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
@@ -398,8 +400,8 @@
_("Set the port for GPSD to use. Default for gpsd is 2947."),
NULL);
gtk_table_attach_defaults (GTK_TABLE (table), port, 1, 2, 10, 11);
+# endif
-
if (!new)
update_widgets (treeview);
Modified: trunk/src/sat-pref-qth.c
===================================================================
--- trunk/src/sat-pref-qth.c 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/src/sat-pref-qth.c 2011-03-30 23:16:02 UTC (rev 802)
@@ -187,6 +187,7 @@
column = gtk_tree_view_column_new_with_attributes (_("Name"), renderer,
"text", QTH_LIST_COL_NAME,
NULL);
+ gtk_tree_view_column_set_expand(column, TRUE);
gtk_tree_view_insert_column (GTK_TREE_VIEW (qthlist), column, -1);
/* location column */
@@ -194,6 +195,7 @@
column = gtk_tree_view_column_new_with_attributes (_("Location"), renderer,
"text", QTH_LIST_COL_LOC,
NULL);
+ gtk_tree_view_column_set_expand(column, TRUE);
gtk_tree_view_insert_column (GTK_TREE_VIEW (qthlist), column, -1);
/* lat column */
@@ -267,6 +269,9 @@
g_signal_connect (qthlist, "row-activated", G_CALLBACK (row_activated_cb), NULL);
+
+# if HAS_LIBGPS
+ /* GPSD enabled*/
/*server*/
renderer = gtk_cell_renderer_text_new ();
column = gtk_tree_view_column_new_with_attributes (_("GPSD\nServer"), renderer,
@@ -289,6 +294,7 @@
NULL);
gtk_tree_view_insert_column (GTK_TREE_VIEW (qthlist), column, -1);
gtk_tree_view_column_set_alignment (column, 0.5);
+# endif
return qthlist;
}
@@ -827,7 +833,7 @@
/* function below not used */
#if 0
-/** \brief Callback function to check each QTH for beeing the default */
+/** \brief Callback function to check each QTH for being the default */
static gboolean
check_and_set_default_qth (GtkTreeModel *model,
GtkTreePath *path,
Modified: trunk/win32/Makefile
===================================================================
--- trunk/win32/Makefile 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/win32/Makefile 2011-03-30 23:16:02 UTC (rev 802)
@@ -5,8 +5,10 @@
# directories
topsrc = ..
-gcincdir = c:/mingw/include/goocanvas-0.10/goocanvas/
-gcsrcdir = $(topsrc)/goocanv8/src
+glibdir = c:/mingw/include/glib-2.0
+gcincdir = c:/mingw/include/goocanvas/
+gcsrcdir = $(topsrc)/goocanvas-0.15/src
+
gpreddir = $(topsrc)/src
sgpsdpdir = $(gpreddir)/sgpsdp
@@ -22,13 +24,12 @@
# libraries
GTKLIBS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs gtk+-win32-2.0)
GLIBLIB := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --libs glib-2.0 gthread-2.0)
-GUI_LIBS = $(GTKLIBS) $(GLIBLIB) -lgoocanvas libsgpsdp.lib -lcurldll -lwinmm -lws2_32
+GUI_LIBS = $(GTKLIBS) $(GLIBLIB) -lgoocanvas libsgpsdp.lib -lcurl.dll -lwinmm -lws2_32
LIBS = -lm
-
# flags/defines
CFLAGS = -DHAVE_CONFIG_H -DHAVE_LIBCURL -DPACKAGE_LOCALE_DIR=\"/\" \
- -I. -I.. -I$(gpreddir) -I$(gcincdir) -I$(gcsrcdir) -I$(CROSSDIR)/include
+ -I. -I.. -I$(glibdir) -I$(gpreddir) -I$(gcincdir) -I$(gcsrcdir) -I$(CROSSDIR)/include
GTK_CFLAGS := $(shell PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) pkg-config --cflags gtk+-win32-2.0)
# source paths
@@ -121,6 +122,7 @@
pass-popup-menu.c \
pass-to-txt.c \
predict-tools.c \
+ print-pass.c \
qth-data.c \
qth-editor.c \
radio-conf.c \
@@ -159,6 +161,7 @@
sat-pref-tle.c \
sat-vis.c \
save-pass.c \
+ strnatcmp.c \
time-tools.c \
tle-tools.c \
tle-update.c \
Modified: trunk/win32/build-config.h
===================================================================
--- trunk/win32/build-config.h 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/win32/build-config.h 2011-03-30 23:16:02 UTC (rev 802)
@@ -86,4 +86,9 @@
#undef STDC_HEADERS
/* Version number of package */
-#define VERSION "1.1"
+#define VERSION "1.3"
+
+#define GETTEXT_PACKAGE "gpredict"
+
+#define HAS_LIBGPS 0
+
Modified: trunk/win32/config.mk
===================================================================
--- trunk/win32/config.mk 2011-03-29 00:55:07 UTC (rev 801)
+++ trunk/win32/config.mk 2011-03-30 23:16:02 UTC (rev 802)
@@ -1,7 +1,7 @@
# Configuration variables governing the build of grig for win32
# directory containing the cross tools
-#CROSSDIR = /grga/mingw32/buildenv
+CROSSDIR = /cygdrive/c/mingw
# prefix for mingw tools (e.g. i586-mingw32msvc-gcc)
#MGW_PREFIX = i586-mingw32msvc-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2011-04-01 11:48:11
|
Revision: 805
http://gpredict.svn.sourceforge.net/gpredict/?rev=805&view=rev
Author: csete
Date: 2011-04-01 11:48:05 +0000 (Fri, 01 Apr 2011)
Log Message:
-----------
Appied patch 3261586: Remove leading zero code from time formatting functions (thanks to Paul Schulz).
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-event-list.c
trunk/src/gtk-polar-view.c
trunk/src/gtk-rig-ctrl.c
trunk/src/gtk-rot-ctrl.c
trunk/src/pass-to-txt.c
trunk/src/sat-pass-dialogs.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/ChangeLog 2011-04-01 11:48:05 UTC (rev 805)
@@ -1,3 +1,15 @@
+2011-04-01 Alexandru Csete <oz9aec at gmail.com>
+
+ * src/pass-to-txt.c
+ * src/sat-pass-dialogs.c
+ * src/gtk-rig-ctrl.c
+ * src/gtk-event-list.c
+ * src/gtk-rot-ctrl.c
+ * src/gtk-polar-view.c
+ Appied patch 3261586: Remove leading zero code from time formatting
+ functions (thanks to Paul Schulz).
+
+
2011-03-28 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-rig-ctrl.c
Modified: trunk/src/gtk-event-list.c
===================================================================
--- trunk/src/gtk-event-list.c 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/src/gtk-event-list.c 2011-04-01 11:48:05 UTC (rev 805)
@@ -577,7 +577,6 @@
guint coli = GPOINTER_TO_UINT (column);
guint h,m,s;
- gchar *ch,*cm,*cs;
/* get cell data */
@@ -596,39 +595,17 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if ((h > 0) && (h < 10))
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup ("0");
- else
- cm = g_strdup ("");
-
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
if (h > 0) {
- buff = g_strdup_printf ("%s%d:%s%d%s%d", ch, h, cm, m, cs, s);
+ buff = g_strdup_printf ("%02d:%02d:%02d", h, m, s);
}
else {
- buff = g_strdup_printf ("%s%d%s%d", cm, m, cs, s);
+ buff = g_strdup_printf ("%02d:%02d", m, s);
}
- g_free (ch);
- g_free (cm);
- g_free (cs);
-
}
/* render the cell */
Modified: trunk/src/gtk-polar-view.c
===================================================================
--- trunk/src/gtk-polar-view.c 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/src/gtk-polar-view.c 2011-04-01 11:48:05 UTC (rev 805)
@@ -677,7 +677,6 @@
gdouble number, now;
gchar *buff;
guint h,m,s;
- gchar *ch,*cm,*cs;
sat_t *sat = NULL;
gint *catnr;
@@ -721,34 +720,16 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if ((h > 0) && (h < 10))
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup ("0");
- else
- cm = g_strdup ("");
-
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
if (h > 0)
- buff = g_strdup_printf (_("Next: %s\nin %s%d:%s%d%s%d"),
- sat->nickname, ch, h, cm, m, cs, s);
+ buff = g_strdup_printf (_("Next: %s\nin %02d:%02d:%02d"),
+ sat->nickname, h, m, s);
else
- buff = g_strdup_printf (_("Next: %s\nin %s%d%s%d"),
- sat->nickname, cm, m, cs, s);
+ buff = g_strdup_printf (_("Next: %s\nin %02d:%02d"),
+ sat->nickname, m, s);
g_object_set (polv->next,
@@ -756,9 +737,6 @@
NULL);
g_free (buff);
- g_free (ch);
- g_free (cm);
- g_free (cs);
}
else {
sat_log_log (SAT_LOG_LEVEL_BUG,
@@ -1643,7 +1621,6 @@
static gchar *los_time_to_str (GtkPolarView *polv, sat_t *sat)
{
guint h,m,s;
- gchar *ch,*cm,*cs;
gdouble number, now;
gchar *text = NULL;
@@ -1658,37 +1635,16 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if ((h > 0) && (h < 10))
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup ("0");
- else
- cm = g_strdup ("");
-
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
if (h > 0) {
- text = g_strdup_printf (_("LOS in %s%d:%s%d%s%d"), ch, h, cm, m, cs, s);
+ text = g_strdup_printf (_("LOS in %02d:%02d:%02d"), h, m, s);
}
else {
- text = g_strdup_printf (_("LOS in %s%d%s%d"), cm, m, cs, s);
+ text = g_strdup_printf (_("LOS in %02d:%02d"), m, s);
}
- g_free (ch);
- g_free (cm);
- g_free (cs);
return text;
}
Modified: trunk/src/gtk-rig-ctrl.c
===================================================================
--- trunk/src/gtk-rig-ctrl.c 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/src/gtk-rig-ctrl.c 2011-04-01 11:48:05 UTC (rev 805)
@@ -2244,7 +2244,6 @@
gdouble delta;
gchar *buff;
guint h,m,s;
- gchar *ch,*cm,*cs;
gchar *aoslos;
@@ -2267,42 +2266,21 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if ((h > 0) && (h < 10))
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup ("0");
- else
- cm = g_strdup ("");
-
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
if (h > 0)
- buff = g_strdup_printf ("<span size='xx-large'><b>%s %s%d:%s%d%s%d</b></span>",
- aoslos, ch, h, cm, m, cs, s);
+ buff = g_strdup_printf ("<span size='xx-large'><b>%s %02d:%02d:%02d</b></span>",
+ aoslos, h, m, s);
else
- buff = g_strdup_printf ("<span size='xx-large'><b>%s %s%d%s%d</b></span>",
- aoslos, cm, m, cs, s);
+ buff = g_strdup_printf ("<span size='xx-large'><b>%s %02d:%02d</b></span>",
+ aoslos, m, s);
gtk_label_set_markup (GTK_LABEL (ctrl->SatCnt), buff);
g_free (buff);
g_free (aoslos);
- g_free (ch);
- g_free (cm);
- g_free (cs);
}
Modified: trunk/src/gtk-rot-ctrl.c
===================================================================
--- trunk/src/gtk-rot-ctrl.c 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/src/gtk-rot-ctrl.c 2011-04-01 11:48:05 UTC (rev 805)
@@ -1225,7 +1225,6 @@
gdouble delta;
gchar *buff;
guint h,m,s;
- gchar *ch,*cm,*cs;
/* select AOS or LOS time depending on target elevation */
@@ -1243,39 +1242,18 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if ((h > 0) && (h < 10))
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup ("0");
- else
- cm = g_strdup ("");
-
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
if (h > 0)
- buff = g_strdup_printf ("%s%d:%s%d%s%d", ch, h, cm, m, cs, s);
+ buff = g_strdup_printf ("%02d:%02d:%02d", h, m, s);
else
- buff = g_strdup_printf ("%s%d%s%d", cm, m, cs, s);
+ buff = g_strdup_printf ("%02d:%02d", m, s);
gtk_label_set_text (GTK_LABEL (ctrl->SatCnt), buff);
g_free (buff);
- g_free (ch);
- g_free (cm);
- g_free (cs);
}
Modified: trunk/src/pass-to-txt.c
===================================================================
--- trunk/src/pass-to-txt.c 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/src/pass-to-txt.c 2011-04-01 11:48:05 UTC (rev 805)
@@ -567,7 +567,6 @@
/* Duration */
if (fields & (1 << MULTI_PASS_COL_DURATION)) {
guint h,m,s;
- gchar *ch,*cm,*cs;
/* convert julian date to seconds */
s = (guint) ((pass->los - pass->aos) * 86400);
@@ -576,35 +575,14 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if (h < 10)
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup (":0");
- else
- cm = g_strdup (":");
-
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
- buff = g_strdup_printf ("%s %s%d%s%d%s%d", line, ch, h, cm, m, cs, s);
+ buff = g_strdup_printf ("%s %02d:%02d:%02d", line, h, m, s);
g_free (line);
line = g_strdup (buff);
g_free (buff);
- g_free (ch);
- g_free (cm);
- g_free (cs);
}
/* Max El */
Modified: trunk/src/sat-pass-dialogs.c
===================================================================
--- trunk/src/sat-pass-dialogs.c 2011-03-31 00:03:48 UTC (rev 804)
+++ trunk/src/sat-pass-dialogs.c 2011-04-01 11:48:05 UTC (rev 805)
@@ -1226,7 +1226,6 @@
gchar *buff;
guint coli = GPOINTER_TO_UINT (column);
guint h,m,s;
- gchar *ch,*cm,*cs;
@@ -1246,39 +1245,17 @@
h = (guint) floor (s/3600);
s -= 3600*h;
- /* leading zero */
- if (h < 10)
- ch = g_strdup ("0");
- else
- ch = g_strdup ("");
-
/* extract minutes */
m = (guint) floor (s/60);
s -= 60*m;
- /* leading zero */
- if (m < 10)
- cm = g_strdup (":0");
- else
- cm = g_strdup (":");
+ buff = g_strdup_printf ("%02d:%02d:%02d", h, m, s);
- /* leading zero */
- if (s < 10)
- cs = g_strdup (":0");
- else
- cs = g_strdup (":");
-
-
- buff = g_strdup_printf ("%s%d%s%d%s%d", ch, h, cm, m, cs, s);
-
g_object_set (renderer,
"text", buff,
NULL);
g_free (buff);
- g_free (ch);
- g_free (cm);
- g_free (cs);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <aa...@us...> - 2011-04-01 12:35:09
|
Revision: 807
http://gpredict.svn.sourceforge.net/gpredict/?rev=807&view=rev
Author: aa1vs
Date: 2011-04-01 12:35:03 +0000 (Fri, 01 Apr 2011)
Log Message:
-----------
Apply Alan Moffet's changes for win32 build.
Modified Paths:
--------------
trunk/ChangeLog
trunk/win32/build-config.h
trunk/win32/gpredict.exe.manifest
trunk/win32/gpredict.rc
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-01 12:15:25 UTC (rev 806)
+++ trunk/ChangeLog 2011-04-01 12:35:03 UTC (rev 807)
@@ -1,3 +1,10 @@
+2011-04-01 Charles Suprin <hamaa1vs at gmail.com>
+
+ * win32/gpredict.rc
+ * win32/gpredict.exe.manifest
+ * win32/build-config.h
+ Apply Alan Moffet's changes for win32 build.
+
2011-04-01 Alexandru Csete <oz9aec at gmail.com>
* src/pass-to-txt.c
Modified: trunk/win32/build-config.h
===================================================================
--- trunk/win32/build-config.h 2011-04-01 12:15:25 UTC (rev 806)
+++ trunk/win32/build-config.h 2011-04-01 12:35:03 UTC (rev 807)
@@ -90,5 +90,5 @@
#define GETTEXT_PACKAGE "gpredict"
-#define HAS_LIBGPS 0
+#undef HAS_LIBGPS
Modified: trunk/win32/gpredict.exe.manifest
===================================================================
--- trunk/win32/gpredict.exe.manifest 2011-04-01 12:15:25 UTC (rev 806)
+++ trunk/win32/gpredict.exe.manifest 2011-04-01 12:35:03 UTC (rev 807)
@@ -1,5 +1,7 @@
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <assemblyIdentity name="GPredict" processorArchitecture="x86" version="1.3.0.0" type="win32"/>
+ <description>Gpredict: Real-time satellite tracking and orbit prediction program</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT'
@@ -7,4 +9,12 @@
publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
+ <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
+ <security>
+ <requestedPrivileges/>
+ </security>
+ </trustInfo>
+ <asmv3:application>
+ <asmv3:windowsSettings xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings"/>
+ </asmv3:application>
</assembly>
Modified: trunk/win32/gpredict.rc
===================================================================
--- trunk/win32/gpredict.rc 2011-04-01 12:15:25 UTC (rev 806)
+++ trunk/win32/gpredict.rc 2011-04-01 12:35:03 UTC (rev 807)
@@ -1,7 +1,38 @@
#include <windows.h>
-#include <winuser.h>
+#include <commctrl.h>
+#include <richedit.h>
+#include "resource.h"
-/* icon for the program itself */
-icon_0 ICON "icons/gpredict-icon.ico"
-2 RT_MANIFEST gpredict.exe.manifest
+A ICON "icons/gpredict-icon.ico"
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+1 VERSIONINFO
+ FILEVERSION 1,3,0,0
+ PRODUCTVERSION 1,3,0,0
+ FILEOS VOS__WINDOWS32
+ FILETYPE VFT_APP
+ FILESUBTYPE VFT2_UNKNOWN
+ FILEFLAGSMASK 0x00000000
+ FILEFLAGS 0x00000000
+{
+ BLOCK "StringFileInfo"
+ {
+ BLOCK "040904e4"
+ {
+ VALUE "CompanyName", "Alexandru Csete, OZ9AEC"
+ VALUE "FileDescription", "Gpredict: Real-time satellite tracking and orbit prediction program"
+ VALUE "FileVersion", "1.3.0.0"
+ VALUE "InternalName", "GPredict"
+ VALUE "LegalCopyright", "Copyright (C) 2001-2011 Alexandru Csete, OZ9AEC"
+ VALUE "ProductName", "GPredict"
+ VALUE "ProductVersion", "1.3"
+ }
+ }
+ BLOCK "VarFileInfo"
+ {
+ VALUE "Translation", 0x0409, 0x04E4
+ }
+}
+
+LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
+2 RT_MANIFEST "gpredict.exe.manifest"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cs...@us...> - 2011-04-03 14:41:31
|
Revision: 810
http://gpredict.svn.sourceforge.net/gpredict/?rev=810&view=rev
Author: csete
Date: 2011-04-03 14:41:24 +0000 (Sun, 03 Apr 2011)
Log Message:
-----------
Allow changing radio frequency and rotator position using mouse buttons and wheel (feature req 2130926). Up/down arrows are kept for now.
Modified Paths:
--------------
trunk/ChangeLog
trunk/src/gtk-freq-knob.c
trunk/src/gtk-freq-knob.h
trunk/src/gtk-rot-knob.c
trunk/src/gtk-rot-knob.h
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2011-04-03 13:21:00 UTC (rev 809)
+++ trunk/ChangeLog 2011-04-03 14:41:24 UTC (rev 810)
@@ -1,3 +1,13 @@
+2011-04-03 Alexandru Csete <oz9aec at gmail.com>
+
+ * src/gtk-rot-knob.c
+ * src/gtk-rot-knob.h
+ * src/gtk-freq-knob.c
+ * src/gtk-freq-knob.h
+ Allow changing radio frequency and rotator position using mouse buttons
+ and wheel (feature req 2130926). Up/down arrows are kept for now.
+
+
2011-04-01 Charles Suprin <hamaa1vs at gmail.com>
* win32/gpredict.rc
@@ -5,6 +15,7 @@
* win32/build-config.h
Apply Alan Moffet's changes for win32 build.
+
2011-04-01 Alexandru Csete <oz9aec at gmail.com>
* src/pass-to-txt.c
@@ -30,6 +41,7 @@
* src/gtk-sat-selector.c
Remove strverscmp reference.
+
2011-03-27 Charles Suprin <hamaa1vs at gmail.com>
* src/gtk-azel-plot.c
Modified: trunk/src/gtk-freq-knob.c
===================================================================
--- trunk/src/gtk-freq-knob.c 2011-04-03 13:21:00 UTC (rev 809)
+++ trunk/src/gtk-freq-knob.c 2011-04-03 14:41:24 UTC (rev 810)
@@ -49,7 +49,10 @@
static void gtk_freq_knob_destroy (GtkObject *object);
static void gtk_freq_knob_update (GtkFreqKnob *knob);
static void button_clicked_cb (GtkWidget *button, gpointer data);
+static gboolean on_button_press (GtkWidget *digit, GdkEventButton *event, gpointer data);
+static gboolean on_button_scroll (GtkWidget *digit, GdkEventScroll *event, gpointer data);
+
static GtkHBoxClass *parent_class = NULL;
#define FMTSTR "<span size='xx-large'>%c</span>"
@@ -164,7 +167,7 @@
gint delta;
- widget = g_object_new (GTK_TYPE_FREQ_KNOB, NULL);
+ widget = g_object_new (GTK_TYPE_FREQ_KNOB, NULL);
GTK_FREQ_KNOB(widget)->value = val;
@@ -174,10 +177,32 @@
for (i = 0; i < 10; i++) {
/* labels */
GTK_FREQ_KNOB(widget)->digits[i] = gtk_label_new (NULL);
- gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->digits[i],
- idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_FILL | GTK_EXPAND, 0, 0);
-
- if (buttons) {
+
+ if (!buttons) {
+ /* passive display widget without event boxes or buttons */
+ gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->digits[i],
+ idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_FILL | GTK_EXPAND, 0, 0);
+ }
+ else {
+ /* active widget that allows changing the value */
+
+ gtk_widget_set_tooltip_text(GTK_FREQ_KNOB(widget)->digits[i],
+ _("Use mouse buttons and wheel to change value"));
+
+ /* Event boxes for catching mouse evetns */
+ GTK_FREQ_KNOB(widget)->evtbox[i] = gtk_event_box_new ();
+ g_object_set_data(G_OBJECT(GTK_FREQ_KNOB(widget)->evtbox[i]), "index", GUINT_TO_POINTER(i));
+ gtk_container_add(GTK_CONTAINER(GTK_FREQ_KNOB(widget)->evtbox[i]),
+ GTK_FREQ_KNOB(widget)->digits[i]);
+ gtk_table_attach (GTK_TABLE (table), GTK_FREQ_KNOB(widget)->evtbox[i],
+ idx[i], idx[i]+1, 1, 2, GTK_SHRINK, GTK_FILL | GTK_EXPAND, 0, 0);
+
+ g_signal_connect (GTK_FREQ_KNOB(widget)->evtbox[i], "button_press_event",
+ (GtkSignalFunc) on_button_press, widget);
+ g_signal_connect (GTK_FREQ_KNOB(widget)->evtbox[i], "scroll_event",
+ (GtkSignalFunc) on_button_scroll, widget);
+
+
/* UP buttons */
GTK_FREQ_KNOB(widget)->buttons[i] = gtk_button_new ();
@@ -232,12 +257,12 @@
gtk_container_add (GTK_CONTAINER (widget), table);
gtk_widget_show_all (widget);
- return widget;
+ return widget;
}
/** \brief Set the value of the frequency control widget.
- * \param[in] knob THe frequency control widget.
+ * \param[in] knob The frequency control widget.
* \param[in] val The new value.
*
*/
@@ -316,3 +341,138 @@
g_signal_emit (G_OBJECT (data), freq_changed_signal, 0);
}
+
+/** \brief Manage button press events
+ * \param digit Pointer to the event box that received the event
+ * \param event Pointer to the GdkEventButton that contains details for te event
+ * \param data Pointer to the GtkFreqKnob widget (we need it to update the value)
+ * \return Always TRUE to prevent further propagation of the event
+ *
+ * This function is called when a mouse button is pressed on a digit. This is used
+ * to increment or decrement the value:
+ * - Left button: up
+ * - Right button: down
+ * - Middle button: set digit to 0 (TBC)
+ *
+ * Wheel up/down are managed in a separate callback since these are treated as scroll events
+ * rather than button press events (they used to be button press events though)
+ *
+ * The digit labels are stored in an array. To get the amount of change corresponding to the
+ * clicked label we can convert the index (attached to the evtbox): delta = 10^(9-index)
+ *
+ * Whether the delta is positive or negative depends on which mouse button triggered the event.
+ */
+static gboolean on_button_press (GtkWidget *evtbox,
+ GdkEventButton *event,
+ gpointer data)
+{
+ GtkFreqKnob *knob = GTK_FREQ_KNOB(data);
+ guint idx = GPOINTER_TO_UINT(g_object_get_data (G_OBJECT (evtbox), "index"));
+ gdouble delta = pow(10, 9-idx);
+ gdouble value;
+
+
+ if (delta < 1.0) {
+ /* no change */
+ return TRUE;
+ }
+
+ if (event->type != GDK_BUTTON_PRESS) {
+ /* wrong event (not possible?) */
+ return TRUE;
+ }
+
+
+ switch (event->button) {
+
+ /* left button */
+ case 1:
+ value = gtk_freq_knob_get_value(knob) + delta;
+ gtk_freq_knob_set_value(knob, value);
+ g_signal_emit(G_OBJECT (data), freq_changed_signal, 0);
+ break;
+
+ /* middle button */
+ case 2:
+ break;
+
+ /* right button */
+ case 3:
+ value = gtk_freq_knob_get_value(knob) - delta;
+ gtk_freq_knob_set_value(knob, value);
+ g_signal_emit(G_OBJECT (data), freq_changed_signal, 0);
+ break;
+
+ default:
+ break;
+ }
+
+
+ return TRUE;
+}
+
+/** \brief Manage scroll wheel events
+ * \param digit Pointer to the event box that received the event
+ * \param event Pointer to the GdkEventScroll that contains details for te event
+ * \param data Pointer to the GtkFreqKnob widget (we need it to update the value)
+ * \return Always TRUE to prevent further propagation of the event
+ *
+ * This function is called when the mouse wheel is moved up or down. This is used to increment
+ * or decrement the value.
+ *
+ * Button presses are managed in a separate callback since these are treated as different
+ * events.
+ *
+ * The digit labels are stored in an array. To get the amount of change corresponding to the
+ * clicked label we can convert the index (attached to the evtbox): delta = 10^(9-index)
+ *
+ * Whether the delta is positive or negative depends on the scroll direction.
+ */
+static gboolean on_button_scroll (GtkWidget *evtbox,
+ GdkEventScroll *event,
+ gpointer data)
+{
+ GtkFreqKnob *knob = GTK_FREQ_KNOB(data);
+ guint idx = GPOINTER_TO_UINT(g_object_get_data (G_OBJECT (evtbox), "index"));
+ gdouble delta = pow(10, 9-idx);
+ gdouble value;
+
+
+ if (delta < 0.01) {
+ /* no change, user clicked on sign or decimal separator */
+ return TRUE;
+ }
+
+ if (event->type != GDK_SCROLL) {
+ /* wrong event (not possible?) */
+ return TRUE;
+ }
+
+
+ switch (event->direction) {
+
+ /* decrease value by delta */
+ case GDK_SCROLL_DOWN:
+ case GDK_SCROLL_LEFT:
+ value = gtk_freq_knob_get_value(knob) - delta;
+ gtk_freq_knob_set_value(knob, value);
+ g_signal_emit(G_OBJECT (data), freq_changed_signal, 0);
+ break;
+
+ /* increase value by delta */
+ case GDK_SCROLL_UP:
+ case GDK_SCROLL_RIGHT:
+ value = gtk_freq_knob_get_value(knob) + delta;
+ gtk_freq_knob_set_value(knob, value);
+ g_signal_emit(G_OBJECT (data), freq_changed_signal, 0);
+ break;
+
+ default:
+ break;
+ }
+
+
+ return TRUE;
+}
+
+
Modified: trunk/src/gtk-freq-knob.h
===================================================================
--- trunk/src/gtk-freq-knob.h 2011-04-03 13:21:00 UTC (rev 809)
+++ trunk/src/gtk-freq-knob.h 2011-04-03 14:41:24 UTC (rev 810)
@@ -62,6 +62,7 @@
GtkVBox vbox;
GtkWidget *digits[10]; /*!< Labels for the digits */
+ GtkWidget *evtbox[10]; /*!< Event boxes to catch mouse events over the digits */
GtkWidget *buttons[20]; /*!< Buttons; 0..9 up; 10..19 down */
gdouble min;
Modified: trunk/src/gtk-rot-knob.c
===================================================================
--- trunk/src/gtk-rot-knob.c 2011-04-03 13:21:00 UTC (rev 809)
+++ trunk/src/gtk-rot-knob.c 2011-04-03 14:41:24 UTC (rev 810)
@@ -52,13 +52,15 @@
static void gtk_rot_knob_update (GtkRotKnob *knob);
static void button_clicked_cb (GtkWidget *button, gpointer data);
+static gboolean on_button_press (GtkWidget *digit, GdkEventButton *event, gpointer data);
+static gboolean on_button_scroll (GtkWidget *digit, GdkEventScroll *event, gpointer data);
-
static GtkHBoxClass *parent_class = NULL;
+/** \brief Convert digit index (in the digit array) to amount of change. */
+const gdouble INDEX_TO_DELTA[] = {0.0, 100.0, 10.0, 1.0, 0.0, 0.1, 0.01};
-
GType
gtk_rot_knob_get_type ()
@@ -145,10 +147,10 @@
GTK_ROT_KNOB(widget)->min = min;
GTK_ROT_KNOB(widget)->max = max;
GTK_ROT_KNOB(widget)->value = val;
-
+
/* create table */
table = gtk_table_new (3, 8, FALSE);
-
+
/* create buttons */
/* +100 deg */
GTK_ROT_KNOB(widget)->buttons[0] = gtk_button_new ();
@@ -282,9 +284,23 @@
/* create labels */
for (i = 0; i < 7; i++) {
+ /* labels showing the digits */
GTK_ROT_KNOB(widget)->digits[i] = gtk_label_new (NULL);
- gtk_table_attach (GTK_TABLE (table), GTK_ROT_KNOB(widget)->digits[i],
+ gtk_widget_set_tooltip_text(GTK_ROT_KNOB(widget)->digits[i],
+ _("Use mouse buttons and wheel to change value"));
+
+ /* Event boxes for catching mouse evetns */
+ GTK_ROT_KNOB(widget)->evtbox[i] = gtk_event_box_new ();
+ g_object_set_data(G_OBJECT(GTK_ROT_KNOB(widget)->evtbox[i]), "index", GUINT_TO_POINTER(i));
+ gtk_container_add(GTK_CONTAINER(GTK_ROT_KNOB(widget)->evtbox[i]), GTK_ROT_KNOB(widget)->digits[i]);
+ gtk_table_attach (GTK_TABLE (table), GTK_ROT_KNOB(widget)->evtbox[i],
i, i+1, 1, 2, GTK_SHRINK, GTK_SHRINK, 0, 0);
+
+ g_signal_connect (GTK_ROT_KNOB(widget)->evtbox[i], "button_press_event",
+ (GtkSignalFunc) on_button_press, widget);
+ g_signal_connect (GTK_ROT_KNOB(widget)->evtbox[i], "scroll_event",
+ (GtkSignalFunc) on_button_scroll, widget);
+
}
/* degree sign */
@@ -296,10 +312,9 @@
gtk_rot_knob_update (GTK_ROT_KNOB(widget));
gtk_container_add (GTK_CONTAINER (widget), table);
- gtk_widget_show_all (widget);
+ gtk_widget_show_all (widget);
-
- return widget;
+ return widget;
}
@@ -474,3 +489,130 @@
}
+/** \brief Manage button press events
+ * \param digit Pointer to the event box that received the event
+ * \param event Pointer to the GdkEventButton that contains details for te event
+ * \param data Pointer to the GtkRotKnob widget (we need it to update the value)
+ * \return Always TRUE to prevent further propagation of the event
+ *
+ * This function is called when a mouse button is pressed on a digit. This is used
+ * to increment or decrement the value:
+ * - Left button: up
+ * - Right button: down
+ * - Middle button: set digit to 0 (TBC)
+ *
+ * Wheel up/down are managed in a separate callback since these are treated as scroll events
+ * rather than button press events (they used to be button press events though)
+ *
+ * The digit labels are stored in an array that also contains the sign and the
+ * decimal separator. To get the amount of change corresponding to the clicked label we
+ * can use the INDEX_TO_DELTA[] array. The index to this table is attached to the evtbox.
+ * Whether the delta is positive or negative depends on which mouse button triggered the event.
+ */
+static gboolean on_button_press (GtkWidget *evtbox,
+ GdkEventButton *event,
+ gpointer data)
+{
+ GtkRotKnob *knob = GTK_ROT_KNOB(data);
+ guint idx = GPOINTER_TO_UINT(g_object_get_data (G_OBJECT (evtbox), "index"));
+ gdouble delta = INDEX_TO_DELTA[idx];
+ gdouble value;
+
+ if (delta < 0.01) {
+ /* no change, user clicked on sign or decimal separator */
+ return TRUE;
+ }
+
+ if (event->type != GDK_BUTTON_PRESS) {
+ /* wrong event (not possible?) */
+ return TRUE;
+ }
+
+
+ switch (event->button) {
+
+ /* left button */
+ case 1:
+ value = gtk_rot_knob_get_value(knob) + delta;
+ gtk_rot_knob_set_value(knob, value);
+ break;
+
+ /* middle button */
+ case 2:
+ break;
+
+ /* right button */
+ case 3:
+ value = gtk_rot_knob_get_value(knob) - delta;
+ gtk_rot_knob_set_value(knob, value);
+ break;
+
+ default:
+ break;
+ }
+
+
+ return TRUE;
+}
+
+/** \brief Manage scroll wheel events
+ * \param digit Pointer to the event box that received the event
+ * \param event Pointer to the GdkEventScroll that contains details for te event
+ * \param data Pointer to the GtkRotKnob widget (we need it to update the value)
+ * \return Always TRUE to prevent further propagation of the event
+ *
+ * This function is called when the mouse wheel is moved up or down. This is used to increment
+ * or decrement the value.
+ *
+ * Button presses are managed in a separate callback since these are treated as different
+ * events.
+ *
+ * The digit labels are stored in an array that also contains the sign and the
+ * decimal separator. To get the amount of change corresponding to the clicked label we
+ * can use the INDEX_TO_DELTA[] array. The index is attached to the evtbox.
+ * Whether the delta is positive or negative depends on the scroll direction.
+ */
+static gboolean on_button_scroll (GtkWidget *evtbox,
+ GdkEventScroll *event,
+ gpointer data)
+{
+ GtkRotKnob *knob = GTK_ROT_KNOB(data);
+ guint idx = GPOINTER_TO_UINT(g_object_get_data (G_OBJECT (evtbox), "index"));
+ gdouble delta = INDEX_TO_DELTA[idx];
+ gdouble value;
+
+ if (delta < 0.01) {
+ /* no change, user clicked on sign or decimal separator */
+ return TRUE;
+ }
+
+ if (event->type != GDK_SCROLL) {
+ /* wrong event (not possible?) */
+ return TRUE;
+ }
+
+
+ switch (event->direction) {
+
+ /* decrease value by delta */
+ case GDK_SCROLL_DOWN:
+ case GDK_SCROLL_LEFT:
+ value = gtk_rot_knob_get_value(knob) - delta;
+ gtk_rot_knob_set_value(knob, value);
+ break;
+
+ /* increase value by delta */
+ case GDK_SCROLL_UP:
+ case GDK_SCROLL_RIGHT:
+ value = gtk_rot_knob_get_value(knob) + delta;
+ gtk_rot_knob_set_value(knob, value);
+ break;
+
+ default:
+ break;
+ }
+
+
+ return TRUE;
+}
+
Modified: trunk/src/gtk-rot-knob.h
===================================================================
--- trunk/src/gtk-rot-knob.h 2011-04-03 13:21:00 UTC (rev 809)
+++ trunk/src/gtk-rot-knob.h 2011-04-03 14:41:24 UTC (rev 810)
@@ -59,9 +59,10 @@
struct _gtk_rot_knob
{
- GtkVBox vbox;
+ GtkVBox vbox;
GtkWidget *digits[7]; /*!< Labels for the digits */
+ GtkWidget *evtbox[7]; /*!< Event boxes to catch mouse events over the digits */
GtkWidget *buttons[10]; /*!< Buttons; 0..4 up; 5..9 down */
gdouble min;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|