my now flow and fucntion
[{"id":"2a71b465c3426380","type":"mqtt in","z":"a34699b03789f7a6","name":"","topic":"tele/tas04/SENSOR","qos":"2","datatype":"json","broker":"31a99116.50a74e","nl":false,"rap":true,"rh":0,"inputs":0,"x":243.6302490234375,"y":1752.22607421875,"wires":[["a8ce7ae004eb838d","554c17f988a8c05c","53bbf35e81420d8e"]]},{"id":"53bbf35e81420d8e","type":"function","z":"a34699b03789f7a6","name":"","func":"let msg0 = {};\nlet msg1 = {};\nlet msg2 = {};\nlet msg3 = {};\nfunction myfunction(sensorValue) {\n let volts = sensorValue * 0.1875 / 1000\n let psi = (volts - 0.5) * 5 / 4\n //let specgravw = 1\n //let watercolumn = (psi *27.72) / specgravw\n //let cubinchs = watercolumn * 1017\n //let volumeG = cubinchs * 0.004329\n return {\n 'sensorValue': sensorValue,\n 'psi': psi >= 0 ? psi : 0,\n 'volts': volts,\n // 'specgravw' : specgravw,\n // 'watercolumn': watercolumn,\n // 'cubinchs' : cubinchs,\n // 'volumeG' : volumeG,\n }\n}\nmsg0.payload = myfunction(msg.payload.ADS1115.A0);\nmsg1.payload = myfunction(msg.payload.ADS1115.A1);\nmsg2.payload = myfunction(msg.payload.ADS1115.A2);\nmsg3.payload = myfunction(msg.payload.ADS1115.A3);\nreturn [msg0, msg1, msg2, msg3];\n","outputs":4,"noerr":0,"initialize":"","finalize":"","libs":[],"x":452.7909240722656,"y":1759.204116821289,"wires":[[],["2a171b6ac5c34fdb","0d8231a4dfe728e4"],["cc38d4986b301ae8","4154f6fcae94ac65"],[]]},{"id":"2a171b6ac5c34fdb","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":619.8342895507812,"y":1718.4608612060547,"wires":[]},{"id":"cc38d4986b301ae8","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":614.3698577880859,"y":1843.4739437103271,"wires":[]},{"id":"0d8231a4dfe728e4","type":"change","z":"a34699b03789f7a6","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"lower","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":637.639518737793,"y":1757.7197704315186,"wires":[["ea61ce510ba2fcda","7718a196838034aa"]]},{"id":"4154f6fcae94ac65","type":"change","z":"a34699b03789f7a6","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"upper","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":637.6395492553711,"y":1804.4833850860596,"wires":[["b9c3b3508ca03ff0","b0e215125738bb63"]]},{"id":"ea61ce510ba2fcda","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":800.7571640014648,"y":1714.82200050354,"wires":[]},{"id":"b9c3b3508ca03ff0","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":803.1916103363037,"y":1844.5768632888794,"wires":[]},{"id":"5dea334096eff75b","type":"function","z":"a34699b03789f7a6","name":"","func":"\nvar upper = msg.payload.upper;\nvar lower = msg.payload.lower;\nvar sensorDist = (lower * 27.72)-(upper*27.72);\nvar specgrav = ((lower * 27.72)-(upper*27.72))/sensorDist;\nvar boilwc = (lower*27.72)/specgrav;\nvar cubicinch = boilwc*1017;\nvar boilVolume = cubicinch*0.004329;\n\nmsg.payload.boilvolume = boilVolume;\nmsg.payload.gravity = specgrav;\nreturn msg;payload.lower","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":1474.7041549682617,"y":1740.6609802246094,"wires":[["504641de737e27df"]]},{"id":"504641de737e27df","type":"debug","z":"a34699b03789f7a6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1629.306999206543,"y":1768.515525817871,"wires":[]},{"id":"65c530439a1f2028","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1126.5643768310547,"y":1721.9210395812988,"wires":[]},{"id":"e418984ce7f5d6d9","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1155.5643920898438,"y":1829.148639678955,"wires":[]},{"id":"7718a196838034aa","type":"change","z":"a34699b03789f7a6","name":"set payload to Temperature value","rules":[{"t":"move","p":"payload.psi","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":892,"y":1752,"wires":[["65c530439a1f2028","7a4a53cb034dbaa5"]]},{"id":"b0e215125738bb63","type":"change","z":"a34699b03789f7a6","name":"set payload to Temperature value","rules":[{"t":"move","p":"payload.psi","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":888,"y":1809,"wires":[["e418984ce7f5d6d9","7a4a53cb034dbaa5"]]},{"id":"7a4a53cb034dbaa5","type":"join","z":"a34699b03789f7a6","name":"","mode":"custom","build":"object","property":"payload","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":true,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1144.2223358154297,"y":1776.4098405838013,"wires":[["a8151bbb8d2b8b75","552e27cb369f56a5"]]},{"id":"a8151bbb8d2b8b75","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1304.7814674377441,"y":1741.1009120941162,"wires":[]},{"id":"552e27cb369f56a5","type":"change","z":"a34699b03789f7a6","name":"","rules":[{"t":"set","p":"pressure","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1312.7848434448242,"y":1785.4585876464844,"wires":[["7ce93d5941140aed","5dea334096eff75b"]]},{"id":"7ce93d5941140aed","type":"debug","z":"a34699b03789f7a6","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1489.7709655761719,"y":1811.0903987884521,"wires":[]},{"id":"31a99116.50a74e","type":"mqtt-broker","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
yes I made a few mistakes and found them. here is function
var upper = msg.payload.upper;
var lower = msg.payload.lower;
var sensorDist = (lower * 27.72)-(upper*27.72);
var specgrav = ((lower * 27.72)-(upper*27.72))/sensorDist;
var boilwc = (lower*27.72)/specgrav;
var cubicinch = boilwc*1017;
var boilVolume = cubicinch*0.004329;
msg.payload.boilvolume = boilVolume;
msg.payload.gravity = specgrav;
return msg;payload.lower