Commit Graph
1468 Commits
Author SHA1 Message Date
hba56 74f04a13f8 Merge remote-tracking branch 'origin/Development' into Development 2017-08-09 23:27:04 +12:00
hba56 e53d72f24b compound marks now can give the mark they have that needs to be rounded this is used to draw the line around the correct mark
#story[1101]
2017-08-09 23:25:42 +12:00
Connor Taylor-Brown da9915174c Merge branch 'master' into Development 2017-08-09 23:05:07 +12:00
Connor Taylor-Brown 3cf0cf2ee0 Merge branch 'master' into story63 2017-08-09 22:56:55 +12:00
Connor Taylor-Brown 638413da1a Merge remote-tracking branch 'remotes/origin/story63' into Development 2017-08-09 22:46:26 +12:00
Jessica Syder ce973fecfe Sails are displayed correctly for all wind and active boat directions.
- Figured out the different situations that can occur using accurate points of sail
- Mathed out the rotation angle for each situation
- Manual testing carried out by running simulations
- Manual testing carried out using pen and paper

#story[1098]
2017-08-09 21:48:17 +12:00
zwu18 03713d3699 Added checkPosition into MockRace which was removed. Boat now updates legs again.
#Story[1097]
2017-08-09 16:37:29 +12:00
Connor Taylor-Brown e021dd328d Changed CompositeCommand stack to queue
#story[1096]
2017-08-08 23:56:59 +12:00
hba56 e2605c3c7c Merge remote-tracking branch 'remotes/origin/story68' into Development 2017-08-08 23:29:57 +12:00
hba56 bb75806781 Cleaned up line to be in a shippable shape
#story[1101]
2017-08-08 23:23:46 +12:00
fjc40 3ec87582d3 Merge remote-tracking branch 'origin/master' into story_61 2017-08-08 20:58:53 +12:00
David Wu 568458aca4 Merge branch 'story48' into 'master'
Story48 & issue 26

This is the merge request for story 48 (http://agilefant.cosc.canterbury.ac.nz:8080/agilefant302/editProject.action?projectId=61#fi.hut.soberit.agilefant.model.Story_1093) ( #29 ) and issue #26.

A.C:
- Wind speed and direction must follow that provided by the Race Status message or messages.
- Arrow aligned with the current wind direction shown on the live race view.
- Arrow orientation adjusts within 1s when changes in the wind direction are received.
- Arrow length is proportional to wind speed.
- Wind speed in m/s (or as defined in story 17) should be easily estimated from the wind arrow.

The wind speed (TWS) should be shown as both a number and in the length of the wind arrow. The arrow length should be always long enough for TWA (wind direction) to be clear; the length should never drop below some minimum value.  

This includes issue #26 as story 48 was slightly dependent on that.

Both #29 and issue #26 should be closed once this has been merged.

See merge request !20
2017-08-08 20:50:41 +12:00
hba56 22722286ef all paths now join up
#story[1087]
2017-08-08 14:47:11 +12:00
zwu18 53c9192130 Merge branch 'CommandFactory' into Development
# Conflicts:
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
2017-08-08 02:52:29 +12:00
hba56 ef3f468b19 arrows displayed for each leg
#story[1101]
2017-08-08 00:02:07 +12:00
Jessica Syder ace1252c1d Fixed sails so they behave correctly
- Changed sail angle calculations back
- Luffing currently displays no sail as a temporary representation of sails in

#story[1098]
2017-08-07 17:40:21 +12:00
cbt24 2920b6cf23 Removed build-breaking code from MockRace
#story[1096]
2017-08-07 16:47:25 +12:00
Fan-Wu Yang a460df3e4d Fixed Javadocs that were causing the build to fail. #story[1096] 2017-08-07 16:30:06 +12:00
Fan-Wu Yang 0f9b191ccb Added doc strings to RaceXML Creator #story[1096] 2017-08-07 16:13:15 +12:00
Connor Taylor-Brown 8ee4e84236 Merge remote-tracking branch 'remotes/origin/story63' into Development
# Conflicts:
#	racevisionGame/src/main/java/mock/model/MockBoat.java
#	racevisionGame/src/main/java/mock/model/MockRace.java
2017-08-07 15:02:13 +12:00
Joseph Gardner f6cdf66bfe Sails can be toggled on the visualiser and the rotate sails button rotates the sail visually. #story[1098] 2017-08-07 15:01:16 +12:00
Connor Taylor-Brown dad4fa57c6 Fixed WindCommand not updating downwind command when moving upwind.
#story[1096]
2017-08-07 14:51:32 +12:00
Connor Taylor-Brown 55798447ab Cherry-picked CommandFactory connection between ControllerServer and RaceLogic.
#story[1096]
2017-08-07 14:25:30 +12:00
Connor Taylor-Brown e76de1cbf9 Added test for WindCommand
#story[1096]
2017-08-07 14:13:14 +12:00
fjc40 634d78ab70 Added names to threads created.
MockOutput had a nested while loop, but it wasn't needed. Also tidied some of the error handling in MockOutput.

#story[1095]
2017-08-07 13:42:50 +12:00
hba56 62752c142a building blocks for drawing the race line around the course
#story[1087]
2017-08-07 12:47:55 +12:00
hba56 747c31b948 Merge remote-tracking branch 'remotes/origin/story68' into Development 2017-08-07 12:29:56 +12:00
hba56 4195d41814 removed outdated comments
#story[1087]
2017-08-07 12:28:44 +12:00
Jessica Syder 7c5670f8c2 Sails are displayed on first boat in a race. Optimised imports.
- Implemented drawSails method
- Sail position is displayed and updated using a boat's heading
- Sails conform to 'Points of sail'
- Javadoc'd new method and tidied up existing
- Sped up track point frequency (visualiserBoat class)
- Optimised imports (any other classes changed)
- A lot of canvas drawing and sail rotating issues were discovered and eventually overcome along the way. Using a sail image to draw and rotate on the existing canvas rather than a JavaFX shape on a new canvas was the final decision.

#story[1098]
2017-08-07 12:20:52 +12:00
hba56 950a801d16 rounding fix for the xml
#story[1087]
2017-08-07 12:16:37 +12:00
Joseph Gardner 0bf2c6106b Boat updating speed after key press has been fixed. #fix #story[1094] 2017-08-07 12:03:34 +12:00
zwu18 ddaa2623ca Added tests for TackGybeCommand class.
#Story[1097]
2017-08-07 02:56:24 +12:00
Fan-Wu Yang fef35d0b00 The race is rotated with it's initial rotation in mind
- RaceXMLCreator now checks the bearing of the race with getLineAngle()
- Split some methods into functions so that it is more readable
#story[1096]
2017-08-07 02:37:05 +12:00
Fan-Wu Yang 2ce1c0786e The course points can now be rotated,
- Created markToGPSCoordinate Class
- Added Rotation to marks
#story[1092]
2017-08-07 02:01:41 +12:00
fjc40 134586f407 The message encoders and decoders now catch exceptions, and throw InvalidMessageException.
Removed the big switch statement from BinaryMessageDecoder - it now uses the decoder factory instead.
issue #35 #36
#story[1095]
2017-08-06 22:25:43 +12:00
fjc40 9c64b678e3 Added MarkRoundingEncoder.
Refactored MarkRoundingDecoder - it now implements MessageDecoder.
Tidied up MarkRounding - it is now documented and has getters. Also Created MarkRoundingBoatStatusEnum, MarkRoundingIDEnum, MarkRoundingSideEnum, MarkRoundingTypeEnum.
Added MarkRoundingDecoderTest.
issue #35 #36
#story[1095]
2017-08-06 21:38:12 +12:00
fjc40 da800e659a Added AverageWindEncoder.
Refactored AverageWindDecoder - it now implements MessageDecoder.
Refactored AverageWind - it now uses milliseconds and knots, instead of packed MMperSec and tenths of a second. It also exposes its attributes now.
Added (un)packAverageWindPeriod to AC35UnitConverter.
Added AverageWindDecoderTest.
issue #35 #36
#story[1095]
2017-08-06 20:31:21 +12:00
fjc40 ce63f58429 Added RaceStartStatusEncoder.
Added RaceStartTypeEnum.
Refactored RaceStartStatusDecoder to implement the MessageDecoder interface.
Documented RaceStartStatus, and it actually exposes its properties now.
Updated RaceStartStatusDecoderTest.
issue #35 #36
#story[1095]
2017-08-06 19:36:21 +12:00
fjc40 e99ad00294 Javadoc fixes. 2017-08-06 18:54:45 +12:00
fjc40 750ea5c141 Added MessageDecoder interface. All decoder implement this.
Added DecoderFactory. This creates an appropriate decoder based on a MessageType.
BoatActionDecoder implements MessageDecoder.
BoatLocationDecoder implements MessageDecoder.
HeartBeatDecoder implements MessageDecoder.
JoinAcceptance implements MessageDecoder.
RaceStatusDecoder implements MessageDecoder.
RequestToJoinDecoder implements MessageDecoder.
XMLMessageDecoder implements MessageDecoder.
Refactored CourseWind decoder/encoder. CourseWind decoder/encoder is for an individual CourseWind.
CourseWinds decoder/encoder is for the combined message from the API.
Documented BoatAction, and it now contains a BoatActionEnum instead of a byte.
Refactored CourseWind and CourseWinds classes. They now expose correct units, instead of packed units.
Added CourseWindDecoderTest, and updated CourseWindsDecoderTest.
issue #35 #36
#story[1095]
2017-08-06 18:51:13 +12:00
zwu18 a388989827 Reworked TackGybeCommand. Current boat in race will now tack and gybe when control is pressed.
#Story[1097]
2017-08-06 16:38:44 +12:00
fjc40 1fbdd09d70 Refactored BoatLocation message, encoders, decoders. It now exposes datatypes that we actually use in the program (double knots, bearings, etc..), instead of the bits-on-the-wire packed units (like int mmPerSec). Also documented it, and updated test.
issue #35 #36
#story[1095]
2017-08-06 16:13:25 +12:00
zwu18 18f14c7542 VMGCommand now toggles autoVMG on and off. Linked up observer and observable so the current boat can now be controlled. Fixed autoVMG not working.
#Story[1097]
2017-08-06 16:12:53 +12:00
fjc40 ff262a6227 Added Knots <-> MMperSec conversions to AC35UnitConverter.
Removed redundant/unused conversions.
Documented all of the conversions, and renamed them to pack/unpackX, to match the API spec.
Updated/added some tests in AC35UnitConverterTest.
RaceStatus now contains a Bearing instead of a packed int bearing.
RaceStatus now contains wind speed in knots, instead of MMperSec packed.
This means that only RaceStatus decoder/encoder need to care about the bits-over-wire packed values.
issue #35 #36
#story[1095]
2017-08-06 14:57:51 +12:00
zwu18 dab0f2b402 Merge branch 'story63' into CommandFactory
# Conflicts:
#	racevisionGame/src/main/java/mock/model/commandFactory/TackGybeCommand.java
2017-08-06 14:54:21 +12:00
zwu18 074e2e590b VMGCommand now toggles autoVMG on and off. Linked up observer and observable so the current boat can now be controlled.
#Story[1097]
2017-08-06 14:48:46 +12:00
fjc40 a0f98eadaa Added some documentation to BoatStatus.
issue #35 #36
#story[1095]
2017-08-06 13:57:09 +12:00
zwu18 3d417c3a40 Merge branch 'story63' into CommandFactory
# Conflicts:
#	racevisionGame/src/main/java/mock/model/MockRace.java
#	racevisionGame/src/main/java/mock/model/RaceLogic.java
#	racevisionGame/src/main/java/mock/model/RaceState.java
#	racevisionGame/src/main/java/mock/model/commandFactory/CommandFactory.java
#	racevisionGame/src/main/java/mock/model/commandFactory/VMGCommand.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
2017-08-06 13:48:41 +12:00
fjc40 b1922fc3fc Added RaceStatusEncoder.
Refactored RaceStatusDecoder to be more consistent with other decoders - it now has a getMessage() function.
Added BoatStatus encoder and decoder - the RaceStatus encoder and decoder uses this for BoatStatuses. The BoatStatus encoder doesn't implement the MessageEncoder interface as BoatStatus is not a proper message type (doesn't inherit from AC35Data).
Added remaining cases to EncoderFactory, but commented them out.
BoatStatus now uses BoatStatusEnum instead of a byte.
Added some comments to RaceStatus, and it uses enums instead of bytes.
MockOutput logs a warning if a RaceStatus cannot be encoded.
Added a BoatStatusDecoderTest.
Updated RaceStatusDecoder to use new encoders/decoders.
issue #35 #36
#story[1095]
2017-08-06 13:38:27 +12:00
fjc40 e464ee298e javadoc fixes for some warnings. 2017-08-06 01:08:47 +12:00