OpenMarine

Full Version: SK to N2K plugin, engine parameter errors?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm generating SK data using SensESP, but some of the data isn't appearing on the instruments.... tackling it one by one. (the only thing that's making it through so far is RPM and engine hrs).

Specifically, coolant temp... In SK, I have:  propulsion.mainEngine.coolantTemperature  But my gauges don't show coolant Temp. x.coolantTemperature matches Appendix A (https://signalk.org/specification/1.5.0/...ranch.html) and the temp is sent in Kelvins....

propulsion.mainEngine.coolantTemperature 

321.0571
K
12/15 16:11:30
ws.ee8cef9e-eb61-baf4-f097-ff0953dbbb64.XX 


I took a quick look at the SK to N2K code (conversions/engineParameters.js)

I noticed:
  const engParKeys = [
      'oilPressure',
      'oilTemperature',
      'temperature',
      'alternatorVoltage',
      'fuel.rate',
      'runTime',
      'coolantPressure',
      'fuel.pressure',
      'engineLoad',
      'engineTorque'
  ]


          keys: engParKeys.map(key => `propulsion.${engine.signalkId}.${key}`),
          timeouts: engParKeys.map(key => DEFAULT_TIMEOUT),
          callback: (oilPres, oilTemp, temp, altVolt, fuelRate, runTime, coolPres, fuelPres, engLoad, engTorque) => {
            return [{
                pgn: 127489,
                "Engine Instance": engine.instanceId,
                "Instance": engine.instanceId,
                "Oil pressure": oilPres === null ? undefined : oilPres / 100,
                "Oil temperature": oilTemp === null ? undefined : oilTemp,
                "Temperature": temp === null ? undefined : temp,
                "Alternator Potential": altVolt === null ? undefined : altVolt,
                "Fuel Rate": fuelRate ===null ? undefined : fuelRate * 3600 * 1000,
                "Total Engine hours": runTime === null ? undefined : runTime,
                "Coolant Pressure": coolPres === null ? undefined : coolPres / 100,
                "Fuel Pressure": fuelPres === null ? undefined : fuelPres / 100,
                "Discrete Status 1": [],
                "Discrete Status 2": [],
                "Percent Engine Load": engLoad === null ? undefined : engLoad * 100,
                "Engine Load": engLoad === null ? undefined : engLoad * 100,
                "Percent Engine Torque": engTorque === null ? undefined : engTorque * 100,
                "Engine Torque": engTorque === null ? undefined : engTorque * 100
            }]


should "temperature" have been coolantTemperature to match appendix A?

PGN 127489 expects "temperature" (field no 4) , so I would suggest either updating appendix A to match the N2K specs or correcting the add-in? I suggest matching the N2K spec of "temperature" in Appendix A might be preferable?


If I dig a little deeper, I find the following in the N2K spec:
1 Engine instance 

2 Engine oil pressure 
3 Engine oil temp. 
4 Engine temp. 
5 Alternator potential 
6 Fuel rate 
7 Total engine hours 
8 Engine coolant pressure 
9 Fuel Pressure 
10 Not Available 
11 Engine Discrete Status 1 
12 Engine Discrete Status 2 
13 Percent Engine Load 
14 Percent Engine Torque 
15 Engine Coolant Temperature - Engine Block 
16 Engine Coolant Temperature - Cylinder Head 
17 Exhaust Manifold Temperature (Port or Single) 
18 Exhaust Manifold Temperature (Starboard)

so Coolant Temp could also be param 15 or 16.... I'll have to play around to see what Raymarine (i70S) expects....