Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graphical current on wind gauge #234

Open
petsicola opened this issue Nov 26, 2023 · 7 comments
Open

Add graphical current on wind gauge #234

petsicola opened this issue Nov 26, 2023 · 7 comments
Labels
enhancement An enhancement request widget Related to a Widget

Comments

@petsicola
Copy link

petsicola commented Nov 26, 2023

Duplicate of #82

@petsicola
Copy link
Author

  • Add graphical current on wind gauge

@godind
Copy link
Collaborator

godind commented Nov 26, 2023

Editing your issue as it's a partial duplicate of #82. Will rename and keep it open as it's a good idea! I suggest you comment on #82 if you want to be notified when released.

Thank you for the feedback! I hope you enjoy KIP!

@godind godind changed the title an enhancement Add graphical current on wind gauge Nov 26, 2023
@godind godind added enhancement An enhancement request widget Related to a Widget labels Nov 26, 2023
@petsicola
Copy link
Author

Perfect!

@ignamendi21
Copy link

Is this "water current Flag" implemented????😮

@godind
Copy link
Collaborator

godind commented Dec 20, 2023

Hi,

We've not started working on this yet. It's on our list. When it gets done this issue will be linked, closed and you will be notified.

KIP is built by volunteers on spare time. It will come, at some point!

@ignamendi21
Copy link

ignamendi21 commented Dec 20, 2023

Ah okey. I am also focus on this in my openplotter enviroment. Currently I have been thinking in creating a custom derived_data for signalk. In this derived data I am trying to get the current speed value and the current magnetic angle.
This is the derived i am going to test this week in my boat. I just post it here, in case , it can be helpful.

module.exports = function (app, plugin) {
return {
group: 'TIDE',
optionKey: 'Tide of the Water',
title: 'Tide of the Water',
derivedFrom: [
'navigation.headingMagnetic',
'navigation.speedThroughWater',
'navigation.speedOverGround',
'navigation.courseOverGround'
],
calculator: function (h, speed, sog, cog) {
// Convertir grados a radianes
var hRad = (h * Math.PI) / 180;
var cogRad = (cog * Math.PI) / 180;
var x = Math.cos(cogRad - hRad) * sog - speed;
var y = Math.sin(cogRad - hRad) * sog;
var angulo = hRad + Math.atan(x / y);
var corriente = Math.sqrt(x * x + y * y);
// Convertir el ángulo a grados si es necesario
angulo *= 180 / Math.PI;

  return [
    { path: 'navigation.derived.CORRIENTE_modulo', value: corriente },
    { path: 'navigation.derived.CORRIENTE_angulo', value: angulo }
  ];
}

};
};

@godind
Copy link
Collaborator

godind commented Dec 20, 2023

Awesome. Let me know when it's ready and I'll see my schedule to include the UI in the widget.

As a side note: check that you send null if your derived calc can't generate path data values for whatever reason, like missing path value dependencies. It's overlooked in many cases and I've seen empty strings, undefined or no output at all witch makes trouble shooting hard from KIP.

Have fun!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement request widget Related to a Widget
Projects
None yet
Development

No branches or pull requests

3 participants