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

global imgdir altprint currmap
set currmap full_overall

canvas_set_scrollregion 0 0 1275 768

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

if {$loadsat == 1} {
   canvas_loadmap full_track full_track2 full atvs
} elseif {$loadsat == 2} {
   canvas_loadmap full_track full_track2 full atir
} else {
   canvas_loadmap full_track full_track2
}

global min_long max_long min_latt max_latt
set min_long 20
set max_long 116
set min_latt 8
set max_latt 52

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) 24 ;# The minimum distance we can check
set map_specs(dxy)  5 ;# The distance (in canvas units) for $min nm

set xbase(20) 1250.0 ; set xbase(22) 1225.0 ; set xbase(24) 1201.0
set xbase(26) 1176.0 ; set xbase(28) 1150.0 ; set xbase(30) 1127.0
set xbase(32) 1099.0 ; set xbase(34) 1075.0 ; set xbase(36) 1050.0
set xbase(38) 1026.0 ; set xbase(40) 1001.0 ; set xbase(42)  975.0
set xbase(44)  949.0 ; set xbase(46)  925.0 ; set xbase(48)  900.0
set xbase(50)  874.0 ; set xbase(52)  851.0 ; set xbase(54)  826.0
set xbase(56)  799.0 ; set xbase(58)  775.0 ; set xbase(60)  749.0
set xbase(62)  726.0 ; set xbase(64)  700.0 ; set xbase(66)  675.0
set xbase(68)  651.0 ; set xbase(70)  625.0 ; set xbase(72)  600.0
set xbase(74)  575.0 ; set xbase(76)  551.0 ; set xbase(78)  527.0
set xbase(80)  502.0 ; set xbase(82)  475.0 ; set xbase(84)  450.0
set xbase(86)  425.0 ; set xbase(88)  401.0 ; set xbase(90)  375.0
set xbase(92)  351.0 ; set xbase(94)  327.0 ; set xbase(96)  301.0
set xbase(98)  275.0 ; set xbase(100) 251.0 ; set xbase(102) 226.0
set xbase(104) 201.0 ; set xbase(106) 177.0 ; set xbase(108) 151.0
set xbase(110) 126.0 ; set xbase(112) 101.0 ; set xbase(114)  75.0
set xbase(116)  51.0

set ybase(8) 766.0
set ybase(10) 736.0 ; set ybase(12) 706.0 ; set ybase(14) 676.0
set ybase(16) 645.0 ; set ybase(18) 614.0 ; set ybase(20) 583.0
set ybase(22) 552.0 ; set ybase(24) 520.0 ; set ybase(26) 486.0
set ybase(28) 455.0 ; set ybase(30) 421.0 ; set ybase(32) 387.0
set ybase(34) 353.0 ; set ybase(36) 318.0 ; set ybase(38) 280.0
set ybase(40) 243.0 ; set ybase(42) 203.0 ; set ybase(44) 163.0
set ybase(46) 122.0 ; set ybase(48)  79.0 ; set ybase(50)  35.0
set ybase(52)   0.0

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

