Comments (4)
Nothing - 5.22 knots is 2.7 meters per second. The real fix naturally would be to have configurable units #10.
A quick fix is to change the displayed value on the fly like so
diff --git a/lib/sailgauge.js b/lib/sailgauge.js
index 6da134c..b6017be 100644
--- a/lib/sailgauge.js
+++ b/lib/sailgauge.js
@@ -75,7 +75,7 @@ SailGauge.prototype = {
},
updateSpeedOverGround: function(speed) {
if (speed != null) {
- d3.select('#speed').text(speed.toFixed(1));
+ d3.select('#speed').text((speed / 0.51444444444).toFixed(1));
}
},
updateApparentWindAngle: function (angle) {
In addition to this actually change you need to run first npm install
in the Sailgauge directory and then npm run build
to make the change take effect. I haven't used openplotter myself, so I can't help you find the file easily.
Let me know if you get this working.
Help with implementing the configurable units would be appreciated, this is not very high on my personal backlog right now.
Btw the wind speeds are in meters per second as well.
from sailgauge.
Thanks tkurki. That explains it! What fooled me was the sailgauge project information specifically states that the SOG is in Knots whereas the wind speeds and depth are in SI.
from sailgauge.
Oops, thanks for pointing that out. Fixed now.
from sailgauge.
Thanks for the patch. I just directly edited the sailgauge.js in the .../dist/ directory with the replacement line you suggested and that works fine. I'll probably do the same for the wind speed as well eventually.
from sailgauge.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sailgauge.