An LTSpice screencast using screentoaster.com

December 2, 2009 | General | By: Mark VandeWettering

I was trying to remember how I did screencasts before, but instead discovered the interesting online service at screentoaster.com. It doesn’t require that you download any software: you can quickly record what occurs on the screen and upload it either to youtube.com or their own server, and then embed in a blog post. Here is my first attempt: demonstrating a simple astable multivibrator circuit that I cribbed from Hans Summers’ low powered QRSS beacon project. Using LTSpice, you can easily reproduce the schematic and then find out how it varies the voltage and current.


This is really just a test, I hope to have some more interesting circuit examples in the not too distant future.

Wolves And Rabbits

December 1, 2009 | General | By: Mark VandeWettering

I really like programmpraxis.com. Today, they had an interesting little task, not so much for the program itself, but for what it reminded me of. But first, the task: basically to simulate a simple set of differential equations which model a predator prey relationship. It’s not that hard really, this just implements the model using a Runge-Kutta integrator.

Wolves And Rabbits « Programming Praxis.

#!/usr/bin/env python

# http://programmingpraxis.com/2009/12/01/wolves-and-rabbits/

def population(r, w, rg, wg, rd, wd):
    def dr(x, y):
        return rg * x - rd * x * y
    def dw(x, y):
        return wg * x * y - wd * x 
    while True:
        yield r, w
        rh = r + dr(r, w) / 2.
        wh = w + dw(w, r) / 2.
        r = r + dr(rh, wh)
        w = w + dw(wh, rh)


g = population(40, 15, 0.1, 0.005, 0.01, 0.1)

for x in range(201):
        r, w = g.next()
        print r, w 

If you plot out the data, you get curves looking like this:

wolves-rabbits

This reminded me of an article by A. K. Dewdeny from Scientific American back in December of 1984, entitled Shark and fish wage an ecological war on the toroidal planet Wa-Tor. Wator was an implementation of a shark/fish predator prey model, but displays a similar set of interleaved periodic population changes. Unlike this program though, it works by directly simulating the world by creating individual sharks and fish, and modeling their interactions. It was a fun, simple project which didn’t require any real understanding of mathematical methods.

Satpack: Arduino Satellite tracking and doppler tuning

December 1, 2009 | Amateur Radio, Amateur Satellite | By: Mark VandeWettering

Bruce, VE9QRP has a nice video demoing his qrpTracker code (open source) running on an Atmel AVR microcontroller and tracking the Doppler of a cubesat as well as AO-51. Nifty.

httpv://www.youtube.com/watch?v=XgNcCGXeRyw

Addendum: Back in January of 2008, I acquired my (then) new FT-817, and one of the first projects I did was to use my own implementation of Plan 13 to automatically tune the radio to follow a satellite’s Doppler shift. Here is my first recording of the (recently defunct) satellite LO-19.

A night of WSPR spots…

December 1, 2009 | Amateur Radio | By: Mark VandeWettering

Got some interesting spots overnight. VK6BMW is located in Perth, Australia, which is pretty close to the maximum distance I’ve heard before. PA0LSK is in the Netherlands (any European spots are pretty rare for me). CO7WT is my first Cuban station spotted I think. Not a bad night.

Timestamp Call MHz SNR Drift Grid Pwr Reporter RGrid km az
 2009-12-01 08:52   VK6BMW   10.140182   -22   0   OF87ax   10   K6HX   CM87ux   14747   66 
 2009-12-01 10:18   VK5EX   10.140142   -23   0   PF95ha   10   K6HX   CM87ux   13015   61 
 2009-12-01 09:02   K6HX   10.140207   -31   0   CM87ux   5   VK2GOM   QF56if   12001   241 
 2009-12-01 08:54   VK2GOM   10.140215   -21   0   QF56if   5   K6HX   CM87ux   12001   56 
 2009-12-01 10:14   K6HX   10.140216   -24   0   CM87ux   5   VK2AWD   QF56ng   11966   241 
 2009-12-01 10:16   VK2AWD   10.140183   -19   -1   QF56ng   5   K6HX   CM87ux   11966   56 
 2009-12-01 08:34   K6HX   10.140210   -26   0   CM87ux   5   VK4ZBV   QG62ml   11417   245 
 2009-12-01 10:58   PA0LSK   10.140189   -27   0   JO21ur   5   K6HX   CM87ux   8838   321 
 2009-11-30 16:06   K6HX   10.140210   -25   0   CM87ux   5   JQ2WDO   PM95gi   8374   304 
 2009-11-30 22:28   CO7WT   10.140203   -23   0   FL11   1000   K6HX   CM87ux   4684   303 
 2009-11-30 16:54   K6HX   10.140210   -26   0   CM87ux   5   KB3EDF   FM18rh   3959   75 
 2009-12-01 12:36   KB3EDF   10.140122   -23   0   FM18rh   5   K6HX   CM87ux   3959   284 
 2009-12-01 13:24   WB3ANQ   10.140182   -20   0   FM19rc   1   K6HX   CM87ux   3938   283 
 2009-11-30 16:42   K6HX   10.140198   -25   0   CM87ux   5   W3GXT   FM19ol   3908   73 
 2009-11-30 16:28   W3GXT   10.140202   -21   0   FM19ol   5   K6HX   CM87ux   3908   282 
 2009-11-30 19:08   KB3VR   10.140251   -27   0   FM19la   5   K6HX   CM87ux   3898   283 
 2009-11-30 16:42   K6HX   10.140207   -23   0   CM87ux   5   KB3VR   FM19la   3898   74 
 2009-12-01 12:44   W3BCW   10.140190   -20   0   FM19ka   2   K6HX   CM87ux   3891   283 
 2009-12-01 12:46   K6HX   10.140209   -21   0   CM87ux   5   W3BCW   FM19ka   3891   74 
 2009-12-01 12:54   K6HX   10.140209   -27   0   CM87ux   5   W3CSW   FM19kd   3888   74 
 2009-12-01 12:40   W3CSW   10.140264   -19   -1   FM19kd   1   K6HX   CM87ux   3888   283 
 2009-11-30 16:10   W3HH   10.140156   -24   0   EL89vb   1   K6HX   CM87ux   3814   296 
 2009-11-30 20:46   K6HX   10.140215   -25   0   CM87ux   5   W3HH   EL89   3721   93 
 2009-11-30 23:28   KN4QD   10.140176   -22   -1   EM94   0.01   K6HX   CM87ux   3690   288 
 2009-11-30 23:36   K6HX   10.140221   -21   0   CM87ux   5   KN4QD   EM94jd   3687   84 
 2009-11-30 23:54   KD4VQT   10.140198   -15   1   EM74we   5   K6HX   CM87ux   3432   288 
 2009-12-01 00:12   K6HX   10.140212   -28   0   CM87ux   5   KD4VQT   EM74we   3432   85 
 2009-11-30 21:22   K6HX   10.140216   -25   0   CM87ux   5   AI4RY   EM72go   3374   89 
 2009-11-30 22:06   AI4RY   10.140114   -23   0   EM72go   1   K6HX   CM87ux   3374   291 
 2009-11-30 22:32   K6HX   10.140222   -26   0   CM87ux   5   K8ZJC   EN81eo   3300   71 
 2009-11-30 21:48   K6HX   10.140274   -21   0   CM87ux   5   N4QLB   EM73br   3295   87 
 2009-11-30 21:44   N4QLB   10.140122   -28   0   EM73br   5   K6HX   CM87ux   3295   289 
 2009-11-30 21:22   K6HX   10.140233   -20   0   CM87ux   5   W8JAQ   EM79tk   3270   75 
 2009-11-30 17:16   K6HX   10.140210   -17   0   CM87ux   5   W9HLY   EN70mt   3199   72 
 2009-11-30 16:10   W9HLY   10.140108   -19   0   EN70mt   1   K6HX   CM87ux   3199   277 
 2009-11-30 16:28   W3PM   10.140214   -26   0   EM64or   1   K6HX   CM87ux   3180   287 
 2009-11-30 22:54   K6HX   10.140207   -27   0   CM87ux   5   W3PM   EM64or   3180   86 
 2009-11-30 22:54   K6HX   10.140209   -13   0   CM87ux   5   WC9C   EM69hh   3017   76 
 2009-11-30 20:42   K3SIW   10.140229   -12   1   EN52ta   5   K6HX   CM87ux   2904   273 
 2009-12-01 14:08   K6HX   10.140209   -22   0   CM87ux   5   K3SIW   EN52ta   2904   70 
 2009-11-30 16:08   K0VM   10.140237   -16   -1   EN42db   1   K6HX   CM87ux   2629   270 
 2009-11-30 16:42   K6HX   10.140227   -16   0   CM87ux   5   K0VM   EN42db   2629   70 
 2009-11-30 16:06   K6HX   10.140212   -12   0   CM87ux   5   K9LDW   EM12sr   2406   96 
 2009-12-01 05:52   WA5ETV   10.140184   -26   -1   EM15jm   1   K6HX   CM87ux   2245   284 
 2009-12-01 12:58   VE5TLW   10.140117   -21   0   DO70qj   10   K6HX   CM87ux   1963   232 
 2009-12-01 13:44   K6HX   10.140215   -17   0   CM87ux   5   VE5TLW   DO70   1946   39 
 2009-12-01 07:54   W0NAC   10.140171   -26   -1   DM79   2   K6HX   CM87ux   1503   269 
 2009-11-30 17:24   K6HX   10.140182   0   0   CM87ux   5   WA7HL/P   DM51ck   1353   119 
 2009-11-30 22:20   K6HX   10.140215   -10   0   CM87ux   5   KS7S   DM41un   1306   120 
 2009-11-30 21:46   KS7S   10.140182   +2   1   DM41un   5   K6HX   CM87ux   1306   306 
 2009-11-30 17:42   K6HX   10.140208   +2   0   CM87ux   5   N4ABN   DM59pd   1187   80 
 2009-11-30 17:48   N4ABN   10.140141   +10   0   DM59pd   5   K6HX   CM87ux   1187   268 
 2009-11-30 16:12   WA0UWH   10.140166   +1   1   CN97bv   5   K6HX   CM87ux   1103   182 
 2009-12-01 15:52   K6HX   10.140251   +2   0   CM87ux   5   KB7GF   DN06ta   951   19 
 2009-11-30 16:02   WA7KGX   10.140275   -22   0   CN85no   10   K6HX   CM87ux   849   177 
 2009-11-30 17:16   K6HX   10.140201   -2   0   CM87ux   5   WA7KGX   CN85no   849   357 
 2009-12-01 04:58   K6HX   10.140216   -17   0   CM87ux   5   K6UM   CN85mh   817   356 
 2009-12-01 04:56   K6UM   10.140184   -16   0   CN85mh   1   K6HX   CM87ux   817   176 
 2009-12-01 05:26   K1BAA   10.140188   -12   0   DM04xa   5   K6HX   CM87ux   583   320 
 2009-11-30 18:26   K6HX   10.140217   -20   0   CM87ux   5   NN6RF   CM87uw   5   180 
 2009-11-30 18:10   NN6RF   10.140212   -12   0   CM87uw   5   K6HX   CM87ux   5   0 

Recommendations for a little LTSpice design project?

November 28, 2009 | Amateur Radio | By: Mark VandeWettering

Well, one of the advantages of getting a new Windows 7 laptop is that I now have a much nicer environment for running LTSpice. Does anyone have any ideas of a good, simple project that I could do to help me learn the ropes of LTSpice, and which I could also build for real to test my understanding? Perhaps something like a VFO + buffer amplifier + power amplifier chain, that could be done in steps? The simple transmitter in EMRFD would seem to be a reasonable choice, but the oscillator is crystal controlled, and I’ve heard that LTSpice can have some difficulty simulating these kind of “high Q” circuits.

What would you all suggest?

A couple of days of WSPR 2.0

November 27, 2009 | Amateur Radio | By: Mark VandeWettering

Left my FT-817 beaconing for the last 48 hours or so, mostly on 40m, and got some interesting DX, including someone I think I never reached before, KG6DX in Guam.

Timestamp Call MHz SNR Drift Grid Pwr Reporter RGrid km az
 2009-11-27 07:32   VK3AMW   7.040092   -19   0   QF22ir   5   K6HX   CM87ux   12668   59 
 2009-11-27 07:08   K6HX   7.040107   -23   0   CM87ux   5   VK3AMW   QF22ir   12668   240 
 2009-11-27 08:58   K6HX   7.040107   -24   0   CM87ux   5   VK2UB   QF59vk   11713   243 
 2009-11-27 09:12   VK2UB   7.040153   -12   0   QF59vk   2   K6HX   CM87ux   11713   55 
 2009-11-27 15:18   K6HX   7.040112   -24   0   CM87ux   5   VK4YEH   QG62ll   11423   245 
 2009-11-27 12:48   VK4YEH   7.040014   -23   0   QG62ll   5   K6HX   CM87ux   11423   54 
 2009-11-27 07:58   ZL2FT   7.040108   -26   0   RF70mb   5   K6HX   CM87ux   10758   45 
 2009-11-27 08:10   K6HX   7.040121   -26   0   CM87ux   5   ZL2FT   RF70mb   10758   223 
 2009-11-27 07:26   CX2ABP   7.040096   -26   0   GF15wc   10   K6HX   CM87ux   10587   314 
 2009-11-27 08:10   K6HX   21.096114   -19   0   CM87ux   5   KG6DX   QK23kl   9334   282 
 2009-11-27 06:58   KG6DX   7.040074   -10   -1   QK23kl   10   K6HX   CM87ux   9334   52 
 2009-11-27 09:08   JE6EFV   7.040022   -20   0   PM74so   50   K6HX   CM87ux   8642   52 
 2009-11-27 08:50   K6HX   7.040116   -13   0   CM87ux   5   JQ2WDO   PM95gi   8374   304 
 2009-11-27 08:54   JQ2WDO   7.040082   -15   0   PM95gi   5   K6HX   CM87ux   8374   54 
 2009-11-27 09:32   UA0ZEO   7.040082   -14   0   QO93ec   10   K6HX   CM87ux   6068   72 
 2009-11-28 01:48   I5FIG   7.040030   -20   -4   GM03   0.001   K6HX   CM87ux   5621   294 
 2009-11-27 07:40   K6HX   7.040107   -22   0   CM87ux   5   VE1VDM   FN85ij   4857   61 
 2009-11-27 13:36   K6HX   7.040110   -24   0   CM87ux   5   VE2EXB   FN35hi   4080   62 
 2009-11-27 08:10   K6HX   7.040108   -19   0   CM87ux   5   KC2STA   FN32bv   4077   67 
 2009-11-27 06:46   KC2STA   7.040090   -23   0   FN32bv   5   K6HX   CM87ux   4077   279 
 2009-11-27 06:42   NU3E   7.040049   -24   0   FN20pb   5   K6HX   CM87ux   4068   282 
 2009-11-27 06:48   K6HX   7.040110   -20   0   CM87ux   5   NU3E   FN20pb   4068   71 
 2009-11-27 11:10   N2NOM   7.040135   -13   0   FN22bg   5   K6HX   CM87ux   3926   279 
 2009-11-27 11:38   K6HX   7.040104   -8   0   CM87ux   5   N2NOM   FN22bg   3926   68 
 2009-11-27 07:08   K6HX   7.040106   -16   0   CM87ux   5   K3BXO   FM19ma   3905   74 
 2009-11-27 07:24   K3BXO   7.040093   -26   0   FM19ma   0.01   K6HX   CM87ux   3905   283 
 2009-11-28 05:16   WB4KLJ   7.040126   -20   0   FM18ku   2   K6HX   CM87ux   3895   283 
 2009-11-27 07:30   K6HX   7.040107   -28   0   CM87ux   5   K1BZ   FM19   3887   73 
 2009-11-27 13:34   VE3EWW   7.040145   -26   0   FN03   0.2   K6HX   CM87ux   3653   275 
 2009-11-27 22:50   K6HX   7.040104   -27   0   CM87ux   5   N4AU   EM62vp   3306   89 
 2009-11-27 22:54   N4AU   7.040160   -28   0   EM62vp   1   K6HX   CM87ux   3306   291 
 2009-11-27 06:44   NU8D   7.040091   -9   -1   EM79uh   5   K6HX   CM87ux   3279   280 
 2009-11-27 07:08   K6HX   7.040109   -18   0   CM87ux   5   NU8D   EM79uh   3279   75 
 2009-11-28 01:08   W3PM   7.040086   -25   0   EM64or   1   K6HX   CM87ux   3180   287 
 2009-11-27 23:00   K6HX   7.040107   -25   0   CM87ux   5   NG5H   EM25ju   2411   87 
 2009-11-27 11:08   N0SF   7.040152   -25   0   EM26   5   K6HX   CM87ux   2410   282 
 2009-11-28 01:42   935DTE   7.040136   -20   1   DL61   0.02   K6HX   CM87ux   2346   325 
 2009-11-28 00:20   K0FT   7.040055   -5   0   EM17   5   K6HX   CM87ux   2214   279 
 2009-11-28 00:24   K6HX   7.040137   -23   0   CM87ux   5   K0FT   EM17   2214   84 
 2009-11-27 06:44   VE5MU   7.040063   -3   -1   DO70qk   20   K6HX   CM87ux   1966   232 
 2009-11-27 06:48   K6HX   7.040110   -12   -1   CM87ux   5   VE5MU   DO70qk   1966   40 
 2009-11-28 03:24   VE6OG   7.040150   -4   0   DO33fn   20   K6HX   CM87ux   1858   205 
 2009-11-28 00:24   K6HX   7.040105   -16   0   CM87ux   5   VE6OG   DO33fn   1858   18 
 2009-11-27 14:02   W6YQ   7.040090   +2   0   DN84ic   10   K6HX   CM87ux   1728   253 
 2009-11-27 19:10   KE5ZGI   7.040077   -19   0   DM72aw   5   K6HX   CM87ux   1579   295 
 2009-11-27 19:02   K6HX   7.040104   -24   0   CM87ux   5   KE5ZGI   DM72aw   1579   106 
 2009-11-28 01:20   W0AEW   7.040061   -21   0   DN70ke   1   K6HX   CM87ux   1499   266 
 2009-11-28 02:28   K6HX   7.040106   -20   0   CM87ux   5   W0AEW   DN70ke   1499   75 
 2009-11-28 03:26   K6HX   7.040063   -12   0   CM87ux   5   WA7HL/P   DM51ck   1353   119 
 2009-11-28 05:10   N4ABN   7.040047   0   0   DM59pd   5   K6HX   CM87ux   1187   268 
 2009-11-28 05:14   K6HX   7.040103   -13   0   CM87ux   5   N4ABN   DM59pd   1187   80 
 2009-11-28 03:02   K6HX   7.040118   -16   0   CM87ux   5   N7SET   CN87us   1089   0 
 2009-11-28 02:56   N7SET   7.040081   -4   0   CN87us   5   K6HX   CM87ux   1089   180 
 2009-11-28 02:28   K6HX   7.040153   -24   0   CM87ux   5   WA7NWP   CN87wq   1080   1 
 2009-11-28 02:42   WA7NWP   7.040047   -6   -1   CN87wq   10   K6HX   CM87ux   1080   181 
 2009-11-27 06:48   K6HX   7.040113   -1   0   CM87ux   5   W7RDP   CN87xo   1070   1 
 2009-11-27 06:54   W7RDP   7.040163   -7   0   CN87xo   5   K6HX   CM87ux   1070   181 
 2009-11-27 07:18   K6HX   7.040121   -18   2   CM87ux   5   K7EK   CN87tb   1010   360 
 2009-11-27 09:54   WA7KGX   7.040034   +4   0   CN85no   100   K6HX   CM87ux   849   177 
 2009-11-27 10:00   K6HX   7.040100   -8   0   CM87ux   5   WA7KGX   CN85no   849   357 
 2009-11-28 01:34   K6HX   7.040099   -7   0   CM87ux   5   W6NIA   DM13ed   683   140 
 2009-11-28 01:28   W6NIA   7.040099   -6   0   DM13ed   2   K6HX   CM87ux   683   323 
 2009-11-27 08:50   K6HX   7.040111   -22   0   CM87ux   5   AC7SM   DM26ie   652   106 
 2009-11-27 06:50   AC7SM   7.040110   -20   0   DM26ie   5   K6HX   CM87ux   652   290 
 2009-11-27 07:04   W6PDD   7.040056   -19   0   DM04nf   2   K6HX   CM87ux   518   325 
 2009-11-27 07:18   K6HX   7.040094   -20   0   CM87ux   5   W6PDD   DM04nf   518   143 
 2009-11-27 06:42   WB6RQN   7.040094   -9   0   CM98mq   50   K6HX   CM87ux   140   236 
 2009-11-27 07:08   K6HX   7.040106   -19   0   CM87ux   5   WB6RQN   CM98mq   140   55 
 2009-11-27 21:28   K6HX   7.040104   -14   0   CM87ux   5   K6PJV   CM98iq   118   48 
 2009-11-27 20:20   K6PJV   7.040096   -8   0   CM98iq   5   K6HX   CM87ux   118   228 
 2009-11-27 14:18   K6HX   7.040098   -18   0   CM87ux   5   N6MQL   CM98ho   106   49 
 2009-11-27 06:52   N6MQL   7.040120   -20   0   CM98ho   5   K6HX   CM87ux   106   229 
 2009-11-27 20:42   AA7EE   7.040088   -15   0   CM87ut   2   K6HX   CM87ux   19   0 
 2009-11-27 20:56   K6HX   7.040112   -25   0   CM87ux   5   AA7EE   CM87ut   19   180 
 2009-11-27 07:06   NN6RF   7.040069   -15   0   CM87uw   2   K6HX   CM87ux   5   0 
 2009-11-27 07:08   K6HX   7.040111   -8   0   CM87ux   5   NN6RF   CM87uw   5   180 

New Google Voice Number

November 27, 2009 | General | By: Mark VandeWettering

Courtesy of Zeid, I finally got an invite to use Google Voice. I’ll write more about this when I figure more about it, but at a minimum, it gives you a real phone number (amazingly, for free) which anyone can call and leave voice mail. You can configure it to ring a different phone (say, your cell phone) or send it directly to voicemail. You can access your voice mail in the conventional way, or by using a computer online. It even automatically transcribes the message into text! Very cool, and thanks Zeid for hooking me up.

Here’s an example of what you can do. This is a little flash widget. If you click on it, you can type your own name and a number that you can be reached at. Google will then call you back and hook me to my voicemail (or, if I configured it differently, ring my cell). Give it a try if you like. I’m just starting this, and it seems that you can’t select the “Conceal my number” checkbox if you want this to work. It also won’t work from international numbers.

Addendum: Here is an example of what Google Voice can do with a voicemail message.

FreeBSD 8.0 is released…

November 26, 2009 | Operating Systems | By: Mark VandeWettering

I’ve been a long time fan of FreeBSD, going all the way back to the 1.1.5.1 days (and used regular BSD going back even further). Today, I still have a server which runs FreeBSD, as well as another desktop which is running Ubuntu. Which one I prefer is not really something I choose to argue (or even spend much time thinking about) but I did notice that FreeBSD 8.0 was just released.

FreeBSD 8.0-RELEASE Release Notes.

Back on WSPR today…

November 26, 2009 | Amateur Radio | By: Mark VandeWettering

Well, I finally dug up all the cables I needed and hooked up my little HP netbook to my radio again, and got it going with the new WSPR 2.0 software. As of this moment, I’m beaconing out at 5w on the traditional 30m watering hole, and getting pretty good domestic spots. I might try shifting to a different band a bit later in the day (maybe 15m, I’ve been curious about how good 15 has been lately).

17 spots:

Timestamp Call MHz SNR Drift Grid Pwr Reporter RGrid km az
 2009-11-26 16:46   K0VM   10.140263   -12   0   EN42db   1   K6HX   CM87   2710   270 
 2009-11-26 16:46   W9HLY   10.140114   -17   0   EN70mt   1   K6HX   CM87   3279   276 
 2009-11-26 16:44   K6HX   10.140207   -19   0   CM87ux   5   NG5H   EM26ja   2406   87 
 2009-11-26 16:44   K6HX   10.140221   -24   0   CM87ux   5   KH7HJ   BL01xj   3881   252 
 2009-11-26 16:44   K6HX   10.140160   -21   1   CM87ux   5   W4SWQ   FM06   3798   79 
 2009-11-26 16:44   K6HX   10.140264   -15   0   CM87ux   5   WA7NWP   CN87wq   1080   1 
 2009-11-26 16:44   K6HX   10.140223   -15   0   CM87ux   5   K0VM   EN42db   2629   70 
 2009-11-26 16:44   K6HX   10.140206   -16   0   CM87ux   5   W9HLY   EN70mt   3199   72 
 2009-11-26 16:42   W3HH   10.140159   -23   0   EL89vb   1   K6HX   CM87   3878   295 
 2009-11-26 16:42   KD0BIK   10.140191   -8   0   DM79np   5   K6HX   CM87   1595   267 
 2009-11-26 16:42   W3GXT   10.140206   -24   0   FM19ol   2   K6HX   CM87   3988   282 
 2009-11-26 16:40   KH7HJ   10.140128   -20   0   BL01xj   10   K6HX   CM87   3801   54 
 2009-11-26 16:40   KC8YJJ   10.140214   -19   0   EN90pl   5   K6HX   CM87   3639   279 
 2009-11-26 16:38   WA7KGX   10.140131   +12   0   CN85no   100   K6HX   CM87   904   181 
 2009-11-26 16:36   K6HX   10.140209   -20   0   CM87ux   5   KD0BIK   DM79np   1518   78 
 2009-11-26 16:36   K6HX   14.097097   +2   0   CM87ux   5   WA7KGX   CN85no   849   357 
 2009-11-26 16:36   K6HX   10.140178   -1   0   CM87ux   5   WA7HL/P   DM51ck   1353   119 

SO-67 Audio…

November 22, 2009 | Amateur Radio, Amateur Satellite | By: Mark VandeWettering

John, K8YSE recorded a North American pass of SO-67 (the new South African ham satellite) and posted the audio on his website. It appears the audio quality is actually pretty good. I’ll have to be trying it out fairly soon.

SO-67_22Nov2009_141052z.mp3

A simple, naive implementation of a MasterMind solver

November 22, 2009 | Games and Diversions | By: Mark VandeWettering

Okay, I woke up this morning, and decided to code up a version of a MasterMind solver. About fifteen minutes later, I had this tremendously slow implementation, which nevertheless seems to solve patterns very pretty quickly (averaged just 4.71 guesses in the short run of 100 trials that I just ran. It’s tremendously slow though, for reasons which I should have guessed before I wrote it. Nevertheless, it does work fast enough that if you wanted to write a Mastermind solver, it would work just fine.

Here’s the idea. Start by simply trying to guess the code by picking one at random. Assuming that you didn’t win, you need to generate a new guess. Let’s generate one and pretend that it was the secret. If you evaluate it against all the previous guesses you make, it would need give the same results. If it doesn’t, it can’t be the secret, so don’t use it as your guess. Try a different one.

That’s it. Of course the reason it’s slow is that when you get to the end, very few of the random choices you’ll make will match all the previous results (there are 1296 possibilities in the 6,4 version of classic Mastermind), so you might have to try lots and lots and lots of guesses before you find the consistent one. The better way would be to use a list of all possible codes, and strike out the ones in each round that are inconsistent with the previous guesses. Then you can select among all consistent codes. I’ll write up that optimization shortly, which should speed up the code by several hundred times. But this one does work… check it out.

#!/usr/bin/env python
#
# A naive implementation of the game MasterMind, to test some ideas 
# that I learned in a brief scan of some of the known literature.
#

import random
from sets import Set

# traditional Mastermind uses six different colors, not exactly certain
# what they were, so I chose Red/Yellow/Blue/Orange/Green/Purple...

colors = ['R', 'Y', 'B', 'O', 'G', 'P']


# generate a random secret code (or guess)

def randomcode():
        return ''.join([random.choice(colors) for i in range(4)])

def evaluate(guess, secret):
        b, w = 0, 0
        gs, ss = Set([]), Set([])
        for i in range(4):
            if guess[i] == secret[i]:
                b = b + 1 
            else:
                gs.add(guess[i])
                ss.add(secret[i])
        return b, len(gs.intersection(ss))

def solve(secret):
        history = []
        guess = randomcode()
        nguesses = 1
        while True:
                b, w = evaluate(guess, secret)
                history.append((guess, b, w))
                print guess, b, w
                if b == 4:
                        break   # we solved it...
                # generate a new random guess, consistent with
                # all the previous guesses.
                nguesses = nguesses + 1 
                while True:
                        guess = randomcode()
                        consistent = True
                        for g, b, w in history:
                                nb, nw = evaluate(guess, g)
                                if nb != b or nw != w:
                                        # nope, not consistent
                                        consistent=False
                                        break
                        if consistent:
                                break
        print
        return nguesses

ROUNDS = 100
totalguesses = 0

for x in range(ROUNDS):
        totalguesses = totalguesses + solve(randomcode())

print "average number of guesses was %.2f" % (float(totalguesses)/ROUNDS)

Addendum: I coded up the optimization that I mentioned above, and it seemed not to help that much. Run time dropped from 21 seconds to 17 or so. Not very good. Perhaps I don’t know what’s going on here. Then again, I still haven’t had any caffeine this morning, so perhaps my puzzler isn’t quite up to speed yet.

Investigations into the Master Mind Board Game

November 21, 2009 | Games and Diversions | By: Mark VandeWettering

Over at the Programming Praxis blog, the task of the day is to write a program to solve the game Mastermind. Mastermind is actually a fairly interesting game mathematically speaking, and has a fairly rich set of mathematics behind it, and yet it’s actually small enough to analyze easily using modern computing power. I might try to use this as a test program to try out the new Go programming language from Google. In the mean time, here are some links:

Investigations into the Master Mind Board Game

Here’s a link to computer science luminary Don Knuth’s paper The Computer As Master Mind

Orion Nebula

November 21, 2009 | Astronomy | By: Mark VandeWettering

IMG0012
IMG0012
21st November, 2009


Dan Lyke of flutterby drew my attention to the astrometry pool on Flickr. If you upload an astrophotograph to this group, a process comes by later and tries to identify the stars in your image, and adds annotations and labels to it. Very nifty. Check it out. Try clicking the image above, and it will send you to the Flickr page with the annotations.

Creating an Anaglyph from a Stereograph

November 20, 2009 | 3D | By: Mark VandeWettering

Back in 2005, I wrote a little blog post about creating stereo images with the GIMP along with a screencast. Little did I know that a couple of years later, I’d end up learning far more about stereo imaging when I became the stereo rendering lead for Toy Story and Toy Story 2. This post has circulated back to the sidebar in my “years ago on this date” section, so I thought I’d resurrect this video (the links were broken) and even though it is dated, it’s still pretty good information, so check I thought I’d upload it to blip.tv (I would have done Youtube, but it’s 11 minutes long, and Youtube rejected it) and make it available again. Enjoy!



Handmade Cigar Box Instruments – Ukuleles – Banjos – Guitars

November 20, 2009 | Music | By: Mark VandeWettering

It’s been a while since I posted a link to anything related to home made musical instruments, so when I ran across this page this morning, I thought of my friend Tom and his love of quirky instruments, and decided to pass it along. Papa’s Boxes sells both kits and completed ukuleles and banjos made from cigar boxes. Pretty neat folk instruments. Check it out.

Handmade Cigar Box Instruments – Ukuleles – Banjos – Guitars