MAPCALIB 1.0 Two point .bmp map calibration routine. 5/5/2001 THEORY OF OPERATION Mapcalib is the companion map calibration program for Movmap. It enables the use of bitmapped (.bmp) maps. Movmap will continuously convert and display the current latitude and longitude position on properly calibrated .bmp maps. Mapcalib also allows the user to designate "points of interest" on .bmp maps and associate pictures (.bmp files) and sounds (.wav) files with the points. When properly stored Movmap will display the associated pictures and play the sounds in the perscribed sequence as the points of interest are approached. Upon execution Mapcalib will look for three directories on the CD-ROM drive. If not found on the CD-ROM drive Mapcalib will look for them on the current drive. The directories are: \maps \pictures \sounds It also expects to find a fourth directory on the current drive. \mapprog Mapcalib cannot execute correctly without the presence of these four directores. In addition the \maps directory must contain at least one file of the format map*.bmp in order for Mapcalib to execute. The map*.bmp file must be a reasonably accurate map section that covers a relatively small area (<400 sq. miles). The map must be reasonably accurate since a two point calibration method is used. If the map area becomes too large the deformations due to the mapping of a spherical surface onto a flat plane will impact the map calibration accuracy. Movmap will ask you to associate two points on the stored .bmp file with known latitudes and longitudes. Using standard methods these two points allow all other lat/lon pairs to be mapped to an x/y pel position on the stored .bmp file. Once a map is calibrated sites (points of interest) can be designated and previously stored pictures and/or sounds can be associated with the sites. Movmap produces two output files (mapsfile.cfg and sitefile.cfg) that contain the calibration information and are placed in the \mapprog directory on the default drive. SETUP Unzip the mapcalib bundle into the mapprog directory on your perferred hard drive. Like Movemap Mapcalib uses Borland controls so you must move BPMCC.DLL to the \os2\dll directory. Mapcalib use the os2 multimedia extensions so you must have these installed or Mapcalib will not execute. OPERATION MAP CALIBRATION - Store your bitmapped (OS/2 .bmp file type) map in the \maps directory on the same hard drive that you execute mapcalib from. - Execute Mapcalib and maximize the window after it comes up. It will be far easier to deal with the calibration procedure if you have the largest window possible. - Select Control->Load BMP File. This will open the "Map Parameters" dialogue window. - You have the following control selections in the Map Parameters window: - Collection Radio Buttons, The 11 listed are the ones I use for my Civil War maps. It really doesn't matter what the heading are; however, you must select one. This control gives you the ability to have multiple maps that cover the same relative area. Movemap will display the first map it comes to of the right resolution in the designated collection that covers the lat/lon that your are at. Therefore if you have two maps that cover the same area at the same resolution this control allows you to select which one to display. - Resolution Radio Buttons, High Medium or Low. Movemap will give preference to the resolution you tell it you want. You should not calibrate two maps with the same resolution and the same collection because movemap will never display the second one. - Bitmap File Names Field - Mapcalib displays in this field all files of the format map*.bmp that it found in the \map directory on either the CD-ROM or default drive. Select the map file that you want to calibrate. - Map Description Field - Enter up to 25 characters in this field. They will be displayed on the heading line when this map is brought up. Blanks are not allowed and the underline (_) character is interpreted as a blank. I usually put something discriptive in this field like Gettysburg_1A_High to denote that the .bmp file I'm using is the gety1a map and I selected High resolution. - Sites Radio Buttons - All selections beyond 2 are greyed out. A future version of Mapcalib may allow the use of more calibration sites to handle maps with known systematic errors in them. For the present the "2" must be selected. - Select Done (or Cancel if you wish to start over). - After selecting Done above the Static Calibration Dialog window will open. You will have to know the precise latitude and longitude of two points on the map you are calculating. It is best to select two points that are as far apart vertically and horizontally as possible. Picking two points near the opposite corners of the bitmap is the best strategy. If you pick them too close together Mapcalib will give you a warning message. - Place the mouse pointer on the first of the known calibration points and depress the left mouse button. A small red circle should appear around the point and the digit "1" will be displayed. Also, the x and y pel positions will be displayed in the x-pell position and y-pell position fields. - Enter the longitude and latitude in degrees, minutes and seconds in the respective fields for the first calibration point. Remember that West Longitudes are negative degrees numbers. (positive minutes and seconds). - Press "Done". - Move the vertical and horizontal slider bars until your second calibration point is in the main window. - Select Calibration->Record Second Point. This will reopen the Static Calibration Dialogue window with the "Second Point" radio button selected. If it is not then you have done something wrong and must start over. - From this point proceed as with the first calibration point; clicking the left mouse botton on the second calibration point and entering the latitude and longitude of the second calibration point. At this point you should have one full calibration record in the mapsfile.cfg in the \mapprog directory on the default drive. You can check by Selecting Sites->Review. This will open the Historical Site Information dialogue window. Select the map name from the list and make sure the collection is correct. When you press Done Mapcalib should display the map you just calibrated WITHOUT any error messages. If you get an error message it is likely you either map an error in calibration or did not designate the right map or collection in this Dialogue. In addition the information you put in the Map Description field above should now be displayed on the upper line of the window. - Select Sites->Reset to continue with map calibration. This is necessary since Mapcalib thinks you are reviewing sites (which you're not cause you don't have any yet). Control->Reset Calib State at this time does nothing. Eventually it will reset the calibration state to allow for a more elegant way to stop at any point in a calibration and reset the calibration file to the state prior to beginning. For now my recommendation is that you backup your mapsfile.cfg prior to each new map calibration and, if for any reason you need to break your calibration after having identified a single calibration point, restore the old file and start over. If all you want to do is calibrate maps this is all the further you have to go. If you want to add sites-of-interest proceed to the next section. SITE DEFINITION The site definition function allows you to add, delete, move and review the sites you have entered. By selecting one of these from the menu you place Mapcalib in a "site definition" state. In order to complete any of these functions you must select Sites->Reset to place Mapcalib in a non-site state. ADD A SITE - Select Sites->Add. This will open the Historical Site Information dialogue window. - The Map Name window will contain the names of all the MAP*.BMP files that Mapcalib was able to find in the \maps directory. Select one of the map*.bmp file that you have calibrated previously. - Select the Collection radio button that corresponds to the MAP*.BMP file as calibrated. This must be the same collection as the collection selected when the map was calibrated. - The Calibration Sites radio button will default to 2 for this release. - Select Done. - Mapcalib will search the mapsfile.cfg for a calibration record that matches the parameters that you just entered. If it finds one it will display it and place the Mapcalib program in an "Add Site" state. In this state a left click on the mouse pointer will begin the add procedure. - Position the mouse pointer on the map at the point you want to be the point of interest and left click. This will place a green circle on the map at the point of interest and open the Site Sound and Pictures dialogue window. - Enter up to 12 digits in the Site Name field. Blanks are not allowed and underscores are interpreted as blanks. - Enter the subdirectories for both the .BMP files and the .WAV files in the Low Level Pic Dir and the Low Level Sound Dir fields respectively. The entries must be 8 characters long and follow OS/2 directory naming conventions. These fields will allow you to keep the pictures and words seperate for different collections. For example I use getyburg in both these fields to keep my Gettysburg pictures and words seperate from all the others. By doing so Movmap will go to the \pictures\getyburg and the \sounds\getyburg directories to find the associated files. These directories as you will see must have been pre-defined. - Enter in sequence, left to right and top to bottom, the eight character names (do not include the ".BMP" or ".WAV" file types in these fields. These files must have been predefined in the \pictures and \sounds subdirectories indentified above. The sequence you enter the names will determine how Movemap displays/plays the files. If you want to display a picture and then tell about it enter the .BMP file name first then the .WAV file name. Movmap will bring the picture up and immediately start playing the .WAV file if there is one immediately after the .BMP file. If there are two or more .BMP files in a row Movemap will display each for about 12 seconds. You can have up to 20 file names for each site of interest. - When you have entered from 0-20 file names select Done. The information just entered will be written to the sitefile.cfg file in the \mapprog directory on the default drive. - If you have more sites of interest to define continue by moving the mouse pointer to the location of your next site of interest and proceed as above. When you have completed adding all the sites of interest you wish select Sites->Reset. DELETE A SITE - Select Sites->Delete This will open the Historical Site Information dialogue window. - Proceed as above in ADDING A SITE by selecting the appropriate map file and collection. Select Done when complete. - This will retrieve and display the selected map and place all the previously defined sites on the map. It will also place Mapcalib in the "delete site" state. - Place the mouse cursor on the red dot indicating the site you wish to delete. Click the left mouse button. THE SITE WILL CONTINUE TO BE DISPLAYED at this point. - If you have more sites that wish to delete continue moving the cursor and clicking until you have clicked on all the sites you want deleted. - Select Sites->Reset The map will be redisplayed without the sites that you selected for deletion. MOVE A SITE - Select Sites->Move This will open the Historical Site Information dialogue window. - Proceed as above in ADDING A SITE by selecting the appropriate map file and collection. Select Done when complete. - This will retrieve and display the selected map and place all the previously defined sites on the map. It will also place Mapcalib in the "move site" state. - Place the mouse cursor on the red dot indicating the site you wish to move. Click the left mouse button. THE SITE WILL CONTINUE TO BE DISPLAYED at this point. However, a dark red circle will be drawn around the point you selected. - Now place the mouse cursor on the location that you wish to move the site to. THE SITE WILL STILL CONTINUE TO BE DISPLAYED at the previous site point. However, a green circle will be drawn around the new point and the site tag will be added. - If you have more sites to move continue as above until you have moved all the sites you plan to move. Select Sites->Reset when you have completed the moves and the map will be redisplayed with the sites all moved. REVIEW A SITE This function is used to review the sites and sounds associated with sites you have entered. It should display the pictures and play the sound files exactly the way that Movemap will in real time. - Select Sites->Review. This will open the Historical Site Information dialogue window. - Proceed as above in ADDING A SITE by selecting the appropriate map file and collection. Select Done when complete. - This will retrieve and display the selected map and place all the previously defined sites on the map. It will also place Mapcalib in the "review site" state. - Place the mouse cursor on the red dot indicating the site you wish to review. Click the left mouse button. This will start the sequence of pictures and sound files that you had previously associated with this site. - When complete you my left click on another site. When you have reviewed all the sites you wish Select Sites->Reset. Tom Danninger 5/6/2001