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]
- 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]
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.
- Created AC35RaceStatus class
- Deleted wait loop into a Thread.sleep()
- Deleted Entirely commented out class....
- Deleted duplicate draw that appeared again
#story[873]
-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]
- 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]
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]
- 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]
- 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
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]
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]
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]
- 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]