Commit Graph
97 Commits
Author SHA1 Message Date
Fan-Wu Yang 044d786043 Added Refactors that the Audit suggested
- Created AC35RaceStatus class
- Deleted wait loop into a Thread.sleep()
- Deleted Entirely commented out class....
- Deleted duplicate draw that appeared again
#story[873]
2017-05-19 01:05:45 +12:00
Fan-Wu Yang 7990ac9d2e Merge branch 'Story49Vis' into 'master'
Story49



See merge request !1
2017-05-15 15:58:21 +12:00
Fan-Wu Yang c0bc2b2c1e Merged Mock49 and fixed bugs
- Error where mock would not read in the files when running from the jar.
- Error where the AC35 stream now no longer sends us packets with information that is set for 0 for boat location.
#story[881] #pair[fwy13, esa46]
2017-05-15 15:53:49 +12:00
Fan-Wu Yang b065b8d9c7 Merged Mock49 and fixed bugs
- Error where mock would not read in the files when running from the jar.
- Error where the AC35 stream now no longer sends us packets with information that is set for 0 for boat location.
#story[881] #pair[fwy13, esa46
2017-05-15 15:49:38 +12:00
Fan-Wu Yang 7bfb6bb968 Merge remote-tracking branch 'origin/49Mock' into Story49Vis
# Conflicts:
#	visualiser/src/test/java/seng302/Model/RaceXMLTest.java
2017-05-15 14:01:16 +12:00
Fan-Wu Yang f011b4117e Added and removed javadoc tests that were making errors in the code, #story[881] 2017-05-14 16:24:17 +12:00
Fan-Wu Yang a7a065825a Fixed thread issue on windows
- Added a Platform.runLater on the Visualiser loops so that the notifying observers do not try to call it, where it is a non java-fx loop
#story[881]
2017-05-14 16:18:11 +12:00
Fan-Wu Yang 156e0bfdd5 removed blocking queue that somehow appeared again
- Removed blolcking queue from Visualiser Input that had appeared miraculously
#story[881]
2017-05-14 16:14:45 +12:00
Fan-Wu Yang 294627074d Commented out throws in the BinaryMessageDecoder for messages we ignore as they were not errors and instead were causing the program to stop if they're received
- commented out throw from default, chatter text, yachactioncode, yachteventcode, displaytextmessage states
#story[881]
2017-05-14 16:13:37 +12:00
Fan-Wu Yang b2d9e44d03 Deleted Unecessary code
- StreamedRace no longer sets the positions of boats
- The Visualiser has blocking queue removed
- The Regatta XML Reader not longer has a variable to the deleted Regatta class
#story[881]
2017-05-14 15:36:40 +12:00
Fan-Wu Yang 30beef29ba Deleted Regatta XMl reading that is deprecated
- No longer in use XML reader has been deleted
#story[881]
2017-05-14 15:29:52 +12:00
Fan-Wu Yang 3570e1283f Deleted Race class
- Delete dependency on Race class from Streamed Race as there is no need for extention after the split of Visualiser and Mock.
#story[881]
2017-05-14 15:24:19 +12:00
Fan-Wu Yang f8c6e500fb Deleted deprecated Race XML reader
- Deleted RaceXMLReader class
- Deleted Corresponding Tests
#story[882]
2017-05-14 15:14:32 +12:00
Fan-Wu Yang 045e69a637 Deleted and Fixed some redundant code
- Deleted some unused functions
- Fixed NullPointerException for Marks
#story[881] #pair[fwy13,jam339]
2017-05-10 15:51:55 +12:00
Fan-Wu Yang 9e19ddb1f4 Story 49 Marks move with boat location.
- Commented out blocking array as it was unecessary
- Added Observable list for markers to the race canvas
- Added SourceId's to Marker
- Added updating Markers from the Streamed Race loop.
#story[881] #pair[fwy13, jam339]
2017-05-10 14:45:42 +12:00
Fan-Wu Yang bdf215d0f1 TCP connection at the front menu will no longer bug out if the socket is bugged.
- Timeout set on connection socket so that the socket will return false after 5 seconds.
#story[782]
2017-05-06 16:55:12 +12:00
Fan-Wu Yang d52b09e74a Visualiser Closes All threads on exit now.
- Added override for exiting the Visualiser which closes all threads: such as the TCP connection.
#story[782]
2017-05-06 15:58:12 +12:00
Fan-Wu Yang a20dafea11 Annotations go on top and boundaries now update
- Fixed FPS and other annotations being hidden under the map
- Fixed boundaries not updating with the visualiser.
#story[782]
2017-05-06 15:46:38 +12:00
Fan-Wu Yang 982b47943a Fixed blocking issue
- Fixed byte stream error where it would reinitilise every run
#story[782]
2017-05-06 15:27:21 +12:00
Fan-Wu Yang b7f010a2fa Fixed Network While loops
- Removed while blocking loops and replaced them with return statements
#story[782]
2017-05-06 14:36:37 +12:00
Fan-Wu Yang 565b7adaa2 Merge remote-tracking branch 'origin/race-timer-fixes' into layeredCanvas
# Conflicts:
#	visualiser/src/main/java/seng302/Controllers/StartController.java
2017-05-04 16:55:01 +12:00
Fan-Wu Yang 862391d7ef Canvas Layer Created
- Canvas is created via layering.
- Resizable canvas is now a seperate abstract class
#story[782]
2017-05-04 16:54:06 +12:00
Fan-Wu YangandErika Savell 284eb6d951 Added Test for AC35UnitConverter
- Added tests to make sure it was working properly
#story[782]
2017-05-04 16:30:42 +12:00
Fan-Wu Yang 037c09b059 Merge branch 'splitIntoTwoModules' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into splitIntoTwoModules 2017-05-04 13:42:28 +12:00
Fan-Wu Yang 6bbc2ac4be Merge branch 'splitIntoTwoModules' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into splitIntoTwoModules 2017-05-04 13:40:48 +12:00
Fan-Wu Yang bb57685faf Added Test for AC35UnitConverter
- Added tests to make sure it was working properly
#story[782]
2017-05-04 13:40:43 +12:00
Fan-Wu Yang 43fb0df5be Merge branch 'splitIntoTwoModules' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into splitIntoTwoModules 2017-05-04 13:07:13 +12:00
Fan-Wu Yang 874953f763 Fixed issue win ResizableRaceCanvas
- Issue where the boat position may mess up if it is called before the server has sent us information about hte location.
#story[782]
2017-05-04 13:07:05 +12:00
Fan-Wu Yang 44a5b9a38f Fixed merge issue
- Strange Issue where there was a null pointer from convertGPS however it has resolved itself may crop in the future htough.
#story[782]
2017-05-01 20:25:09 +12:00
Fan-Wu Yang 84bb4fdb8f Fixed merge issue
- Strange Issue where there was a null pointer from convertGPS however it has resolved itself may crop in the future htough.
#story[782]
2017-05-01 20:23:52 +12:00
Fan-Wu Yang 5444b872bd Fixed GPs Coordinates as well as got Boats to display
- Fixed GPS conversion number being wrong (extra 1)
- Fixed Boats displaying as the boat = null (cough Joseph) was stopping it from working as well as track is broken.
#story[782]
2017-05-01 20:13:16 +12:00
Fan-Wu Yang 04366c2e4c Fixed small Merge issue
- Deleted a unfinished statement that caused hte build to fail
#story[782]
2017-05-01 19:24:59 +12:00
Fan-Wu Yang 0fc1da4090 Merge branch 'splitIntoTwoModules' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into splitIntoTwoModules 2017-05-01 19:21:48 +12:00
Fan-Wu Yang 560af8c21d Added more data types to Visualiser Input that can be take from InputStream
-Added AverageWind
-Added CourseWinds
-Added MarkRounding
-Added RaceStartStatus
#story[782]
2017-05-01 19:21:43 +12:00
Fan-Wu Yang 2c414d3061 Added way to get the Race Status and Boat Status'
- Added getters in Visualiser Input
- Added Hashmap for boat status messages
#story[782]
2017-05-01 18:35:15 +12:00
Fan-Wu Yang 444a4432c6 Fixed stream from messing up
- Stream was getting code before all of it came therefore a while loop was added t owait for the code
#story[782] #pair[hba56, fwy13]
2017-05-01 15:07:59 +12:00
Fan-Wu Yang c3717b7fc5 Added Classes to help Visualiser
- Added Get Boat GPS Coordinate
- Added Get Heading as Degrees
- Added Get True Wind Angle as Degrees
#story[782]
2017-04-29 18:26:02 +12:00
Fan-Wu Yang 8569d3f2dc Added a few decoders and unit converters
- Units can be converted from int to degrees as a double
- XML message now keeps the most recent XML file
#story[782]
2017-04-28 17:00:04 +12:00
Fan-Wu Yang eab41315c5 Merge branch 'splitIntoTwoModules' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into splitIntoTwoModules 2017-04-28 13:44:19 +12:00
Fan-Wu Yang 760f1ed5a9 Added CRC
- CRC checking now works
#story[782]
2017-04-28 13:44:14 +12:00
Fan-Wu Yang a18eb86438 Merge branch 'networkingTest' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into networkingTest 2017-04-27 22:44:25 +12:00
Fan-Wu Yang 278a7dbde0 Added rare bug which would cause system crash
- Fixed Array Index out of Bounds when they try to send a message of 9 length and it is to be turned into a number
#story[782]
2017-04-27 22:44:21 +12:00
Fan-Wu Yang 1d33015925 Fixed a small array out of bounds exception error
- Error in Byte ConverterTest where the array was pointing at the wrong place which could make an error
2017-04-27 15:58:04 +12:00
Fan-Wu Yang 8223ae46a1 Fixed some issues
- Fixed issue where everything was inputted as an integer when converting to a byte array.
- Seperated loops that are used often to make it more readable.
#story[782]
2017-04-25 20:25:56 +12:00
Fan-Wu Yang 413ab7b768 Added Tests for bytesToLong
- Tested for Bytes to long
- Fixed little endian and big endian being thewrong way around.
#story[782]
2017-04-25 19:57:14 +12:00
Fan-Wu Yang df871b1242 Added tests to fix ByteConverter
- Integers cutting and chopping now works
- Integer to bytes word
- bytes to integer also work
#story[782]
2017-04-25 19:40:20 +12:00
Fan-Wu Yang be9f02997e Fixed issue where the new XML Decoder funtion was changed
- Changed String XML Message to InputSource
#story[782]
2017-04-25 18:36:39 +12:00
Fan-Wu Yang 7b4a428574 Merge branch 'networkingTest' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into networkingTest 2017-04-25 18:29:11 +12:00
Fan-Wu Yang 7d7564ce15 Added being able to decode everything into their respective classes
- Made classes for Heartbeat message, race status message, xml messag,e racestartstatus message, boat location message, mark rounding message, course wind message, average wind message.
- Made a statci calculation class for calculating bytes to int or long
- Message Decoder now kinda works!
#story[782]
2017-04-25 18:29:05 +12:00
Fan-Wu Yang b346e10774 Refactored Constructors
- Constructors after adding AC35Data as a parent were failing as they took in an extra parameter
story[782]
2017-04-25 14:43:37 +12:00
Fan-Wu Yang c0bf5b1641 Added Decoding testing and splitting
- Binary Message Decoder now can determine whether the files are correct or not
- Boat Location Message is now a extension of AC35Data which will be read by the TCPClient
- Boat Status is now an extension of AC35Data which will be read by the TCPClient
- CourseWind is now an extension of AC35Data which will be read by TCPClient
- ValueOf static method added MessageType to assist in determining the packet that was received.
- Race Message is now an extension of AC35Data which will be read by TCPClient
- PacketDumpReader created to read the sample file that was provided.
- AC35Packet has been made to store each Dumped file packet.
- AC35 Data Dump has been added to resources/dataDumps as ac35.bin
#story[782]
2017-04-25 14:26:58 +12:00
Fan-Wu Yang 1b18eff3db Added CRC to Encoder
- Added CRC to Message Encoder
#story[778]
2017-04-21 17:36:18 +12:00
Fan-Wu Yang 82acf40dd6 Merge branch 'networkingTest' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into networkingTest 2017-04-21 16:23:53 +12:00
Fan-Wu Yang c63c6a3c77 Added Encoding to RaceVisionByteEncoder
- Added chatterText
2017-04-21 12:51:48 +12:00
Fan-Wu Yang 54a2c08258 Added RaceVisionByteEncoder
- Encodes heartBeat
- Encodes raceStatus
- Encodes displayTextMessage
- Encodes raceStartStatus
- Encodes yachtEventCode
#story[778]
2017-04-21 12:27:34 +12:00
Fan-Wu Yang 4dd173261c Added functions to the RaceVisionByteEncoder
- Encodes Race Status
- Encodes displayTextMessage
- Encodes raceStartStatus
- Encodes yachtEventCode
#story[778]
2017-04-21 12:24:21 +12:00
Fan-Wu Yang 4ba9331528 Merge branch 'networkingTest' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into networkingTest 2017-04-19 17:55:10 +12:00
Fan-Wu Yang 6046ba4cf1 Added Some Encoding functions for ByteStrem
- Created Heart Beat encoding
- Created race Status encoding
- Create display Text encoding
- Created race Start status encoding
#story[778]
2017-04-19 17:55:04 +12:00
Fan-Wu Yang e501102bc5 Refactored the raceClock
- created a class that hosts the raceClock
- refactored the raceController to use a raceClock.
#story[761]
2017-04-19 02:45:08 +12:00
Fan-Wu Yang 7790322e04 Implemented the Time showing on Grid
- Added Label to scene
- Added Timezone formatting
#story[28] #pair[fwy13,hba56]
2017-04-06 16:55:43 +12:00
Fan-Wu Yang 71f0085268 Implemented geotimezone from com.github.bfsmith
- Calculates timezone from mark
#story[28] #pair[fwy13,hba56]
2017-04-06 16:11:14 +12:00
Fan-Wu Yang 795b411f08 Added some doc strings
- Added doc strings to RaceXML
- Added a few minor changes to bermuda_AC35.xml
- Changes to the RaceXMLReader Unit Test
2017-03-31 00:51:08 +13:00
Fan-Wu Yang c105c2d01e Fixed file paths so they work when it becomes an executable
- Changed file paths for the FXML files
2017-03-31 00:00:53 +13:00
Fan-Wu Yang 305326881f Merged Boundaries branch
- Merged Boundaries branch.
#story[22]
2017-03-29 17:13:52 +13:00
Fan-Wu Yang 461d894ac8 Merge branch 'boundaries'
# Conflicts:
#	src/main/java/seng302/Controllers/RaceController.java
#	src/main/java/seng302/Model/ResizableRaceCanvas.java
#	src/main/resources/scenes/racepane.fxml
2017-03-29 16:53:28 +13:00
Fan-Wu Yang 6ffe3d02a3 Fixed and merged heading-visualisation
- Fixed the boats not appearing at the starting line.
- Merged with master
#story[24]
2017-03-29 16:46:23 +13:00
Fan-Wu Yang edd9c2a48d Merge remote-tracking branch 'origin/heading-visualisation'
# Conflicts:
#	src/main/java/seng302/Controllers/RaceController.java
#	src/main/java/seng302/Model/Boat.java
#	src/main/java/seng302/Model/Race.java
#	src/main/java/seng302/Model/ResizableRaceCanvas.java
#	src/main/resources/scenes/racepane.fxml
2017-03-29 14:36:24 +13:00
Fan-Wu Yang eb97bd6aef Implemented resizable map and boundary scaling.
- Map can now be downsized
- The boundaries are auto margined and fit in the center of the canvas.
#implement
2017-03-29 13:29:53 +13:00
Fan-Wu Yang 224c16a713 Implemented Map Boundaries in XML
- RaceXMLReader will calculate the top left latitude and longitude and the bottom right latitude and longitude, and make the layout the map accordingly.
- The Boundaries are draw on the Race Canvas in Aqua.
#story[22]
2017-03-29 03:18:47 +13:00
Fan-Wu Yang 879de9869b Implemented XML Reader
-XMLReader class for generic XML Reading Created
- RaceXML Reader class made specifically for reading races
- RaceController COnstants now replced with XML file
#implement
2017-03-27 02:09:59 +13:00
Fan-Wu Yang 8fac6ad23b Merge branch 'story9' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into story9 2017-03-22 12:20:31 +13:00
Fan-Wu Yang a77f4883f3 Create Resource XML
- Created Race XML file which contains the perameters of the bermuda race for AC35
2017-03-22 12:20:20 +13:00
Fan-Wu Yang 419fa8e9fe Fixed merge conflicts
- Fixed Merge conflicts with boats
#merge
2017-03-20 16:56:43 +13:00
Fan-Wu Yang 15fd24203d Merge branch 'story9' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into story9 2017-03-20 16:38:40 +13:00
Fan-Wu Yang d97802e06c Refactored the refreshTable into propeties that listen.
- Added currentLegName as a String Property
- Refactored Name of the Boat as a StringProperty
#story[15]
2017-03-20 16:38:35 +13:00
Fan-Wu Yang 12a9205ded Implemented Table Refresh Function
- Made refreshTable() in RaceController that refresh the boatInfoTable
- Made checkPosition() in Race call controller.refreshTable()
- Result is that the table now updates
#story [15]
2017-03-20 16:11:02 +13:00
Fan-Wu Yang 3f55a45362 Documented RaceMap
- Added Constructor Documentation for RaceMap
#documentation
2017-03-19 22:53:57 +13:00
Fan-Wu Yang 4e94da5e49 Merge branch 'story9' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into story9 2017-03-19 22:49:07 +13:00
Fan-Wu Yang dffd77f7a7 Filled in missing documentation.
- Added Documentation for all Classes.
#documentation
2017-03-19 22:48:58 +13:00
Fan-Wu Yang 91861eb5cb Refactored BoatinRace to observable list
- Changed starting Boats into ObservableList from array
- stopped checkPosition in Race abstract class from updating the table as everytime as it is checked by a listener
- Changed array methods .length to .size() and [i] to .get() to reflect the type change.
#refactor #story[9]
2017-03-19 21:21:21 +13:00
Fan-Wu Yang b15edd49d6 Merge branch 'story9' of https://eng-git.canterbury.ac.nz/seng302-2017/team-7 into story9
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
2017-03-17 13:13:23 +13:00
Fan-Wu Yang 15829628f2 Fixed Map
- Changed GPS Coordinate so that latitude and longitude were on the correct orientation
- Map is now centered.
#fix
2017-03-17 13:10:29 +13:00
Fan-Wu Yang 3751ee2488 Fixed arrow Direction, and Canvas
- Canvas will not longer not fill the entire screen
- Canvas will redraw when resized larger
- Arrow Rotation no longer rotates the entire map.
#fix
2017-03-17 11:52:54 +13:00
Fan-Wu Yang bc4701ef32 Fixed Canvas not filling screen issue
- Created ResizableRaceCanvas Class
- Moved all draw functions to ResizableRaceCanvas
#fix
2017-03-17 10:30:40 +13:00
Fan-Wu Yang 43c84cb677 Added draw ability to draw arrow on the canvas
- displayArrow() function created
- rotate() function created.
#story [14] #pair[fwy13, zwu18]
2017-03-16 16:14:28 +13:00
Fan-Wu Yang ffaed5ef47 Implemented Finish Line
-Altered others drawing to utilise drawLine in RaceMap
-Added Finish Line
-Rescaled Canvas (To be fixed in the future).
#story[11]
2017-03-15 13:27:58 +13:00
Fan-Wu Yang 5108c0eaf5 Implemented Finish Line to show
- shows a dark red line with 2 thickness
- shows two rectangles at the ends of each line
#story [11]
2017-03-15 12:33:56 +13:00
Fan-Wu Yang 0729ae719d Implemented Display a Boat as a circle.
- created displayBoat function which will display a circle at a Coordinate.
#story[9] #pair[cbt24, fwy13]
2017-03-15 11:55:11 +13:00
Fan-Wu Yang a7c64dc401 Implemented base UI and abstract controller for parent coupling
-Added Controller abstract class that all JavaFX controllers are to be a child of.
-Added MainController in case in the future we need a menu.
-Added mainpane.fxml as a base pane that we can mount the future menu on.
-Added RaceController so where the race will be made and displayed.
-Added racepane.fxml which includes a Canvas and a tableview
-Added loadPane() function to the mainApp which will swap the pane the app is currently on.
#story[9]
2017-03-15 02:03:37 +13:00
Fan-Wu Yang 3ac93ae1e5 Documentation and Refactor
- Changed Race to an abstract class
- Protected and privated certain variables
- Wrote Javadocs for the classes and functions
- Moved generate race from RandomisedRace and ConstantVelocityRace to the abstract Race class
- Added string checking exception for Scanner for whether to run in 1 minute or 5 minutes
#pair[fwy13, cbt24]
2017-03-09 16:43:30 +13:00
Fan-Wu Yang 2d777b8903 Implemented user input
- Changed it from launching the program with args setting to with Scanner.
- Changed field 'factor' to 'timescale' in Race class
#story [5] #pair[fwy13, cbt24]
2017-03-09 16:03:27 +13:00
Fan-Wu Yang 2db4beadcb Boats now display knots, also the racecouse has been modified to reflect the AC35 racecourse via linear coordinates. 2017-03-08 16:24:51 +13:00
Fan-Wu Yang f62c4dcb3d Added Display of all Boats participating in the race, and a message to seperate this and the events in the console. 2017-03-08 15:35:40 +13:00
Fan-Wu Yang 00bd194361 Added heading from each event that the boat is heading towards. 2017-03-06 16:59:09 +13:00
Fan-Wu Yang 4f6ab7b4bc Added simulation of a race with randomised time events. This is reported in time order and shown in the console which is displayed as "Boat passed Mark at 60 (seconds)" 2017-03-06 15:46:19 +13:00
Fan-Wu Yang 02cc98b0b6 Story 3 complete added all AC35 Teams into the program. 2017-03-03 11:38:35 +13:00
Fan-Wu Yang 21487340ab Story 1 completion, Added Boat and Event classes. The program displays two boats New Zealand and America. 2017-03-03 11:02:31 +13:00