pathfinder 1.0 the terrabyters © 2004. terrabyters kristi olson, team leader heather koyuk,...

62
PathFinder 1.0 The TerraByters © 2004

Upload: rudolf-andrews

Post on 26-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

PathFinder 1.0

The TerraByters

© 2004

Page 2: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

TerraByters

Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee, Developer

Page 3: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

PathFinder 1.0 Requirements

Users must find the process seamless. Users with any level of technical expertise

should be able to use PathFinder correctly on their first try.

PathFinder needs to consistently return correct images.

PathFinder needs to handle images of up to 1.5K.

Page 4: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

PathFinder 1.0 Iterations

Group decided on iterative development.– Each iteration was tested and verified before

moving on to further iterations.– Iteration 1 was to meet basic requirements as

defined by Dr. Mock.– Iteration 2 incorporates panning and zooming.– We had time to incorporate other features beyond

what we originally anticipated.

Page 5: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Features of iteration 1

User interface with drop down menu:– File: Open, Close

Route images initially drawn at a scale calculated from the size of the route.

Route images initially centered on the screen.

Page 6: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Features of iteration 2

Panning– Uses an offset to ensure image remains on

screen for first panning operation.

Zooming– Pop up error windows if the user tries to pan too

far in or too far out.

Page 7: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

More features of Iteration 2

Ability to save images.– Saves as type .jpg

Print Preview and Print options. Ability to switch between Aerial

(photographic) and Topographical images. User manual linked to “Help” on user

interface.

Page 8: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Features iteration 2 continued

Properties box:– Information for name, size, and location of file.– Number of data points in file.– Minimum and Maximum latitude and longitude.

About box:– Information about program and developers.

Center latitude and longitude points are displayed on the user interface.

Page 9: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Team process

Group decisions:– TerraService API

.NET environment and C#.

Splitting up the work:– Defined four basic modules:

User interface XML parsing Getting the Terra Server images Drawing the route

Page 10: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

SE

Heather’s design decoupled the modules and made the processes of integrating the modules and iterative development simple.

Page 11: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Who worked on What

Heather:– Technical lead. – Developed design.– Classes Coded:

View, Controller, Error Dialog, About, Map, Properties, DataPoint.

Modified Weiss code for LinkedList, LinkedListItr.– Fixed anything we couldn’t and improved much of what we

wrote.– Handled integration.– Wrote the Test Plan and large part of Requirements and

Design documentation.

Page 12: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Who worked on What

Chris:– CoursePlot and File.– Wrote User’s Manual and contributed to

documentation.

Susmita:– XML parsing.– Wrote User’s Manual and contributed to

documentation.

Page 13: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Who worked on What

Kristi:– Team Leader.– Wrote GetImage, modified LinkedList.– Contributed to documentation.– Meeting notes.– Supplied the bagels and cheese!

Page 14: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

What we learned

The importance of Human Communication– Check, double check, triple check to make sure we are all

on the same page.

The importance of deadlines– Without a deadline of iteration 1, we may never have gotten

around to iteration 2.

User interface– If this were a product intended for the general public, we

would have needed to test the user interface sooner with members of the general public.

Page 15: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

More of What We Learned

Theoretical side of SE vs. Reality– Design modifications: from "Main with Shared

data" / ADT to MVC with Observer then settled on MVC with shared data.

– XML Parser: from pre-existing parser with interface, to modifying a pre-existing parser to using .NET XML libraries.

– More about this in a minute…

Page 16: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Yet More of What We Learned

Gained experience in integrating modules. Learned about the benefits of a formal

documentation process for Requirements and Design.

Learned about XML, .NET, and C#. Gained experience working with APIs.

Page 17: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The Software Engineering Process

Heather will now talk about the process and design

Page 18: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The Software Engineering Process

The Language – C# The Environment - .NET The Design The Implementation

Page 19: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The Software Engineering Process

The Language – C# The Environment - .NET The Design The Implementation

Page 20: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process – The Language

We decided on C# for interfacing with the TerraService API and for code re-use

C# is very similar to Java– Sample C# code:

public void openFile(string filename, Route r)

{

myRoute = r;

this.parseXML(filename);

}

Page 21: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The Software Engineering Process

The Language – C# The Environment - .NET The Design The Implementation

Page 22: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process – The Environment

The .NET environment helped a lot in the development of PathFinder– “Point and Click” GUI development– “Nice” (i.e., useful) compiler error messages– Precompiled dialog boxes (Open File, Save As,

Print Preview, and Print boxes)– Useful help files– Helpful prompts

Page 23: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process

The Language – C# The Environment - .NET The Design The Implementation

Page 24: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process – The Design

Began with “Main with Shared Data” combined with “Abstract Data Types”

Then, Model-View-Controller with Shared Data, Observer Pattern– Model split into two parts, Operators and Data– Operators would be observers, Data would be

subjects– Controller’s only job was to initialize other

modules

Page 25: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Model-View-Controller

Page 26: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Model-View-Controller with Observer Pattern

Page 27: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process – The Design

Issues with Observer Pattern Final Design: MVC with the following

changes:– Model split into two parts, Operators and Data

classes– Operators operate directly on Data– All other method calls go through the Controller– Data notifies the Controller when it’s been

changed

Page 28: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Model-View-Controller with Operators and Data

Page 29: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process

The Language – C# The Environment - .NET The Design The Implementation

Page 30: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

The SE Process – The Implementation

Of course, the code itself changed dramatically throughout the semester

For instance, we had originally wanted to use an external XML Parser

– Looked at 3 different parsers in 2 different languages– Finally, we wrote our own parser based on preexisting XML

functionality built into .NET– Which left nothing for our File class to do, so we combined

our parser with our File class

Page 31: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

FINAL IMPLEMENTATION

Our final implementation includes 13 classes– Controller: the “brains” of the program – View: the Graphical User Interface– 3 Operator classes

File: Opens a file, parses the XML, and create a Route GetImage: Retrieves and puts together the image from

TerraServer CoursePlot: Draws the route on top of the image

– 2 major Data classes Route: contains a linked list of data points from the XML file Map: the map image and associated data

Page 32: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

FINAL IMPLEMENTATION

3 supplemental data classes– LinkedList: a linked list of DataPoints– DataPoint: structure to hold information (latitude, longitude,

etc.) from each point in the XML file– LinkedListItr: Iterator for the Linked List

3 internal dialog boxes– About: Displays information about PathFinder and its

developers– Properties: Displays information about the current XML file

and current Route– ErrorDialog: displays a variety of errors to the user

Page 33: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

FINAL IMPLEMENTATION

Additionally, 4 external .NET dialog boxes are used:– OpenFileDialog– SaveAsDialog– PrintPreviewDialog– PrintDialog

Page 34: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

FINAL IMPLEMENTATION

The following slide shows the general structure of the PathFinder program (not including the dialog boxes or LinkedListItr)

Page 35: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,
Page 36: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Operator Classes in more detail

File– Opens a file, parses the XML, and create a Route

GetImage– Retrieves and puts together the image from

TerraServer

CoursePlot– Draws the route on top of the image

Page 37: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

File Module: Chris Ochap

Uses a Linked List of DataPoints:– The Linked List is a logical representation of the entire

route.– Each DataPoint within the Linked List is a logical

representation of a trackpoint from the Garmin XML file.

Uses C# XML parsing libraries:– Each <trackpoint>…</trackpoint> tag within the XML input

file contains coordinate information needed to populate the necessary fields in a DataPoint object .

Page 38: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

File Module: parseXML()

Recursive: – Could have been written iterative, is more elegant

when written recursive.– The module will only call itself if an XML node has

another level of child node(s) below it.

Page 39: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

File Module: parseXML()

For example, <Position> is a child node of <Trackpoint> and <Latitude>, <Longitude>, & <Altitude> are all child nodes at the same level below <Position>.

- <Trackpoint>– - <Position>–   <Latitude>61.19035</Latitude> –   <Longitude>-149.82023</Longitude> –   <Altitude>47.723</Altitude> –   </Position>–   <Time>2004-08-27T20:15:13Z</Time> –   </Trackpoint>

Page 40: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

File Module: parseXML()

The parseXML() method calls itself twice to read in the values displayed above once it is at the <Trackpoint> node level.

As the parseXML() method extracts data for a specific trackpoint, new DataPoint objects are created, and inserted into a Linked List.

Page 41: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Operator Classes in more detail

File– Opens a file, parses the XML, and create a Route

GetImage– Retrieves and puts together the image from

TerraServer

CoursePlot– Draws the route on top of the image

Page 42: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

GetImage: Kristi Olson

TerraService API– GetImage uses the TerraService

AreaBoundingBox to retrieve the tiles.– Works off the center most point of the XML data.– For panning, update the center point with each

panning operation.– For zooming, update the scale parameter.– For image type, update the Theme parameter.

Page 43: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

Operator Classes in more detail

File– Opens a file, parses the XML, and create a Route

GetImage– Retrieves and puts together the image from

TerraServer

CoursePlot– Draws the route on top of the image

Page 44: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

CoursePlot: Chris Ochap

This module works with a Linked List of DataPoint’s and the composite map image retrieved using the GetImage() module.

The Linked List of DataPoints that the CoursePlot() module uses is assembled using the parseXML() method contained in the File() module.

Each DataPoint object contains all available coordinate information for each specific recorded point within the XML input file.

Page 45: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

CoursePlot

X & Y coordinates are calculated as the CoursePlot() module iterates though the Linked List of DataPoint’s.

A line is drawn on the composite map image using the calculated X & Y coordinates of the current DataPoint and the DataPoint next in the Linked List until the end of the list.

C# graphics manipulation libraries are used to draw lines representing the route on top of the composite map image retrieved from TerraServer by the GetImage() module.

Page 46: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

CoursePlot

My team is mean because they wouldn’t let me draw cute little points for each <Trackpoint>…</Trackpoint>.

When CoursePlot() is done iterating through the Linked List of DataPoint’s, it notifies the Controller() that it’s task is complete.

Page 47: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

User presses Open File button

Page 48: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

View opens an OpenFileDialog box

Page 49: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

User selects a file

Page 50: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

View sends command to Controller

Page 51: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Controller sends command to File

Page 52: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

File changes Route

Page 53: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Route notifies Controller

Page 54: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Controller sends command to GetImage

Page 55: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Using data from Route, GetImage operates on Map

Page 56: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Map notifies Controller

Page 57: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Controller sends command to CoursePlot

Page 58: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Using data from Route, CoursePlot draws route on Map

Page 59: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Map notifies Controller

Page 60: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

Controller sends command to View

Page 61: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

User command: Open File

View redraws its picturebox image

Page 62: PathFinder 1.0 The TerraByters © 2004. TerraByters Kristi Olson, Team Leader Heather Koyuk, Technical Lead Chris Ochap, Developer Susmita Chatterjee,

PathFinder 1.0

Demo