Tacking and gybing merge request
Note: this allows the player to perform a common maneuver, changing tack, quickly. The goal is to change the boat's heading from one tack to another with a single keypress.
If the boat is heading upwind, the keypress will cause the boat to tack through head-to-wind, so that the wind shifts from one side of the boat to the other. The TWA (true wind angle) after tacking should be 360-TWA(before_tacking).
Similarly for gybing if the boat is initially heading downwind, except that the boat's heading always remains away from the wind.
Acceptance criteria:
- The wind shifts from one side of the boat to the other on keypress
- When heading upwind the boat should tack on keypress
- When heading downwind the boat should gybe on keypress
[Manual test](https://eng-git.canterbury.ac.nz/seng302-2017/team-7/wikis/manual-test:-tacking-and-gybing)
See merge request !24
-updated port and starboard boat checks
-added gps method to check if on correct side of a line
-updated pos check method to make boats round marks with the new tech
# Conflicts:
# racevisionGame/src/main/java/mock/app/ConnectionAcceptor.java
# racevisionGame/src/main/java/mock/app/Event.java
# racevisionGame/src/main/java/mock/model/commandFactory/TackGybeCommand.java
# racevisionGame/src/main/java/mock/model/commandFactory/VMGCommand.java
-updated port and starboard boat checks
-added gps method to check if on correct side of a line
-updated pos check method to make boats round marks with the new tech
# Conflicts:
# racevisionGame/src/main/java/mock/app/ConnectionAcceptor.java
# racevisionGame/src/main/java/mock/app/Event.java
# racevisionGame/src/main/java/mock/model/commandFactory/TackGybeCommand.java
# racevisionGame/src/main/java/mock/model/commandFactory/VMGCommand.java
Pom profile fix
The racevisionGame pom still had "profiles", which aren't needed with a single jar build, and the built jar didn't have a mainifest/main class.
See merge request !19
Issue 28 & 36 - encoders and decoders refactor
This resolves#28#36.
This was on the story_61 branch, but I figured it may be helpful to push this into master/other branches before then.
The main changes:
- Moved encoding functions from RaceVisionByteEncoder into their own encoder classes.
- Added a EncoderFactory and DecoderFactory, which return correct en/decoder based on MessageType.
- All encoders implement MessageEncoder interface, and all decoder implement MessageDecoder interface.
Extra changes:
- Added names to most threads that are created.
- Removed the nested while loop from MockOutput, and moved the XML stuff before the main loop (functionally it's the same).
See merge request !23
63. [C, M] I'd like to be able to make small adjustments to the heading of my boat, as Gemma, either upwind or downwind.
Note: each keypress should change the boat's heading by a small amount (3 degrees?) Pressing the 'upwind' key will turn the boat's head towards the wind by that small amount, while the 'downwind' key will do the opposite. Continuing to press the downwind key when the boat is already heading straight downwind, or upwind when heading directly upwind, achieves nothing.
Acceptance criteria:
- The player boat turns towards wind a small amount for each press of the 'upwind' key.
- The player boat turns away from the wind by a small amount for each press of the 'downwind' key.
- If the boat heading is directly into wind after a series of 'upwind' keypresses, the heading will continue to change in the same direction for one more keypress.
- Substitute 'downwind' for 'upwind' for the downwind case.
See merge request !21
Wind/Tack commands disable autoVMG. VMG command enables it.
Upwind command was turning until boat was at 0 degrees, instead of being aligned with wind direction, but that's fixed.
#story[1096]
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