




                              Simpler WEFAX
          

          When Keith Sueker 1introduced us to the idea of using  digital 
     processing  and dot matrix printers to observe analog  weather  fax 
     signals,  he  spawned a multitude of amateur  experimenters  and  a 
     variety  of WEFAX interface products. His basic  interface  between 
     the HF receiver and the computer was fairly simple, but did contain 
     enough  analog  processing so it actually degraded or  smeared  the 
     incoming signals due to bandwidth limiting and nonlinear  effects3. 
     A more effective interface for computers with a cassette input  was 
     soon found to be NO interface; ie, feed the receiver audio directly 
     into  the cassette FSK demodulator built into the  computer.  These 
     demodulators generally counted computer clock pulses between  audio 
     zero  crossings  and  used a single threshold to output a  1  or  0 
     depending  on the audio frequency coming in. I used this  technique 
     on  my Sharp PC-5000 laptop and got excellent map  copying  results 
     with  some  fairly simple software. W4AVO has a family  of  similar 
     programs  for the Tandy 100. Other programs exist for a variety  of 
     the  older cassette computers. Unfortunately cassette  support  has 
     disappeared on current computers.

          It  is obvious that if you take the clock pulse count  between 
     audio  zero  crossings  (ie, once every 1/2 cycle)  you  have  very 
     directly  made  a  high resolution gray shade  measurement  of  the 
     incoming fax audio at that instant. For maps you need only  compare 
     this  to a single threshold count half way between Black and  White 
     level  counts  and  paint pixels black or white  depending  on  the 
     comparison result. Satellite photo's are multi-shaded, however,  so 
     the count must be transformed to something the display  recognizes. 
     To   get  from a 1/2 cycle count (say the number 54) to  a  display 
     byte that represents that pixel's "gray shade", you compare 54 with 
     a  series of values starting at the Black level count (say a  count 
     of  22).  The display byte is first nulled to zero (black)  and  is 
     incremented by 1 for each threshold that 54 exceeds. In this  exam-
     ple  with  thresholds of 30, 39, 49, 60, 72, etc. the  54  converts 
     into a gray shade byte of 3 since there are 3 thresholds between 22 
     and  54.  We first applied this to a Commodore 64 system  which  is 
     described in more detail in reference 3.

          When we bought an 80286 IBM  clone laptop  (the Bondwell B310) 
     last  summer, we became interested in adapting the gray shade  pro-
     gram  to  IBM-like machines. The computer has  to share  it's  time 
     between  counting clock pulses (as above) for FSK demodulation  and 
     manipulating  the  many thousands of pixel bytes into  the  various 
     formats for screen display, printer display, and disk save. Comput-
     er speed and memory becomes an ultimate limiter on how much resolu-
     tion  with how many gray shades (or colors) you can  display.  With 
     the  B310's 12 mhz. clock, it's 1 mb of memory, and more  efficient 
     microprocessor, I had all the makings for a jump beyond the C-64.

          About this  same time Jerry Dahl had an article4 describing an 
     IBM   compatible  interface with gray shades which I  examined  with 






     interest.  It  is  a "gray shade" extension  of  Sueker's  original 
     interface.  Jerry is obviously a talented circuit designer  and  he 
     combined phase locked loops, high speed A/D converters,  electronic 
     filters,  etc. to derive pixel gray shade bytes to be  sequentially 
     fed  to  the  computer for formatting. His  analog  processing  was 
     apparently  signal  level dependent since he had to  invent  a  new 
     statistically  derived digital AGC to ameliorate that. When I  com-
     pared that with my simple clipper (to remove those same gain varia-
     tions that bothered Jerry and also strip off AM noise) along with a 
     few lines of software code to count pulses, it was NO CONTEST!  

          Since  the  laptop and most IBM clones don't have  game  ports 
     like  the C-64, I created a better clipper interface to  feed  into  
     the  universally  available RS232 serial port.  The  schematic   is 
     shown  in figure -. By using a low quiescent current IC  clipper  I 
     was able to power the circuit with +12 volts and -12 volts from two 
     unused serial port logic lines. Isolation resistors  in the  inter-
     face protect your computer from a dead-short failure of any of  the 
     other components. Parts were chosen from Radio Shack stock.
          
          While  the  radio to computer interfaces described  above  are 
     widely  different  in cost and complexity, there's hardly  a  dimes 
     worth  of difference in results compared to the impact of the  dis-
     play mechanism, be it printer, CRT, or laptop LCD. More pixels  per 
     line and more gray shades (colors)  per pixel give you more  infor-
     mation content and prettier pictures. On normal printers, somewhere 
     around  1000  dots/line  are available. You can get  a  modicum  of 
     shading   on  each individual dot by making more than  one  printer 
     pass. Using several adjoining printer dots as a resolution cell and 
     making the dots printed per cell vary with gray  shades allows gray 
     shade  printing---at  the expense of resolution. A  second  printer 
     pass doubles the information content and can be used to either give 
     more  gray  shades  or a smaller resolution cell.  Dithering  is  a 
     common  technique  for increasing gray shades but  it  also  lowers 
     resolution. This can be done by FM'ing the incoming audio  slightly 
     or  more  simply doing the equivalent in software (the  Navy  WEFAX 
     station  at Norfolk offers you free dithering in the form of  "hum" 
     on  their signal). It's hard to see where dithering  adds  anything 
     except  to  manufacturer's claims for gray shades.  The  black  and 
     white LCD pixels on my laptop  are the least tractable of all. With 
     CGA resolution you tend to see individual pixels instead of  groups 
     of pixels. Perhaps with VGA resolution this might improve. B/W maps 
     do display well on LCD, however..

          I have developed several programs aimed at printer  display--8 
     shades  (one printer pass) and 14 shades and a dithered  25  shades 
     (both using two printer passes). I can see no real improvement from 
     the  dithering , but the extra printer pass gives  significant  im-
     provement. A sample 14 shade picture is shown in figure -.

          When  I arrived at the Dayton Hamfest this spring and saw  the 
     bargain  prices  on 80386 computers with super VGA (1024 x  768)  I 
     couldn't  resist.  Using the same old interface and  modifying  the 
     software  to  fit SVGA formatting, I instantly  had  pictures  like 
     figures  - and -. The satellite photos are either  visual  (channel 






     15) or infra-red (channel 14). By using a palette of colors for the 
     IR pictures, you can readily see cloud height and spot the towering 
     thunderstorms.  Visual shots only show cloud location. But  the  IR 
     measures cloud temperature (which gets colder as height  increases) 
     directly in each pixel. As a cruising  sailor, I am most interested 
     in  the winds associated with weather. While the weather maps  give 
     you  a good average wind prediction, the gear-busting  wind  turbu-
     lence  is  best  indicated by the vertical extent  of  the  weather 
     clouds.

          In  developing the programs described above, I have  used  ma-
     chine  language code to get the speed required, but I  have  inter-
     faced these to the user through BASIC programs which almost  every-
     one  can modify. Since the clock pulse counts change directly  with 
     clock frequency, you'll have to POKE in different counts for  other 
     clock speeds. This is explained in a README text file. Programs are 
     included for CGA (640x200), VGA (640x480),and SVGA (1024x768)  with 
     CRT or LCD as a choice. At the moment only the SVGA program  offers 
     pixel  gray shades  and color. The SVGA is configured for the  Tri-
     dent card with 1 mb memory. My son has a Paradise card with 512  kb 
     so  I  may have that available by the time this is  published.  The 
     SVGA  program  also requires at least 1 mb of  extended  memory  to 
     store  one picture (over 800,000 bytes). The printer code  accommo-
     dates the Epson and IBM Pro-printer formats.

          Since  I  use  the WEFAX daily both when I'm  on  an  extended 
     sailing cruise and when at home to provide weather info to  friends 
     who are crossing oceans, these programs are written for easy  daily 
     use with scheduling for automatic operation, automatic  synchroniz-
     ing,  etc.  If  you would like a copy of all   the  IBM  configured 
     programs just sent me a 3 1/2 or 5 1/4 inch disk , freshly  format-
     ted  in your machine with an SASE mailer for return. 3 1/2 is  pre-
     ferred  since  my backup (10 year old grandson) when  I'm  cruising 
     only has that capability.



                                             Ben Vester, K3BC
                                             4921 Bonnie Branch Road
                                             Ellicott City, Md.,21043
     
     References    

     1.   K. Sueker, "Real-Time HF WEFAX maps  on a Dot Matrix  Printer" 
     QST, Mar 1986, pp15-20

     2.   B. Vester, "HF WEFAX for the IBM PC, PCJr and  C64"  Technical 
     Correspondence, QST, May 1987, pp 40-43

     3.   B. Vester, "C64 WEFAX Improvements", Technical Correspondence, 
     QST, Jan 1988,  pp. 47-49

     4.    J. Dahl, "A Weather-Facsimile Package for the IBM  PC",  QST,  
     April 1990, pp. 15-24



