Upload
others
View
6
Download
0
Embed Size (px)
Citation preview
NavRuleSim – Package Diagram
Release Version – 0.90Robert Ross Duncan
org.duncanharbor.navrulesim
org.duncanharbor.nauticalworld
org.duncanharbor.overlays
org.duncanharbor.regions
org.duncanharbor.terrestrialobjects
org.duncanharbor.icons
Package contains the classes needed to support the nautical objects which appear in the virtual 3D nautical world. For example fishing boats, bouys, lighted day marks, etc
Package contains the classes needed to support the 2D overlays through which the 3D nautical world is observed. Typically the overlay represents the first person vessel such as a sail boat.
Package contains the classes needed to define regions in the 3D nautical world needed to manage the simulations. For example a region could exist to indicate shallow water.
Package contains the classes to support the terrestrial objects in the virtual 3D world. For examples, the a land bank or bridge would be a terrestrial object.
Package contains bit maps need to provide images for control button icons. For example the Next or Return icon.
Package contains the class with the main method. This class is NavRuleSim.
The package also contains the FXML files and classes defining the controllers for the GUI user screens with the application.
The application contains five major user screens: a simulator screen; a learn screen with lesson on the rules used in the simulator, a test screen used to demonstrate an understanding of the rules and therefore gain access to addition simulation, a reference screen to become familiar with vessels in the 3D nautical world and finally a help screen which is used to answer questions on how to use the application.
NavRuleSim – Config Files
presentationModules folder
lessons folder
tests folder
simulations folder
settings folder
help folder
XML files which define the presentation modules used in the Learn Section. Each lesson topic is an XML file. Within each file is the configuration for all the presentation module for that topic.
XML files which define the presentation modules used in the Test Section. Each Test Group is an XML file. Within each file is the configuration for all the test module for that grooup.
XML files which define the simulation modules. For each Test Group there is a corresponding Simulation Group. (Successfully completing a Test Group “unlocks” the Simulations associated with that test topic.) Each Group has two simulation files. One file defines the simulations while under power, the other file defines simulations while under sail.
The location of the serialization files which store the current state of the application. For example, which test groups have been successfully completed, the Settings configuration, etc.
Because of their close association with the application implementation, the configuration of the presentation modules used in the application help section are coded directly into the application. This file contains the .gif format image files used in the Help Section module presentations.
Separate from the source code for the NavRuleSim application are a set of files which are used to configure components of the application or data files referenced by the application. The files are of four types:1) XML files used to define presentation modules which in the Lesson, Tests and Simulations Sections of the application.2) Slides and charts which are used by the presentation modules.3) bitmap files which define the “skin” on nautical objects4) image files which define icons which appear within the GUI interfaces of the application
bitmaps folder
icons folder
images folder
images folder
Bitmap files with the bitmaps used to “skin” nautical objects. For example and bitmaps exists for marking which appear around regulatory navigation bouys.
GIF formatted files which define the icons used my the FXML files which define the layout for the different GUI screens used within the application.
GIF formatted files which are used by both the Learn and Test presentation modules.
Image files used by the Simulations. These image files are of two types: 1) GIF formatted image files which are training slides referenced by the “getting started” simulations. 2) PNP formatted image files which are charts of the 3D nautical world in which a given simulation is taking place.
Note: This is not a valid UML structure and does not define code construction. Included for overall clarity.
Main User Interface – Use Case Diagram
Select Specific User Screen from Main User Screen
Reference User Screen
Learn User Screen
Test User Screen
Simulator User Screen
Settings User Screen
Quit at JVM
Help User Screen
Development Ref Screen
<<extend>>
User
NavRulesSim Application
Quit from App
This Screen is used by the developer to observe vessel objects in detail. It has additional controls, such as the ability to move the viewing camera to any angle, which are not available in the Reference User Screen. Because of the unique set of knowledge and skills need to use this screen, it is typically not available. Access is controlled by the Setting Configuration during the application build
Simulator User Interface – Use Case Diagram
Select PLAY buttonTo start the simulation
User
Simulator User Screen
Use THROTTLE to Controlvessel motor speed
Use WINCH to ControlVessel sail speed
Use TILLER to Controlvessel direction
Run SimulationDisplay vessel movement
Display the resultsof the simulation in
console
<<include>>
<<include>>
<<include>>
<<include>> <<include>>
Select the Next Button in Console
Display NextSimulation in
Simulator
Reset CurrentSimulation
In Simulator
Select the ReplayButton in Console
Select the Chart or Timer
Toggle Button
Open or CloseChart or Timer
Display
<<include>>
<<include>>
<<include>>
Select the Erase Button in Console
Remove Current Simulation from List of Simulations
which Simulator Will Play<<include>>
<<include>>
Learn User Interface – Use Case Diagram
Use PREVIOUS button To display the previous lesson presentation
OR if at first lessonReturn to PULL DOWN menu with previous
lesson topic selected
Select Lesson Topic ListFrom PULL DOWN menu
Select NEXT button to loadSelected Lesson
Topic List
Use PULL DOWN menu to select a different lesson presentation for display
ORReturn to lesson topics PULL DOWN menu
with first Lesson Topic List selected
Select the RETURN buttonTo return to the main menu
Select PLAY buttonTo play lesson animation
User
Use NEXT button To display the next lesson presentation
OR if at last lessonReturn to PULL DOWN menu with next
lesson topic selected
Select IMAGE toggleTo open or close the display
of presentation image
Learn User Screen
<<include>>
<<include>>
<<include>>
Display lesson presentation module
<<include>>
<<include>><<extend>>
<<extend>>
Test User Interface – Use Case Diagram
Use NEXT button To display the next question
OR if all questions have been displayed,to display a summary of the test results
Select NEXT Button to Load the current test Group
Select NEXT button to start testing with the first question
in the test group
Select on of the ANSWER buttons to submit answer
for the current test question
Select the RETURN buttonTo return to the main menu
Select PLAY buttonTo play test animation
User
Select IMAGE toggleTo open or close the display
of presentation image
Test User Screen
<<include>>
Display summary of the resultsfor the answers
to the questions in the test group
Display presentation modules with test question
<<include>>
<<extend>>
<<extend>>
If all questions answeredcorrectly, allow access tosimulations related to the
tested topic
<<include>>
Display if Answer was Correct or Wrong
All Questions Answers
<<include>>
Make the next Test Presentation Module the Current Module
<<include>>
Reference User Interface – Use Case Diagram
Select from type PULL DOWN menu
the vessel to display
User
Reference User Screen
Select from motion PULL DOWN menuthe form of vessel motion
to display
Select from operation PULL DOWN menuthe form of vessel operation
to display
Select from conformance PULL DOWN menu
If vessel should conform to inland or international rules
Select the RETURN buttonTo return to the main menu
Use Drag Operation To rotate vessel
Use SCROLL operation To change distance to
vessel
Use RADIO button To set day or night display
Use CHECKBOXTo set
1) lights only display2) rotate animation3) high speed mouse
Display Vessel
<<include>>
<<include>>
<<include>>
<<include>>
<<extend>>
<<extend>>
<<extend>>
Settings User Interface – Use Case Diagram
ChangeDistance Unit
In Reference UserScreenUser
Setting User Screen
ChangeWind Direction
In Reference UserScreen
ChangePerformance
Settings
ForceRebuild of
Lesson Menus
ConfigureSimulator Mode
(Enable Power Only Enable Auto Sail Trim)
ConfigureSimulation Mode
(Random or PlaylistSelection)
ConfigureSimulation
Groups
Erase / RestoreSimulation
(Define if part ofrandom selection)
Add / RemoveSimulations from
Playlist
ConfigureFirst Peson
Vessel
<<include>>
ConfigureReference
Screen<<include>>
<<include>>
DefineSimulations
To Be Run BySimulator<<include>>
<<include>>
<<include>>
<<include>>
ConfigureApplication Operation
<<include>>
<<include>>
Help User Interface – Use Case Diagram
Use PREVIOUS button To display the previous help image
OR if at first imageReturn to PULL DOWN menu with previous
help section selected
Select Help Section ListFrom PULL DOWN menu
Select NEXT button to loadSelected Help
Section List
Use PULL DOWN menu to select a different help image for display
ORReturn to help selection PULL DOWN menu
with first Help Section List selected
Select the RETURN buttonTo return to the main menu
User
Use NEXT button To display the next help image
OR if at last help imageReturn to PULL DOWN menu with next
help section selected
Help User Screen
<<include>>
<<include>>
<<include>>
Display Help Image
<<include>>
<<include>>
NauticalEnvironment - Class Diagram
+ getOceanMaterial(Condition) : PhongMaterial+ getOceanMaterial() : PhongMaterial+ getNauticalSkyColor(Condition) : Color+ getNauticalSkyColor() : Color
+ setWindDirection(double) : void+ getWindDirection() : double+ setWindSpeed(double) : void+ getWindSpeed() : double+ setNauticalCondition(Condition) : void+ getNauticalCondition() : Condition
+ setTime(hrs: int, mins: int, secs: int) : void+ setHour(int hour) : int+ getHours() : int+ getMinutes() : int+ getSeconds() : int
+ halfSecondProperty() : BooleanProperty+ secondsProperty() : IntegerProperty+ minutesProperty() : IntegerProperty
+ addHalfSecond() : void+ addDeltaSeconds(deltaSeconds : int) : void
+ setSystemTimePeriodForAnimation(bool) : void
- nauticalCondition : Condition - windDirection : double- windSpeed : double
- hours : int- MINUTES_PROPERTY : IntegerProperty- SECONDS_PROPERTY : IntegerProperty- HALF_SECOND_PROPERTY : BooleanProperty
HALF_SECOND_PERIOD: int = 500 {readOnly}systemTimePeriond: int
NauticalEnvironmentBase
+ DAY (“day”)+ NIGHT (“night”)
label : String {readonly}
Condition: enum
NauticalUtils
FirstPerson
VesselBase
NavAidBase
IMPORTANT DESIGN CONTRAINT: Because the parameters of the nautical environment such as wind speed, wind direction, time and whether it is night or day affect ALL nautical objects within the 3D nautical world. These conditions are provided via static methods. This allows any nautical object to easily obtain information on the nautical environment by making the appropriate static call. But this convenience requires that the SAME nautical conditions apply to all nautical presentations modules. If the nautical environment parameters (for example wind direction) is changed, then all presentations must be managed to account for the change. It is important to be aware of this constraint when loading presentation modules or any nautical objects into the 3D nautical world. All parameters of importance to a presentation module must be defined when the module is loaded.
Also be aware of the dependency of the Utils, VesselBase, NavAidBase and FirstPerson Classes on the NauticalEnvironment Class. Changes to methods within the NauticalEnvironment Class will have a direct affect on these other classes.
OverlayManager
ModulePresentation
LandFormBase
LandmarkBase
NauticalUtils - Class Diagram
+ stringToVesselGroupClassConversion(String) : Class<? Extends VesselBase>+ stringToLightedNavAidGroupClassConversion(String) : Class<? Extends VesselBase>+ stringToNavAidGroupClassConversion(String) : Class<? Extends VesselBase>
+ calculateApparentWindAngle(double objectSpeed, double objectDirection) : double+ calculateApparentWindSpeed(double objectSpeed, double objectDirection) : double
+ KNOTS_TO_METER_PER_SECOND : double = 0.51444 {readOnly}+ METERS_PER_NAUTICAL_MILE : double = 1852 {readOnly}
+ COMPLETE_ROTATION : double = 360 {readOnly}+ THREE_QUARTER_ROTATION : double = 270 {readOnly}+ HALF_ROTATION : double = 180 {readOnly}+ QUARTER_ROTATION : double = 90 {readOnly} + NO_ROTATION : double = 0 {readOnly}
+ MIN_SAIL_ANGLE: double = 45 {readOnly}
+ HEADED_EFFICIENCY : double = -0.02 {readOnly}+ CLOSE_HAUL_TRIMMED_EFFCIENCY : double = 0.5 {readOnly}+ CLOSE_HAUL_NOT_TRIMMED_EFFCIENCY : double = -0.02 {readOnly}+ REACH_TRIMMED_EFFCIENCY : double = 0.6 {readOnly}+ REACH_NOT_TRIMMED_EFFCIENCY : double = 0.15 {readOnly}+ RUN_TRIMMED_EFFCIENCY : double = 0.5 {readOnly}+RUN_NOT_TRIMMED_EFFCIENCY : double = 0.25 {readOnly}+ ZERO_EFFCIENCY : double = 0.0 {readOnly}
+ TO_THE_WIND_TOLERANCE : int = 10 {readOnly}
NON_ILLUMINATED_VISIBILITY_RANGE : int = 1500 {readOnly}
+ VESSEL_GROUP : ArrayList<Class<? Extends VesselBase> + LIGHTED_ NAV_AID_GROUP : ArrayList<Class<? Extends NavAidLightedBase> + NAV_AID_GROUP : ArrayList<Class<? Extends NavAidBase> + VESSEL_REFERENCE_DISPLAY_GROUP : ArrayList<Class<? Extends VesselBase>
NauticalUtils
+ METER (1, “meter”)+ KILOMETER (1000, “kilometer”)+ NAUTICAL_MILE (1852, “nautical mile”)
conversion : double {readOnly}description : String {readOnly}
DistanceUnits: enum
+ STARBOARD (“starboard”, 1)+ PORT (“port”, -1)+ STRAIGHT_AHEAD (“straight ahead”, 0)+ NOT_DEFINED (“not defined”, 0)
label : String {readOnly}sign : int {readOnly}
NauticalDirection: enum
+ HEADED (“headed into wind”, 0)+ CLOSE_HAUL (“close haul”, 30)+ CLOSE_REACH (“close reach”, 60)+ BEAM_REACH (“beam reach”, 90)+ BROAD_REACH (“broad reach”, 120)+ RUN (“run”, 180)
label : String {readOnly}windAngle : int {readOnly}
PointOfSail: enum
+ PRIVILEDGED (“privileged”)+ EQUAL (1000, “equal”)+ NOT_PRIVILEDGED (“not privileged”)
label : String {readOnly}
Priviledge : enum
+ NORTH (“north”, 0)+ EAST (“east”, 90)+ SOUTH (“south”, 180)+ WEST (“west”, 270)
label : String {readOnly}compassBearing : int {readOnly}
CardinalDirection : enum
+ STANDARD+ EGREYED+ BLACKENED
ObjectColoring : enum
TerrestrialObjects - Class Diagram
+ stringToLandFormGroupClassConversion(String) : Class<? Extends LaandFormBase>+ stringToLandmaarkGroupClassConversion(String) : Class<? Extends LandMarkBase>
~ LAND_FORM_GROUP : ArrayList<Class<? Extends LandFormBase> ~ LANDMARK_GROUP : ArrayList<Class<? Extends NavAidLightedBase>
TerrestrialUtils
+ setEnvironmentVisibility(NauticalEnvironment.Condition) : void
<<Constructable>>
+ getChildren(): ObservableList<Node>+ setTranslateX(double): void+ setTranslateY(double): void+ setTranslateZ(double): void+ setRotate(double): void
Group
LandFormBase LandmarkBase
All land forms must conform to the following constructor signature
public LandForm<Description of Object>( double posX, double posZ, double elevation, double orientation, double width, double length, double height, NauticalEnvironment.Condition condition )
All landmarks must conform to the following constructor signature
public Landmark<Description of Object>( double posX, double posZ, double elevation, double orientation, NauticalEnvironment.Condition condition )
NauticalLight - Class Diagram
~ NauticalLight()~ NauticalLight(int: displayArcStart, int: displayArcEnd,
color : String LightRange: lightRange)
~ getPreferredIntensity(double, LightRange) : LightIntensity
# displayLight() : void# obscureLight() : void
~ getColor(): String ~ getDisplayArcStart(): int~ getDisplayArcEnd(): int ~ getLightRange() LightRange
~ setObservability(observerAngle: int)~ setIntensity(LightIntensity) : void~ getIntensity() : LightIntensity~ setNotVisibleIfOutOfRange(distance : double) : void
- SWITCH_DISTANCE_RATIO : int = 3- light : Sphere- displayArcStart : int {readOnly}- displayArcEnd : int {readOnly}- color : String {readOnly}- lightRange : LightRange {readOnly}- intensity : LightIntensity
NavLight
~ NEAR~ MID~ FAR
LightIntensity: enum
+ getChildren() : ObservableList<Node>
Group
Image: IlluminationImageDiffuseColor: blackSpecularColor: null
PhongMaterial
File
Image
Color Map Filesbitmaps/white.gifbitmaps/red.gifbitmaps/green.gifbitmaps/yellow.gifBitmaps/blue.gifbitmaps/amber.gifbitmaps/red-green.gif
~ ONE_NM ( 6, 18, 54, 250, 1852) ~ TWO_NM ( 12, 36, 108, 500, 3704)~ THREE_NM ( 18, 54, 162, 750, 5556)~ FOUR_NM ( 24, 72, 216, 1000, 7408) ~ FIVE_NM ( 30, 90, 270, 1250, 9260) ~ SIX_NM ( 36, 108, 324, 1500, 11112)
nearRadius : int {readOnly}midRadius : int {readOnly}farRadius : int {readOnly}switchDistance : int {readOnly}rangeMeters: int {readOnly}
LightRange: enum
farRadius value will allow navigation light sphere to remain visible within the virtual subScene3D for the equivalent visibility distance as defined in actual navigation rules. “colRegs”
Because these spheres can be very large when a vessel is close to the first person observer in the virtual subScene3D. A second set of radius values is created. The nearRadius values have different sizes to represent the different intensity of the navigation light, but are a reasonable size when near the first person observer
NavAidLight - Class Diagram
~ NavLight()~ NavLight(int: displayArcStart, int: displayArcEnd,
color : String LightRange: visibilityRange)~ NavLight(int: displayArcStart, int: displayArcEnd,
color : String LightRange: visibilityRange,illuminationPattern: int{] )
~ createAllRoundNavAidLight(color : String, range : LightRange, pattern : NavAidLightedBase.LightPattern, period : int) : NavLight
# convertNavAidLightPatternToIntArray(lightPattern : NavAidLightBase.LightPattern, period : int) : int[]
~ stopBackgroundTask()
# displayLight() : void <<Overridden>># obscureLight() : void <<Overriden>>
- continousIllumination : boolean# illuminationPattern : int[]
- currentDisplaylluminationPattern : DisplayIlluminationPattern- illuminated : bool
NavAidLight
NauticalLight
DisplayIlluminationPattern()run() : void <<Override>>stop() : voidnauticalSleep(int) : void
- active : bool- HALF_SECOND_LISTENER : InvalidationListener
DisplayIlluminationPattern
<<Runnable>>
This class is a task which is run as a background task to display lights which are not continuously illuminated.
The variable named “active” is used to stop the background task.
The methods stop () and stopBackgroundTask() provides a means to stop the task.
IMPORTANT NOTE: The display of the illumination pattern is synchronized with nautical time on half second intervals. (This is different from the vessel lights which is synchronized on system time)
VesselLight - Class Diagram
~ VesselLight()~ VesselLight(int: displayArcStart, int: displayArcEnd,
color : String LightRange: visibilityRange)~ VesselLight(int: displayArcStart, int: displayArcEnd,
color : String LightRange: visibilityRange,illuminationPattern: int{] )
~ createAllRoundWhite(LightRange): NavLight~ createAllRoundRed(LightRange): NavLight~ createAllRoundGreen(LightRange): NavLight~ createStarboardSide(LightRange): NavLight~ createPortSide(LightRange): NavLight~ createStern(LightRange): NavLight~ createTowStern(lightRange): NavLight~ createConvoyStern(L:ightRange): NavLight~ createMasthead(LightRange): NavLight~ createComboAsm(LightRange): NavLight~ createFlashingYellow(LightRange): NavLight~ createFlashingRed(LightRange): NavLight~ createDredgeFlashing(LightRange): NavLight~ createSpecialFlashing(LightRange): NavLight~ createDistressWhite(LightRange): NavLight~ createFlashingAmber(LightRange): NavLight
~ stopBackgroundTask()
# displayLight() : void <<Overridden>># obscureLight() : void <<Overriden>>
- continousIllumination : boolean# illuminationPattern : int[]
- currentDisplaylluminationPattern- illuminated : bool
VesselLight
NauticalLight
Image: IlluminationImageDiffuseColor: blackSpecularColor: black
PhongMaterialDisplayIlluminationPattern()run() : void <<Override>>Stop() : void
- active : bool volatile
DisplayIlluminationPattern
<<Runnable>>
This class is a task which is run as a background task to display lights which are not continuously illuminated.
The variable named “active” is used to stop the background task.
The methods stop() and stopBackgroundTask() provides a means to stop the task.
IMPORTANT NOTE: The display of the illumination pattern is synchronized with system time on intervals defined in milliseconds. (This is different from the Nav Aid light which is synchronized on nautical time)
Type Color Start End Flash RateAll Round White white 0 360All Round Red red 0 360 All round Green green 0 360Starboard green 0 135Port red 225 0Stern white 135 225Tow Stern yellow 135 225Convoy Stern blue 135 225Masthead white 225 135ComboAsm green-red 225 135Flashing Yellow yellow 0 360 {250, 250}Flashing Red red 0 360 {250, 250}Dredge Flashing yellow 0 360 {500, 500}Special Flashing yellow 270 90 {500, 500}Distress White white 0 360 {500, 500}Flashing Amber amber 0 360 See Note
Note: Pattern for Flashing Amber {500,500,500,500,500,3500}
VesselStructure - Class Diagram
+ getChildren(): ObservableList<Node>+ getRotate(): double+ setRotate(double): void+ rotate: DoubleProperty
Group
~ VesselStructure()- lookUpObjList(Motion): ArrayList<Node>- lookUpObjList(Operation): ArrayList<Node>- lookUpLightsGroup(Motion): Group- lookUpLightsGroup(Operation): Group+ isSupported(Motion): bool+ isSupported(Operation): bool+ setNauticalState(Motion, Operation): void+ setNauticalState(Motion): void+ setNauticalState(Operation): void+ setNauticalState(Conformance): void+ getNauticalMotion(): NauticalMotion+ getNauticalOperation(): NauticalCondition+ getConformance(): NauticalConformance
- nauticalMotion: Motion- nauticalOperation: Operation- conformance: Conformance# speed: SimpleDoubleProperty+ rotate: double# baseGroup: Group# vesselGroup: Group# nauticalObjGroup: Group# lightsGroup: Group# emptyLightsList: ArrayList<NavLight># notUnderwayObjList: ArrayList<Node># anchorObjList: ArrayList<Node># anchorLightsList: ArrayList<NavLight># powerObjList: ArrayList<Node># powerLightsList: ArrayList<NavLight># towObjList: ArrayList<Node># towLightsInternationalList: ArrayList<NavLight># towLightsInlandList: ArrayList<NavLight># sailObjList: ArrayList<Node># sailLightsList: ArrayList<NavLight># nonDisplaceObjList: ArrayList<Node># nonDisplaceLightsList: ArrayList<NavLight># wigObjList: ArrayList<Node># wigLightsList: ArrayList<NavLight># normalObjList: ArrayList<Node># divingObjList: ArrayList<Node># divingLightsList: ArrayList<NavLight># notCommandedObjList: ArrayList<Node># notCommandedLightsList: ArrayList<NavLight># restrictedObjList: ArrayList<Node># restrictedLightsList: ArrayList<NavLight># constraintObjList: ArrayList<Node># constraintLightsList: ArrayList<NavLight># fishingObjList: ArrayList<Node># fishiingLightsList: ArrayList<NavLight># trawlingObjList: ArrayList<Node># trawlingLightsList: ArrayList<NavLight># pilotObjList: ArrayList<Node># pilotLightsList: ArrayList<NavLight># sweepingObjList: ArrayList<Node># sweepingLightsList: ArrayList<NavLight>
VesselStructure
+ NORMAL (“normal operation”, “normal”)+ DIVING (“diving”, “diving”)+ NOT_COMMANDED (“not under command”, “not commanded”)+ RESTRICTED (“restricted in movement”, “restricted”)+ CONSTRAINT (“constraint by draft”, “draft”)+ FISHING (“fishing”, “fishing”)+ TRAWLING (“trawling”, “trawling”)+ DREDGING (“dredging”, “dredging”)+ PILOT (“providing pilot”, “pilot”)+ SWEEPING (“mine sweeping”, “sweeping”)
humanReadable : String {readOnly}label : String {readOnly}
Operation: enum
+ NOT_UNDERWAY (“not underway”, “not underway”)+ ANCHORED (“at anchored”, “anchored”)+ POWER (“under power”, “power”)+ TOW (“towing”, “tow”)+ SAIL (“under sail”, “sail”)+ NON_DISPLACEMENT (“under non displacement motion”, “non displacement”)+ WIG (“under wing in ground motion”, “wig”)
humanReadable : String {readOnly}label : String {readOnly}
Motion: enum
+ INTERNATIONAL (“international”, “international”)+ INLAND (“inland”, “inland”)
humanReadable : String {readOnly}label : String {readOnly}
Conformance: enum
The vessel structure creates object lists and light lights which correspond to the different types of possible vessel motion and operation. (Refer to the enumerations for details on all the possible types of vessel motion and operation.)
The shapes which make up the physical presentation of a given type of vessel are sorted into the appropriate lists. Depending on the current vessel motion and operation, the lists are used to determine which shapes should be displayed.
For example: The following are some shapes which would be used to represent a power boat.1) special shape for a hull2) cylinder for anchor line3) green sphere for a starboard side light4) white sphere for an anchor light
The shapes would be sorted as follows:1) The hull would be placed into the vessel group2) The anchor line would be placed into the anchor objects list3) The green sphere would be placed in the power lights list4) The white sphere would be placed in the anchor lights list
If the motion of a vessel was changed to “under power” and the environment was night. The light group would be cleared and the lights from the power light list would be added to the lights group. Hence the green side light would be displayed.
If the motion was change to at anchor. The nautical object group and lightgroup would be cleared. The shapes from the anchor list would be added to the nautical objects group and the shapes from the anchor light list would be added to the light group. Hence the anchor line and white anchor light sphere would be displayed.
Class definition exists within the VesselBase.java file
+ getBestObserveDistance() int+ toString() : String <<override>>
~ setNauticalObjectColoring(NauticalUtils.ObjectColoring) : void~ getMaxTurnRate() : double
~ getMinLightRange() : NavLight:LightRange
+ getApparentWindAngle() : double+ getApparentWindSpeed() : double
~ speedProperty() : DoubleProperty~ setNauticalLightsDisplayedOn(bool) : void~ isNauticalLightsDisplayedOn() : bool
- setLightsObservability(int: observerAngle) : void- setLightsIntensity(NavLights.LightIntensity, bool) : void- getLightsIntensity() : NavLights.LightIntensity- setVesselVisibility(bool) : void
- adjustPosition(period : double) : void- adjustCourse(period : double) : void
# positionX : double# positionZ : double# direction : double
- courseChangeRemaining : double- courseChangeDirection : Utils.NauticalDirection- vesselLightsIntensity : NavLightIntensity# vesselVisible : bool# onlyDisplayVesselLights : bool
- hunting : bool- lockedOnCourse : bool- beingOvertaken : bool- locationStale : bool
VesselBase
VesselBase - Class Diagram
~ VesselStructure()
# speed: double+ rotate: double
VesselStructure
+ getType() : String+ setPositionX(double) : void+ getPositionX() : double+ setPositionZ(double) : void+ getPositionZ() : double+ setDirection(double) : void+ getDirection() : double+ setLocation() : void+ getBoundaryRadius() : double+ getBoundaryLength() : double+ getBoundaryWidth() : double+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void+ isRebuildRequiredForSetEnvironmentVisibility() : bool+ getDistance(double posX, double posZ) : double+ updateVisibility(double : posX, double : ) : void+ adjustToApparentWind()
<<Placeable>>
+ setSpeed(double) : void+ getSpeed() : double+ getMaxSpeed() : double+ getLength() : int
+ setCourseChangeDirection(Utils.NauticalDirection) : void+ getCourseChangeDirection() : Utils.NauticalDirection+ setCourseChangeRemaining(double) : void+ getCourseChangeRemaining() : double
+ move(double period) : void+ fastAdvance(period : double) : void+ isLocationStall() : bool
+ getAngleOffBow(posX : double, posZ : double) : int
+ getNauticalMotion() : VesselBase.Motion+ getNauticalOperation() : VesselBaseOperation+ getSailTack() : Utils.NauticalDirection
+ isHunting() : boolean+ isLockedOnCourse() : boolean+ isBeingOvertaken() : boolean+ setBeingOvertaken(bool) : void
<<Moveable>>
+ setLightsObservability(posX : double, posZ : double) : void+ setMagnitude(posX : double, posZ : double, force : bool) : void+ setLightsNotVisibleIfOutOfRange(posX : double, posZ : double) : void+ setNauticalObjDisplayOn(bool) : void+ isNauticalObjDisplayOn() : bool+ stopBackgroundLightTasks() : void
<<Lighted>>
The moveable interface allows the presentation module in the Learn, Test and Simulator User Screens the ability to move the vessels within the 3D nautical world. This movement is part of presentation animation or simulation
The Lights interface allows the management of the display of the nautical lights as the observer’s view changes in relation to the vessel
NauticalComponents - Class Diagram
createCone( createTrapezoid(radius : float thickness : floatheight : float) : MeshView height : float
maxWidth : floatcreateHaltOctagon( minWidth : float) : MeshView
length : floatthickness : float) : MeshView
createStandardHull(length : floatbowToBeam : float
beamWidth : floatsternWidth : float
bowHeight : floatbeamHeight : floatsternHeight : float
bowRake : floatwaterline : floatbeamRake : float) : MeshView
createINavAidId (navAIDid : charheight : doublecolor : ColorlineWidth : double) : Group
NauticalComponents
The createNavAidId method does not return a shape object. Instead is creates a 2D number.
Standard JavaFX shapes are sphere, box and cylinder. The class contains static methods to create shapes which are not part of JavaFX but are required to create physical representations of vessels.
Some the shapes supported by methods in this class are a hull shape, a cone and a trapezoid.
Nautical Flag – Class Diagram
~ NauticalFlag(flagWidth : double,flagLength : double,sectionColors : Color[],points : Double[][])
~ NauticalFlag(flagWidth)~ NauticalFlag()
~ createWhiteTestFlag(flagWidth: double): NauticalFlag~ createBravoFlag(flagWidth: double): NauticalFlag~ createOscarFlag(flagWidth: double): NauticalFlag~ createDiverDownFlag(flagWidth: double): NauticalFlag
~ getFlagWidth(): double~ getFlagLength(): double
~ setGrey(boolean): void
~ setOffsetAngle(double) : void~ getOffsetAngle() : double~ setAngle(double) : void~ getAngle() : void
- rotation: Rotate- flagWidth: double {readOnly]- flagLength: double {readOnly}- numberOfSections: int {readOnly}- sectionColors: Color {readOnly}- sections: Polygon {readOnly}
- offsetAngle : double
NauticalFlag
+ getChildren(): ObservableList<Node>
Group
Two angles define the angular position of the flag. The "offset angle" and the "angle". The "offset angle" allows the alignment of the flag in a given direction to make the dynamic management of the flag position easily defined with the "angle" based on external conditions.
For example the "offset angle" can be used to align the flag with the centerline of a vessel from the bow to the stern. Then the value of the appareny wind off the bow of the vessel can be used to calculate the "angle" which dynamically controls the position of the flag
VesselBase
+ VesselMediumPower()+ VesselMediumPower(length: int)
+ getType(): String <<override>>+ getBoundaryDimension(): double <<override>>+ getLength(): int <<override>>+ getBestObserveDistance(): int <<override>>+ getMaxSpeed(): double <<override>>+ getMax_Turn_Rate(): double <<override>>+ getMinLightRange() : NavLight.LightRange <<override>>+ setEnvironmentVisibility(NauticalEnvironmentBase: Condition) : void <<override>>+ adjustToApparentWind(): void <<override>>
- defineMaterialColors(): void- setNauticalObjGrey(bool): void- setBaseMaterial(PhongMaterial): void
+ TYPE: string = “Medium Power Boat” {readOnly}+ MAX_SPEED : double = 9 {readOnly}+ MAX_TURN_RATE : double = 15 {readOnly}+ MIN_LENGTH: int = 12 {readOnly}+ DEFAULT_LENGTH: int = 15 {readOnly}+ DEFAULT_BEAM: int = 5 {readOnly}+ MAX_LENGTH: int = 20 {readOnly}+ MIN_LIGHT_RANGE : NavLight.LightRange = TWO_NM {readOnly}- length: int {readOnly}
~ base: Box {readOnly}~ diveBase: Box {readOnly}~ hull: MeshView {readOnly}~ cabin: Box {readOnly}~ bridge: Box {readOnly}~ mastheadPole: Cylinder {readOnly}~ forwardStarboardSupport: Cylinder {readOnly} ~ forwardPortSupport: Cylinder {readOnly}~ aftStarboardSupport: Cylinder {readOnly} ~ aftPortSupport: Cylinder {readOnly}~ diveLightsPole: Cylinder {readOnly}~ anchorLine: Cylinder {readOnly}~ portSideFlagPole : Cylinder {readOnly} ~ starboardSideFlagPole : Cylinder {readOnly}~ bravoFlag : NauticalFlag {readOnly} ~ diverDownFlag : NauticalFlag {readOnly}~ anchorLight: NavLight {readOnly}~ starboardSideLight: NavLight {readOnly}~ portSideLight: NavLight {readOnly}~ sternLight: NavLight {readOnly}~ mastheadLight: NavLight {readOnly}~ allRoundRedBottom : NavLight {readOnly}~ allRoundWhite : NavLight {readOnly}~ allRoundRedTop : NavLight {readOnly}
~greyMaterial: PhongMaterial {readOnly}~whitelMaterial: PhongMaterial {readOnly}~blueMaterial: PhongMaterial {readOnly}
VesselMediumPowerVesselMediumPower - Class Diagram
The VesselMediumPower is a class which creates an object representing a medium sized power boat. The class is representative of all the other vessel classes in the Navigation Rules Simulator Application.
The class extends VesselBase which extends Group. The class defines a set of JavaFX shapes which are used to represent a medium sized power boat in the 3D natical world.
Medium Power Boat – Object Diagram
nauticalObjGroup: Group
vesselGroup: Group
lightsGroup: Group
- length: double = 15
MediumPowerBoat : VesselMediumPower
under_wayObjList: ArrayList<Node>
anchorObjList: ArrayList<Node>
powerObjList: ArrayList<Node>
towObjList: ArrayList<Node>
sailObjList: ArrayList<Node>
non_displacementObjList: ArrayList<Node>
emptyLightsjList: ArrayList<NavLight>
powerLightsList: ArrayList<NavLight>
anchorLightsList: ArrayList<NavLight>
towLightsInternationalList: ArrayList<NavLight>
towLightsInlandList: ArrayList<NavLight>
wigObjList: ArrayList<Node>
divingObjList: ArrayList<Node>
not_commandedObjList: ArrayList<Node>
base: Box
hull: MeshView
forwardStarboardSupport: Cylinder
1
1
1
baseGroup: Group
1
1
forwardStarboardSupport: Cylinder
aftStarboardSupport: Cylinder
aftPortSupport: Cylinder
cabin: BoxBridge: Box
1
1
mastheadPole: Cylinder1
1111
anchorLight: NavLight
mastheadLight: NavLight
anchorLine: Cylinder
starboardLight: NavLight
portLight: NavLight
sternLight: NavLight
sailLightsList: ArrayList<NavLight>
non_displacementLightsList: ArrayList<NavLight>
wigLightsList: ArrayList<NavLight>
restrictedObjList: ArrayList<Node>
constraintObjList: ArrayList<Node>
fishingObjList: ArrayList<Node>
trawlingObjList: ArrayList<Node>
dredgingObjList: ArrayList<Node>
pilotObjList: ArrayList<Node>
sweepingObjList: ArrayList<Node>
divingLightsList: ArrayList<NavLight>
bravoFlag: NauticalFlag
diveLightPole: Cylinder
not_commandedLightsList: ArrayList<NavLight>
allRoundRedTop: NavLight
allRoundWhite: NavLight
allRoundRedBottom: NavLight
restrictedLightsList: ArrayList<NavLight>
constraintLightsList: ArrayList<NavLight>
fishingLightsList: ArrayList<NavLight>
trawlingLightsList: ArrayList<NavLight>
dredgingLightsList: ArrayList<NavLight>
politLightsList: ArrayList<NavLight>
sweepingLightsList: ArrayList<NavLight>
The vessel object is configured for the following nautical state:Motion = “under power”Operation = “diving”
normalObjList: ArrayList<Node>
1
diverDownFlag: NauticalFlag
diveBase: Box
portSideFlagPole: Cylinder
starboardSideFlagtPole: Cylinder
NavAidBase - Class DiagramNavAidLightedBase – Class Diagram
+ getChildren(): ObservableList<Node>+ getRotate(): double+ setRotate(double): void
Group
~ NavAidBase( NavAidFunction, char,
NavAidRegulation, NauticalEnvironment.Condition)
+ getNavAidFunction() : NavAidFunction+ getNavAidRegulation() : NavAidRegulation+ getNavAIDId() : char+ toString() : String <<Override>>
# getAngleFromSectorOrigin(PosX : double, PosZ : double) : int
# positionX : double# positionZ : double# direction : double
# navAidFunction : NavAidFunction {readOnly}# navAidRegulation : NavAidRegulation {readOnly}# navAidId : char {readOnly}
# displayCondition : NauticalEnvironment.Condition# objectVisible : bool
NavAidBase
+ PORT_SIDE (“port side”, “port side”)+ STARBOARD_SIDE (“starboard side”, “starboard side”)+ PREFERRED_PORT_SIDE (“preferred channel to port side”, “preferred port side”)+ PREFERRED_STARBOARD_SIDE (“preferred channel to starboard side”, “preferred starboard side”)+ SAFE_WATER (“safe water”, “safe water”)+ DANGER (“isolated danger”, “danger”)+ SPECIAL (“special”, “special”)+ SPECIAL_NUN (special preferred nun shape”, “special nun”)+ NO_LATERAL (“no lateral significance”, “no lateral”)+ NO_LATERAL_RED (“no lateral significance - Red Identifier”, “no lateral redl”)+ NO_LATERAL_GREEN (“no lateral significance – Green Identifier”, “no lateral green”)+ PORT_SIDE_INTERCOASTAL (“port side - intercoastal”, “port side intercoastal”)+ STARBOARD_SIDE_INTERCOASTAL (“starboard side - intercoastal”, “starboard side intercoastal”)+ PREFERRED_PORT_SIDE_INTERCOASTAL (“preferred channel to port side - intercoastal”, “preferred port side intercoastal”)+ PREFERRED_STARBOARD_SIDE_INTERCOASTAL (“preferred channel to starboard side - intercoastal”, “preferred starboard side intercoastal”)
humanReadable : String {readOnly}label : String {readOnly}
NavAidFunction : enum
+ getType() : String+ setPositionX(double) : void+ getPositionX() : double+ setPositionZ(double) : void+ getPositionZ() : double+ setDirection(double) : void+ getDirection() : double+ setLocation() : void+ getBoundaryRadius() : double+ getBoundaryLength() : double+ getBoundaryWidth() : double+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void+ isRebuildRequiredForSetEnvironmentVisibility() : bool+ getDistance(double posX, double posZ) : double+ updateVisibility(double : posX, double : ) : void+ adjustToApparentWind()
<<Placeable>>
+ setLightsObservability(posX : double, posZ : double) : void+ setMagnitude(posX : double, posZ : double, force : bool) : void+ setLightsNotVisibleIfOutOfRange(posX : double, posZ : double) : void+ setNauticalObjDisplayOn(bool) : void+ isNauticalObjDisplayOn() : bool+ stopBackgroundLightTasks() : void
<<Lighted>>
+ FLASH (“SingleFlashing”, “Fl”),+ GROUP_FLASH_2 ("Group Flashing (2)", "Fl (2)"),+ GROUP_FLASH_3 ("Group Flashing (3)", "Fl (3)" ),+ GROUP_FLASH_4 ("Group-Flashing (4)", "Fl (4)"),+ COMPOSITE_FLASH_2_1 ("Composite Group Flashing (2+1)", "Fl (2+1)"),+ OCCULT ("Occulting", "Oc"), + GROUP_OCCULT_2 ("Group Occulting (2)", "Oc (2)"),+ ISOPHASE ("Isophase", "Iso"),+ QUICK ("Continuous Quick Flash", "Q"),+ MORSE ("Morse Code (A)", "Mo (A)"),+ FIXED ("Fixed", "F");
humanReadable : String {readOnly}label : String {readOnly}
LightPattern : enum
~ NavAidLightedBase(function : NavAidFunction, id : char,condition : NauticalEnvironment.Conditionpattern : LightPattern,period : int)
+ updateVisibility(posX : double, posZ : double) : void <<override>>
+ getLightPattern() : LightPattern+ getLightPatternPeriod() : int
# lightPattern : LightPattern# lightPatternPeriod : int
NavAidLightedBase
+ INFO ("info", "regulatory-info"), + FUEL ("fuel", "regulatory-fuel"), + MARINA ("marina", "regulatory-marina"),+ DANGER ("danger", "regulatory-danger"),+ DAM ("dam", "regulatory-dam"),+ ROCK ("rock", "regulatory-rock"), + EXCLUSION ("exclusion", "regulatory-exclusion"),+ SWIM_AREA ("swim area", "regulatory-swim-area"),+ CONTROL ("control", "regulatory-control"),+ NO_WAKE ("no wake", "regulatory-no-wake");
label : String {readOnly}fileName : String {readOnly}
NavAidRegulation : enum
The updateVisibility method from the placeable interface is overridden to account for both non-illuminated components and the Nav Aid light
NavAidManOverboardPole - Class DiagramNavAidDayMark – Class Diagram
NavAidBouy – Class Diagram
NavAidBase
~ NavAidManOverboardPole( function : NavAidFunction, id : char, regulation : NavAidRegulation,condition : NauticalEnvironment.Condition)
~ NavAidManOverboardPole(NavAidFunction, char, NauticalEnvironment.Condition)~ NavAidManOverboardPole(NavAidFunction, char)~ NavAidManOverboardPole(NauticalEnvironment.Condition)~ NavAidManOverboardPole()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
- createManOverboardPoleComponents() : void- clearManOverboardPoleComponents() : void
+ TYPE: string = “Man Overboard Pole” {readOnly}
~ MAN_OVERBOARD_POLE_RADUS : double = 0.05 {readOnly}~ MAN_OVERBOARD_POLE_HEIGHT : double = 2.0 {readOnly}
NavAidManOverboardPole
~ NavAidDayMark( function : NavAidFunction, id : char, regulation : NavAidRegulation,condition : NauticalEnvironment.Condition)
~ NavAidDaymark(NavAidFunction, char, NauticalEnvironment.Condition)~ NavAidDaymark(NavAidFunction, char)~ NavAidDaymark(NavAidFunction)~ NavAidDaymark()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<Override>>
- createDaymarkComponents() : void- clearDaymarkComponents() : void
+ TYPE: string = “Daymark” {readOnly}
~ POLE_RADUS : double = 0.25 {readOnly}~ ID_STROKE_WIDTH : double = 1.0 {readOnly}
NavAidDayMark
~ NavAidBouy( function : NavAidFunction, id : char, regulation : NavAidRegulationcondition : NauticalEnvironment.Condition)
~ NavAidBouy(NavAidFunction, char, NauticalEnvironment.Condition)~ NavAidBouy(NavAidFunction, char)~ NavAidlBouy(NavAidFunction)~ NavAidBouy()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
- createBouyComponents() : void- clearBouyComponents() : void
+ TYPE: string = “Bouy” {readOnly}
~ BOUY_RADUS : double = 1.0 {readOnly}~ ID_STROKE_WIDTH : double = 1.0 {readOnly}
NavAidBouy
File
Image
Color Map Filesbitmaps/black-grey-black-grey.gifbitmaps/red-white-red-white.gif
This is the default object which is placed into the 3D nautical world if there is a problem creating a Navigation Aid while generating a 3D nautical world presentation module. The existence of the man overboard pole provides an indication of the failure.
This object can also be placed as an actual man overboard pole should it be desired in a 3D nautical world.
NavAidRegulatoryBouy – Class DiagramNavAidMooringBouy – Class Diagram
NavAidBase
~ NavAidMooringBouy( function : NavAidFunction, id : charregulation : NavAidRegulationcondition : NauticalEnvironment.Condition)
~ NavAidBouy(NavAidRegulation) ~ NavAidBouy()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
- createBouyComponents() : void- clearBouyComponents() : void
+ TYPE: string = “Mooring Bouy” {readOnly}
~ BOUY_RADUS : double = 0.5 {readOnly}
NavAidMooringBouy
File
Image
Image Filesbitmaps/mooring.gifbitmaps/mooring-night.gif
~ NavAidRegulatoryBouy( function : NavAidFunction, id : char,regulation : NavAidRegulationcondition : NauticalEnvironment.Condition)
~ NavAidRegulatorylBouy(regulatoryFunction : RegulatoryFunction)~ NavAidRegulatoryBouy()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
- createBouyComponents() : void- clearBouyComponents() : void
+ TYPE: string = “Regulatory Bouy” {readOnly}
~ BOUY_RADUS : double = 0.5 {readOnly}
NavAidRegulatoryBouy
File
Image Image Filesbitmaps/regulator-info.gif bitmaps/regulator-info-night.gifbitmaps/regulatory-fuel.gif bitmaps/regulator-fuel-night.gifbitmaps/regulatory-marina.gif bitmaps/regulator-marina-night.gifbitmaps/regulatory-danger.gif bitmaps/regulator-danger-night.gifbitmaps/regulatory-dam.gif bitmaps/regulator-dam-night.gifbitmaps/regulatory-exclusion.gif bitmaps/regulator-exclusion-night.gifbitmaps/regulatory-swim-area.gif bitmaps/regulator-swim-area-night.gifbitmaps/regulatory-control.gif bitmaps/regulator-control-night.gifbitmaps/regulatory-no-wake.gif bitmaps/regulator-no-wake-night.gif
NavAidLightedEmergencyBeacon - Class DiagramNavAidLightedDaymark – Class Diagram
NavAidLightedBase
~ NavAidLightedEmergencyBeacon( function : NavAidFunction, id : char, condition : NauticalEnvironment.Condition pattern : NavAidLightedBase.LightPattern, period : int)
~ NavAidLightEmergencyBeacon()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
+ getNavAidFunction() : NavAidFunction <<override>>+ getNavAidId() : char <<override>>
+ setLightsObservability( posX : double, posZ : double) : void <<override>>+ setMagnitude(posX : double, posZ : double) : void <<override>>+ setLightsNotVisibleIfOutOfRange(posX : double, posZ : double) : void <<override>>+ setNauticalObjDisplayOn(enable : bool) : void <<override>>+ isNauticalObjDisplayon() : bool <override>>+ stopBackgroundLightTasks() : void <<override>>
- createBeaconComponents() : void- createBeaconLight() : void- clearBeaconComponents() : void
+ TYPE: string = “Emergency Beacon” {readOnly}
~ LIGHTED_BEACON_RADUS : double = 0.5 {readOnly}~ BEACON_LIGHT_RANGE : NavLight.LightRange = TWO_NM {readOnly}
- beaconLight : NavLight
- drum : Cylinder- pole : Cylinder - base : Box
NavAidLightedEmergencyBeacon
~ NavAidLightedDaymark( function : NavAidFunction, id : char, condition : NauticalEnvironment.Condition pattern : NavAidLightedBase.LightPattern, period : int)
~ NavAidLightedDayMark( function : NavAidFunction, id : char)
~ NavAidLightedDaymark()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
+ setLightsObservability( posX : double, posZ : double) : void <<override>>+ setMagnitude(posX : double, posZ : double) : void <<override>>+ setLightsNotVisibleIfOutOfRange(posX : double, posZ : double) : void <<override>>+ setNauticalObjDisplayOn(enable : bool) : void <<override>>+ isNauticalObjDisplayon() : bool <override>>+ stopBackgroundLightTasks() : void <<override>>
- createDaymarkComponents() : void- createNavAidLight() : void
+ TYPE: string = “Lighted Daymark” {readOnly}
~ BATTERY_WIDTH : double = 0.5 {readOnly}~ NAV_AID_LIGHT_RANGE : NavLight.LightRange = FOUR_NM {readOnly}
- navAidLight : NavLight
~ nauticalObjGroup : Group
NavAidLightedDaymark
NavAidDayMark
This is the default object which is placed into the 3D nautical world if there is a problem creating a Lighted Navigation Aid while generating a 3D nautical world presentation module. The existence of the emergency beacon provides an indication of the failure.
This object can also be placed as an emergency beacon should it be desired in a 3D nautical world.
NavAidLightedBouy – Class DiagramNavAidLightedSmallTower – Class Diagram
NavAidLightedBase
File
Image
Color Map Filesbitmaps/black-grey-black-grey.gifbitmaps/red-white-red-white.gif
~ NavAidLightedBouy( function : NavAidFunction, id : char, condition : NauticalEnvironment.Condition pattern : NavAidLightedBase.LightPattern, period : int)
~ NavAidLightedBouy( function : NavAidFunction, id : char)~ NavAidLightedBpuy()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
+ getNavAidFunction() : NavAidFunction <<override>>+ getNavAidId() : char <<override>>
+ setLightsObservability( posX : double, posZ : double) : void <<override>>+ setMagnitude(posX : double, posZ : double) : void <<override>>+ setLightsNotVisibleIfOutOfRange(posX : double, posZ : double) : void <<override>>+ setNauticalObjDisplayOn(enable : bool) : void <<override>>+ isNauticalObjDisplayon() : bool <override>>+ stopBackgroundLightTasks() : void <<override>>
- createBouyComponents() : void- createNavAidLight() : void- clearBouyComponents() : void
+ TYPE: string = “Lighted Bouy” {readOnly}
~ LIGHTED_BOUY_RADUS : double = 1.5 {readOnly}~ ID_STROKE_WIDTH : double = 1.0 {readOnly}
~ NAV_AID_LIGHT_RANGE : NavLight.LightRange = FOUR_NM {readOnly}
- navAidLight : NavLight
~ nauticalObjGroup : Group
NavAidLightedBouy
~ NavAidLightedBouy( function : NavAidFunction, id : char, condition : NauticalEnvironment.Condition pattern : NavAidLightedBase.LightPattern, period : int)
~ NavAidLightedBouy( function : NavAidFunction, id : char)~ NavAidLightedBouy()
+ getType() : String <<override>>+ getBoundaryRadius() <<Override>>+ getBoundaryLength() <<Override>>+ getBoundaryWidth() <<Override>>+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void <<override>>
+ getNavAidFunction() : NavAidFunction <<override>>+ getNavAidId() : char <<override>>
+ setLightsObservability( posX : double, posZ : double) : void <<override>>+ setMagnitude(posX : double, posZ : double) : void <<override>>+ setLightsNotVisibleIfOutOfRange(posX : double, posZ : double) : void <<override>>+ setNauticalObjDisplayOn(enable : bool) : void <<override>>+ isNauticalObjDisplayon() : bool <override>>+ stopBackgroundLightTasks() : void <<override>>
- createTowerComponents() : void- createNavAidLight() : void- clearTowerComponents() : void
+ TYPE: string = “Lighted Small Tower” {readOnly}
~ TOWER_RADUS : double = 1.0 {readOnly}
~ NAV_AID_LIGHT_RANGE : NavLight.LightRange = SIX_NM {readOnly}
- navAidLight : NavLight
~ nauticalObjGroup : Group
NavAidLightedSmallTower
FirstPerson - Class Diagram
+ FirstPersonl()
+ getObserverHeight() : double + setObserverHeight(double) : void+ setLength(int) : void + setWidth(double) : void~ setHunting(bool) : void ~ setLockedOnCourse(bool) : void+ setNauticalMotion(VesselBase.Motion) : void + setNauticalOperation(VesselBase.Operation) : void+ directionProperty() : DoubleProperty + speedProperty() : DoubleProperty
+ setAutoCourseChangeEnabled(bool) : void + isAutoCourseChangeEnabled() : bool+ setControlsEnabled(bool) : void + getControlsEnabled() : bool~ setOverlayManager(OverlayManager) : void
+ setMaxSpeed(double) : void+ setMaxTurnRate(double) : void + getMaxTurnRate() : double+ setBoundaryRadius(double) : void
+ setPercentRudderTravel(double) : void + getPercentRudderTravel() : double+ getApparentWindAngle() : double + getApparentWindSpeed() : double+ setSailSpeed(double) : void +setMotorSpeed(double) : void
+ setSignalledDirection(NauticalDirection) : void + getSignalledDirection() : NauticalDirection+ isCabinAccessEnabled() : bool + setCabinIconsEnabled(bool) : void+ getFastAdvanceIcon() : Shape + updateOvserverViewDirection() : void
+ fillSignalledCourseEstablishedFrameCounter() : void + clearSignalledCourseEstablishedFrameCounter() : void+ decrementSignalledCourseEstablishedFrameCounter() : void
+ decrementSignalledCourseEstablishedFrameCounter() : bool- getControlSpeed() : double- adjustSpeed(period : double) : void - updatePosition() : void- adjustPosition(period : double) : void - adjustCourse(period : double) : void
+ SCALING_FACTOR : float = 10 {readOnly}+ FIELD_OF_VIEW_ANGLE : double = 90 {readOnly}
+ light : PointLight + camera : PerspectiveCamera+ pointOfView : PointOfView+ frameDurationRequiredToEstablishCourse : int + signalledCourseEstablishedFrameCounter : int
- OCEAN_EDGE : float {readOnly} - DEFAULT_POSX : double {readOnly}- OCEAN_DEPTH : float {readOnly} - DEFAULT_POSZ : double {readOnly}- DEFAULT_OBSERVER_HEIGHT : double {readOnly}- CAMERA_NEAR_CLIP : double {readOnly} - CAMERA_FAR_CLIP : double {readOnly}
- postionX : double - positionZ : double- direction : DoubleProperty - speed : DoubleProperty
- maxSpeed : double - maxTurnRate : double- sailSpeed : double - motorSpeed : double- boundaryRadius : double- vesselLength : int - vesselWidth : double- courseChangeDirection : NauticalDirection -signalledDirection : NauticalDirection- autoCourseChangeEnabled : bool -courseChangeRemaining : double- controlsEnabled : bool - percentRudderTravel : double- nauticalMotion : VesselBase.Motion - nauticalOperation : VesselBase.Operation- overlayManager : OverlayManager- hunting : bool - lockedOnCourse : bool- beingOvertaken : bool - locationStale : bool
FirstPersonVessel
+ getType() : String+ setPositionX(double) : void+ getPositionX() : double+ setPositionZ(double) : void+ getPositionZ() : double+ setDirection(double) : void+ getDirection() : double+ setLocation() : void+ getBoundaryRadius() : double+ getBoundaryLength() : double+ getBoundaryWidth() : double+ setEnvironmentVisibiliity(NauticalEnvironment:Condition) : void+ isRebuildRequiredForSetEnvironmentVisibility() : bool+ getDistance(double posX, double posZ) : double+ updateVisibility(double : posX, double : ) : void+ adjustToApparentWind()
<<Placeable>>
+ setSpeed(double) : void+ getSpeed() : double+ getMaxSpeed() : double+ getLength() : int
+ setCourseChangeDirection(Utils.NauticalDirection) : void+ getCourseChangeDirection() : Utils.NauticalDirection+ setCourseChangeRemaining(double) : void+ getCourseChangeRemaining() : double
+ move(double period) : void+ fastAdvance(period : double) : void+ isLocationStale() : bool
+ getAngleOffBow(posX : double, posZ : double) : int
+ getNauticalMotion() : VesselBase.Motion+ getNauticalOperation() : VesselBaseOperation+ getSailTack() : Utils.NauticalDirection
+ isHunting() : boolean+ isLockedOnCourse() : boolean+ isBeingOvertaken() : boolean+ setBeingOvertaken(bool) : void
<<Moveable>>
+ BOW “‘bow”, 0)+ STARBOARD (“starboard”, 90)+ STERN (“stern”, 180)+ PORT (“port”, -90)
label : String {readOnly}viewAngle : int {readOnly}
PointOfView : enum
OverlayManager - Class Diagram
+ OverlayManager( firstPerson : FirstPerson, + Load ( overlayType : OverlayTypewindowWidth : ReadOnlyDoubleProperty, windAffectedOverlayDisplayed : bool,initialDisplayWindowHeight : double, instrumentsOverlayDisplayed : bool,intialDisplayWindowWidth : double, controlsOverlayDisplayed : bool,initialOveralWindowWidth : double, bearingGradientsDisplayed : bool, firstPersonVessel : Group) pointOfViewEnabled : bool,
cabinAccessEnabled : bool) : void+ setAutoWindAdjustEnabled(bool) : void+ isAutoWindAdjustEnabled() : bool + isCabinAccessEnabled() : bool+ isPointOfViewEnabled() : bool + adjustToWind() : void+ getSailTack() : NauticalDirection + reset() : void
+ removeListener() : void- implementControls() : void- updateOverlay() : void - resetCurrentOverlayParameters() : void- setPointOfSail(apparentWind : double) - currentOverlayRefresh() : void- getSailSpeed( apparentWindAngle : double, - setTelltale(apparentWind : double, boomAngle : double)
apparentWindSpeed: doubel,boomAngle : double ) : double
- adjustToWind(windAngle : double) : void - adjustToWindAngle(windAngle : double, boomAngle : double) : void- isSailTrim(windAngle : double, boomAngle : double) : bool
+ fastAdvanceIcon : Shape + exitCabinIcon : Shape
- TRIM_TOLERANCE : double = 0.02 {readOnly}- TRIM_TOLERANCE_HYSTERESIS : double = 0.03 {readOnly} - trimTolerance : double
- firstPerson : FirstPerson- windowWidth : ReadOnlyDoubleProperty - initialDisplayWindowHeight : double- initialDisplayWIndowWidth : double - initialOverallWindowWidth : double
- firstPersonVessel : Group {readOnly} - currentWindAffectedOverlay : WindAffected- firstPersonBowView : Group {readOnly} - bowWindAffectedOverlay : WindAffected- firstPersonStarboardView : Group {readOnly} - starboardWindAffectedOverlay : WindAffected- firstPersonSternView : Group {readOnly} - sternWindAffectedOverlay : WindAffected- firstPersonPortView : Group {readOnly} - portWindAffectedOverlay : WindAffected-firstPersonCabinView : Group {readOnly} - currentOverlayType : OverlayType
- instrumentsOverlay : Instruments - controlsOverlay : UserControls- cockpitView : CabinAccess - bowPointOfView : PointOfView- cabinAccessEnabled : bool -windAffectedCurrentlyDisplayed : bool- instrumentsCurrentlyDisplayed : bool - controlsCurrentlyDisplayed : bool- gradientsCurrentlyDisplayed: bool - boomAngle : double- currentSailTack : Utils.NauticalDirection - autoWindAdjustEnabled : boo- currentPointOfSail : Utils.PointOfSail - pointOfViewEnabled : bool- telltaleStraight : bool - rudderActive : bool- sailLuffed : bool - throttleActive : bool- minuteChangeListener : InvalidationListener - winchActive : bool
OverlayManager
+ NONE (“No Overlay Is Displayed”, “none”)+ CAT_BOAT (“Cat Boat Overlay”, “cat boat”)+ FISHING_BOAT (“Fishing Boat Overlay”, “fishing boat”)+ CABLE_LAYER (“Cable Layer Overlay”, “cable layer”)+ LIFE_RAFT (“Life Raft Overlay”, life raft”)
humanReadable : String {readOnly}label : String {readOnly}
OverlayTypes: enum
+ getObserverHeight() : double
<<VesselInfo>>
+ adjustSailDisplay( sailTack : Utils.NauticalDirection,windScale : double ) : void
+ setTelltaleStraight(bool) : void
<<WindAffected>>
+ updateInstruments( speed : double,direction : double,windSpeed : doublewindAngle : double ) : void
+ KNOTMETER_DISPLAY_RESOLUTION {readOnly}
<<Instruments>>
+ getRudderControl() : Shape+ getThrottleControl() : Shape+ getWinchControl() : Shape+ setTillerPosition(posX : double) : void+ setThrottlePosition(posX : double, posY : double) : void+ resetWinch() : void+ getWinchDirection(posX : double, posY : double) : WinchDirection+ setRudderPosition(rudderPercentTravel : double) : void+ getRudderPercentTravel() : double+ getThrottleSetting() : ThrottleSetting
<<UserControls>>
~ CLOCKWISE (“clockwise”, 1)~ NO_ROTATION (“no rotation”, 0)~ COUNTERCLOCKWISE (“counterclockwise”, -1)
label : String {readOnly}value : int {readOnly}
WinchDirection : enum + REVERSE (“reverse”, -0.3)+ NEUTRAL (“neutral”, 0)+ SLOW (“slow”, 0.3)+ STANDARD (“standard”, 0.8)+ FULL (“full”,1.0)
label : String {readOnly}percentFull : double {readOnly}
ThrottleSettings : enum
+ getArrowLeft() : Shape+ getArrowRight() : Shape
<<PointOfView>>
~ UPPER_LEFT (“upper left”)~ UPPER_RIGHT (“upper right”)~ LOWER_LEFT (“lower left”)~ LOWER_RIGHT (“lower right”)~ RESET (“reset”)
label : String {readOnly}
WinchRegion : enum
The OverlayTypes define the overlays which are supported by the Overlay Manager
The Overlay Manager uses the following six interfaces to manage the display of the overlays
+ getSwitchLocationIcon() : Shape
<<CabinAccess>>
+ getFastAdvanceIcon() : Shape+ getClockDisplay() : Shape
<<FastAdvance>>
ModuleDefinitionGenerator – Class Diagram
~ ModuleDefinitionGenerator()
~ convertDimensionStrToDimensionArray(String : string) : double ~ getTotalNumberOfModuleSectionDefFiles(directory : File) : int~ generateSectionsStrToFileNameStr(directory File) : Map<String, String> ~ generateSectionStrToDescriptionStr(directory : File) : Map<String, String>~ generateSectionTitlesArray( directory File,
map : Map<String, String>,numberOfFiles : int ) : List<String>
~ convertXMLFileToTitleStrList(file : File) : List<String>
~ convertXMLFileToModuleModuleDef(file : File, moduleTitle : String) : ModulePresentationGenerator.ModuleDefinition~ convertXMLFileToModuleDefList(file : File) : ArrayList<ModulePresentationGenerator.ModuleDefinition>~ convertXMLFileToModuleDefList(file : File, moduleTitle : String) : ArrayList<ModulePresentationGenerator.ModuleDefinition>
- convertStrToDef(ModulePresentationGenerator.ModuleDefinition, ModuleStrings) : ModulePresentationGenerator.ModuleDefinition- convertStrToDef(ModulePresentation.ModuleTypeDefinition, ModuleStrings) : ModulePresentation.ModuleTypeDefinition- convertStrToDef(ModulePresentation.ModuleFirstPersonConditions, ModuleStrings) : ModulePresentation.ModuleFirstPersonConditions- convertStrToDef(ModulePresentationGenerator.NauticalObjectDefinition, NauticalObjectStrings) :
ModulePresentationGenerator.NauticalObjectDefinition- convertStrToDef(ModulePresentationGenerator.TerrestrialObjectDefinition, TerrestrialObjectStrings) :
ModulePresentationGenerator.TerrestrialObjectDefinition- convertStrToDef(ModulePresentationGenerator.AnimationEventConfigDefinition, NauticalObjectStrings) :
ModulePresentationGenerator.AnimationEventConfigDefinition- convertStrToDef(ModulePresentationGenerator.RegionDefinition, RegionStrings) : ModulePresentationGenerator.RegionDefinition
- strToEnvironmentCondition : Map<String, NauticalEnvironment.Condition>- strToOverlayType : Map<String, OverlayManager.OverlayType> - strToThrottleSetting : Map<String, UserControls.ThrottleSetting>- strToNavAidFunction : Map<String, NavAidBase.NavAidFunction> - strToNavAidRegulation : Map<String, NavAidBase.NavAidRegulation>- strToNavAidLightPattern : Map<String, NavAidLightedBase.LightAPattern> - strToVesselMotion : Map<String, VesselBase.Motion>- strToVesselOperation : Map<String, VesselBase.Operation> - strToNauticalDirection Map<String, Utils.NauticalDirection>- strToModuleType : Map<String, ModulePresentation.ModuleType> - strToAnswerSet : Map<String, ModulePresentation.AnswerSet>- strToAnimationChangeType : Map<String, ModulePresentation.ChangeType>
ModuleDefinitionGenerator
- moduleTypeStr = "display only"- titleStr = ""- moduleImageStr = ""- descriptionStr = ""- questionStr = ""- answerSetStr = "empty"- correctAnswerStr = ""- resultResponseStr = ""- displayImageWithResultStr = "false"- vesselsVisibleWithResultStr = "false"- conditionStr = "day"- hourStr = DEFAULT- windSpeedStr = "0.0"- windDirectionStr = "0.0"- firstPersonPosXStr = "0.0"- firstPersonPosZStr = "0.0"- firstPersonDirectionStr = "0.0"- firstPersonSpeedStr = "0.0"- firstPersonMotionStr = “power”- firstZPerson = “normal”- firstPersonChangeDirectionStr = "straight ahead"- firstPersonCourseChangeStr = "0.0"- overlayTypeStr = "life raft"- windAffectedOverlayDisplayedStr = "false"- instrumentsOverlayDisplayedStr = "false"- controlsOverlayDisplayedStr = "false"- bearingGradientsDisplayedStr = “false”- pointOfViewEnabledStr = "false"- cabinAccessEnabledStr = “false”- timerToggleEnabledStr = “false”- initialThrottleSettingStr = “neutrual”- nauticalObjectStringsList : ArrayList<NauticalObjectsStrings>- terrestrialObjectStringsList :
ArrayList<TerrestrialObjectsStrings>- animationEventStringsList : ArrayList<AnimationEventStrings>- regionStringsList : ArrayList<AnimationEventStrings>
ModuleStrings
When the Module Definition Generator is initialized it creates a set of lookup maps which can be used to translate strings into Java object definitions.
Given an XML file which defines module presentations, static methods available as part of the Definition Generator can be used to parse the information in the XML into a string structure called “ModuleStrings” which completely defines a module presentation. The “ModuleStrings” structure may also contain string sub-structures which if present define nautical objects, terrestrial objects, regions and animation events which will be part of the module presentation.
Note: The “ModuleStrings” structure contains default strings. If the XML does not define a value for a certain module presentation parameter, the string within the structure remains at the default value.
Give a “ModuleStrings” structure, methods and the lookup maps within the Module Definition Generator can be used to convert the string structure to a module presentation definition
XML File
moduleDefinition : ModuleDefintion
~ SectionDependenciesGraph(sectionTitles : String[])
~ addDependency(sectionTitle : String, dependency : String) : void~ sectionTitleDependencyStepThrough(String, Map<String,bool, Stack<String>) : void~ getSortedTitleArray() : List<String>
~ sectionTitles : String[] - visited : Map<String, bool>- sectionDependencies : Map<String, ArrrayList<String>>
SectionDependenciesGraph
ModuleDefinitionGenerator Part2 – Class Diagram
- indexStr : String = "-1"- nauticalGroupStr : String = "NAV_AID"- typeStr : String = "Man Overboard Pole"- functionStr : String = "danger"- regulationStr : “exclusion”- idStr : String = "X"- lightPatternStr = “F”- periodStr = “10000”- motionStateStr : String = "not underway" - operationStateStr : String = "normal"- conformanceStateStr : String = "international"- displayLightsOnlyStr : String = "false"- posXStr : String = "0.0"- posZStr : String = "0.0"- directionStr : String = "0.0"- speedStr : String = "0.0"- changeDirectionStr : String = "straight ahead" - courseChangeStr : String = "0.0"- huntingStr = “false”- lockedOnCourseStr = “false”
NauticalObjectStrings
- changeTypeStr : String = "no change"- durationStr : String = "0.0"- nauticalObjectIndexStr : String = "-1"- courseChangeStr : String = "0.0"- newSpeedStr : String = "0.0"
AnimationEventStrings
- moduleTypeStr = "display only"- titleStr = ""- moduleImageStr = ""- descriptionStr = ""- questionStr = ""- answerSetStr = "empty"- correctAnswerStr = ""- resultResponseStr = ""- displayImageWithResultStr = "false"- vesselsVisibleWithResultStr = "false"- conditionStr = "day"- hourStr = DEFAULT- windSpeedStr = "0.0"- windDirectionStr = "0.0"- firstPersonPosXStr = "0.0"- firstPersonPosZStr = "0.0"- firstPersonDirectionStr = "0.0"- firstPersonSpeedStr = "0.0"- firstPersonMotionStr = “power”- firstZPerson = “normal”- firstPersonChangeDirectionStr = "straight ahead"- firstPersonCourseChangeStr = "0.0"- overlayTypeStr = "life raft"- windAffectedOverlayDisplayedStr = "false"- instrumentsOverlayDisplayedStr = "false"- controlsOverlayDisplayedStr = "false"- pointOfViewEnabledStr = "false"- cabinAccessEnabledStr = “false”- timerToggleEnabledStr = “false”- initialThrottleSettingStr = “neutrual”- nauticalObjectStringsList : ArrayList<NauticalObjectsStrings>- terrestrialObjectStringsList : ArrayList<TerrestrialObjectsStrings>- animationEventStringsList : ArrayList<AnimationEventStrings>- regionStringsList : ArrayList<AnimationEventStrings>
ModuleStrings
0..*
0..*
- indexStr : String = "-1"- terrestrialGroupStr : String = "LANDFORM"- typeStr = “Bank”- posXStr : String = "0.0"- posZStr : String = "0.0"elevationStr = “0.0”orientationStr = “0.0”widthStr = “0.0”lengthStr = “0.0”heightStr = “0.0”
TerrestrialObjectStrings
0..*
0..*
- regionTypeStr = “Circle”- regionLabelStr = “”- boundaryDimensionStr = “0, 0, 5”- wayPointStr = “true”- channelStr = “false”- speedZoneStr = “false”- fencedStr = “false”- wayPointIndexStr = “0”- maxSpeedStr = “12”
RegionStrings
0..*
ModulePresentationGenerator – Class Diagram
~ ObjectToggle( Image, Image)
~ setVisible(bool) : void~ setDisable(bool) : void~ setToggleToClose() : void~ setToggleToOpen() : void~ isSetToClose() : bool
# closeIcon : Image# openIcon : Image# setToClose : bool
ObjectToggle
~ ObjectToggleButton( Button, Image, Image)
~ setVisible(bool) : void <<override>>~ setDisable(bool) : void <<override>>~ setToggleToClose() : void <<override>>~ setToggleToOpen() : void <<override>>
- toggleButton : Button
ObjectToggleButton
~ ObjectToggleButton( Button, Image, Image)
~ setVisible(bool) : void <<override>>~ setDisable(bool) : void <<override>>~ setToggleToClose() : void <<override>>~ setToggleToOpen() : void <<override>>
- toggleButton : Button- buttonLabel : Label
ObjectToggleButtonLabel
ModulePresentationGenerator – Class Diagram
~ ModulePresentationGenerator(firstPerson : FirstPerson, subScene : SubScene, nauticalWorld : Group, buttonPlayAnimation : Button, imagePresenter : ImageView, imageToggle : ObjectToggle,
timerToggle : ObjectToggle,textArea : TextArea,consolePane : Parenttimer : PaneControllerTimer
testButtons : Button[], testButtonLabels: Label[],
overlayManager : OverlayManager,simulationManager : SimulationManager)
~ ModulePresentationGenerator( FirstPerson, SubScene, Group, Button, ImageView, ObjectToggle, TextArea, OverlayManager)
~ ModulePresentationGenerator( FirstPerson, SubScene, Group, Button, ImageView, ObjectToggle, ObjectToggle, TextArea, Button[], Label[], OverlayManager)
~ ModulePresentationGenerator( FirstPerson, SubScene, Group, Button, ImageView, ObjectToggle, ObjectToggle, PaneControllerSimulatorConsole, PaneControllerTimer, OverlayManager, SimulationManager)
~ generateModule() : ModulePresentation~ generateModule(ModuleDefinition) : ModulePresentation
- convertStrDataToAnimationEvent(AnimationEventConfigDefinition) : double[]
- firstPerson : FirstPerson - subScene3D : SubScene- nauticalWorld : Group - buttonPlayAnimation : Button- imagePresenter : ImageView - imageToggle : ObjectToggle- timerToggle : ObjectToggle - consolePane : Parent- timer : PaneControllerTimer - overlayManager : OverlayManager- simulationManager : SimulationManager - textArea : TextArea- testButtons : Button[] - testButtonLabels : Label[]
ModulePresentationGenerator
~ index : int~ nauticalGroup : nauticalGroup ~ type : Type~ function : NavAidBase.NavAidFunction ~ id : char
~ regulation : NavAidBase.NavAidRegulation~ lightPattern : NavAidLightedBase.LightPattern ~ period : int
~ motionState : VesselBase.Motion~ operationState : VesselBase.Operation~ conformanceState : VesselBase.Conformance
~ displayLightsOnly : bool~ posX : double ~ posZ : double~ direction : double ~ speed : double~ changeDirection : Utils.NauticalDirection ~ courseChange: double
~ hunting : bool ~ lockedOnCourse : bool
NauticalObjectDefintion
~ changeType : ModulePresentation.ChangeType ~ duration : double~ nauticalObjectIndex : double ~ courseChange : double~ newSpeed : double
AnimationEventConfigDefinition
~ moduleTypeDef : ModulePresentation.ModuleTypeDefinition~ moduleFirstPersonConditions : ModulePresentation.ModuleFirstPersonConditions~ nauticalObjectDefList : ArrayList<NauticalObjectDefinition>~ terrestriallObjectDefList : ArrayList<TerrestrialObjectDefinition>~ animationEventDefList : ArrayList<AnimationEventConfigDefinition>~ regionsDefList : ArrayList<RegionDefinition>
ModuleDefinition
~ ObjectToggle( Image, Image)
~ setVisible(bool) : void~ setDisable(bool) : void~ setToggleToClose() : void~ setToggleToOpen() : void~ isSetToClose() : bool
# closeIcon : Image# openIcon : Image# setToClose : bool
ObjectToggle
1..*
1
0..*
ModulePresentation
In addition to displaying a 3D nautical world, a module presentation may contain the following optional components:
1) a play button to play animation or a simulation in the 3D world2) an image presenter to display a 2D image over top of the 3D world 3) a toggle button to toggle the display of the 2D image4) a toggle button to toggle the display of a timer (stop watch)5) a text area to provide a further description of the presentation6) buttons to support answering of questions7) Reference to separate console GUI for simulation management
Given a module definition which consists of the following items:
1) Information on the type of module presentation and how information will be displayed.2) Information on the characteristics of the first person observer and how the first person will observe the presentation3) Information on nautical objects and regions which will be part of the presentation. (a presentation may consist of zero or many nautical objects and regions)4) Information on how to display the objects as moving animation. Changes in the animation display are provided as multiple animation change configurations (A presentation may consist of zero or many animation event configurations)
The module presentation generator returns a module presentation ready for display within the Navigation Rules Simulator appliacation
Because of different configurations, user screens use different constructors to create the presentation generator
1) Lesson User Screen does not have separate console or answer buttons2) Test User Screen does not have separate console3) Simulator User Screen has a separate console but does not have answer buttons
~ type : String ~ label : String~ boundaryDimension : double[]~ wayPoint : bool ~ channel : bool~ speedZone: bool ~ fenced : bool~ wayPointIndex : int ~ maxSpeed : double
RegionDefinition
~ type : String ~ index : int~ terrestrialGroup : String~ posX : double ~ width : doublel~ posZ : double ~ height : double
~ length : double~ elevation : double ~ orientation : double
TerrestrialObjectDefinition
ModulePresentation – Class Diagram
ModulePresentation~ moduleType : ModuleType~ title : String~ moduleImage : String~ description : String~ question : String~ answerSet : AnswerSet~ correctAnswer : String~ resultResponse : String~ displayImageWithResult : bool~ vesselsVisibleWithResult : bool
ModuleTypeDefintion~ condition : NauticalEnvironment.Condition~ windSpeed : double~ windDirection : double~ hour : int~ firstPersonPosX : double~ firstPersonPosZ : double~ firstPersonDirection : double~ firstPersonSpeed : double~ firstPersonMotion : VesselBase.Motion~ firstPersonOperation : VesselBase.Operation~ firstPersonChangeDirection : Utils.NauticalDirection~ firstPersonCourseChange : double~ overlayType : OverlayManager.OverlayType~ windAffectedOverlayDisplayed : bool~ instrumentsOverlayDisplayed : bool~ controlsOverlayDisplayed : bool~ bearingGradientsDisplayed : bool~ pointOfViewEnabled : bool~ cabinAccessEnabled : bool~ timerToggleEnabled : bool~ initialThrottleSetting : UserControls.ThrottleSetting
ModuleFirstPersonConditions
~ LESSON (“lesson”)~ TEST (“test”)~ SIMULATION (“simulation”)~ DISPLAY_ONLY (“display only”)
label : String {readOnly}
ModuleType : enum
~ NO_CHANGE (“no change”, 0)~ DIRECTION_CHANGE_ONLY_STARBOARD (“direction change only starboard”, 1)~ DIRECTION_CHANGE_ONLY_PORT (“direction change only port”, 2)~ SPEED_CHANGE_ONLY (“speed change only”, 3)~ SPEED_AND_DIRECTION_CHANGE_STARBOARD (“speed and direction change only starboard”, 4)~ SPEED_AND_DIRECTION_CHANGE_PORT (“speed and direction change port”, 5)~ END_OF_ANIMATION (“end of animation”, 6)
label : String {readOnly}code : int {readOnly}
ChangeType : enum
~ VESSEL_CONDUCT (“vessel conduct”, {"Stand On", "Give Way", "Pass (Port)", "Pass (Starboard)}, {"standon", "giveway", "passtoport", "passtostarboard"},
~ VESSEL COURSE {“vessel course”, {"Turn Port", "Turn Starboard", “Head Away”, "Go Slow"},{“turnport”, turnstarboard”, “headaway”, “slowdown”}
~ MOTION (“motion”, {"Towards", "Away", "To Port", "To Starboard"}, {"towards", "away", "toport", "tostarboard"})~ SAIL_TACK { “sail tack”, {“Headed”, “Starboard”, “Port”, “Unknown”}, {“Headed”, “Starboard”, “Port”, “Unknown”} ~ TRUE_FALSE (“true false”, {"True", "False"}, {"true", "false"})~ MULTIPLE_CHOICE (“multiple choice”, {"A", "B", "C", "D"}, {"letterA", "letterB", "letterC", "letterD"})~ EMPTY (“empty”, {}, {})
label : String {readOnly} answers : String[] {readOnly} icons : String[] {readOnly}
AnswerSet : enum
~ NUMBER_OF_EVENT_PARAMETER : int = 5~ CHANGE_TYPE : int = 0~ FRAME_COUNT : int = 1~ OBJECT_INDEX : int = 2~ COURSE_CHANGE : int = 3~ NEW_SPEED : int = 4
AnimationEventConfigLayout
ModulePresentation Part2 – Class Diagram
~ ModulePresentation( subScene3d : SubScene, firstPerson : FirstPerson, nauticalWorld : Group, buttonPlayAnimation : Button, imagePresenter : ImageView, imageToggle : ModuleImageToggle, textArea : TextArea, consolePane : Parent, testButton : Button[], testButtonLabels : Label[], overlayManager : OverlayManager, simulationManager : SimulationManager, moduleTypeDefinition : ModuleTypeDefinition, moduleFirstPersonConditions : ModuleFirstPersonConditions, placeableObjectsArray : Placeable[], lightedObjectsArray : Lighted[], moveableObjectArray : Moveable[], animationEventConfigArraydouble[][],
regionArray : RegionBase[], constructableObjectsArray : Constructable[])
~ getTitle() : String ~ load() : void ~ playAnimation() : void ~ stopAnimation() : void~ reset() : void ~ resetDescription() : void ~ stopBackGroundTasks() : void removeListeners() : void~ enableTestButtonAnswerButtons(bool) : void ~ enableTestButtonAnswerButtonLabels(bool) : void ~ displayAnswerResults(int)
- playEvents() : void - configAnimationEvent() : void - isEndOfAnimationEvent() : bool- recordStartConditions(startConditions : double[][], object : Moveable, count : int) : void - resetStartCondition(startCondditions : double[][], nauticalObjects : Moveable[]) : void
- configureTestButtons(AnswerSet) : void -resetTimer() : void - synchNauticalTime() : void - setVesselsVisibility(bool) : void
- eventHandlerDay() : EventHandler<ActionEvent> - eventHandlerNight() : EventHandler<ActionEvent> - eventHandlerSimulatorDay() : EventHandler<ActionEvent> - eventHandlerSimulatorNight() : EventHandler<ActionEvent>
~ FIRST_PERSON_INDEX : int = 0 ~ NUMBER_OF_START_CONDITIONS : int = 6~ START_POS_X : int = 0 ~ START_POS_Z : int = 1~ START_DIRECTION : int = 2 ~ START_SPEED : int = 3 ~ START_CHANGE_DIRECTION : int = 3 ~ START_COURSE_CHANGE : int = 5
- paneControllerTimer: PaneControllerTimer- firstPerson : FirstPerson - subScene3D : SubScene - nauticalWorld : Group- buttonPlayAnimation : Button - imagePresenter : ImageView - imageToggle : ObjectToggle - timerToggle : ObjectToggle- consolePane : Parent - textArea : TextArea - overlayManager : OverlayManager
- moduleType : ModuleType - title : String - moduleImage : Image - description : String
- question : String - answerSet : AnswerSet - correctAnswer : String - resultResponse : String- displayImageWithResult : bool - vesselsVisibleWithResult : bool - testButtons : Button[] - testButtonLabels : Label[]
- windSpeed : double - windDirection : double - hours : int - condition : NauticalEnvironment.Condition
- firstPersonPosX : double - firstPersonPosZ : double - firstPersonDirection : double - firstPersonSpeed : double- firstPersonChangeDirection : NauticalDirection - firstPersonCourseChange : double
-firstPersonMotion : VesselBase.Motion -firstPersonOperation : VesselBaseOperation
- overlayType : OverlayManager.OverlayType - windAffectedOverlayDisplayed : bool - pointOfViewEnabled : bool- instrumentsOverlayDisplayed : bool - controlsOverlayDisplayed : bool - bearingGradientsDisplayed : bool - timerToggleEnabled : bool- placeableObjects : Placeable[] - moveableObjects : Moveable[] - lightedObjects : Lighted[] - cabinAccessEnabled : bool- regions : RegionBase[] - constructableObjects : Constructable[] - initialThrottleSetting : UserControls.ThrottleSetting
- simulationManager : SimulationManager - moveableObjectsStartConditions : double[]- animationEventConfigs : double[][] - eventConfigIndex = 0 - currentEvent : double[] - currentTimeline : Timeline
- currentEventFrameCount : int - fastAdvanceInvtervalFramesRemaining : int - synchFrames : int
- animationEventSimulatorAtDay : Timeline - animationEventAtDay : Timeline - animationEventSimulatiorAtNight : Timeline - animationEventAtNight : Timeline
ModulePresentation
NavRulSim – Class DiagramRootUserScreen – Class Diagram
ScreenControllerMain – Class Diagram
+ start() : void <<override>>+ stop() : void <<override>>
NavRuleSim
Application
A RootUserScreen object is created and the start method is configured so the RootUserScreen is the root node of the scene on the primary application stage
The previously saved settings objects are deserialized. This allows the application settings configuration to be persistent
The MainScreen is load onto RootUserScreen which is the root node
AnchorPane
~ RootUserScreen()
~ createScreen(resource : String) : Parent~ loadScreen(userScreen : Parent) : bool
~ loadMainScreen() : bool
~ recreateMainScreen() : void
~ currentScreenController : UserScreenController
~ mainScreen : UserScreen
RootUserScreen
ScreenMain.fxml
When the RootUserScreen is initialized, the definition contained within the “ScreenMain” fxml file is used with the FXMLLoader to create the main screen GUI.
The main screen GUI is contained in memory as part of the RootUserScreen. This allows the main screen GUI to be quickly loaded.
+ setScreenParent(RootUserScreen) : void+ performPreUserScreenExitHousekeeping() : void
<<UserScreenController>>
+ initialize() : void <<override>>+ setScreenParent(RootUserScreen) : void <<override>>+ performPreExitHousekeeping() : void <<override>>
- handleButtonSimulator(event : ActionEvent) : void <<FXML>>- handleButtonLearn(event : ActionEvent) : void <<FXML>>- handleButtonTest(event : ActionEvent) : void <<FXML>>- handleButtonReference(event : ActionEvent) : void <<FXML>>- handleButtonSettings(event : ActionEvent) : void <<FXML>>- handleButtonHelp(event : ActionEvent) : void <<FXML>>
- handleButtonQuit(event : ActionEvent) : void <<FXML>>
- goToScreen(String) : void
~ rootUserScreen : RootUserScreen~ userScreen : UserScreen
- DISCLAIMER : String {readOnly}- GRAPHICS_NOT_SUPPORTED {readOnly}
- buttonSimulator : Button <<FXML>>- buttonLearn : Button <<FXML>>- buttonTest : Button <<FXML>>- buttonReference : Button <<FXML>>- buttonSettings : Button <<FXML>>- buttonHelp : Button <<FXML>>
- labelNote : Label <<FXML>>- labelStartHere : Label <<FXML>>- labelOutOfMemory : Label <<FXML>>
ScreenControllerMain
The FXML loader for the MainScreen FXML file which was called by the RootScreenUser during initialization creates an object from the ScreenControllerMain class to control the Main Screen GUI. The FXML loader also assigns a value for the “thisUserScreenParent” variable..
Methods within the controller object manage activity triggered by selecting buttons in the Main Screen GUI
The userScreen variable is used by the methods trigger by the buttons to move to a new screen. Once created, the new screen is assigned to this variable. The variable then defines the screen which needs to be loaded to a separate process.
This interface provides a means for a controller to define the parent of the current user screen. With regards to this method, the parent is the user screen from which the current screen was entered. The parent must be known to allow the controller to return from the current user screen back to the original user screen.
The interface also provides a method to housekeep, for example stopping any running background processes, before the application exits.
The stop() method is called when the application exits. It calls the housekeeping method prior to exit
userScreenGUI : ParentuserScreenController : UserScreenController
UserScreen
An FXML file defines the User Screen GUI (userScreenGUI) component of the User Screen
Structure defining the common objects of all User Screens in navrulesim:1) User Screen GUI2) User Screen Controller
Root User Load – Activity Diagram
Construct Instance of Application Class
Call init()
Call start()
Wait for End ofApplication
User SelectsQuit Button
User ClosesOperating System Window
Platform.exit Application Stop()
Serial SettingsSerialize Selection Menu
Create Root User Screen
Create Main Screen GUIand store in Memory
Load Main Screen GUIInto Root User Screen
Define SceneWith Root User Screen
Start Stagewith Scene
Main User Screen GUIIs displayed
In Operating SystemWindow
(awaiting user input)
Empty Placeholder
Stop() method hasBeen OverwrittenTo call housekeepingFor current controller
When a User Screen GUIIs loaded into the Root User Screen, the current controller is recorded
Since the current controller is known it can be accessed to perform housekeeping when moving to a new screen and controller
DeserializeSettings Configuration
Update settings static values with values from stored configuration
Reset Settings to Defaults
Deserialize Failed
Deserialize Successful
DeserializeSelection Menu
Update selection menu with values from stored configuration
Update selection menu to match current settings configuration
Deserialize Failed
Deserialize Successful
Call housekeeping()For current controller
As part of creating the Root User Screen, the Main Screen GUI is created as defined by the FXML config file and placed into memory
This allows the application configuration to remain persistent when application is exited and restarted later
Simulator Screen – Class Diagram+ setScreenParent(RootUserScreen) : void
<<UserScreenController>>
+ initialize() : void <<Override>>
~ convertSimulationStrToSimDef(simStr : String)
~ enableConsoleControlButtons(bool) : void
~ setScreenParent(screenParent : RootUserScreen) : void <<override>>~ performPreUserScreenExitHouseKeeping() : void <<override>> ~ performPrePresentationModuleExitHousekeeping() : void
~ stopSimulation() : void
~ handleButtonReturn() : void
~ handleButtonReplay() : void~ handleButtonErase() : void ~ handleButtonNext() : void
- advanceToNextSimulation() : void- loadNextModuleDefinitionList() : void - loadNextModulePresentationList() : void
~ rootUserScreen : RootUserScreen
~ paneControllerSimulatorConsole : paneControllerSimulatorConsole ~ simulatorConsole : Parent
~ firstPerson : FirstPerson ~ firstPersonWindow : Group~ nauticalWorld : Group ~ firstPersonVessel : Group~ subScene3D : SubScene
~ moduleDefintitionGenerator : ModuleDefinitionGenerator~ moduleDefinitionList : ArrayList<ModulePresentationGenerator.ModuleDefinition>~ modulePresentationGenerator : ModulePresentatonGenerator~ modulePresentationList : ArrayList<ModulePresentation>~ currentModulePresentation : ModulePresentation
~ buttonPlayAnimation : Button~ buttonQuit : Button ~ handleButtonQuit : HandleButtonQuit~ buttonToggleImage : Button ~ handleButtonToggleImage : HandleButtonToggleImage~ buttonToggleTimer : Button ~ handleButtonToggleTimer : HandleButtonToggleTimer~ imagePresenter : ImageView ~ imageToggle : ObjectToggle~ timerPane : Parent ~ timerToggle : ObjectToggle~ paneControllerTimer : PaneControllerTimer
- overallPane : Pane <<FXML>> - displayPane : Pane <<FXML>>- upperBorderPane : Pane <<FXML>> - firstPersonPane : Pane <<FXML>>- lowerBorderPane : Pane <<FXML>>
- moduleDefinitionListSize : int - moduleDefinitionListIndex : int- modulePresentationListSize : int - modulePresentationListIndex : int- simulationsListIndex : int - simulationsList : List<String>
- centeringPane : StackPane ~ SimulationManager : SimulationManager
ScreenControllerSimulator
+ initialize() : void <<Override>>
~ setSimulatorController(ScreenControllerSimulator) : void
~ handleButtonReturn(ActionEvent) : void <<FXML>>~ handleButtonReplay(ActionEvent) : void <<FXML>>~ handleButtonErase(ActionEvent) : void <<FXML>>~ handleButtonNext(ActionEvent) : void <<FXML>>
~ consolePane : Parent <<FXML>>~ labelTextArea : Label <<FXML>>~ textAreaSimulator : TextArea <<FXML>>~ buttonReplay : Button <<FXML>>~ labelButtonReplay : Label <<FXML>>~ buttonErase : Button <<FXML>>~ labelButtonErase : Label <<FXML>>~ buttonNext : Button <<FXML>>
paneControllerSimulatorConsole
1This controller manages a separate console display used to manage the simulations which are executed in the simulator. The console has a text area used to provide information on the simulation and the results of the execution of the simulation. The console also has a “Next”, ”Replay” and “Erase” button to manage which simulations are run. Selection of these buttons triggers methods within the paneControllerSimulator class to handle management of the simulations.
PaneControllerTimerUsed to support the timer (stop watch) feature.Refer to the Timer Activity Diagram.
1
+ handle(ActionEvent) : void
<<EventHandler>>
+ handle(ActionEvent) : void <<override>>
HandleButtonToggleTimer
+ handle(ActionEvent) : void <<override>>
HandleButtonToggleImage
Manages the opening and closing of the timer (stop watch) in the Simulator GUI
Manages the opening and closing of the image ( nautical chart) in the Simulator GUI
+ handle(ActionEvent) : void <<override>>
HandleButtonQuitManages button which requests termination of simulation in simulator.
SimulationManager –
Class Diagram
~ SimulationManager( simulatorController : SimulatorController, firstPerson : FirstPerson, consolePane : Parent, textArea : TextArea )~ setRegions(RegionBase[]) : void ~ setPlaceableObjects( PlaceableObjects[]) : void ~ setMoveableObjects(MoveableObjects[]) : void~ reset() : void ~ terminateSimulation(SimulationTerminateCondition) : void ~ processSimuationStep() : void~ hasEndConditionOccurred() : bool
- processRegions() : void - processNextRegion() : void - processRegion(posX : double, posZ : double, region “ RegionBase) : void- processPotentionCollisions() : void - processNearCollision() : void - processPotentialCollision(nauticalObject : Placeable) : void- processPotentialInteraction() void - processNextNauticalObject() : void - processEndCondition(SimulationEndCondition, String) : void
- GetDistanceAsBoundaryRatio(PlaceableObject) : double -areCoursesParallel(delta : double, tolerance : double) : bool- isPriviledgeViolationPossible(controlledObject : Moveable, adjustableObject : Moveable) : bool- getCourseAdjustmentAngle(controlledObject : Moveable, adjustableObject : Moveable) : double- getPriviledge(controlledObject : Moveable, adjustableObject : Moveable) : Priviledge - isFirstPersonDirectionChangeClearlySignalled() : bool- isPowerGivewayRequired(controlledObject : Moveable, adjustableObject : Moveable, double distanceRatio) : bool- isSailGivewayRequired(controlledObject : Moveable, adjustableObject : Moveable, double distanceRatio) : bool - getOperationPriviledgeRank(VesselBase.Operation) : int- isSafeGradualApproach(controlledObject : Moveable, adjustableObject : Moveable, double distanceRatio) : bool - getMotionPriviledgeRank(VesselBase.Motion) ; int- isControlledObjectOvertakingadjustableObject(controlledObject : Moveable, adjustableObject : Moveable) : bool- processBeingOvertaken(controlledObject : Moveable, adjustableObject : Moveable, double distanceRatio) : void- getDirectionChange(controlledObject : Moveable, adjustableObject : Moveable) : NauticalUtils.NauticalDirection- getIntersect(dir1: double, pos1: Point2D, dir2: double, pos2: Point2D) : Point2D - getAngularDirection(pos1: Point2D, pos2: Point2D) : double
~ MANAGE_SIMULATIONS_MESSAGE : String = "\n\nSelect REPLAY to run this simulation again or select NEXT to advance to the next simulation." {readOnly}~ MANAGE_PLAYLIST_MESSAGE : String = "\n\nSelect \"Replay\" to run this simulation again or select \"Next\" to go to the next simulation." {readOnly}~ SIMULATION_COMPLETE_MESSAGE : String = "Simulation Complete:\n OBJECTIVE ACCOMPLISHED\n" {readOnly}~ SIMULATION_TERMINATED_MESSAGE : String = "Simulation Terminated:\n OBJECTIVE FAILED\n" {readOnly}~ OBJECTIVE_ACCOMPLISHED_MESSAGE : String = "Congratulations: " {readOnly}~ EXCESSIVE_SPEED_MESSAGE : String = "Allowed vessel speed was exceeded in the following area: " {readOnly}~ ENTERED_FORBIDDEN_AREA_MESSAGE : String = "Vessel entered into the following forbidden area: " {readOnly}~ LEFT_SAFE_WATER_MESSAGE : String = "Vessel left safe water at the following area: " {readOnly}~ COURSE_NOT_FOLLOWED_MESSAGE : String = "The required course was not followed.\n" {readOnly}~ APPROACHED_TOO_CLOSE_MESSAGE : String = "Vessel approached the following object too closely: " {readOnly}~ FAILED_TO_STAY_CLEAR_MESSAGE : String = "Vessel failed to stay clear of the following vessel being overtaken: " {readOnly}~ FAILED_TO_GIVEWAY_MESSAGE : String = "Vessel failed to give way to the following vessel: " {readOnly}~ IMPEDED_MOTION_MESSAGE : String = "Impeded motion of the following priviledged vessel: " {readOnly}~ FAILED_TO_KEEP_LOOKOUT_MESSAGE : String = "Failed to keep lookout while the following approached: " {readOnly} ~ REQUESTED_TERMINATION_MESSAGE : String = "Simulation was requested to terminate.\n" {readOnly}~ TIMED_OUT_MESSAGE : String = "The time allowed for the simulation has expired." {readOnly}~ ABNORMAL_END_MESSAGE : String = "simulator condition has been incorrectly processed." {readOnly}
~ COLLISION_MONITOR_RATIO : double {readOnly} ~ OVERTAKING_CLEARED_RATIO : double {readOnly} ~ GIVEWAY_MONITOR_RATIO : double {readOnly}~ VESSEL_ADJUST_RATIO : double {readOnly} ~ GRADUAL_APPROACH_ANGLE : double {readOnly} ~ GRADUAL_APPROACH_RATIO {readOnly} ~ DIRECTLY_IN_FRONT_RATIO {readOnly} ~ DIRECTLY_IN_FRONT_ANGLE {readOnly}~ PARALLEL_COLLISION_FACTOR : double {readOnly} ~ PARALLEL_TOLERANCE : double {readOnly} ~ NOT_PARALLEL_TOLERANCE : {readOnly}~ FEEDBACK_RATIO : double {readOnly} ~ AXIS_TOLERANCE : double {readOnly} ~ DIRECTIONAL_TOLERANCE : double {readOnly}~ MINIMUM_ADJUST_ANGLE : double {readOnly} ~ ADJUST_ANGLE_INCREMENT : double {readOnly} ~ SIGNIFICANT_PERCENT_CHANGE : double {readOnly}~ OVERTAKE_SECTOR_START : double {readOnly} ~ OVERTAKE_SECTOR_END : double {readOnly} - simulatorController : ScreenControllerSimulator - firstPerson : FirstPerson- consolePane : Parent - textArea : TextArea
- regions : RegionBase[] - placeableObjects : Placeable[] - moveableObjects : Moveable[]
- potentialCollisionsBeingMonitored : ArrayList<Placeable> - potentialCollisionsBeingPackaged : ArrayList<Placeable>- processPlaceableObjects : bool - processMoveableObjects : bool- nextProcess : SimulationManager.SimulationProcesses- regionIndex : int - placeableObjectIndex : int - moveableObjectIndex : int- currentWayPointIndex : int - monitoringChannels : bool - inChannel : bool - currentChannelLabel : String- endConditionOccurred : bool
SimulationManger
~ PRIVILEDGED~ EQUAL~ NOT_PRIVILEDGED
Priviledge : enum
~ PROCESS_REGIONS~ PROCESS_POTENTIAL_COLLISIONS~ PROCESS_NAUTICAL_OBJECT
SimulationProcesses : enum
~ OBJECTIVE_ACCOMPLISHED~ EXCESSIVE_SPEED~ ENTERED_FORBIDDEN_AREA~ LEFT_SAFE_WATER~ COURSE_NOT_FOLLOWED~ COLLISION~ FAILED_TO_STAY_CLEAR~ FAILED_TO_GIVEWAY~ IMPEDED_MOTION~ FAILED_TO_KEEP_LOOKOUT
SimulationEndConditions : enum
~ REQUESTED~ TIMED_OUT
SimulaitonTerminationCondition: enum
Refer to BOTH the manage simulations and manage simulation activity diagrams for details on implementation of this class
Settings – Class Diagram
ScreenControllerSettings
~ RANDOM (“random”)~ PLAYLIST (“playlist”)
label : String {readOnly}
SelectionMode : enum
+ logException(className : String, logLevel : Level, msg : String, ex Exception) : void ~ serialize() : void ~ deserialize() : void~ reset() : void ~ simGroupSettingsReset() : void
~ DISPLAY_QUICK_START_LABELS : bool = true {readOnly}~ displayQuickStartLabels :bool = DISPLAY_QUICK_START_LABELS~ CURRENT_GROUP_INDEX : int = 0 {readOnly}~ currentGroupIndex : int = CURRENT_GROUP_INDEX~ screenLoadingFlag : bool
~ PERFORMANCE_SETTING : PerformanceSetting = MEDIUM {readOnly}~ performanceSetting : PerformanceSetting = PERFORMANCE_SETTING~ FORCE_MENU_REBUILDS : bool = false {readOnly}~ forceMenuRebuilds : bool = FORCE_MENU_REBUILDS~ DISPLAY_UNITS : DistanceUnits = METERS {readOnly}~ displayUnits : DistanceUnits = DISPLAY_UNITS~ WIND_SPEED : double = 12 {readOnly}~ windSpeed : double = WIND_SPEED~ WIND_DIRECTION : Utils.CardinalDirection = EAST {readOnly}~ windDirection : Utils.CardinalDirection = WIND_DIRECTION~ SIMULATOR_SELECTION_MODE : SelectionMode = RANDOM {readOnly}~ simulatorSelectionMode : SelectionMode = SIMULATOR_SELECTION_MODE~ UNDER_POWER_ONLY : bool = false {readOnly}~ underPowerOnly : bool = UNDER_POWER_ONLY+ AUTO_WIND_ADJUST_ENABLED : bool = true {readOnly}+ autoWindAdjustEnabled : bool = AUTO_WIND_ADJUST_ENABLEDPLAYLIST : String[] {readOnly}Playlist : String[] = PLAYLIST;~ ACCESS_TO_ALL_SIMULATIONS_GROUP : bool = false {readOnly}~ accessToAllSimulationGroups : bool = ACCESS_TO_ALL_SIMULATION_GROUPS~ erasedSimulation : HashSet<String>~ SIM_GROUP_TO_SIM_GROUP_SETTING : Map = { simGroupReset() }
+ WINDOW_SIZE: WindowSize = MEDIUM ~ ENABLE_DEVELOPMENT_MODE : bool = false+ OVERALL_LOG_LEVEL {readOnly} + OVERALL_LOG_HANDLER {readOnly}
+ MAGNETIC_VARIATION : double = -3 {readOnly} + MILLISECONDS_PER_SECOND : int = 1000 ~ MAX_PLAYLIST_SIZE = 25{readOnly} ~ BORDER_OFFSET : int = 5 {readOnly}~ CONTROL_BUTTON_WIDTH : int = 60 {readOnly} ~ CONTROL_BUTTON_HEIGHT : int = 52 {readOnly}~ TIMER_PANE_WIDTH : int = 250 {readOnly} ~ TIMER_PANE_HEIGHT: int = 185 {readOnly}+ INSTRUMENT_FONT_SIZE: init = 16 {readOnly}+ CONTROL_ICON_IDLE_COLOR: Color = ORANGERED {readOnly}+ CONTROL_ICON_HOVER_COLOR: Color = RED {readOnly}+ FAST_ADVANCE_INCREMENT: int = 2 {readOnly} + FAST_ADVANCE_INTERVAL: int = 120 {readOnly}~ MAX_NUMBER_OF_PLAYLIST_SIMULATIONS = 25 (readOnly}~ SETTINGS_DIR_PATH : String = “//modules//settings” (readOnly}~ LESSONS_DIR_PATH : String = "//modules//lessons" (readOnly}~ TESTS_DIR_PATH : String = "//modules//tests" (readOnly}~ SIMULATIONS_DIR_PATH : String = "//modules//simulations" (readOnly}~ IMAGES_DIR_PATH : String = "//modules//images" (readOnly}~ SIMULATION_IMAGES_DIR_PATH : String =
"//modules//simulations//images" (readOnly}~ HELP_DIR_PATH : String = “//modules/help” (readOnly}~ BITMAP_DIR_PATH : String = "//modules//bitmaps" (readOnly}~ ICON_DIR_PATH : String = "//modules//icons" (readOnly}~ INTRO_TEST_IMAGE : String ="selectTestGroup.gif" (readOnly}~ PLAY_ICON : String = “play-Large.gif” (readOnly}~ OPEN_ICON: String = “open.gif” (readOnly} ~ CLOSE_ICON: String = “close.gif” (readOnly}
Settings
~ HIGHEST (“highest”, 100, 10, 20, 20, 4)~ HIGH (“high”, 100, 10, 20, 10, 2)~ MEDIUM (“medium”, 100, 10, 20, 5, 1)~ LOW (“low”, 125, 8, 10, 2, 1)~ LOWEST (“lowest”, 125, 8, 10, 1, 1)
label : String {readOnly}animationPeriod : int {readOnly}framesPerSecond : int {readOnly}maxDefinitionListSize : int {readOnly}maxPresentationListSize{readOnly}progressIndex : int {readOnly}
PerformanceSettings : enum
The Settings Screen GUI and controller is used to modify the Settings values for the application
~ CONDUCT (“Conduct”, “Basic Conduct),~ NAV_AIDS (“NavAids”, “Navigation Aids”),~ LIGHTS (“Lights”, “Basic Vessel Lights”),~ LIGHTED_AIDS (“LightedNavAids”, “Lighted Nav Aids”)~ NAVIGATION (“Navigation”, “Navigation Techniques”),~ADV_CONDUCT (“AdvConduct”, “Advanced Conduct”),~ ADV_LIGHTS (“AdvLights”, “Advanced Vessel Lights”),~ TOWING (“Towing”, “Towing”),~ SIGNALS (“Signals”, “Sound and Light Signals”),~ PARALLEL (“Parallel”, “Parallel Travel”),~ NAVAL (“Naval”, “Naval”),~ START (“Start”, “Enable Getting Started”)
label : String {readOnly}humanReadable : String {readOnly}
SimulationGroup : enum
~ NOT_ENABLED (“not enabled”)~ ENABLED (“enabled”)~ SELECTED (“selected”)~ OVERRIDE_ENABLED (“override enabled”)~ OVERRIDE_SELECTED (“override selected ”)
label : String {readOnly}
SimulationGroupSetting : enum
start() : void
NavRuleSim
The start() method om NavRulesSim which is run when the application starts executes the deserialize() and sSelectionManu.deserialize() methods. The deserialized objects are the static Settings values. These values are used to update the Settings values to those which were saved.
+ LARGE (“Large”, 400, “navrulesimLarge.css)+ MEDIUM (“Medium”, 300, “navrulesim.css)
label : String {readOnly}sidePaneWidth : int {readOnly}cssFile : String {readOnly}
WindowSize : enum
SettingsBean – Class Diagram
Settings
~ setDisplayQuickStartLabel(bool) : void~ getDisplayQuickStartLabel() : bool~ setCurrentTestGroupIndex(int) : void~ getCurrentTestGroupIndex() : int~ setPerformanceSetting(Settings.PerformanceSetting) : void~ getPerformanceSetting() : Settings.PerformanceSetting~ setForceMenuRebuilds(bool) : void~ getForceMenuRebuilds() : bool~ setDisplayUnits(NauticalUtils.DistanceUnit) : void~ getDisplayUnits() : NauticalUtils.DistanceUnit~ setWindSpeed (double) : void ~ getWndSpeed() : double ~ setWindDirection(NauticalUtils.CardinalDirection) : void~ getWindDirection() : NauticalUtils.CardinalDirection~ setSimulatorSelectionMode(Settings.SelectionMode) : void~ getSimulatorSelectionMode() : Settings.SelectionMode~ setUnderPowerOnly(bool) : void~ getUnderPowerOnly() : bool~ setAutoWindAdjustEnabled(bool) : void~ getAutoWindAdjustEnabled() : bool~ setPlaylist(String[]) : void~ getPlaylist() : String[] ~ setAccessToAllSimulationGroups(bool) : void~ getAccessToAllSimulationGroups() : bool~ setErasedSimulation(HashSet<String>) : void~ getErasedSimulation() : HashSet<String>~ setSimGroupAccessMap(Map<String, Settings.SimulationGroupSetting>) : void~ getSimGroupAccessMap() : Map<String, Settings.SimulationGroupSetting>
- serialVersionUID : long - displayQuickStartLabel : bool- currentTestGroupIndex : int- performanceSetting : Settings.PerformanceSetting- forceMenuRebuilds : bool- displayUnits : NauticalUtils.DistanceUnit- windSpeed : double - windDirection : NauticalUtils.CardinalDirection- simulatorSelectionMode : Settings.SelectionMode- underPowerOnly : bool- autoWindAdjustEnabled : bool- playlist : String[] - accessToAllSimulationGroups : bool- erasedSimulation : HashSet<String>- simGroupAccessMap : Map<String, Settings.SimulationGroupSetting>
SettingsBean
<<Serializable>>
The SettingsBean is used to save and restore the Settings configuration as a file named “settings.ser”
Simulator Load – Activity Diagram
Start Application Create Root User Screen Create Main ScreenLoad Main Screen
Onto Root User ScreenMain Screen GUI
User input is Pending
User Selects Simulator Button
(background process)Initialize
Simulator Screen Controller
(background process)Clear
Loading Message
First Simulation in Simulation List is LoadedWaiting for user to run or select
different simulation
Refer to the Manage SimulationsActivity Diagram
(user interface process)Load Learn User Screen Onto the Root User Screen
(background process)Create Simulator User Screen
From ScreenSimulator FXML file
(user interface process)Set Loading Message
Set Screen Loading Flag
Add ocean and light tothe nautical world
Enable the Depth Testfor the nautical world
Create subScene3D and Set camera in subScene
Set Nautical EnvironmentCondition to Day
Define Pane Border Constraints
CreateTimer (Stop Watch) Pane
Create Simulator Console Screen
From ScreenSimulatorConsole FXML file
Initialize SimulatorConsole
Controller
Define Reference toSimulatorConsole
Controller
Define Reference toSimulator Controller
To Be Used By Console
Create Simulation Manager
DefinePlay Animation
Button
DefineTimer Toggle
Button
Postion Origin ofFirst Person Vessel
DefineImagePresenter
DisableConsole Control
Buttons
Create Overlay Manager
Based on Settings Configuration, Generate Simulations Definition List1) If selection mode equals playlist: Use XML titles defined in playlist to create list of simulation definitions.2) If selection mode equals random: obtain list of all active simulations and shuffle to create selection list then select the simulations in the list, starting at the top to create the simulation definition list.Note: The Max Number of Simulations is Defined in the Settings Configuration.
Refer to the Overlay Load Activity Diagram
Set Auto Wind AdjustTo User Preference
As Defined in Settings Config
Create Module Presentation
Generator
Allow First PersonControl Icons to Be Selected (Normally being covered by centering pane with image presenter and play button would
prevent access)
Create Default PresentationProviding Information On How To Add Simulations to Selection List
Load the First Presentation (Simulation) Module
As the Current Presentation
Create XML Event Readerfor the
XML SimulationConfiguration File
Update Nautical ObjectString Structure with Info
Update Animation EventString Structure with Info
[End of All XML Component Strings]
Convert String StructureTo Module Presentation Def
The Loop Also Inspects for Region, terretrial objects and Module String Structures
Refer to the Simulation Load Activity Diagram
For each Simulation Module Presentation DefinitionCreate the Simulation Module Presentation
Refer to the Create Module Activity Diagram
DefineQuit Button
DefineImage Toggle
Button
The order of initialization is important to ensure correct display and interaction of control buttons
Create Module – Activity Diagram
Create Temporary Array Listto Contain Animation Events
Create End of Animation Event
Add End of Animation Eventto Temporary Events Array List
Obtain Given Module Definition as input parameter
If a module definition does not exist. A default definition is used.
The module definition contains a list of animation events defined for the module:
For each: animation event definition:1) Create an animation event
2) Add animation event to Events Array List
Create Temporary Array Listto Contain Moveable Objects
Add First Person Objectto Temporary Moveable Objects List
The first personobject is defined whenthe Module Generator is constructed
Because how a presentation will be managed differs between User Screens, different Presentation Module Generators are Constructed for different User Screens
Create Temporary Placeable Objects and Lighted Objects Array Lists
Convert XML String Definition To NAV AID Class
Construct Nav Aid Objector Log Error
Set Object Location and Direction
If NAV AID
Add to Placeable Objects List
For Each Nautical Object
Convert XML String Definition To LIGHTED NAV AID Class
Construct LIGHTED Nav Aid Objector Log Error
Set Object Location and Direction
If LIGHTED NAV AID
Add to Placeable Objects List
Add to Lighted Objects List
Convert XML String Definition To VESSEL Class
Construct Vessel Objector Log Error
Set if “display lights only” is enabled
Set Vessel Environmental Conditions
If VESSEL
Set Object Location and Direction
Set Object Speed
Set Object Course Change
Create Nautical Index toMoveable Index Lookup
Add Nautical Object Index and Moveable Object Index
to Index Lookup
Add to Moveable Objects List
Add to Lighted Objects List
If Defined, Set Vessel HuntingIf Defined, Set Vessel Locked
Generate Placeable Object ArrayFrom Placeable Objects List
Generate Lighted Object ArrayFrom Lighted Objects List Generate Moveable Object Array
From Moveable Objects List
Using the Index lookupConvert the Nautical Index for each
Animation Event into the Indexfor the Moveable Object
For Each Event Definition
For Each Animation Event in Animation List
Generate Animation Event ArrayFrom Animation Event List
If Nautical ObjectsExist
Convert XML String Definition To VESSEL Class
Convert Dimensions to Pixels
Construct Region Objector Log Error
Add to Region Objects Array
Convert XML String Definition To Land Form or Landmark Class
Construct Terrestrial Objector Log Error
Add to Terrestrial Objects Array
Using Constructed NauticalObjects Create Module
If Terrestrial Objects Exist
For Each: Land Form or Landmark
For Each: Region
Overlay Load –
Activity Diagram
Create Cat Boat Overlay
[Requested Overlay Type is Cat Boat]
Create Overlay Manager
Define Value forInitial Overall Window Width
Define Value forfirst Person Vessel
Define Value forwindow Width
Define Value forInitial Display Window Width
Define Value forInitial Display Window Height
Load Overlay
Clear first Person Bow View
The following has been provided:Requested overlay Type
Yes or No on whether to display wind affected objects, to display instruments, to display controls, multi point view
Add Cat Boat Overlay to first Person Bow View
Set Current Overlay Type to Catboat
Set First Person observer height, max speed and turnSet First Person Length, Beam and Boundary Radius
Set Cockpit View to Cat Boat
[cabin access enabled]
Same activity as for Cat Boat
[Requested Overlay Type is Fishing Boat]
Same activity as for Cat Boat
[Requested Overlay Type is Cable Layer]
Overlay is Life Raft
Same activity as for Cat Boat
[No Overlay is requested][request to display insturments]
Create instruments overlayAssign to Instruments Overlay Ref
Set Instruments Displayed to True
Set Instruments Displayed to False
Create wind affected overlayAssign to bow wind affected Overlay Ref
Set first person sail speed
Set wind Affected Displayed to TrueSet wind Affected Displayed to False
[request to displaywind affected]
Create controls overlayAssign to controls Overlay Ref
Configure first Person for controls enabled
Set controls Displayed to True
[request to display controls]
Configure first Person for controls disabled
Set controls Displayed to False
enable point of view control arrows on bow view
Assign bow point of control arrows to appropriate views
[point of view enabled or cabin access enabled]
Create point of view overlayAssign to point of view overlay ref
Create wind affected overlay for point of viewAssign to wind affected point of view overlay ref
Assign point of control arrows to appropriate views
Set Point of View and/or Cabin Access Displayed to True
[For starboard, stern, portand cabin views]
Define Value forfirst Person
[overlay Type is different from current overlay] OR [Overlay Type request is life raft]Or [current Wind Affected Display Or current Instrument Display Or current Controls Display Or Cabin Access is different from requested]
Set Bow Point Of View to Cat Boat
[multi point of view enabled]
Update Overlay Clear first person vessel group and add Bow View
Add Listeners forSpeed and Direction
Manage Simulations – Activity Diagram
Simulation From Simulation List is LoadedWaiting for user to run simulation
or select a different simulation
User Selects Return Button
The Simulator Console Controller:Calls Simulator Controller to
Handle Return Button
The Simulator Controller:Load Main Screen
Onto Root User Screen
User Selects Play Button
User Selects Replay Button
User Selects Erase Button
User Selects Next Button
The Presentation Manger:Makes Simulator Console
Not Visible
The Presentation Manager:Plays Events
(Until Play Loop is Terminated)
The Simulator Console Controller:Makes Replay and Erase Button Not Visible
Calls Simulator Controller ToHandle Replay Button
The Simulator Controller:Resets the Current Simulation
Resets the Simulation DescriptionMakes the Play Button Visible
The Simulator Console Controller:Calls Simulator Controller to
Handle Erase ButtonHandle Next Button
The Simulator Controller: Erase Button FunctionAdds the Current Simulation
to the Settings Erase Simulations Group
The Simulator Controller: Next Button FunctionPerforms HouseKeepting
Advances to the Next Simulation
The Simulator Console Controller:Calls Simulator Controller to
Handle Next Button
HouseKeeping
Stop Simulation Animation
Stop Background Processes
Increment Event Configuration Index
Else If: Direction Change Only to Starboard
For Moveable Object Defined By Event ConfigSet Object Direction to Starboard
Set Turn Angle to Value Defined by Event Config
Else If: Direction Change Only to Port
For Moveable Object Defined By Event ConfigSet Object Direction to Port
Set Turn Angle to Value Defined by Event Config
Else If: Speed and Direction Change to Starboard
For Moveable Object Defined By Event ConfigSet Object Direction to Starboard
Set Turn Angle and Speed to Value Defined by Event Config
Else If: Speed And Direction Change to Port
For Moveable Object Defined By Event ConfigSet Object Direction to Port
Set Turn Angle and Speed to Value Defined by Event Config
Else If: Speed And Direction Change to Port For Moveable Object Defined By Event Config
Set Object Direction to StarboardSet Turn Angle to Value Defined by Event Config
If: No Change in Motion Parameters
For All Moveable Objects in Simulation: Move
For All Moveable Objects in Simulation: Move
For All Lighted Objects in Simulation: Set Observability, Set Magnitude, Determine If Visible
IF Condition is Day
Play EventsAdvance to Next Simulation
UncoversQuitButton
The Simulator Controller:Performs HouseKeeping
Call Simulation Manager toProcess Next Simulation Step
Set Next Simulation in List as Current ModuleLoad Current Module
Set First Simulation in List as Current ModuleLoad Current Module
(user interface process)Set Text Area with a
“Simulations Loading” messageDisable Next Button
(background process)From Settings Controller:
Get List of Active SimulationsShuffle List
(background process)For each Simulation in Active List
Create Definition and Add to Def List
(background process)For each Simulation in Def List
Create Simulation and Add to Presentation List
(Background Process)Set First Simulation in Presentation List
To Current SimulationLoad Current Simulation
Refer to Manage Simulation Activity Diagram Refer to Simulation Load Activity Diagram
(Background Processes)Enable Next Button
IF: There is only one simulation or no simulations in Presentation List
Else if: Not at end of Presentation List
Else If: At end of Presentation List
Else:
Simulation Load – Activity Diagram
Set Nautical Environment Conditions Set First Person Conditions
Add First Person Light and Ocean to the nautical world
Add Placeable Objects to the nautical world
[Placeable Objects Exist in Module]
Add Moveables Object to the nautical world
[Moveable Objects Exist in Module]
Set Play Button Visible
[Animation Event Configs Exist in Module]
Configure Chart ViewerAnd Chart Toggle
[If nautical chart exists in simulation]
Refer to Overlay LoadActivity Diagram
Set Lights ObservabilitySet Lights Magnitude
Set Lights Not Visible If Out of Range
[Condition is NIGHT && lighted objects exist]
Load Presentation (Simulation) Module
Waiting for User to Run SimulationRefer to Manage SimulationActivity Diagram
Load Overlay
Update Text Area in Simulator ConsoleWith Description of Simulation
Note: Chart Viewer is configured for the needs of the simulator.The 2D image viewer in module presentations is configured differently for the Learn Screen and Test Screen
Note: Text Field is configured for the needs of the simulator.The text field is configured differently for the Learn Screen and Test Screen
Set Simulation Manager with Regions
Set Simulation Manager with Placeable Objects
Set Simulation Manager with Moveable Objects
Reset Simulation Manager
Note: The Simulation Manager is only used in the Simulation Presentation Modules. It is not configured in Lesson or Test Presentation Modules.
Bow View Overlay of Vessel is Displayed
And if enabled:Chart and Timer Toggle Buttons Visible
Refer to Point of ViewActivity Diagram forAdditional details on user Interaction
Add Terrestrial Objects to the nautical world
[Constructable Objects Exit in Module]
If timer exists, reset timerThe timer is created as part of the simulator Load
Configure fast advance icon
[If Cabin Access is Enabled]
Refer to TimerActivity Diagram
Reset Overlay Manager
Configure Test Buttons
This step is only performed for test presentation modules. This step is NOT performed for the simulator module
Point of View – Activity Diagram
Bow View Overlay is Displayed
Stern View Overlay is Displayed
User Selects Chart Open Button
Set Chart Toggle to Open
Set Chart Toggle to Close
Close Image Presenter
Open Image PresenterUser Selects
Chart Close Button
User Selects Timer Open Button
Set Timer Toggle to Open
Set Timer Toggle to Close
Close Timer Pane
Open Timer PaneUser Selects
Timer Close Button
Refer toTimerActivity Diagram
Cabin View Overlay is Displayed
Starboard View Overlay is Displayed
Port View Overlay is Displayed
User Selects Right Arrow Icon
Set Current Point of View to select point of view
Update First Person Observation Direction
If Wind Affected Overlay Is Displayed:Update the Wind Affected Overlay
Update First Person Vessel Groupwith current point of view
User Selects Left Arrow Icon
User Selects Right Arrow Icon
User Selects Left Arrow Icon
User Selects Right Arrow Icon
User Selects Left Arrow Icon
User Selects Left Arrow Icon
User Selects Right Arrow Icon
This Process to Update Point of View is Fired Whenever a Point of View Arrow Icon is Selected
User Selects Fast Advance Icon
Refer to TimerActivity Diagram
User Selects Cabin Access Icon
User Selects Cockpit Access Icon
Update First Person Vessel Groupwith current point of view
Add Listener to Nautical Minute Time
Update First Person Vessel Groupwith current point of view
Remove Listener to Nautical Minute Time
The process outlined tothe right of this note is fired by selecting any arrow point of view icon
Timer – Activity Diagram
+ initialize() : void <<Override>>
+ reset() : void+ enable() : void+ displayDashes() : void+ addDeltaSeconds() : void
+ removeListener() : void
- handleButtonStart(ActionEvent) : void <<FXML>>- handleButtonStop(ActionEvent) : void <<FXML>>- handleButtonReset(ActionEvent) : void <<FXML>>- handleSetHoverColor(MouseEvent) : void <<FXML>>- handleSetIdleColor(MouseEvent) : void <<FXML>>
~ IDLE_BUTTON_COLOR : String = “DARKRED”~ HOVER_BUTTON_COLOR : String = “RED”
~ timerPane : Parent <<FXML>>~ labelTimeDisplay : Label <<FXML>>~ buttonStart : Button <<FXML>>~ buttonStop : Button <<FXML>>~ buttonReset : Button <<FXML>>
- timerEnabled : bool- timerRunning : bool
- hours : int- minutes : int- seconds : int- secondChangeListener : InvalidationListener
PaneControllerTimerUser Selects
Simulation Play Icon
FirescurrentPresentationManager.playAnimation
Executes playEvents Plays currentTimeline
For each frame in animation:Synchronizes Nautical Time
Execute Synchronization MethodCounter Loop for Frames
When count equals frames in a second:The NauticalEnvironment.Second Property is incremented
Both vessel clock displays and the timer (stop watch) add listeners to the nautical time property. Therefore, all time display is synchronized with the virtual 3D world time.
The passage of time displayed on the clock or the time multiplied by the first person’s speed will equal the distance travelled by the first person.
If ability to Enable timer is configured:
Enable Timer
This prevents use of the timer (stop watch) before the simulation is executing and virtal 3D world time is incrementing
User Selects Icon to Access Cabin
User Selects Fast Advance Icon
Timer is EnabledListener has been added to
Nautical Environment Seconds Property
Increment Timer SecondsIf appropriate
Increment minutes and hours
[If Timer is Running][If Nautical Seconds Property
has Changed]
User Selects Timer Start
Timer RunningIs set to True
User Selects Timer Stop
Timer RunningIs set to False
User Selects Timer Reset
Timer RunningIs set to False
hours, minutes and seconds
are set to zero
Timer Displayis updated
The Cabin Overlay is DisplayedCabin Overlay contains
fast advance icon
Disable Fast advance icon
(prevents multiple executions)
Disable Cockpit Access Icon(Prevents display of Virtual World so vessels will
not appear to jump to new position)
(User Interface/ GUI Process)
(BackgroundProcess)
Stop Current Animation
Timeline
[If Animation is Running] Log Error[If Timeline Does Not Stop in 15 Seconds
(GUI Process)Display Dashes
On TimerDefineFast Advance Interval
Fast Advance Increment
For Each Moveable Object1) Update Position
2) Test for Conformance to Rules
Decrement Event Frame Counts
Advance toNext Event
[Next Event Exists]
Enable Cabin Exit And
Fast Advance Icons
Add Fast Advance Interval
To Nautical Time and Timer
Play AnimationFor Next Event
Play Animation for remainder of current event
[No Frames Remain for current Event]
[Frames for time advance interval complete]
Nautical Time – Activity Diagram
Presentation Manager Loads Nautical Objects:If Nav Aids have lights:1) Presentation manager creates nav aid light (This will create the display and obscure methods)
Presentation Manager Removes Listeners:1) Removes Overlay Manager Minute Listener
Presentation Manager Stops Background Tasks:1) All all lighted objects stops background taskIf lighted object is a NavAid 1) NavAidLight.stopBackgrounTask() is called a) currentIlluminationPatter is stopped This removes half second listener for light
Presentation Manager synchronizes frames with nautical time:When frame counter equals number of frames in a half second:1) Toggles half second property in Nautical Environment2) This will trigger the half second listener if added to the half second property3) The time will be adjusted by a half second4) As half second and seconds increment, the second listener and minute listener will trigger if added to the property.
User Selects Simulator
User Loads Next Simulation
User RunsSimulation
Overlay Manager Loads Overlay:If cabin access is enabled1) Overlay manager creates minute listener2) Sets cabin access icon to add listener3) Set cockpit access icon to remove listener
User AccessesCabin
User Returnsto Cockpit
User Exits Simulator
Simulation Controller Creates Timer (Stop Watch):1) Creates Timer Pane1) Creates second listener2) Adds listener to nautical environment second property
Add listener to half second property Make Light Visible
Set Light Not Active
Remove listener from half second property
Simulation Controller removes second listener
Add listener to minute property
Remove listener from minute property
Presentation Manager Removes Listeners:1) Removes Overlay Manager Minute Listener
Presentation Manager removesOverlay Manager Minute Listener
For each frame, the Presentation Manager determines the visibility of a Nav Aid Light
Obscure Nav Aid LightDisplay Nav Aid Light
Set Light ActiveCreate Separate Background Thread
Decrement Light Counter
Toggle Light DisplayIncrement Light Counter with Next Value
Light Counter is Zero
Wait for the following:1) half second listener is triggered
2) system time interval passesLight is Active
Half SecondListener Triggered
SecondListener Triggered
MinuteListener Triggered
Increment Clock Display
When in the simulator, the system interval time is set for a value greater than half a second. Therefore, when the simulator is running, the nav aid light patterns will be aligned with nautical time. (System time simply provides an exit from the wait loop, if frames are dropped and listener does not trigger.) Also, system time allows Nav Lights to flash prior to simulation running (but at a slower rate.)
Increment Timer (Stop Watch) DisplayTimer is Running
Manage Simulation – Activity Diagram Call Simulation Manager toProcess Next Simulation Step
For All Moveable Objects in Simulation: Move
Simulation Execution
EndedLast Event in AnimationOr Simulation Manager
has terminated Simulation
Refer to Manage Simulations Activity Diagram for details on how to manage this state.
User Input Via Controls Will Affect First Person
Movement
First Person is one of the Moveable Objects.
First Person Move
User Selects Winch Control
Simulation Execution Ended
Call Simulator Controller to:Perform HouseKeepingEnable Console Buttons
Make Console Visible
All Regions Have Not Been Processed
Regions contain channels
If: Vessel In Channel Flag = false
Is Region Waypoint
Is waypoint NOT next in list
Is Region Speed Zone Is maximum speed exceeded
Is Region Fenced Is vessel inside region
For each Placeable ObjectIn the Monitor List
Analyze for Collision with First Person
All Regions Have Been Processed
If: VesselIn Region
Set ChannelFlag = true
Is Region Waypoint
For each Placeable or Moveable ObjectIf: Distance between First PersonIs Less than the Monitor Distance
Add to Next List to Monitor for Collision
Collision Occurred
If: distance is within the Monitor RangeOR object is hunting
Set Placeable Object Index to BeginningSet Moveable Object Index to Beginning
Determine if Priviiledge (pending collision) Violation is Possible
If: Moveable Object: Is not underway, anchored or not commandedis in process of changing direction is First Person and Clearly making change in directionis First Person and Overtaking Moveable Object
For each Moveable Object
If Moveable Object is First Person and Failed to Stay Clear of Other Moverable Object
Get Priviledge Between First Person and Moveable Object
If RequiredAdjust Moveable Object Course
If: First Person Impededthe Moveable Object
If: First Person Failed to Giveway Due to Priviledge
If: First Person Violated Under Power Rule
If: First Person ViolatedUnder Sail Rule
User Selects Throttle Control
(On Control Icon Press)Overlay Manager:
Sets First Person Course Change Directionto Not Defined
Set Rudder to Active
(On Control Icon Release)Overlay Manager:
Sets First Person Course Change Directionto Straight Ahead
Set Rudder to Not ActiveSet Rudder Travel to 0
Sets First Person Signaled Course To Not Defined
(On Control Icon Mouse Drag)Overlay Manager:
Sets Tiller Position in OverlaySets First First Person Rudder TravelBased oon percent travel on overlay
(On Control Icon Press)Overlay Manager:
Set Throttle to Active
User Selects Rudder Control
(On Control Icon Release)Overlay Manager:
Set Throttle to Not ActiveSets First Person Motor Speed
Based on Overlay Throttle Position
(On Control Icon Mouse Drag)Overlay Manager:
Set Overlay Throttle Position
Adjust Speed toMatch Requested Speed
Based on Animation Period(as defined in Settings)
Modify First Person Position Based on Speed
Determine angle adjustbased on Animation Period
Vessel maximum turn
Change Direction Based on angle adjustAnd percent rudder
If: Speed Does Not MatchRequested Speed
If: Direction isNot straight ahead
(On Control Icon Press)Overlay Manager:If: auto wind adjust enabledToggle sail luff, Set boom angle based on sail luffSet sail display based on boom angle and apparent windElse: Set Winch Active, reset winch
(On Control Icon Mouse Drag)If winch Active: Overlay Manager:
Increment boom angle based on rotation positionUpdate sail display based on boom and and apparent wind
(On Control Icon Mouse Release)Overlay Manager:
Set Winch to Not Active, Reset WinchSets First Person Sail Speed based on Sail Position
Refer to Manage Lights Activity Diagram
Manage Lights – Activity DiagramFor All Lighted Objects in Simulation:
Set Observability, Set Magnitude, Determine If Visible
For All Lighted Objects:
Set Lights Observability
Set Lights Magnitude
Set Lights Visibility
For All Lights of Lighted Object
For All Lights of Lighted Object
For All Lights of Lighted Object
Determine Angle From Object to Observer Display Light[If angle is within display arc of light]
Determine Distance From Object to ObserverBased on distance, determine the preferred light intensity
(Note: intensity determines the size of the sphere representing the light)
Update the light intensity to match preferred intensity
[If preferred insensity does not match current intensity]
Update Current Insensity with preferred value
Determine Distance From Object to Observer
Determine Nautical Rangeof least powerful light of Object
[If distance > Nautical Range]
Do Not Display Light[If distance > nautical range for THIS light]
UpdateVisibility
For All Placeable and Moveable Objects:Determine Distance From Object to Observer
Determine if vessel is visible(in other words is distance less than non illuminated visibility range)
State of Visibility has changed
Color Vessel Black or Set All Other Objects Not Visible
Color Object GreyVessel is Visible
Vessels are large and need to be set black so as to mask lights behind them.
ScreenControllerLearn – Object Diagram
+ setScreenParent(RootUserScreen) : void
<<UserScreenController>>
+ ScreenControllerLearn()+ initialize() : void <<Override>>
- loadToicsList() : void- loadLessonList(String) : void- updateLesson(int) : void
+ setScreenParent(RootUserScreen) : void <<Override>>+ performPreUserScreenExitHousekeeping() : void <<Override>>
~ performPrePresentationModuleExitHousekeeping() : void
- handleButtonReturn(ActionEvent) : void <<FXML>>- handleComboBox(ActionEvent) : void <<FXML>>- handleButtonToggleImage(ActionEvent) : void <<FXML>>- handleButtonNext(ActionEvent) : void <<FXML>>- handleButtonPrevious(ActionEvent) : void <<FXML>>
~ rootUserScreen : RootUserScreen
~ firstPerson : FirstPerson~ firstPersonWindow : Group~ nauticalWorld : Group~ firstPersonVessel : Group~ subScene3D : SubScene~ moduleDefintitionGenerator : ModuleDefinitionGenerator~ modulePresentationList : ArrayList<ModulePresentations>~ moduleDefinitionList : ArrayList<ModulePresentationGenerator.ModuleDefinition>~ modulePresentationGenerator : ModulePresentatonGenerator~ modulePresentations : ArrayList<ModulePresentation>~ currentModulePresentation : ModulePresentation~ blankModulePresentation : ModulePresentation~ buttonPlayAnimation : Button~ imagePresenter : ImageView~ imageToggle : ObjectToggle
- overallPane : Pane <<FXML>>- displayPane : Pane <<FXML>>- upperBorderPane : Pane <<FXML>>- firstPersonPane : Pane <<FXML>>- lowerBorderPane : Pane <<FXML>>
- comboBoxLesson : ComboBox<String> <<FXML> - labelComboBoxTitle : Label <<FXML>>- textAreaLesson : TextArea <<FXML>> - labelTextAreaTitle : Label <<FXML>>-buttonNext : Button <<FXML>>- buttonPrevious : Button <<FXML>> - labelPrevious : Label <<FXML>>- buttonToggleImage : Button <<FXML>> - labelButtonToggleImage : Label <<FXML>>
- comboBoxList : ObservableList<String> - totalNumberOfTopicss : int- topicStrToFileNameStr : Map<String, String> - tooicStrToDescriptionStr : Map<String, String>- topicTitlesList : List<String>- currentTopicIndex : int - lessonTopicLoaded : bool- moduleDefinitionListIndex : int - advancingThruList : int- modulePresentationListStart : int - modulePresentationListSize : int
- centeringPane : StackPane
ScreenControllerLearn
~ getTotalNumberOfModuleSectionDefFiles(directory : File) : int~ generateSectionsStrToFileNameStr(directory File) : Map<String, String>~ generateSectionTitlesArray( directory File,
map : Map<String, String>,numberOfFiles : int ) : List<String>
~ generateSectionStrToDescriptionStr(directory : File) : Map<String, String>
ModuleDefinitionGenerator
The Lesson Presentations and Topic groups are configurable.The module presentations for the Learn User Screen are defined by XML files. To speed the load time, a list of the XML definition files and a look up map for the files on the list is saved as a Java serialized object.
Static methods within the ModuleDefinitionGenerator class are used to determine if there have been changes to the XML definition files. If so, the list and lookup map isregenerated and a new serialized object is stored
~ SectionDependenciesGraph(SectionTitles : String[])
~ addDependency(sectionTitle : String, dependency : String) : void~ sectionTitleDependenciesStepThrough(sectionTitle : String, visited : Map, Stack<String>~ getSortedTitlesArray() : void
~ sectionTitles : String[] {readOnly}- sectionDependencies : Map<String, ArrayList<String>> - visited : HashMap<String, bool>
SectionDependenciesGraph
This inner class is located within the generateSectionTitlesArray() method.
The inner class is used to create a dependencies graph for the section titles. Lessons which are dependent on other lessons appear in the section title list after lessons on which they are dependent.
~ setTopicTitlesList(List<String>) : void ~ getTopicTitlesList() : List<String>~ setTopicStrToFileNameStr( Map<String, String>) : void ~ getTopicStrToFileNameStr() : Map<String, String~ setTopicStrToDescriptionStr( Map<String, String>) : void ~ getTopicStrToDescriptionStr() : Map<String, String>
- topicTitlesList : List<String>- topicStrToFileNameStr : Map<String, String> -topicStrToDescriptionStr : Map<String, String>
LessonTopicsBean
<<Serializable>>
Learn User Screen Load – Activity Diagram
Start Application Create Root User Screen Create Main ScreenLoad Main Screen
Onto Root User ScreenMain Screen GUI
User input is Pending
User Selects Learn Button
(background process)Create Learn User Screen
From ScreenLearn FXML file
(background process)Define Controller for the
Learn User Screen
(user interface process)Set Loading Message
Set Screen Loading Flag
(background process)Create the Learn User
Screen Controller
(background process)Initialize
Learn Screen Controller
(background process)Clear Loading Message
Clear Screen Loading Flag
Add ocean and light tothe nautical world
Enable the Depth Testfor the nautical world
Create subScene3D and Set camera in subScene
Set Nautical EnvironmentConditions to Day
Define Pane Border Constraints
DefinePlay Animation Button
DefineImagePresenter
Configure Text Area
Postion Origin ofFirst Person Vessel
Create Image Toggle
Create Overlay Manager
Create Module Presentation
Generator
Get number of XML definition files
In the lessons directory
Get list of XML definition files
from serialized object file
Regenerate the List of XML files and List to File Lookup MAP
[Number of XML files != Files in List]
CreateBlank
Nautical World
Set Previous Button
Not Visible
Clear Pull Down MenuAdd Section List to
the Pull Down Menu
Load Blank
Nautical World
Update Text in the Text AreaWith the Description for the
First Lesson Section in the Pull Down Menu List
Load 2D Image(image contains Info on
how to select topic)
Lesson Sections List is DisplayedUser Input Pending
(Waiting for Selection of Lesson List)
Refer to the Lesson SelectionActivity Diagram
LoadSection List
(user interface process)Load Learn User Screen Onto the Root User Screen
Refer to the Presentation Display Activity Diagram
Refer to the Overlay Load Activity Diagram
Refer to Root User Load Activity Diagram
Lesson Selection – Activity Diagram
Lesson Sections List Loaded and DisplayedUser Input Pending
(Waiting for Selection of Lesson List)
Handle New Selection
On Pull Down Menu
User Selects Return Button
User Selects New Section to Display on Pull Down Menu
User Selects Next Button
Stop Any Animation and Light TasksIn Current Module Presentation
Load Main ScreenOnto Root User Screen
[Lesson List Not Loaded OR Request to Return to Section List]
Set Lesson SelectedIn Pull Down Menu
To Current Presentation
Load Current Presentation
Update Text AreaWith Description ofSelected Lesson List
HandleSelection of
Next (or Previous) Button
Lesson List Is Loaded and DisplayedUser Input Pending
(waiting for selection of Lesson)
User Selects Next Button
User Selects Previous Button
User Selects New Lesson Or Request to Return to Section List
on Pull Down Menu[Current Presentation was Last (or First) Lesson in List]
[Lesson List Loaded]
Set Pull Down MenuWith First Lesson List in Lesson Section List
[Current Presentation is Last Lesson in List]
Set Pull Down Menuwith Next Lesson List in Lesson SectionList
[Current Lesson List is Last in Lesson Section List]
Load Section List
Set Pull Down MenuWith Next Lesson in Lesson List
Set Current Lesson List to the Lesson List Displayed in Pull Down Menu
Refer to Learn LoadActivity Diagram
[Lesson List Loaded]
Load Section List
[Request to Return to Section List]
Set Pull Down MenuWith Selected Lesson List
in Lesson Section List
Refer toPresentation DisplayActivity Diagram
User Selects Return Button
Refer toLearn LoadActivity Diagram
Refer to LearnPresentation LoadActivity DiagramFor Details on the Additional OptionalUser Inputs:
1) Play Animation2) Toggle Image Display
Handling the Previous Button is the same as the Next Button with the following differences:
1) No activity takes place if Lesson List is NOT loaded.2) Branch is when Current Presentation is FIRST in Lesson List3) Set with Previous Lesson instead of Next Lesson4) Set with Previous Lesson List instead of Next Lesson List
When the list (either Lesson Sections List or Lessons List) is updated on the Pull Down Menu, this triggers the action to handle a new selection in the Pull Down Menu
Handle New Selection
On Pull Down MenuLoad Lesson List
Refer toPresentation DisplayActivity Diagram
Stop Any Animation and Light TasksIn Current Module Presentation
Learn Presentation Display – Activity Diagram
User Selects a Section Lessons List
Load Lesson ListLesson List Is Loaded and Displayed
Current Lesson Module Presentation is DisplayedUser Input Pending
User SelectsPlay Animation Button
User SelectsToggle 2D Image Button
(background process)Using the lookup Maps which where obtained or
regenerated during the load of the Learn User Screen,Determine the XML config file for the Selected Lessons List
(background process)Use the XML config file to generate
a list of Lessons in the SectionAnd update Pull Down Menu
(background process)Use the XML Configuration file
to create a List of Definitions forFor each of the Lesson Modlule Presentations
(background process)For each Lesson Module Presentation Definition
Create the Lesson Module Presentation
(background process)Set the first Module Presentation
Defined in the Lessons ListAs the current module Presentation
Enable Next Button
(user interface process)Set Text Area with a
“Lesson Loading” messageDisable Next Button
(user interface process)Load the Current
Module Presentation
Set Nautical Environment Conditions
Set First Person Conditions
Add First Person Light and Ocean to The nautical world
Add Placeable Objects to the nautical world
Load Overlay
[Placeable Objects Exist in Module]
Add Moveables Object to the nautical world
[Moveable Objects Exist in Module]
Set Play Button Visible
[Animation Event Configs Exist in Module]
Configure Image ViewerAnd image Toggle
[2D Image Exists in Module]
Refer to the Learn User Screen Load Activity Diagram for information on the handling of thePull Down Menu and the Next, Previous and Return Buttons
Toggle Display of 2D Image
Play Lesson Animation
Optional Feature
Optional Feature
Create XML Event Readerfor the
XML Section’s LessonsConfiguration File
Update Nautical ObjectString Structure with Info
[Nautical Object Def in Config File]
Update Animation EventString Structure with Info
[Animation Event Config Def in Config File]
Update Module DefString Structure with Info
[Module Def in Config File]
Convert String StructureTo Module Presentation Def
[End of Lesson Module Definition]
AddModule Presentation Def
To Definition List
Module PresentationDefinition ListIs Complete
[End of ALL Lesson Module Definitions]
A pre-defined config flie is used when creating a blank presentation
Refer to Overlay LoadActivity Diagram
Set Lights Observability
[Condition is NIGHT && lighted objects exist]
ScreenControllerTest – Class Diagram
+ setScreenParent(RootUserScreen) : void
<<UserScreenController>>
+ ScreenControllerTest()+ initialize() : void <<Override>>
+ setScreenParent(RootUserScreen) : void+ performPreUserScreenExitHousekeeping() : void <<override>>~ performPrePresentationModuleExitHousekeepint() : void
- loadDefinitionList() : void - loadNextModulePresentationList() : void- advanceToNextQuestion() : void -loadTestingComplete() : void
- handleButtonReturn(ActionEvent) : void <<FXML>>- handleButtonToggleImage(ActionEvent) : void <<FXML>>- handleButtonNext(ActionEvent) : void <<FXML>>- handleButtonTestAnswer0(ActionEvent) : void <<FXML>>, - handleButtonTestAnswer1(ActionEvent) : void <<FXML>>, - handleButtonTestAnswer2(ActionEvent) : void <<FXML>>, - handleButtonTestAnswer3(ActionEvent) : void <<FXML>>,
~ rootUserScreen : RootUserScreen
~ firstPerson : FirstPerson~ firstPersonWindow : Group~ nauticalWorld : Group~ firstPersonVessel : Group~ subScene3D : SubScene~ moduleDefintitionGenerator : ModuleDefinitionGenerator~ moduleDefinitionList : ArrayList<ModulePresentationGenerator.ModuleDefinition>~ modulePresentationGenerator : ModulePresentatonGenerator~ modulePresentationList : ArrayList<ModulePresentation>~ currentModulePresentation : ModulePresentation~ blankModulePresentation : ModulePresentation~ buttonPlayAnimation : Button~ imagePresenter : ImageView~ imageToggle : ObjectToggle
- overallPane : Pane <<FXML>> - displayPane : Pane <<FXML>>- upperBorderPane : Pane <<FXML>> - firstPersonPane : Pane <<FXML>>- lowerBorderPane : Pane <<FXML>>
- moduleDefinitionListIndex : int- modulePresentaionListIndex : int - modulePresentationListSize : int
- textFieldTest : TextField <<FXML> - textAreaTest : TextArea <<FXML>>- buttonReturn : Button <<FXML>>- buttonToggleImage : Button <<FXML>> - labelButtonToggleImage : Label <<FXML>>- buttonNext : button <<FXML>> - labelButtonNext : Label <<FXML>>- buttonTestAnswer0 : Button <<FXML>> - buttonTestAnswer1 : Button <<FXML>>- buttonTestAnswer2 : Button <<FXML>> - buttonTestAnswe3 : Button <<FXML>>- labelTestAnswer0 : Label <<FXML>> - labelTestAnswer1 : Label <<FXML>>- labelTestAnswer2 : Label <<FXML>> - labelTestAnswe3 : Label <<FXML>>
- moduleDefinitionListIndex: int- modulePresentationListIndex : int - modulePresentationListSize : int
- testGroupList : String[]- sectionStrToFileNameStr : Map<String, String> - sectionStrToDescriptionStr : Map<String, String>- correctAnswers : int - initialAnswerNotProvided : bool- allQuestionsAnswered : bool - allAnswersCorrect : bool- centeringPane : StackPane
ScreenControllerTest
~ getTotalNumberOfModuleSectionDefFiles(directory : File) : int~ generateSectionsStrToFileNameStr(directory File) : Map<String, String>~ generateSectionTitlesArray( directory File,
map : Map<String, String>,numberOfFiles : int ) : List<String>
~ generateSectionStrToDescriptionStr(directory : File) : Map<String, String>
ModuleDefinitionGenerator
The module presentations for the Learn User Screen are defined by XML files. To speed the load time, a list of the XML definition files and a look up map for the files on the list is saved as a Java serialized object.
Static methods within the ModuleDefinitionGenerator class are used to determine if there have been changes to the XML definition files. If so, the list and lookup map isRegenerated and a new serialized object is stored
Test Load – Activity Diagram
Start Application Create Root User Screen Create Main ScreenLoad Main Screen
Onto Root User ScreenMain Screen GUI
User input is Pending
User Selects Test Button
(background process)Create Test User Screen
From ScreenLearn FXML file
(background process)Define Controller for the
Test User Screen
(user interface process)Set Loading Message
Set Loading Flag
(background process)Create the Test User
Screen Controller
(background process)Initialize
Test Screen Controller
(background process)Clear Loading Message
Clear Loading Flag
Curernt Test Group Is DisplayedUser Input Pending
(Waiting for Selection of Next Button)
Refer to the Test ManagementActivity Diagram
(user interface process)Load Learn User Screen Onto the Root User Screen
Add ocean and light tothe nautical world
Enable the Depth Testfor the nautical world
Create subScene3D and Set camera in subScene
Set Nautical EnvironmentConditions to Day
Define Pane Border Constraints
DefineplayAnimationButton
DefineImagePresenter
Configure Test Area
Postion Origin ofFirst Person Vessel
Create Image Toggle
Create Overlay Manager
Create Module Presentation
Generator
CreateBlank
Nautical World
Assign Blank Nautical World
As Current Presentation
Load CurrentModule Presentation
Load 2D Imagewith info onTest Group
Update Test Group Text Field
with Current Test Group
LoadCurrent Test Group
Test Group Text Field
Refer to the Presentation Display Activity Diagram
Refer to the Presentation Display Activity Diagram
Refer to the Test Management Activity Diagram
For each simulation group:Add group name and file name of simulations to
Group String to File String Lookup Table
For each simulation group:Add group name and group description to
Group String to Group Description Lookup Table
Test Management – Activity Diagram
Current Test Group is DisplayedUser Input Pending
(Waiting for Selection of Next Button)
User Selects Return Button
Stop Any Animation and Light TasksIn Current Module Presentation
Load Main ScreenOnto Root User Screen
User Selects Next Button
User SelectsPlay Animation Button
User SelectsToggle 2D Image Button
Toggle Display of 2D Image
Play Lesson Animation
Optional Feature
Optional Feature
User SelectsSelects Answer Button
Display Result in Text AreaRecord Result
Load Test Group
Load BlankModule Presentation
[Test is Last in Test Group]
Display Test Group Answer ResultsIn Text Area. If All Questions Answered Correctly,
Enable Access to Associated Simulations
Load 2D Imagewith info onTest Groups
SetCurrent Presentation Module
To Next Test in Test Group
Load Presentation Module
Set initial Answer Not ProvidedTo True
[Test Group is Last
[Test Group Results are in Text Area]
Set Current Test GroupTo next Test Group
Test Groups List
Load Test CompletePresentation ModuleDisable Next Button
(background process)Use the XML Configuration file
to create a List of Definitions forFor each of the Tests
In the Test Group
(background process)For each Test Module Presentation Definition
Create the Test Module Presentation
(background process)Set the first Module Presentation
Defined in the Lessons ListAs the current module Presentation
(user interface process)Set Text Area with a
“Lesson Loading” messageDisable Next Button
(user interface process)Load the Current
Module PresentationSet the Image Visible
Initialize Test Results Variables
Load the CurrentPresentation ModuleEnable Next Button
Stop Any Animation and Light Tasks
In Current Module
Presentation
Test Group Not Loaded
ScreenControllerReference – Class Diagram
+ setScreenParent(RootUserScreen) : void
<<UserScreenController>>
+ initialize() : void <<Override>>
- updateComboBoxesAndDisplayVessels() : void- getVesselLengthString() : String- getVesselDistance() : double- getVesselDistanceString : String- refreshVesselDistance() : void
+ setScreenParent(RootUserScreen) : void <<override>>+ performPreUserScreenExitHousekeeping() : void <<override>>
- handleFirstPersonPaneMouseClicked(MouseEvent) : void- handleFirstPersonPaneMouseDragged(MouseEvent) : void- handleFirstPersonPaneMouseScrolled(MouseEvent) : void- handleOveralPaneKeyPressed(KeyEvent) : void
- handleButtonReturn(ActionEvent) : void <<FXML>>- handleComboBoxType(ActionEvent) : void <<FXML>>- handleComboBoxMotion(ActionEvent) : void <<FXML>>- handleComboBoxOperation(ActionEvent) : void <<FXML>>- handleComboBoxConformance(ActionEvent) : void <<FXML>>- handleEnvironmentCondition(ActionEvent) : void- handleCheckBoxDisplayLightsOnly(ActionEvent) : void- handleCheckBoxRotateAutomation(ActionEvent) : void- handleCheckBoxHighSpeedMouse(ActionEvent) : void
- NORMAL_ROTATION_SPEED : double = 0.5 - HIGH_SPEED_ROTATION_SPEED : double = 1.0- NORMAL_POSITION_SPEED : double = 0.5 - HIGH_SPEED_POSITIONAL_SPEED : double = 25- DEFAULT_OBSERVER_HEIGHT : double = 1.5- CAMERA_NEAR_CLIP : double = 0.01 - CAMERA_FAR_CLIP : double = 6.5 * Utils.METERS_PER_NAUTICAL_MILES
~ rootUserScreen : RootUserScreen
~ nauticalWorld : Group~ ocean : Box~ subScene3D : SubScene~ light : PointLight ~ camera : PerspectiveCamera~ vessel : BaseVessel~ animation : Timeline
- vesselTypes : ObservableList<String>- vesselMotions : ObservableList<String> - vesselOperations : ObservableList<String> - vesselConformance : ObservableList<String>
~ developmentStage : Stage ~ enableCameraPitchAndRoll : boolean ~ cameraGroup : Group ~ rotateX : Rotate ~ rotateY : Rotate
- positionSpeed : double - rotationSpeed : double- mousePosX : double - mouseOldX : double - mouseDeltaX : double - mousePosY : double - mouseOldY : double - mouseDeltaY : double
- overallPane : Pane <<FXML>> - displayPane : Pane <<FXML>>- upperBorderPane : Pane <<FXML>> - firstPersonPane : Pane <<FXML>> - lowerBorderPane : Pane <<FXML>>
- comboBoxType : ComboBox<String> <<FXML>- comboBoxMotion : ComboBox<String> <<FXML> - comboBoxOperation : ComboBox<String> <<FXML> - comboBoxConformance : ComboBox<String> <<FXML>- radioButtonNight : RadionButton <<FXML>>- labelVesselLength : Label <<FXML>> - labelVesselDistance : Label <<FXML>>- checkBoxDisplayLightOnly : CheckBox <<FXML>> - checkBoxRotateAnimation : CheckBox <<FXML>> - checkBoxHighSpeedMouse : CheckBox <<FXML>>
ScreenControlleReference
Reference Load – Activity Diagram
Start Application Create Root User Screen Create Main ScreenLoad Main Screen
Onto Root User ScreenMain Screen GUI
User input is Pending
User Selects Reference Button
(background process)Create Reference User Screen
From ScreenReferebce FXML file
(background process)Define Controller for theReference User Screen
(user interface process)Set Loading Message
(background process)Create the Reference User
Screen Controller
(background process)Initialize
Reference Screen Controller
(background process)Clear
Loading Message
Reference Vessel List is DisplayedUser Input Pending
(Waiting for Selection of Vessel)
Refer to the Vessel SelectionActivity Diagram
(user interface process)Load Reference User Screen Onto the Root User Screen
Add ocean and light tothe nautical world
Enable the Depth Testfor the nautical world
Create subScene3DSet Nautical Environment
Conditions to Day
Define Pane Border Constraints
Set Field of ViewFor smaller
Display Width
Set Camera to rotateOn vertical axis andAdd to subScene3D
AddNautical World
To First Person Pane
Create List with All supported Vessels Configure Type Pull Down Menu
with List
Update Nautical WorldTo display the first Vessel
In Pull Down Menu List
Configure WindIn the
Nautical environment
Configure the Motion, Operation and ConformancePull Down Menus
to Align with first Vessel in Type Pull Down Menu
ConfigureAnimatiopn
Vessel Selection – Activity Diagram
Pull Down Menu Defines Current VesselCurrent Vessel is Displayed
User Input Pending(Waiting Selection of New Vessel or Config)
User Selects Return Button
User Selects New Vessel
On Pull Down Menu
Load Main ScreenOnto Root User Screen
Update Combo Boxes and
Update Display Vessel
User Selects New Motion
On Pull Down Menu
User Selects New Operation
On Pull Down Menu
User Selects New Conformance
On Pull Down Menu
User Changes Day or Night
Radio Buttons
User ChangesRotation
Check Box
User Drags Mouse
User Scrolls Mouse
Set Current Vessel toNew Motion State
Set Vessel LightsObservability
Set Current Vessel toNew Operation State
Set Current Vessel toNew Conformance State
Play Animation
Stop Animation
[Check Box Selected]
User ChangesLights
Check Box
Set Display for Light Only
Set Display for Vessel and Lights
[Check Box Selected]
User ChangesHigh SpeedCheck Box
Set Mouse Movement to High Speed
Set Mouse Movement to Normal
[Check Box Selected]
Disable Light CheckBox
Set Nautical Environment to DAY
Set Current Vessel Display to DAY
Enable Light CheckBox
Set Nautical Environment to NIGHT
Set Current Vessel Display to NIGHT
Set Display for Vessel and Lights
[Night Radio Button Selected]
Refresh Nautical Environment to Current Conditions
Based on High Speed SettingConvert Mouse Movement
To Angle
Rotate VesselBy calculated Angle
Based on High Speed SettingConvert Mouse Wheel Scroll
To Distance
Move VesselBy calculated Distance
UpdateVessel Display
Stop Background Processes Remove Vessel
FromNautical World
Based on Newly Selected StringFrom the Pull Down MenuCreate New Vessel Object
Update Pull Down MenuBased on which Groups in Vessel
Contain Objects
For Motion, Operations and Conformance Pull Down Menus
Set the DefaultConfig for VesselBased on first entriesIn Pull Down Menus
Based in info in vessel ClassDetermine best distanceAt which to display vessel
Create VesselBased on configuration
And nautical environment
Update Display ofLength and Distance
Values
Reset Display Lights Only
Checkbox to not selected
Bind Vessel Observability PropertiesTo observer camera
position
Stop AnyBackground
Tasks
ScreenControllerSettings – Class Diagram
+ initialize() : void <<Override>>
+ setScreenParent(RootUserScreen) : void <<Override>>+ performPreUserScreenExitHousekeeping() : void <<Override>> - handleButtonReturn(ActionEvent) : void <<FXML>>
- handleButtonResetSettingsToDefaults(ActionEvent) : void <<FXML>>- handleSetPerformanceSetting(ActionEvent) : void <<FXML>> - handleCheckBoxForceListRebuild(ActionEvent) : void <<FXML>>- handleSetDistanceUnits(ActionEvent) : void <<FXML>> - handleSetWindDirection(ActionEvent) : void <<FXML>>- handleSetSelectionMode(ActionEvent) : void <<FXML>>- handleCheckboxUnderPowerOnly(ActionEvent) : void <<FXML>> - handleCheckboxAutoSailTrim(ActionEvent) : void <<FXML>>
- handleButtonRestore(ActionEvent) : void - handleButtonErase(ActionEvent) : void- handleComboBoxSelectionMenu(ActionEvent) : void <<FXML>> - handleComboBoxSimulatorPlaylist(ActionEvent) : void <<FXML>>- handleButtonAdd(ActionEvent) : void <<FXML>> - handleButtonRemove(ActionEvent) : void <<FXML>>
- handleCheckBoxEnableAllGroups(ActionEvent) : void <<FXML>> - handleCheckBoxGroupSelection (ActionEvent) : void <<FXML>>- configSimGroupCheckBox(checkBox : CheckBox, settings : SimulationGroupSetting) : voi- setRefreshMessage() : voidd
~ REFRESH_MESSAGE : String = “Menu Stale – Select Rebuild To Refresh” {readOnly}~ REBUILD_MESSAGE : String = “Select To Rebuild Menu” {readOnly}~ REBUILDING_MESSAGE : String = “Rebuilding Selection Menu...” {readOnly}~ SIMULATION_IN_PLAYLIST_PRE_TEXT : String = “Simulations in Playlist: ” {readOnly}~ SIMULATION_IN_PLAYLIST_POST_TEXT : String = “ Max” {readOnly}~ REMOVE_ALL_MESSAGE : String = "All Simulations (Use to remove entire list)"~ FORCE_REBUILD_MESSAGE : String ="Select Force Rebuild Checkbox"
~ rootUserScreen : RootUserScreen
- radioButtonMemoryLowest : RadioButton <<FXML>> - radioButtonMemoryLow : RadioButton <<FXML>>- radioButtonMemoryMedium : RadioButton <<FXML>> - radioButtonMemoryHigh : RadioButton <<FXML>>- radioButtonMemoryHighest : RadioButton <<FXML>> - performanceSetting : ToggleGroup <<FXML>>
- checkBoxForceListRebuild : CheckBox <<FXML>>- radioButtonMeter : RadioButtion <<FXML>> - radioButtonKilometer : RadioButtion <<FXML>>- radioButtonNauticalMile : RadioButtion <<FXML>> - distanceUnits : ToggleGroup <<FXML>>
- radioButtonNorth : RadioButtion <<FXML>> - radioButtonSouth : RadioButtion <<FXML>>- radioButtonEast : RadioButtion <<FXML>> - radioButtonWest : RadioButtion <<FXML>> - windDirection : ToggleGroup <<FXML>>
- radioButtonRandom : RadioButtion <<FXML>> - radioButtonPlaylist : RadioButtion <<FXML>> - selectionMode : ToggleGroup <<FXML>> - buttonReturn : button <<FML>>
- checkBoxUnderPowerOnly : CheckBox <<FXML>> - checkBoxAutoSailTrim : CheckBox <<FXML>> - comboBoxSelectionMenu : ComboBox<String> <<FXML>> - comboBoxSimulatorPlaylist : ComboBox<String> <<FXML>>- labelMaxSimulations : Label <<FXML>>
- checkBoxEnableAllGroups : CheckBox <<FXML>>- checkBoxBasicConduct : CheckBox <<FXML>> - checkBoxNavigationAids : CheckBox <<FXML>>- checkBoxBasicVesselLights : CheckBox <<FXML>> - checkBoxLightedNavAids : CheckBox <<FXML>>- checkBoxNavigationTechniques : CheckBox <<FXML>> - checkBoxAdvancedConduct : CheckBox <<FXML>>- checkBoxAdvancedVesselLights : CheckBox <<FXML>> - checkBoxTowing : CheckBox <<FXML>>- checkBoxSoundAndLightSignals : CheckBox <<FXML>> - checkBoxParallelTravel : CheckBox <<FXML>>- checkBoxNaval : CheckBox <<FXML>> - checkBoxGettingStarted : CheckBox <<FXML>>- ALL_SIMULATION_GROUP_CHECK_BOX_LIST : ArrayList<CheckBox>- selectionMenuList : ObservableList<String> - playlistSelectionsList : ObservableList<String>
ScreenControllerSettings
~ serialize(0 : void~ deserialize() : void
~ doesMenuMatchCurrentSettings() : bool~ getCompleteList() : ArrayList<String>~ getActiveList() : ArrayList<String>
~ updateToCurrentSettings() : void- addToMenuIfGroupSelected() : void
~ NO_GROUPS_SELECTED_MESSAGE : String {readOnly}- hashCode : int- powerOnly : bool- selectionMenuList : ArrayList<String>
SelectionMenu
ScreenControllerSimulator ScreenControllerTest
The Selection Menu is a list of Strings defining which simulations are available to the simulator.
The Simulator User Screen controller uses the Selection Menu to determine which simulation groups are enabled and can be accessed to obtain simulations for execution in the simulator.
If all the questions in a test group are answered correctly, the Test User Screen enables the group in the selection menu associated with the successfully answered test group.
updateItem(String, bool) : void <<override>>
SelectionMenuCell
Used to “grey out” erased simulations in the selection menu list.
+ setScreenParent(RootUserScreen) : void
<<UserScreenController>>
~ setSelectionMenuList(ArrayList<String>) : void~ getSelectionMenuList() : ArrayList<String>~ setHashcode(int) : void ~ getHashcode() : int~ setPowerOnlye(bool) : void ~ getPowerOnly() : bool
- selectionMenuList : ArrayList<String>- hashcode : Integer - powerOnly : bool
SelectionMenuBean
<<Serializable>>
Settings Load – Activity Diagram
Start Application Create Root User Screen Create Main ScreenLoad Main Screen
Onto Root User ScreenMain Screen GUI
User input is Pending
User Selects Settings Button
The Settings User Screen is LoadedAwaiting User Input
To Modify Settings ConfigurationOR
Manage Simulations Selection ListOR
Create Custom Playlist
(background process)Create Settings User ScreenFrom ScreenHelp FXML file
(background process)Define Controller for the
Settings User Screen
(user interface process)Set Loading Message
Set Screen Loading Flag
(background process)Create the Settings User
Screen Controller
(background process)Initialize
Settings Screen Controller
(background process)Clear Loading Message
Clear Screen Loading Flag
(user interface process)Load Settings User Screen Onto the Root User Screen
Create an Array of Allthe Checkboxes Use To Enable Access to Simulation Groups
Configure the PerformanceRadio Buttons to Align with the
Settings Configuration
Configure the “Force Menu Rebuild”Checkbox to Align with the
Settings Configuration
Configure the “Distance Units”Radio Buttons to Align with the
Settings Configuration
Configure the “Wind Directions”Radio Buttons to Align with the
Settings Configuration
Configure the “Wind Directions”Radio Buttons to Align with the
Settings Configuration
Configure the “Selection Mode”Radio Buttons to Align with the
Settings Configuration
Configure the “Simulator Mode”Checkboxes to Align with the
Settings Configuration
Update Selection Menuto Match
the Current Settings
Set Selection Menu ListTo “Grey Out” Simulations Which Are
Erased (i.e Not Active)
If: Settings Force Rebuild is Set to TrueORIf: Selection Menu Does Not Match Current Settings
Clear Simulation Selection List
Create Simulation Selection Listwith All Active Simulations
Load Selection Menu Pull Down ListWith Simulations in Simulation
Selection List
Set Selection Menu Text Fieldwith First Simulation in
Simulation Selection List
Configure the PlaylistPull Down Menu to Match
the Settings Playlist
Configure the Simulation GroupCheckboxes to Match
the Settings Configuration
Help Screen – Class Diagram
+ setScreenParent(RootUserScreen) : void
<<UserScreenController>>
+ initialize() : void <<Override>>
- loadHelpSectionsList() : void- loadHelpTopicsList(String) : void
+ setScreenParent(RootUserScreen) : void <<Override>>+ performPreUserScreenExitHousekeeping() : void <<Override>>
- handleButtonReturn(ActionEvent) : void <<FXML>>- handleComboBoxHelp(ActionEvent) : void <<FXML>>- handleButtonNext(ActionEvent) : void <<FXML>>- handleButtonPrevious(ActionEvent) : void <<FXML>>
~ TITLE: int = 0 {readOnly}~ SUMMARY: int = 1 {readOnly}~ IMAGE_FILE: int = 1 {readOnly}~ COMMENTS: int = 2 {readOnly}
~ GETTING_STARTED : String = "Getting Started" {readOnly} ~ SIMULATOR : String = "Simulator" {readOnly}~ ADVANCED_FEATURES : String = “Advanced Features” ~ LEARN : String = "Learn" {readOnly}~ TEST : String = "Test" {readOnly} ~ REFERENCE : String = "Reference" {readOnly}~ SETTINGS : String = "Settings" {readOnly} ~ ABOUT : String = "About" {readOnly}
~ NUMBER_OF_SECTIONS : int = 8 {readOnly}
helpSectionsArray : String[][]gettingStartedTopicsArray : String[][]simulatorTopicsArray : String[][]advancedFeaturesTopicArray : String[][]learnTopicsArray : String[][]testTopicsArray : String[][]referenceTopicsArray : String[][]settingsTopicsArray : String[][]sboutTopicsArray : String[][]
~ rootUserScreen : RootUserScreen
~ imagePresenter : ImageView
- overallPane : Pane <<FXML>> - displayPane : Pane <<FXML>>- upperBorderPane : Pane <<FXML>> - firstPersonPane : Pane <<FXML>> - lowerBorderPane : Pane <<FXML>>
- comboBoxHelp : ComboBox<String> <<FXML> - labelComboBoxTitle : Label <<FXML>>- textAreaHelp : TextArea <<FXML>> - labelTextAreaTitle : Label <<FXML>>- buttonPrevious : Button <<FXML>> - labelPrevious : Label <<FXML>>
- comboBoxList : ObservableList<String>
- currentSectionIndex : int- helpTopicsLoaded : bool- currentTopicArray : String[]
- centeringPane : StackPane
ScreenControllerHelp
Help Load – Activity Diagram
Start Application Create Root User Screen Create Main ScreenLoad Main Screen
Onto Root User ScreenMain Screen GUI
User input is Pending
User Selects Settings Button
Help Pull Down Menu Configured with Help Sections2D Image Display with Info on How to Select Sections
Awaiting User to Select Help Section
(background process)Create Help User Screen
From ScreenHelp FXML file
(background process)Define Controller for the
Help User Screen
(user interface process)Set Loading Message
Set Screen Loading Flag
(background process)Create the Help User
Screen Controller
(background process)Initialize
Help Screen Controller
(background process)Clear Loading Message
Clear Screen Loading Flag
(user interface process)Load Settings User Screen Onto the Root User Screen
Define Pane Border Constraints
DefineImagePresenter
Configure Text Area
Configure Pull Down Menu
To Display Help Topics
Display 2D Image
With Information on How to Select Help Topics