- Removed some default templates (eg: created by X)
- Wrote JavaDoc for classes that had none
- Made JavaDoc more clear for classes
- Linked JavaDoc to other classes
- Minor spelling errors fixed
- BoatInRace and BoatInRaceTest commented out (to be removed)
#story[1003]
- Removed references to Constants class from other classes and tests
- ArrowController, Constants, Regatta removed
- Removed imports from various classes no longer used
#story[1003]
- Wind arrow for the bermuda race is bound between 215 and 235 degrees
- annotations will not correctly highlight what they are showing
#story[877] #story[882]
- Wind arrow for the bermuda race is bound between 215 and 235 degrees
- annotations will not correctly highlight what they are showing
#story[877] story[882]
# Conflicts:
# mock/src/main/java/seng302/Model/Race.java
Resolved.
Also reverted the change to the prestart and preparatory time, as they had gotten flipped around (prestart is > 3min to start, preparatory is < 1 min to start).
- Important, Partial, Hidden, Visible are all radiobuttons
- Fixed bug where the Visualiser would end the race before the last boat had finished
- Refactored the visualiser and the mock to use the race finished status message
- Added and Changed many Javadocs
#story[877]
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.
- 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
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]
Network:
Moved the Network message classes from the Utils package to the Messages package.
Renamed BoatLocationMessage to BoatLocation and BoatStatusMessage to BoatStatus to be consistent with other message classes.
Renamed the BoatStatus enumeration to BoatStatusEnum as it conflicted with BoatStatus (the message).
Moved the BoatStatusEnum and MessageType enumerations from the Utils package to the Messages/Enums package.
Changed the BoatStatusEnum and MessageType enumerations to use map look ups in the enum.fromByte(b) method - this means that there's less copy and pasted values, and the fromByte function doesn't need to be modified if new enumerations are added.
Added a sequenceNumber member to the Heartbeat class.
Added an InvalidMessageException in the package Networking/Exceptions. This is thrown when a message is read, but it is invalid in some way.
Refactored/tidied up the Networking/BinaryMessageEncoder and Decoder classes. The decoder throws InvalidMessageExceptions instead of returning null.
Visualiser:
VisualiserInput now wraps a DataInputStream around the socket. This provides the stream.readFully(buffer) function, which is a blocking read, removing the need for busy wait loops. Replaced the getBytes() function with getNextMessage() and getNextMessageBytes(). These read the next message from the socket, and return it as a message object and a byte array, respectively.
Changed the current heartbeat timeout to 10 seconds. Added some work-in-progress code to attempt to reconnect when connection is lost. It currently doesn't work. I think Fan-Wu was doing a proper implementation, however.
VisualiserInput also has a queue of received events. Currently not really used, but could be useful in the future. Events get added as they are read.
Changed VisualiserInputs main loop to use instanceOf instead of switch+case. Feedback wanted - are there any downsides to using this instanceOf method?
#story[778,782]
Made a few quick fixes (to be tidied a bit later) to Mock.Race class. It now has this.startTime, instead of the AnimationTimers having their own starTime value. RaceStatus messages are now sent properly (still need a refactor though), so they actually send the race star time - this means that the visualizer using the mock data source displays the correct time instead of (midnight, jan 1, 1970).
Removed one of the constructors from RaceStatus - it allowed for constructing and sending essentially invalid RaceStatus messages, and simply wasn't needed.
Added a temporary title ("RaceVision - Team 7") to the visualiser - may be worth changing when we decide on a team name.
Fixed a bug with the order of operations in visualiser.StartController.countdownTimer(). Calling begin race before hiding panes caused them to never be hidden.
Mock.Event. Changed the scaleFactor to 5x for the time being - to easier testing of things like pre-race timers, countdowns, etc...
#story[778,782]
-This was necessary because one boat (the last one to be processed) would lag and jump, as sometimes there was not enough time for all location messages to be sent before the next lot were added.
- The solution was to add a boatOffset, which means while the boats are still processed with3 coming after 2 coming after 1 etc, the loop starts with boat 0, then the next run through it wiull start with boat 1 and so on.
-This eliminated the lag (or at least spread it evenly across all the boats)
#story[778]
- Fixed GPS conversion number being wrong (extra 1)
- Fixed Boats displaying as the boat = null (cough Joseph) was stopping it from working as well as track is broken.
#story[782]
- Made StreamedCourse extend Observable
- Initialised StartController after data pulled from network
- Moved VisualiserInput to visualiser module
- Deleted Networking subpackage from visualiser module
#story[782]