"Top Secret"

CyberGuide Prototype

Winter Quarter 1996
2/21/96

Document Author:

Jimmy Billiter

Project Sponsors:

Gregory Abowd
Dietmar Aust

CyberGuide Team:

Gregory Pauswinski (Manager)
Gregory Lim (Architect)
Kevin Levron (Programmer)
Jimmy Billiter (Technical Writer)


Project Description

Visual Basic Cyberguide

The Cyberguide Project was started in March 1995 by the Future Computing Environments (FCE) group and is headed by Gregory Abowd. The Cyberguide "vision" is to develop an intelligent handheld tour guide that has information about surrounding areas and your location. This vision was partially realized in the Summer of 1995, as a non "position-aware" version of the Cyberguide was developed on the Newton for the GVU Demo Days. The Cyberguide continued to evolve, however, with new projects adapting the tool for wider use and flexibility. Here is a look at the latest Cyberguide Project Page.

This project continues the developmental work done by those Cyberguide pioneers. The aim of this venture is to extend the tool's mode of communication by building a version of Cyberguide portable to a Windows platform.

Project Features

Installation Manual

There are two ways to get the Visual Basic CyberGuide:

A.
Get a copy of the built ready-to-install system by clicking here. This assumes you have available (1) PKware and (2)a copy of Netscape installed in c:\netscape

  1. Place this file, "C-GUIDE.ZIP" in a temporary directory on the target system. Run this file to unpack the archive.

    Example :
    C:> mkdir c:\cguide
    C:> copy c-guide.zip c:\cguide
    C:> cd cguide
    C:\CGUIDE> pkunzip c-guide -d
    Now copy VBRUN300.DLL and MSCOMM.VBX to c:\windows\system as necessary. This will install the product into the directory: "C:\CGUIDE"

  2. Start the File Manager and create a new program icon from the file "CGUIDE.EXE"

B.
Get a copy of the source by clicking here.here. This is a zip of *.FRM, *.MAK, *.BMP, and *.DAT for this project. These are the forms, the project, our bitmaps, and datafiles. Simply load the project under Visual Basic and perform a make.


User Guide

1.0 Getting Started With The Cyberguide
2.0 Displaying 'Interesting Thing' Description
3.0 Modifying The Screen

3.1 Centering
3.2 Zooming
4.0 Getting Help

Coming Soon!
5.0 Locating Specific 'Interesting Things'

1.0 Getting Started With The Cyberguide

The Cyberguide tool itself consists of a PC and a pen. The PC contains a built-in tracking device which reflects your position (the arrow symbol) in relation to the location of "Interesting Things" in the room. Interesting Things (IT's) are denoted on the PC screen by a star symbol.

Begin using Cyberguide by taking a few steps toward an IT. Notice the PC updates your position as you walk. The Cyberguide, however, does more than simply navigate you about the room. You can ask for a description and further information on any IT you wish to know more about.

2.0 Displaying "Interesting Thing" Descriptions

Once you notice an IT you find intriguing, you can get pertinent information associated with it. Using the pen, click the corresponding star symbol on the screen. A pop-up screen will display a brief description of the IT. If you would like further information, such as project leader, sponsors, etc., double click on the IT's description. This causes Netscape to be spawned and information will be displayed in the form of HTML documentation. Return to the room map by exiting Netscape.

3.0 Modifying The Screen

As you move about the room, notice that some IT's may appear on screen, while others vanish. For example, as you step left, objects to your left move onto the screen and objects to your right move off the screen. The Cyberguide allows you to modify the screen's display in three ways.

Centering

If you wish to be centered among those IT's in your immediate vicinity, simply click the "Center" icon at the bottom of the screen. The Cyberguide will move the arrow symbol to the center of the PC screen and update the screen accordingly.

Zoom In

If you are concerned with viewing only those IT's near your current position, use the "Zoom In" icon to decrease the portion of the room displayed. Clicking "Zoom Out" once will return the screen to its original display.

Zoom Out

On the other hand, you may wish to increase the size of the room or have the entire room displayed. If so, click the "Zoom Out" icon until Cyberguide displays the room to your satisfaction.

4.0 Getting Help

Once you have begun using the Cyberguide, you can obtain instructions or information at any time by clicking the "Help" icon at the top of the screen. Click "Exit" to return to the former display.

5.0 Locating Specific "Interesting Things"

You may have previous knowledge that a certain "Interesting Thing" is on exhibit in the room. To find the location of this IT, click the "Categories" icon. A selection of categories will be displayed. Clicking a given category will give you a list of titles to choose from. You can display a differnet list of titles by clicking a new category.

Once you find the IT title you're searching for, click the title. The screen will return to a room map display and the location of your IT will be denoted by a flashing star symbol.


Guide To The Source Code

The Visual Basic version of the Cyberguide program consists of two forms, the map form and the exit form. The map form is the main form of the program and as such contains all the objects used for normal execution execution of the program. The exit form is only displayed when a user attempts to exit the program. It prevents an unauthorized exit from the program.

Map Form - CG_MAP

Global constants - These are constants available to all subroutines.

Global variables - These are variables available to all subroutines.


Map

The map screen in Cyberguide that shows the user's location and the location of the ITs currently available for viewing. There are several objects which make up the map view, allow the user to manipulate the map and get information about the ITs; the user position icon, IT icons, IT description box, scroll bars, zoom buttons, center button, demo info button, help button, and various overlays.

- The user position icon shows the user his current location within the mapped area.
- IT icons show the user the location of the ITs.
- The IT description box gives a short description of the IT selected.
- The scroll bars allow the user to move the map.
- The zoom buttons allow the user to increase and decrease the map size.
- The center button centers the map view around the user's current location.
- The demo info button will allow the user to view a list of current ITs.
- The help button gives access to a help system.
- The overlays provide background and display labels.

Map View Objects

imgUserIcon - Icon that indicates the user's position.
Local variables:
None
Methods:
None

imgITIcon - Icon that indicates the IT's position.
Local variables:
newX, newY (integer) New coordinates of the IT description box.
Methods:
Click(index) - Toggles the display of the IT description box when the icon is clicked.

lblIT - IT description box.
Local variables:
X (variant) - Dummy variable.
Methods:
DblClick - Launches the info browser showing the web page of the selected IT when the description box is double clicked.

hsbMap - Horizontal scroll bar.
Local variables:
currentLeft (integer) - Current position of the left edge of the map.
Methods:
Change - Moves the map horizontally when the scroll buttons are clicked.
Scroll - Moves the map horizontally when the scroll tab is moved.

vsbMap - Vertical scroll bar.
Local variables:
currentTop (integer) - Current position of the top edge of the map.
Methods:
Change - Moves the map vertically when the scroll buttons are clicked.
Scroll - Moves the map vertically when the scroll tab is moved.

cmdZoomIn - Zoom in button.
Local variables:
index (integer) - Index for IT data structures.
Methods:
Click - Scales the map and icons such that they become larger when the button is clicked.

cmdZoomOut - Zoom out button.
Local variables:
index (integer) - Index for IT data structures.
Methods:
Click - Scales the map and icons such that they become smaller when the button is clicked.

cmdCenter - Center button.
Local variables:
moveX, moveY (integer) - The amount that the map will move.
Methods:
Click - Centers around the user icon when the button is clicked.

cmdInfo - Demo info button.
(Note: This function has not yet been implemented.)
Local variables:
None
Methods:
None

cmdHelp - Help button.
Local variables:
None
Methods:
Click - Launches the help system when the button is clicked.

picCover1 - Gray area above map view.
Local variables:
None
Methods:
None

picCover2 - Gray area below map view.
Local variables:
None
Methods:
None

picZoom - Provides the 'Zoom' label.
Local variables:
None
Methods:
None

imgMap - Image of map.
Local variables:
NoneMethods:
None

imgMapView - Viewable area of map.
Local variables:
None
Methods:
None


Data access

Functions that initialize the system and interface with the positioning system. There are several functions that initialize various data structures to be used by the map system.

- The function that loads the map form.
- The function that reads the IT data file.
- The function that initializes the IT icons.
- The function that signals an update from positioning system.
- The function that updates user position.
- The function that updates the IT positions.

Data Access Objects

Form_Load - Loads the form and initializes global variables.
Local variables:
index (integer) - Index for IT data structures.

Form_QueryUnload - Prompts for password before exiting program.
Local variables:
None

ReadITs - Reads the IT data file and initializes IT data structures.
Local variables:
index (integer) - Index for IT data structures.
filenum (variant) - File handle for IT data file.
Xpos, Ypos (variant) - Map coordinates from data file.

CreateITs - Sets up the IT icons.
Local variables:
index (integer) - Index for IT data structures.
Xcoord, Ycoord (integer) - Form coordinates for IT icon position.

PositionStrobe - Signals update from positioning system.
Local variables:
None

UpdateUserPos - Updates the user's position.
Local variables:
index (integer) - Index for IT data structures.
IconBottom, IconTop, IconLeft, IconRight (integer) - Edges of user icon.

UpdateITPos - Updates the ITs position.
Local variables:
index (integer) - Index for IT data structures.
IconBottom, IconTop, IconLeft, IconRight (integer) - Edges of IT icon.

UpdateAllPos - Calls UpdateUserPos and UpdateITPos.
Local variables:
None


IR positioning

comm1:
This control object contains the code for receiving serial data. It gets setup by Form_Load and is controlled by "timer1" and "timer2".

Note: The following two objects are unnecessary unless a real GPS is used.

timer1:
Provides interrupts at regular intervals. Sampling of user's position is done once per each interrupt from "timer1", which enables "timer2." Every "timer1" interval, "comm1" reads all characters from the buffer. The serial data is analyzed by comparing various parts of the trailing part of the input string by comparing it to values in a lookup table. If the data is incorrectly formatted, an error has occurred, and the position is unchanged. If the data indicates that the serial hardware has not been initialized, "timer2" is turned off and the code for the serial hardware is transmitted to the serial hardware and executed. "timer2" is turned back on.
timer2:
Sample interval timer. "timer2"'s interval determines the length of time the serial port is sampled. If "timer2" elapses before valid data is read, a flag is set to stop reading serial data.

Exit Form (CG_EXIT)

Global constants

PASSWORD - Password for exiting the program.

Global variables None

Exit

There are several objects that make up the exit screen; the text box, box label, cancel button, and OK buttonn

- The text box is where the password is typed.
- The box label provides the 'Enter password' label.
- The cancel button exits the exit screen.
- The OK button attempts to exit the program.

Exit Objects

txtPasswd - Box where the password is typed.
Local variables:
None
Methods:
None

lblPasswd - Label for password box.
Local variables:
None
Methods:
None

cmdCancel - Cancel button.
Local variables:
None
Methods:
Click - Exits the exit screen and returns to the map screen when the button is clicked.

cmdOK - OK button.
Local variables:
None
Methods:
Click - Checks the password typed in and exits the program if password is correct when the button is clicked.

Other functions:

Form_Activate - Initializes the form.
Local variables:
None


Beck To Project Notebook
Prototype Evaluation
Last Modified 2/21/96 -- Jimmy Billiter