SignalK / specification

Signal K is a JSON-based format for storing and sharing marine data from different sources (e.g. nmea 0183, 2000, seatalk, etc)
Other
91 stars 69 forks source link

[WIP] Support Average AC Quantites and More Natural Single Phase Representation #455

Closed timmathews closed 6 years ago

timmathews commented 6 years ago

This PR comes out of the discussion at https://github.com/SignalK/n2k-signalk/issues/16.

Three-phase systems need a way to represent average values and it doesn't make much sense to nest single phase systems values all the way under electrical.ac.<device>.phases.single.*.

In split and poly-phase electrical systems, it is common to monitor the average voltage and current for all phases of the circuit. Typical monitoring equipment will provide these values as separate from the per-phase values.

This removes the single key under phases and adds aqQualities fields at the same level as phases under individual AC monitoring devices in the schema.

The following new paths are added:

electrical.ac.<device>.associatedBus
electrical.ac.<device>.lineNeutralVoltage
electrical.ac.<device>.lineLineVoltage
electrical.ac.<device>.current
electrical.ac.<device>.frequency
electrical.ac.<device>.reactivePower
electrical.ac.<device>.powerFactor
electrical.ac.<device>.powerFactorLagging
electrical.ac.<device>.realPower
electrical.ac.<device>.apparentPower

and these are removed:

electrical.ac.<device>.phase.single.associatedBus
electrical.ac.<device>.phase.single.lineNeutralVoltage
electrical.ac.<device>.phase.single.lineLineVoltage
electrical.ac.<device>.phase.single.current
electrical.ac.<device>.phase.single.frequency
electrical.ac.<device>.phase.single.reactivePower
electrical.ac.<device>.phase.single.powerFactor
electrical.ac.<device>.phase.single.powerFactorLagging
electrical.ac.<device>.phase.single.realPower
electrical.ac.<device>.phase.single.apparentPower
fabdrol commented 6 years ago

@timmathews how does this affect the multi-phase stuff? That's unchanged, if I read this correctly?

bkp7 commented 6 years ago

Unfortunately a lot of the sections in electrical including those changed here have non compliant meta properties (eg. warnUpper etc.) Since the changes proposed here are breaking but do not fix the meta issues I'm not sure it's worth committing and forcing a new version.

Also when the time comes we could do with some passing and failing tests for this.

fabdrol commented 6 years ago

@bkp7 agreed, good points. @timmathews I'll mark it WIP.

bkp7 commented 6 years ago

@timmathews @fabdrol I would suggest this be moved to the schema cleanup branch where I anticipate fixing the meta issues in electrical v soon. We can then add these changes too.

fabdrol commented 6 years ago

@timmathews I'm closing this for lack of activity. Please re-submit when you have more time!