mxtommy / Kip

SignalK Instrument package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Something weird with pressure units in KIP

ESchlotfeldt opened this issue · comments

I have SK data source emitting an oil pressure reading of 4500 hPa, while the dial in KIP is displaying 45 hPa.

Any thoughts?

Thanks!

Hi,
I looked at the code quickly and the Pa to hPa conversion looks fine at first glance.

Can you share a screenshot of the SK data path and value from the SK Data Browser and also from the KIP widget output and Widget Options please?

I'll take a look.

Hi - thanks for quick response. below are the files requested. The issue might be that SK uses hPa as its default pressure unit, while KIP uses Pa as the default, ie KIP thinks it receiving Pa data and then converts it into hPa - which is out by a factor of 100 as observed in the screenshots?

KIP 1
KIP 2
KIP 3

I don't see the source emitting this value in your screenshot. The path is different than what's in the specs.
image

I think the path should be propulsion/1/oilPressure where the number is the engine instance for when you have more than one engine. It's not "really" a problem but not align with the specs and may create issues down the road like if/when we have an engine widget that auto listed all engine data. It would not pick up the oilPressure or oilTemperature because it would look for propulsion/<all numbers>/oilPressure, etc.

The Pa to hPa issue is because SK's base units type for all pressure values should be Pa, unless I am mistaken. You can ask in the specification channel to validate.

KIP uses base Units as the starting point for all format conversions so it's expecting the base to be in Pa. The emitting source plugin needs to be changed to send values in Pa and ideally also tag path meta units to Pa (else it can be manually set in Meta editor). That will fix it.

Until the source is corrected, in KIP, you can set the format to as-is value. This will pass it without format modification but, the gauge's displayed format label will be As-Is. Not best looking but it will work.

Ok thanks - thats very helpful!

Is it your own plugin that is generating the data?

Can I close this issue?

Always a pleasure to help. I'll close the issue.

Note: The base Units format is defined by Signal K. Not by KIP. See this link for path specifications: https://signalk.org/specification/1.7.0/doc/vesselsBranch.html