Commit Graph
1415 Commits
Author SHA1 Message Date
hba56 3895172631 updated the race class to set heading for windward legs
#story[873]
2017-05-14 17:25:44 +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
hba56 d4be901b1a Merge remote-tracking branch 'origin/story31.2' into story31.2 2017-05-14 15:16:18 +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
fjc40 2dc17a688f Mock.Polars:
Fixed a bug where duplicate estimates could be added to the Polar table (this happened when the angle was 0, so the "negative" angle became 360, which is equivalent).
Now has a list of angle values for each wind speed, rather than checking if Pair<WindSpeed, WindAngle> exists in the map.
calculateVMG now uses linear interpolation between two adjacent angles (e.g., if data file contains angles 0, 30, 45, etc.. it can interpolate and find an optimal VMG angle between those, for example, 17 degrees).
Added a third test for when we provide a wind speed which is lower than any wind speed values in the Polars table. Still need to actually calculate correct VMG values by hand.

#story[873]
2017-05-14 01:12:36 +12:00
fjc40 6f9249e238 Mock.PolarParser. Fixed a bug where it would only parse the first half of each row.
Mock.Polars. addEstimate also builds up a unique list of angles from the data file, instead of dynamically generating that when calculating a VMG.
addEstimate also adds estimates with negative angles (e.g., 45deg+windSpeed+boatSpeed, and -45deg+windSpeed+boatSpeed).
calculateVMG now accepts an upper and lower bounds to the allowed VMG bearing it returns - this way you can get VMGs only within a certain angle interval (e.g., [16, 99] degrees).
Also fixed some bugs in calculateVMG where it wasn't actually using the angles and such correctly.
Improved the test case slightly, but still need to calculate correct values by hand.

#story[873]
2017-05-13 17:10:06 +12:00
Erika Savell fb6420524d Adding a parameter to test command to debug missing library 2017-05-13 11:57:47 +12:00
Joseph Gardner 63f7857e2f Changed dependency version (repository pls download properly) 2017-05-12 12:59:53 +12:00
hba56 dd1308808a updated the race class to set heading based on the vmg not just the end of a leg
-race class now stores the boundary
-updatePositions now checks if the boat is with the course
-update positions now sets heading and speed based on the vmg
-updated azimuth to now accept a start and finish gps rather that finding it itself
-added a calculatebearingtodestination method that finds the azimuth to the dest from the boat
-updated boat tests to use the new azimuth method
 #story[873]
2017-05-12 12:49:02 +12:00
Joseph Gardner 04fdeaf2e2 Optimised boundary checking #story[873] 2017-05-12 11:58:31 +12:00
Erika Savell 493932b93f Merged with visualiser side of mark boats
#story[881]
2017-05-12 10:27:55 +12:00
Erika Savell 0ed02962a1 Merge branch 'Story49Vis' into 49Mock
# Conflicts:
#	visualiser/src/main/java/seng302/Mock/StreamedCourseXMLReader.java
#	visualiser/src/main/java/seng302/Model/CompoundMark.java
#	visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java
#	visualiser/src/main/java/seng302/VisualiserInput.java
2017-05-12 09:53:07 +12:00
zwu18 a91bc459f7 Implemented functionality for mock to parse marker boats throughout race.
-Added getter to CompoundMark to get the Mark value.

#story[881]
2017-05-12 02:10:17 +12:00
Erika Savell 5708db1936 Ignoring all new race tests
- Thought they they would be ok bc not calling animation timer directly
- Was mistaken

#story[881]
2017-05-11 16:33:00 +12:00
Erika Savell 799e588145 Unignored a couple of GPS tests
- The issue was with accuracy. Average of two coords is fine fo two point fairly close together (<1km), but not for very very large distances.
- We only ever use it for small ranges so changed tests to reflect that

#story[881]
2017-05-11 16:01:44 +12:00
Joseph Gardner eca6b7e374 Fixed imports 2017-05-11 15:57:54 +12:00
Jessica McAuslin d294ee7994 Deleted redundant and deprecated code (Visualiser)
- References to deprecated objects replaced
- Deprecated Constants class removed
- general redundant code deleted
2017-05-11 15:44:58 +12:00
Erika Savell 11f6dee301 Added a number of race tests.
- Still unable to get animation timer tests working. May be necessary to make handle() hold nothing but a method call

#story[881]
2017-05-11 15:43:12 +12:00
Joseph Gardner 602bc0686e Changed public functions in the RaceXMLReader to make a new list every time and reassign the list to avoid duplicates in a list. #story[873] 2017-05-11 14:55:50 +12:00
Joseph Gardner 8c0c03dcf2 Fixed tests that were reading the file again making them fail. #story[873] 2017-05-11 14:49:17 +12:00
Joseph Gardner a13899b6a7 Implemented and tested to check if a point is inside or outside of a boundary using a ray tracing algorithm. The function is public static for a GPSCoordinate and takes a list of GPSCoordinates and the comparing coordinate. #story[873] 2017-05-11 14:40:24 +12:00
Erika Savell 0bb18c7957 Temporarily ignoring animation tests
- The VMs don't have the necessary libraries to run them

#story[881]
2017-05-11 13:34:26 +12:00
fjc40 3b2f99b7d7 Fixed Polars.calculateVMG function - it was using non-existent keys in some circumstances.
#story[873] #pair[fjc40,jam339]
2017-05-11 11:58:02 +12:00
fjc40 238b97c016 Added a VMG class (has a speed and bearing).
Added the Polars.calculateVMG function, which calculates the VMG from a given wind angle, wind speed, and angle to destination. In may not be completely correct at the moment, so it's a work in progress.

#story[873]
2017-05-11 11:30:18 +12:00
Erika Savell 892bfd9676 Began on tests for Race class.
- Made really good progress using Mockito and calling .handle() on animation timers

#story[881]
2017-05-11 01:22:28 +12:00
Erika Savell fd036c1835 Refactored countdown timer in race class
- Also fixed all boats having ame velocity

#story[881]
2017-05-11 00:51:34 +12:00
Erika Savell a35d9cbc5a Re-refactored Event class
#story[881]
2017-05-10 23:54:29 +12:00
Erika Savell e7f84eaf83 Refactored Event Class
#story[881]
2017-05-10 23:43:42 +12:00
Erika Savell 1a780d6955 Fixed spread starting positions being reset at start of race
#story[881]
2017-05-10 23:31:32 +12:00
Erika Savell af3dfbad05 Fixed boats not displayinggit stash
- Was gps coordinates being initialised with X and Y switched around

#story[881]
2017-05-10 22:33:29 +12:00
Erika Savell 081a7d5666 Attempting to solve boats not apearing problem
- Appears to be becaus elat and long are getting switched somewhere

#story[881]
2017-05-10 22:23:49 +12:00
zwu18 ce5a726153 Adjusted wind direction changing angles to a smaller angle.
#story[882]
2017-05-10 22:20:00 +12:00
Erika Savell ffa3d530ae Event takes string and sets time of race
- RaceXmlReaders can handle strings now
- Not working with visualiser, gps coords may be worng

#story[881]
2017-05-10 21:46:24 +12:00
zwu18 8390b19299 Created methods to initialise and change wind direction throughout race.
-Method initialiseWinDir assigns an unsigned short value to wind direction.
-Method changeWindDir randomly changes the wind direction throughout race.
-Issue found regarding showing wind direction.

#story[882]
2017-05-10 21:37:18 +12:00
fjc40 693da8a82a Removed some unneccessary code and comments from PolarParser.parse(...).
Fixed a bug where the polar parser would attempt to insert (wind speed, windspeed, windangle) instead of (windspeed, windangle, boatspeed).
Removed some unused constructors from RaceXMLReader, and fixed a bug where it wouldn't actually use the polar table correctly.
Boat's constructor now expects a Polars table.
Added some comments to the Polars class, and specified the HashMap's template parameters
Added PolarsTest - which needs to be implemented properly when the VMG calculations have been added.

#story[900]
2017-05-10 17:21:18 +12:00
cbt24 91b1773703 Commented out obsolete tests, may be useful if refactored.
#story[881]
2017-05-10 17:02:25 +12:00
cbt24 f31a987787 Reads BoatDataSource into StreamedCourseXMLReader so the latter can function as a single source of static information for the race.
- Mock.StreamedCourseXMLReader populates participant and mark list from BoatDataSource
- Added CompoundMarker class to accommodate Mark data from Boat XML
- Had to check for Yacht type in Visualiser.BoatXMLReader
- Added a missing coordinate value to raceTest.xml
- Marker class still exists due to large number of tests, which should be transitioned to CompoundMark
- IMPORTANT: race is no longer functional

#story[881]
2017-05-10 16:56:21 +12:00
Joseph Gardner 3bc8ad0a07 Arrow is now displayed on screen more vividly, the arrow can be customised to a different colour scheme if needed. #story[882] 2017-05-10 16:30: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
hba56 4f8d6b14d4 updated app class to read the polar csv and pass it off to its parser
#story[900]
2017-05-10 15:46:01 +12:00
hba56 245914a69e added the polars csv
#story[900]
2017-05-10 15:26:43 +12:00
hba56 e67f8fae4b parser updated for the hashmap polars
#pair[hba56, fjc40]
 #story[900]
2017-05-10 15:24:46 +12:00
fjc40 1434892b51 Merge branch 'story31.1' of eng-git.canterbury.ac.nz:seng302-2017/team-7 into story31.1 2017-05-10 15:12:06 +12:00
fjc40 aeee8ca748 Added polar data file.
Added PolarParse class - currently commented out as it depends on polar table class.

#story[900]
2017-05-10 15:11:51 +12:00