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

global imgdir altprint currmap
set currmap carib

canvas_set_scrollregion 0 0 1275 768

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

if {$loadsat == 1} {
   canvas_loadmap carib_track carib_track2 carib huvs
} elseif {$loadsat == 2} {
   canvas_loadmap carib_track carib_track2 carib huir
} else {
   canvas_loadmap carib_track carib_track2
}

global min_long max_long min_latt max_latt
set min_long 60
set max_long 92
set min_latt 8
set max_latt 28

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(58) 1270.0 ; set xbase(60) 1200.0 ; set xbase(62) 1130.0
set xbase(64) 1060.0 ; set xbase(66) 990.0 ; set xbase(68) 920.0
set xbase(70) 850.0 ; set xbase(72) 770.0 ; set xbase(74) 700.0
set xbase(76) 630.0 ; set xbase(78) 560.0 ; set xbase(80) 490.0
set xbase(82) 420.0 ; set xbase(84) 350.0 ; set xbase(86) 280.0
set xbase(88) 210.0 ; set xbase(90) 140.0 ; set xbase(92) 70.0

set ybase(8) 738.0 ; set ybase(10) 665.0 ; set ybase(12) 594.0
set ybase(14) 522.0 ; set ybase(16) 451.0 ; set ybase(18) 381.0
set ybase(20) 312.0 ; set ybase(22) 240.0 ; set ybase(24) 166.0
set ybase(26) 96.0 ; set ybase(28) 26.0

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

