67bb7b81dc
Merge remote-tracking branch 'origin/story68' into story68
hba562017-08-13 19:10:31 +12:00
0d786f381b
fix for boats finishing the race #story[1101]
hba562017-08-13 19:10:16 +12:00
2acc36225e
Fix for placement of invis gates and checks that boats pass through these gates -see wiki on rounding #story[1101]
hba562017-08-13 18:11:53 +12:00
820898d92c
pushed work from school computer to do at home
Fan-Wu Yang2017-08-13 16:02:33 +12:00
f90648e4ce
Fixing a silly mistake where starboard side rounding checks for a port side rounding (Thank goodness for documenting manual tests) #story[1101]
hba562017-08-12 23:40:28 +12:00
7c6f0931ba
Transferring files from my laptop to desktop to work on, may be broken.
Fan-Wu Yang2017-08-12 23:18:54 +12:00
a05ffd023d
Fixing a silly mistake where starboard side rounding checks for a port side rounding (Thank goodness for documenting manual tests) #story[1101]
hba562017-08-12 22:55:25 +12:00
f386a4b989
added checks for gates and moved second rounding check to be in line with the next mark to move towards #story[1101]
hba562017-08-12 22:27:27 +12:00
fe91264aec
fix for the tests #story[1101]
hba562017-08-12 21:10:31 +12:00
89b0aa8b77
Implemented MessageRouter. Added ConnectionToServerCommandFactory, and JoinSuccessfulCommand, RaceParticipantsFullCOmmand, ServerFullCommand. Added IncomingHeartBeatCommandFactory, and IncomingHeartBeatCommand. Added ConnectionToServerState, which represents the client's connection state to server. Renamed VisualiserInput to VisualiserRaceController. Added ConnectionToServer, which tracks the client's connection to server. Added ConnectionToServerController, which accepts JoinAcceptance messages, turns them into commands, and passes them to ConnectionToServer. Added IncomingHeartBeatService, which tracks the heart beat status of the connection. Added IncomingHeartBeatController, which accepts HeartBeat messages, turns them into commands, and passes them to IncomingHeartBeatService. Refactored ServerConnection a bit. #story[1095]
fjc402017-08-12 19:58:47 +12:00
a31eb078a6
Created a splash screen for application.
zwu182017-08-12 16:27:12 +12:00
d70a711a3d
Merge branch 'master' into story68 -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
hba562017-08-12 03:26:28 +12:00
499a409d4f
Merge branch 'master' into story68 -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
hba562017-08-12 03:24:20 +12:00
848edfc6a4
Removed commented out code. Merged master in.
zwu182017-08-12 03:20:21 +12:00
c3ea62dfee
Merge branch 'master' into CommandFactory
zwu182017-08-12 03:18:24 +12:00
9c902dab46
Added javadoc to classes.
zwu182017-08-12 02:11:23 +12:00
6e5fb62880
Added REQUEST_RECEIVED and DECLINED to ConnnectionStateEnum. #story[1095]
fjc402017-08-12 01:05:45 +12:00
41b0a5d7f7
Merge branch 'story_61' of eng-git.canterbury.ac.nz:seng302-2017/team-7 into story_61
fjc402017-08-11 22:38:55 +12:00
b625b6ab05
XMLReader.readXMLFileToString no longer throws a Transformer exception.
fjc402017-08-11 22:38:39 +12:00
e4b72fdfeb
Update appearance on client arrow.
zwu182017-08-11 20:38:54 +12:00
7474de9816
Created foundation classes and interfaces for collision architecture. - Added Collider interface - Added Collision class - Added ColliderRegistry class
Connor Taylor-Brown2017-08-11 14:05:36 +12:00
39b5cc2edc
MockBoat has autoVMG disabled by default. 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]
fjc402017-08-10 12:44:42 +12:00
1a7152f54e
Boats stop when the sails are out. Merged dev. #story[1098]
Joseph Gardner2017-08-10 12:32:05 +12:00
4da3734804
added the ability to toggle the race guide line on and off #story[1087]
hba562017-08-10 12:17:19 +12:00
7cc39abe57
WIP. Probably need to cherry pick stuff out of here. Added ClientConnection and server-side handshake. Added MessageSerialiser and Deserialiser. #story[1095]
fjc402017-08-10 12:13:40 +12:00
1302769a50
Merge branch 'Development' into story_64_sails
Joseph Gardner2017-08-10 11:56:09 +12:00
e23f20753d
Merged master. Added commands for sails in and out. Added logic to stop boat from moving when sails are out. Testing if the boat stops with sails out is blocked until command factory is merged. #story[1098]
Joseph2017-08-10 09:42:59 +12:00
41d09f587e
Merge branch 'master' into story_64_sails
Joseph2017-08-10 08:58:43 +12:00
74f04a13f8
Merge remote-tracking branch 'origin/Development' into Development
hba562017-08-09 23:27:04 +12:00
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]
hba562017-08-09 23:25:42 +12:00
8ee4e84236
Merge remote-tracking branch 'remotes/origin/story63' into Development
Connor Taylor-Brown2017-08-07 15:02:13 +12:00
f6cdf66bfe
Sails can be toggled on the visualiser and the rotate sails button rotates the sail visually. #story[1098]
Joseph Gardner2017-08-07 15:01:16 +12:00
dad4fa57c6
Fixed WindCommand not updating downwind command when moving upwind.
Connor Taylor-Brown2017-08-07 14:51:32 +12:00
55798447ab
Cherry-picked CommandFactory connection between ControllerServer and RaceLogic.
Connor Taylor-Brown2017-08-07 14:25:30 +12:00
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.
fjc402017-08-07 13:42:50 +12:00
62752c142a
building blocks for drawing the race line around the course #story[1087]
hba562017-08-07 12:47:55 +12:00
747c31b948
Merge remote-tracking branch 'remotes/origin/story68' into Development
hba562017-08-07 12:29:56 +12:00
7c5670f8c2
Sails are displayed on first boat in a race. Optimised imports.
Jessica Syder2017-08-07 12:20:52 +12:00
950a801d16
rounding fix for the xml #story[1087]
hba562017-08-07 12:16:37 +12:00
0bf2c6106b
Boat updating speed after key press has been fixed. #fix #story[1094]
Joseph Gardner2017-08-07 12:03:34 +12:00
ddaa2623ca
Added tests for TackGybeCommand class.
zwu182017-08-07 02:56:24 +12:00
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]
Fan-Wu Yang2017-08-07 02:37:05 +12:00
2ce1c0786e
The course points can now be rotated, - Created markToGPSCoordinate Class - Added Rotation to marks #story[1092]
Fan-Wu Yang2017-08-07 02:01:41 +12:00
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]
fjc402017-08-06 22:25:43 +12:00
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]
fjc402017-08-06 21:38:12 +12:00
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]
fjc402017-08-06 20:31:21 +12:00
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]
fjc402017-08-06 19:36:21 +12:00
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]
fjc402017-08-06 18:51:13 +12:00
a388989827
Reworked TackGybeCommand. Current boat in race will now tack and gybe when control is pressed.
zwu182017-08-06 16:38:44 +12:00
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]
fjc402017-08-06 16:13:25 +12:00
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.
zwu182017-08-06 16:12:53 +12:00
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]
fjc402017-08-06 14:57:51 +12:00
dab0f2b402
Merge branch 'story63' into CommandFactory
zwu182017-08-06 14:54:21 +12:00
074e2e590b
VMGCommand now toggles autoVMG on and off. Linked up observer and observable so the current boat can now be controlled.
zwu182017-08-06 14:48:46 +12:00
a0f98eadaa
Added some documentation to BoatStatus. issue #35#36 #story[1095]
fjc402017-08-06 13:57:09 +12:00
3d417c3a40
Merge branch 'story63' into CommandFactory
zwu182017-08-06 13:48:41 +12:00
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]
fjc402017-08-06 13:38:27 +12:00
e464ee298e
javadoc fixes for some warnings.
fjc402017-08-06 01:08:47 +12:00
b486f99dbe
Added XMLMessageEncoder. Refactored XMLMessageDecoder to be consistent with other decoders - only needs to expose the XMLMessage. Refactored BoatLocationDecoder to be consistent with other decoders - only needs to expose the BoatLocation. Updated XMLMessageDecoderTest to use new encoder/decoder. Also tests all three message types. Removed XMLMessageEncoderTest as it was redundant. Updated BinaryMessageDecoderTest.xmlMessageTest() to use updated XMLMessage encoder/decoder. issue #35#36 #story[1095]
fjc402017-08-06 01:01:05 +12:00
8ef906472b
Renamed Heartbeat to HeartBeat. Added HeartBeatDecoder. Added HeartBeatEncoder. BinaryMessageDecoder now uses HeartBeatDecoder. MockOutput now logs a warning if a heartBeat cannot be encoded. Added HeartBeatDecoderTest. issue #35#36 #story[1095]
fjc402017-08-05 23:27:28 +12:00
c3ed30019c
Added BoatLocationEncoder. Updated BoatLocationDecoder test to use new encoder. Updated MockOutput to use new encoder. It logs a warning if encoding fails.
fjc402017-08-05 22:11:54 +12:00
31ce9fff94
Added BoatActonEncoder. Updated ControllerClient to use RaceVisionByteEncoder.encode(message). It also logs a warning if the encoding fails. Also removed pointless and out of place encode/decode of the action enum. Added a BoatActionDecoderTest which tests encoding/decoding a BoatAction Message. issue #35#36 #story[1095]
fjc402017-08-05 21:53:54 +12:00
16686678a7
Added an InvalidMessageTypeException - thrown whenever we encounter a MessageType that isn't recognised or isn't supported. Added EncoderFactory. This creates specific MessageEncoders. Supports JoinAcceptance and RequestToJoin. Added MessageEncoder interface. Added JoinAcceptanceEncoder. Added encode(AC35Data) function to RaceVisionByteEncoder. Added RequestToJonEncoder. Updated RequestToJoin and JoinAcceptance decode/encode tests to use the above.
fjc402017-08-05 21:31:47 +12:00
7ea5b31fa1
RequestToJoinEnum contains an int instead of a byte. Added requestToJoin and joinAcceptance encoding functions to RaceVisionByteEncoder. Implemented JoinAcceptanceDecoder. Implemented RequestToJoinDecoder. Added tests for encoding/decoding RequestToJoin and JoinAcceptance messages.
fjc402017-08-05 20:42:25 +12:00