Commit Graph
1409 Commits
Author SHA1 Message Date
hba56 a24dda2fd8 boats have an annotation beside them that shows time since last mark passed
#story[878]
2017-05-20 20:40:08 +12:00
hba56 9eb4e3daea boats now calculate the time since last mark
-the raceclock is passed around so that the time can be tracked
-time from start to mark 1 is wrong
 #story[878]
2017-05-20 17:22:52 +12:00
fjc40 de0abf94e0 Mock.Race:
Fixed an issue where boats sometimes sailed towards the wind when attempting to turn from bearing just under 360 degrees to a bearing just over 360 degrees.
This required an update to the boundary detection code.

Visualiser:
Appear to have fixed issue where clock didn't display correctly. Previous commit only fixed certain circumstances.

#story[873]
2017-05-20 00:18:42 +12:00
fjc40 81ed07330b Fixed the bug where the race clock wasn't visible some of the time.
It appears to have been due to a threading/javaFX thread issue with prop1.bind(prop2).
2017-05-19 21:50:14 +12:00
Jessica McAuslin ef9d8884d4 Sparkline methods Javadoc'd
- createSparkline
- updateSparkline

#story[876]
2017-05-19 21:39:25 +12:00
Jessica McAuslin 3f2ad8886e Fixed FPS issues and beautified sparkline display
- set upper and lower bounds for axis height
- formatted Y axis to show/hide necessary info
- reduced some looped actions
- added conditions for the first leg
- all boats start in 'last' place

#story[876]
2017-05-19 21:21:00 +12:00
fjc40 c011ccb11b Did some minor refactoring of Mock module...
Added comments/documentation to most classes.
Cleaned up heaps of repeated code, dead code, redundant stuff, etc...

Mock.App:
Now actually exits the program if catastrophic errors occur, rather than silently doing nothing.

Mock.Constants:
Added race prestart and preparatory times.
Removed TEST_VELOCITIES.

Mock.PolarParser:
Now uses Bearing class.

Mock.Angle:
Now implements the Comparable interface.
Also supports .equals.

Mock.Azimuth and Bearing:
Can convert between them easily.

Mock.Boat:
Now uses Bearing, and has some helper functions like setVMG, calculateMetersTravelled(time), moveforwards(distance, time).

Mock.Marker:
Removed. This wasn't really used, and was redundant.

Mock.GPSCoordinate:
Moved a lot of helper GPS related functions into the GPSCoordinate class, instead of being scattered around the codebase.

Mock.Polars:
Polars now uses Bearing.

Mock.VMG:
Now uses Bearing.

Mock.Race:
Added a RaceStatusEnum member.
Added a RaceTypeEnum member.
Now uses Bearing/Azimuth.
Moved the message creation/sending into their own functions.
The RaceStatus updates correctly through out the race (Prestart, Warning, Preparatory, Started, Finished).

Network.RaceStatusEnum:
Added race status enum.

Network.RaceTypeEnum:
Added.
2017-05-19 16:12:47 +12:00
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
fjc40 a0468f251b Merge remote-tracking branch 'origin/story33-estimateTime' into sp4_s31_cleanups
# Conflicts:
#	mock/src/main/java/seng302/Model/Race.java
Resolved.
2017-05-18 23:41:17 +12:00
fjc40 aa7337dc6c Merge branch 'story31.2_alternateTack' into sp4_s31_cleanups
# Conflicts:
#	mock/src/main/java/seng302/Model/Race.java
Resolved conflict manually.
2017-05-18 17:16:06 +12:00
fjc40 d88c353213 Brought in some fixes from the story31.2_merge branch. 2017-05-18 17:03:52 +12:00
Joseph Gardner eba2eb3cd6 Boats no longer change colour during a race and fixed the sparklines for the boats to be in the correct position #story[876] 2017-05-18 16:39:16 +12:00
fjc40 cc54c92d5b Added Mock.Angle, Mock.Azimith, Mock.Bearing. These encapsulate the relevant angle type, to allow for better type safety (e.g., to avoid passing a bearing into an azimuth function).
Added more comments to Mock.Boat.
Moved calculateAzimuth to GPSCoordinate, from Boat.
2017-05-18 14:49:56 +12:00
cbt24 27d4040a54 Cleaned up updatePosition in Mock.Race to simplify time estimation.
#story[875]
2017-05-18 14:42:27 +12:00
fjc40 60458f0f7a Merge commit '7990ac9d2ee8c71d50606813e21a0674f442464f' into story31.2_alternateTack.
This commit (7990ac9d2e) was the commit from master that story49 was merged into.
Everything appears to be working.

# Conflicts:
#	mock/src/main/java/seng302/App.java
#	mock/src/main/java/seng302/Constants.java
#	mock/src/main/java/seng302/DataInput/RaceXMLReader.java
#	mock/src/main/java/seng302/DataInput/RegattaXMLReader.java
#	mock/src/main/java/seng302/Model/Boat.java
#	mock/src/main/java/seng302/Model/Event.java
#	mock/src/main/java/seng302/Model/Race.java
#	mock/src/test/java/seng302/Data/BoatDataTest.java
#	mock/src/test/java/seng302/Data/RaceDataTest.java
#	mock/src/test/java/seng302/Model/BoatTest.java
#	mock/src/test/java/seng302/Model/RaceXMLTest.java
#	visualiser/src/main/java/seng302/Controllers/StartController.java
#	visualiser/src/main/java/seng302/RaceXMLReader.java
Manually resolved conflicts. :(
2017-05-18 13:44:02 +12:00
zwu18 74d3996f6c Merge remote-tracking branch 'origin/story34_v2' into story34_v2
# Conflicts:
#	visualiser/src/main/java/seng302/Controllers/RaceController.java
#	visualiser/src/main/java/seng302/Mock/StreamedRace.java
2017-05-17 20:08:31 +12:00
zwu18 f19a543b68 Changed line appearance and colour.
-Line displayed will no longer plot a point every update.
-Line colours are based on the colours displayed in the race.
-Race colours defined in ResizableRaceCanvas have been used for the lines.
-As boats change colour depending on placement (unintended), the lines will also do this.

#story[876]
2017-05-17 20:04:03 +12:00
Jessica McAuslin 2e1f8a2e9a Lowered frequency sparkline updates
- sparkline only updates when a boat passes a point
- all lines start in the middle
- slow frame rate issue resolved

#story[876]
2017-05-17 19:15:28 +12:00
zwu18 2929019689 Temporary ignored offlineConnectionStatusOffline due to CI issue.
#story[882]
2017-05-17 18:23:20 +12:00
zwu18 7d27a098ac Fixed wind direction code missing due to past merges (?)
#story[882]
2017-05-17 18:13:20 +12:00
fjc40 0c790c1721 Mock.Polars:
Was accidentally using testng in the PolarsTest. Changed it to junit.

#story[873]
2017-05-17 13:48:05 +12:00
fjc40 be9f19eae5 Mock.Polars:
Finished PolarsTest test cases.

Fixed a number of javadoc errors across the codebase.

#story[873]
2017-05-17 13:33:34 +12:00
David Wu f999967cd5 Implemented functionality for sparkline to update throughout race.
-Sparkline reads in initial boats in race.
-Sparkline updates throughout the race.
-Sparkline updates are displayed on GUI.

#story[876]
2017-05-16 17:13:52 +12:00
Jessica McAuslin 7647a93d7a Implemented an updating sparkline
- sparkline is set with X number of lines
- sparkline height fits X lines
- lines are updated regularly
- size is adjusted relevant to plotted points

#story[876]
2017-05-15 20:59:16 +12:00
fjc40 00c9cb2c83 Mock.PolarParser:
Fixed some javadoc issues
2017-05-15 18:49:57 +12:00
fjc40 656212d06d Mock.Race:
Fixed an issue in updatePositions(...) where unconstrained bounds could be passed into the calculateVMG function (e.g., lower = -182391, upper = 188221), but they need to be in the interval [0, 360).

Mock.Polars:
Added more test cases. Still working on getting the assertions correct.
Refactored and bugfixed the calculateVMG(...) function. There were a few bugs (and ugly "fixes") because we didn't bother enforcing a strict interval on the lower and upper bound angles.
Also added a few more comments to explain the function better.

#story[873]
2017-05-15 18:39:38 +12:00
Joseph Gardner 93347fd7ef merged master 2017-05-15 16:28:01 +12:00
Joseph Gardner 5d34b49316 Merge branch 'master' into submission
# Conflicts:
#	mock/src/main/java/seng302/Model/Race.java
#	mock/src/test/java/seng302/Model/RaceTest.java
#	visualiser/src/main/java/seng302/Model/ResizableRaceCanvas.java
2017-05-15 16:08:46 +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
Joseph Gardner 405f01c900 rearranged dependency order (hopefully this makes the ci download it properly) 2017-05-15 15:38:28 +12:00
hba56 12b6f49f2e boats now bounce on the boundry
#pair[hba56, cbt24, jjg64]
 #story[873]
2017-05-15 15:21:45 +12:00
Joseph Gardner a77a58dc66 trying new repo 2017-05-15 14:37:22 +12:00
Joseph Gardner f272c4ff47 trying new repo 2017-05-15 14:23:50 +12:00
Joseph Gardner 12bff9a1e8 trying new dependency 2017-05-15 14:20:25 +12:00
fjc40 572e54b076 Mock.Race:
An alternate tacking implementation during race simulate. Doesn't handle keeping the boats in-bounds, and sometimes has issues with landing directly on a mark.
Also seems to use wrong starting velocities (from the XML file).

#story[873]
2017-05-15 14:13:36 +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
Joseph Gardner 93c539b68b mock pom had the name visualiser 🤔 2017-05-15 11:42:42 +12:00
zwu18 0291726589 Added test for changing wind direction.
#story[882]
2017-05-15 02:10:44 +12:00
fjc40 f4d5df9df2 Mock.Polars:
Fixed a bug where calculateVMG was placing velocity into the VMG object, instead of speed.
Maybe fixed a bug when a bearingLowerBound which is greater than bearingUpperBound is provided.
Added another test case.

Mock.Constants:
Added knots to millimeters per second conversion factor.

Mock.Boat:
Added calculateDIstanceToNextMarker function, which returns the distance, in nautical miles, to the next mark.

Mock.Race:
Added wind direction as a race property.
Added wind speed as a race property.
The race status messages sent by Race now use Race's wind speed and direction.

#story[873]
2017-05-14 22:34:05 +12:00
fjc40 7f37dbbcb5 Mock.Race:
Usages of VMG.bearing now use the getBearing() function, as the member is now private.

#story[873]
2017-05-14 17:54:27 +12:00
fjc40 c2f487b06d Merge branch 'story31.2' of eng-git.canterbury.ac.nz:seng302-2017/team-7 into story31.2 2017-05-14 17:44:46 +12:00
fjc40 6f2c5d6c40 Mock.VMG:
made speed and bearing members private - had accidentally forget the visibility specifier.

Mock.Polars:
Added linear interpolation between speed values (e.g., if the wind speed is 15.9kn, it will interpolate between the 12kn and 16kn data). This allows for wind speeds less than 4kn (the lowest wind speed in the data file). It does not extrapolate anything for wind speeds larger than 30kn (the largest wind speed in the data file).
Also refactored some of the code into some interpolation functions.

#story[873]
2017-05-14 17:43:34 +12:00
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