Story 71 Tack/Gybe, Story 65 VMG Autopilot
# Implementation
- Added autopilot functionality to move boat towards a given heading with a single function call.
- Added functionality to move boat from one side of the wind to the other (tack/gybe) with a single button press.
- Added functionality to move boat to correct VMG from polars with single button press.
- Pressing a button a second time will disable the autopilot, as will pressing the Upwind/Downwind keys.
# Testing
- Fairly simple JUnit testing for a set of beginning headings and expected ends for the autopilot
- Unsure how cucumber testing would actually be better than simple junit testing in this case.
See merge request !55
Compound Mark class is now constructed with a list of marks.
A mid point is created on its construction for use in Geo Calculations
#story[1124] #pair[wmu16, hyi25]
boats now must pass through the correct way. This works for start in-race and finish gates
Refactored yacht algorithm code for better readability
Logging function added or seeing mark roundings occur
tags: #story[1124] #pair[hyi25, wmu16]
Mark rounding works for whole course (WITH BUGS)
Still some gate logic to work out.
Moved gate function to GeoUtil class
tags: #story[1124] #pair[hyi25, wmu16]
Removed RacePosition class. Instead marks are just grabbed from the mark order class when necessary.
No marks are stored as an attribute in the yacht class but the 'currentMarkSeqID' which is used to get current, and surrounding marks.
Works for all marks in between but not including starting and finishing gate as no angle can be made with them. Still to work out how to implement this
#story[1124]
Loading mark sequence from RaceXML
# Loading mark sequence from RaceXML
## Change Log
1. Added MarkOrder class
* Mark order is read from the generated RaceXML and stored
* Added .getNextMark() to get the next mark in the race
* Added .equals() and .hashCode() for Marks
* NEW: Added RacePosition class to hold players position in the race
* NEW: Fixed issue where the duplicates weren't stored in the mark order
## Testing
* Unit tests in models/MarkOrderTest.java
## Acceptance Criteria
* Use the mark sequence in the raceXML
* Met by change log item (1)
* Store relevant mark details with each participating boat (Last mark, next mark)
* Method in MarkOrder to get next mark, however the last mark and next mark will need to be stored by whoever implements the second task.
See merge request !52
- Re-engineered code to work with the new marks
- Fixed bug where race order wasn't correct (added RacePosition class to fix)
- Rewrote tests to work with new RacePosition class
Tags: #story[1124] (Task 1)
This attribute is calculated at each update of the boat as prompted by the game state regularly
Removed the lat and lng attribute from the Yacht class and replaced its usage with the GeoPoint object instead
Removed redundant test files and merged GeoUtility and testGeoUtil test classes into one
tags: #story[1124] #pair[hyi25, wmu16]
- Mark order is read from the generated RaceXML and stored
- Added .getNextMark() to get the next mark in the race
- Added .equals() and .hashCode() for Marks
Tags: #story[1124] (Task 1)