mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 05:11:04 +00:00
fixed determination of average cosine where during the refactoring a getLatRad/getLngRad accidentally became getLatitude/getLongitude which is not radians but degrees
This commit is contained in:
1 parent
0ea7e2f106
commit
9e4635abd0
1 file changed
+2
-1
+2
-1
@@ -152,7 +152,8 @@ public class Swarm implements TimeListener {
|
||||
double boundsWidthpx = Math.abs(boundsNEpx.x - boundsSWpx.x);
|
||||
double boundsHeightpx = Math.abs(boundsSWpx.y - boundsNEpx.y);
|
||||
this.nParticles = (int)Math.round(Math.sqrt(boundsWidthpx * boundsHeightpx) * this.field.getParticleFactor() * this.parameters.swarmScale);
|
||||
cosineOfAverageLatitude = Math.cos((visibleBoundsOfField.getSouthWest().getLatitude()+visibleBoundsOfField.getNorthEast().getLatitude())/2);
|
||||
cosineOfAverageLatitude = Math.cos((visibleBoundsOfField.getSouthWest().getLatitude()/180.*Math.PI+
|
||||
visibleBoundsOfField.getNorthEast().getLatitude()/180.*Math.PI)/2);
|
||||
};
|
||||
|
||||
//native void log(String message) /*-{
|
||||
|
||||
Reference in new issue
Block a user