
# JStrack:  copyright 1997/2010 by Jim Graham, N5IAL, all rights reserved.
#

global imgdir altprint currmap
set currmap gulf_coast

canvas_set_scrollregion 0 0 1275 768

if {$altprint} {
   set gulf_coast_image 0
   set map_bg white
   set map_land black
   set map_grid #005500
} else {
   set map_bg black
   set map_land #ffa64d
   set map_grid #7dff00
}


if {!$gulf_coast_image} {
   image_message "Loading bitmap image #1 (coord. grid)"
   image create bitmap gulf_track -file $imgdir/gulf_cab2_js.bmp \
      -background $map_bg -foreground $map_grid
   image_message "Loading bitmap image #2 (land)"
   image create bitmap gulf_track2 -file $imgdir/gulf_cab2_js-land.bmp \
      -foreground $map_land
   if {!$altprint} { set gulf_coast_image 1 }
}

if {$loadsat == 1} {
   canvas_loadmap gulf_track gulf_track2 gulf huvs
} elseif {$loadsat == 2} {
   canvas_loadmap gulf_track gulf_track2 gulf huir
} else {
   canvas_loadmap gulf_track gulf_track2
}

global min_long max_long min_latt max_latt
set min_long 62
set max_long 110
set min_latt 12
set max_latt 34

global xbase     ; catch { unset xbase }     ; array set xbase {}
global ybase     ; catch { unset ybase }     ; array set ybase {}
global map_specs ; catch { unset map_specs } ; array set map_specs {}

# calculating map specs:  see notes in ~/src/ht/map_specs.notes
set map_specs(min) 12 ;# The minimum distance we can check
set map_specs(dxy)  5 ;# The distance (in canvas units) for $min nm

set xbase(62) 1242.0 ; set xbase(64) 1192.0 ; set xbase(66) 1141.0
set xbase(68) 1092.0 ; set xbase(70) 1040.0 ; set xbase(72)  987.0
set xbase(74)  940.0 ; set xbase(76)  888.0 ; set xbase(78)  838.0
set xbase(80)  788.0 ; set xbase(82)  739.0 ; set xbase(84)  689.0
set xbase(86)  638.0 ; set xbase(88)  587.0 ; set xbase(90)  538.0
set xbase(92)  489.0 ; set xbase(94)  437.0 ; set xbase(96)  388.0
set xbase(98)  337.0 ; set xbase(100) 287.0 ; set xbase(102) 235.0
set xbase(104) 187.0 ; set xbase(106) 136.0 ; set xbase(108)  85.0
set xbase(110)  34.0

set ybase(12) 707.0 ; set ybase(14) 646.0 ; set ybase(16) 586.0
set ybase(18) 522.0 ; set ybase(20) 462.0 ; set ybase(22) 398.0
set ybase(24) 336.0 ; set ybase(26) 270.0 ; set ybase(28) 202.0
set ybase(30) 136.0 ; set ybase(32)  66.0 ; set ybase(34)   0.0

source $libdir/colors.tcl
source $libdir/coords.tcl


