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

global imgdir altprint currmap
set currmap east_coast

canvas_set_scrollregion 0 0 1275 768

if {$altprint} {
   set east_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 {!$east_coast_image} {
   image_message "Loading bitmap image #1 (coord. grid)"
   image create bitmap east_track -file $imgdir/east_coast_js.bmp \
      -background $map_bg -foreground $map_grid
   image_message "Loading bitmap image #2 (land)"
   image create bitmap east_track2 -file $imgdir/east_coast_js-land.bmp \
      -foreground $map_land
   if {!$altprint} { set east_coast_image 1 }
}

if {$loadsat == 1} {
   canvas_loadmap east_track east_track2 eastcoast ecstvs
} elseif {$loadsat == 2} {
   canvas_loadmap east_track east_track2 eastcoast ecstir
} else {
   canvas_loadmap east_track east_track2
}

global min_long max_long min_latt max_latt
set min_long 44
set max_long 90
set min_latt 30
set max_latt 48

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(44) 1257.0 ; set xbase(46) 1205.0 ; set xbase(48) 1152.0
set xbase(50) 1097.0 ; set xbase(52) 1045.0 ; set xbase(54)  992.0
set xbase(56)  941.0 ; set xbase(58)  888.0 ; set xbase(60)  834.0
set xbase(62)  781.0 ; set xbase(64)  730.0 ; set xbase(66)  675.0
set xbase(68)  624.0 ; set xbase(70)  570.0 ; set xbase(72)  519.0
set xbase(74)  466.0 ; set xbase(76)  414.0 ; set xbase(78)  361.0
set xbase(80)  307.0 ; set xbase(82)  256.0 ; set xbase(84)  201.0
set xbase(86)  150.0 ; set xbase(88)   96.0 ; set xbase(90)   43.0

set ybase(30) 703.0 ; set ybase(32) 632.0 ; set ybase(34) 558.0
set ybase(36) 483.0 ; set ybase(38) 404.0 ; set ybase(40) 325.0
set ybase(42) 242.0 ; set ybase(44) 157.0 ; set ybase(46)  71.0
set ybase(48)   0.0

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


