Commit Graph

782 Commits

Author SHA1 Message Date
Haoming Yin c42942430f Fixed bug that grid panel pushes annotation panel up out of window.
#story[928]
2017-05-24 14:57:06 +12:00
Kusal Ekanayake 7abb36c362 The axis is labeled correctly and is scaled accordingly.
The sparkline should work from the start of a race now also. We now have the boat in first place listed at the top along with the axis labeling and marking matching the position (eg, 1st at top. 6th at bottom). Boats picked up on the visualiser park way through the race are able to added and drawn onto the sparkline.

#story[952]
2017-05-24 14:42:41 +12:00
Michael Rausch a1e8d29b9c Merge remote-tracking branch 'origin/develop' into develop 2017-05-24 14:36:04 +12:00
Zhi You Tan c449da2916 [WIP] created finishScreenView.fxml, finishScreenViewController.java 2017-05-24 14:24:14 +12:00
Haoming Yin 3fd0c0a2dd Merge remote-tracking branch 'origin/37-display_map_on_canvas' into 37-display_map_on_canvas
# Conflicts:
#	src/main/java/seng302/App.java
2017-05-24 13:55:42 +12:00
Haoming Yin 397f7d003a Fixed the size of race canvas and race view so that canvas won't be stretched
- canvas view is set to 1280 * 960

#story[928]
2017-05-24 13:54:05 +12:00
Haoming Yin f85d3bf5fe Plugged Canvas map to canvas view controller to display map
- rebase on the latest develop status
- optimised the scaling factor the map to fit the canvas view
- a new image containing map image is displayed under race canvas

#story[928]
2017-05-24 13:52:49 +12:00
Calum d22d758757 Fix issues caused by not updating the time since last mark value frequently. BoatAnnotations now has an update() function that must be called somewhat regularly. 2017-05-24 03:23:02 +12:00
Calum acbde5aad8 Moved boat annotations into their own class. Implemented observer pattern.
Observer pattern appears to have caused issues with updating Text objects.
Made annotations look nicer. Kinda.

#refactor
2017-05-24 03:09:11 +12:00
Haoming Yin 8f93956ff1 Added methods to calculate optimal map size given a geo boundary.
- From zoom level 20 to 1, once find a size that contains the whole boundary, then the size will be used to retrieve map image from google

#story[928]
2017-05-24 00:49:03 +12:00
Haoming Yin 4fe4ac1079 Added get map size (width and height) method in canvasMap with given boundary
#story[928]
2017-05-24 00:49:03 +12:00
Haoming Yin 8a2f0a9f45 Added unit tests for Mercator projection class.
- changed its methods to static
- add some documentation for its methods

#story[928]
2017-05-24 00:49:03 +12:00
Haoming Yin 5cc865f0af Created Mercator projection to convert between Geo location and planar projection point.
- MapGeo and MapPoint encapsulate geo location and planar projection point into classes.

#story[928]
2017-05-24 00:49:03 +12:00
Haoming Yin 189ba93e64 Created a canvas map class to fetch map image from google
- also added Bound class to encapsulate map boundary.
- created TestMapView and its controller just for testing.

#story[928]
2017-05-24 00:49:03 +12:00
William Muir 89464e033e Initial work on calculating when a gate is upwind or downwind
Need to know if a gate is upwind or downwind to use the appropriate polar table

Currently calculate the angle between the next mark and the vector of the current mark to the wind, if this angle is less than 90 degrees than the next mark should be down wind

Pretty poor implementation currently, just prototype

Doesn't appear to be working as intended currently. Just a prototype for how we could implement further

tags: #story[956]
2017-05-24 00:08:55 +12:00
Zhi You Tan 6d7c36e31f Updated code to check if boat is in the race before displaying in the leaderboard
#story[923]
2017-05-23 20:00:23 +12:00
Michael Rausch ca8ea03870 Added method in mark group to draw lay lines, also added next mark to Yacht class.
#story[956]
2017-05-23 18:54:42 +12:00
Kusal Ekanayake 3f57adb9cf Merge branch 'develop' into Story34_Sparklines
# Conflicts:
#	src/main/java/seng302/App.java
#	src/main/java/seng302/controllers/CanvasController.java
#	src/main/java/seng302/controllers/RaceViewController.java
#	src/main/resources/views/RaceView.fxml
2017-05-23 14:06:24 +12:00
Zhi You Tan 2686dac62e Fixed Yacht position initialise. TO-DO: check if the boat is participating before showing up on leaderboard. 2017-05-23 11:53:23 +12:00
Zhi You Tan ffd40fef6d Merge remote-tracking branch 'origin/develop' into issue#5_fix_pre-race_boats_on_leaderboard
# Conflicts:
#	src/main/java/seng302/controllers/RaceController.java
#	src/main/java/seng302/controllers/StartScreenController.java
2017-05-23 11:31:18 +12:00
William Muir e1b8e19966 Initial work on finding next marks for boats as from mark rounding messages
Marks were very difficult to extend, need large refactor

Marks now have a compound ID as well as their sourceID. They need this compound ID to be identifiable by the
mark rounding messages.

tags: #story[956]  #pair[wmu16, mra106]
2017-05-22 18:54:07 +12:00
William Muir dec742cf54 Merge remote-tracking branch 'origin/develop' into 38b_LayLines 2017-05-22 18:15:58 +12:00
Zhi You Tan 6f1b0b06c3 Fixed est time to next mark and time from last mark annotation update after commit e0750f53 in BoatGroup.java
#story[924] #story[927]
2017-05-22 16:17:52 +12:00
Michael Rausch 408d70c420 Merge branch 'issue#10_unifying_marks' into 'develop'
Issue#10 unifying marks

Marks work properly, reading boat position packets and moving.

First and last marks are colored green and red respectively.

See merge request !35
2017-05-22 16:07:50 +12:00
Alistair McIntyre e51c966969 Made sure only boats in participant list are replaced. Also removed mark coloring as it wasn't as accurate as was necessary.
#story[923]
2017-05-22 16:05:24 +12:00
William Muir 08eacacfd4 Polar table is now parsed form the stored file in resources on startup in main
story[956]
2017-05-22 15:45:16 +12:00
William Muir 87150b3c72 Merge remote-tracking branch 'origin/develop' into 38b_LayLines 2017-05-22 15:40:11 +12:00
William Muir e385ac5c09 Initial work on static parser class for polar files
story[956]
2017-05-22 15:39:53 +12:00
Alistair McIntyre c30629542b Merged develop into issue10 branch. Fixed merge issues and completed manual testing before merge request.
#story[923]
2017-05-22 15:27:23 +12:00
Alistair McIntyre 3f9fa24c69 Merge branch 'develop' into issue#10_unifying_marks
# Conflicts:
#	src/main/java/seng302/App.java
#	src/main/java/seng302/controllers/CanvasController.java
2017-05-22 15:13:48 +12:00
Alistair McIntyre 78573fa837 Made start/finish lines a different color.
#story[923]
2017-05-22 15:10:05 +12:00
Michael Rausch d4837cacda Merge branch 'Issue#4_boat_movement' into 'develop'
Issue#4 boat movement

This merge will break several things:
1 boat wakes and trails will be the most effective and will have to be manually re-implemented in the re-engineered boatgroup
2 boat annotations in Raceviewcontroller have been effected
3 boat selection (on click) in Raceviewcontroller has been effected

See merge request !34
2017-05-22 15:03:11 +12:00
Peter Galloway 0367805f0f fixed bug from merge where est time to next mark was null on some boats #story[923] 2017-05-22 15:01:04 +12:00
Peter Galloway e0750f5341 Merge branch 'develop' into Issue#4_boat_movement
# Conflicts:
#	src/main/java/seng302/controllers/CanvasController.java
#	src/main/java/seng302/models/BoatGroup.java
#	src/main/java/seng302/models/Race.java
2017-05-22 14:56:08 +12:00
Calum 80528c9c42 fixed bug in canvas controller
#bug
2017-05-22 14:30:31 +12:00
Michael Rausch e26f2af93d Merge branch 'develop' of https://eng-git.canterbury.ac.nz/seng302-2017/team-13 into develop 2017-05-22 13:30:48 +12:00
alistairjmcintyre be633c0e60 Marks display correctly on the canvas, no double ups or anything like that left.
#[issue10]
2017-05-22 13:22:55 +12:00
cir27 97f1ccb6c1 Fixed a bug where an error was caused when attempting to flip the race around the prime meridian.
All x values are now flipped horizontally if the difference between the smallest lon, e.g. -179.5 and the largest e.g. 179.5 is greater than 180.

#story[923] #bug
2017-05-22 05:41:57 +12:00
cir27 68a243725b Fixed a bug where an error was caused when attempting to flip the race around the prime meridian.
All x values are now flipped horizontally if the difference between the smallest lon, e.g. -179.5 and the largest e.g. 179.5 is greater than 180.

#story[923] #bug
2017-05-22 05:39:36 +12:00
Kusal Ekanayake 8f81060a18 Managed to make the sparklines coordinate with their colour.
However the symbols had to be removed. The sparkline can also be intialised at any time now but this might need to be tested further to ensure that it works.

#story[952]
2017-05-21 19:49:11 +12:00
Kusal Ekanayake 07c76f12e1 Merge branch 'develop' into Story34_Sparklines 2017-05-21 17:37:41 +12:00
cir27 c6ab96a86f Merge branch 'develop' of https://eng-git.canterbury.ac.nz/seng302-2017/team-13 into develop 2017-05-21 16:05:37 +12:00
Kusal Ekanayake 059c0de1fa Quickfix for null pointer in boatObject
#pair[ptg19,kre39]
2017-05-21 15:58:17 +12:00
Kusal Ekanayake 8e147bd1bd Making the boat sparkline initialise after the race screen is shown.
#story[952]
2017-05-21 14:56:05 +12:00
Michael Rausch 4d3cfe71f7 Merge branch 'develop' into Issue#4_boat_movement
Conflicts:
	src/main/java/seng302/models/BoatGroup.java
	src/main/java/seng302/models/Wake.java
2017-05-19 21:40:16 +12:00
Michael Rausch 5adb7c3762 Fixed failing ColorsTest
#story[923]
2017-05-19 20:57:40 +12:00
Michael Rausch 937b309b07 Added boat trails to the boat group, fixed annotations
- Set colours for the annotations
- Added boat trails back into the boat group
- Re-added time until next mark and time since last mark rounding

#story[923]
2017-05-19 20:55:02 +12:00
Kusal Ekanayake 48d58ea660 Sparklines now update when a boat passes a mark.
There are issue of initialising the sparkline before the race starts and when the race is being viewed when it starts. It works great though when you join a race halfway.
#story[952]
2017-05-19 18:08:26 +12:00
Michael Rausch aaf2e6a3f0 Added boat wakes back to the visualiser
#story[923]
2017-05-19 16:57:29 +12:00
Kusal Ekanayake 422dcd4501 Sparklines now update with boat position change.
Need to make it work for any amount of boats in the race and to work when the race first starts as it currently only shows one boat.
#story[952]
2017-05-19 15:15:05 +12:00