This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to split pitch and roll into two objects in node red?
#1
I have the payload from the SignalK value as the following in a node red flow, but I am not sure how to separate them into two separate values to perform some calculations on them.

Code:
object
roll: -0.0008377580640000001
pitch: -0.0005061454970000001
yaw: null



When I use the split node, I get the values, but lose the "roll" and "pitch" names from the subsequent outputs

Code:
1/26/2020, 7:27:13 PMnode: b92f2e27.99214
navigation.attitude : msg.payload : number
-0.000785398185
1/26/2020, 7:27:13 PMnode: b92f2e27.99214
navigation.attitude : msg.payload : number
0.00022689280900000004
1/26/2020, 7:27:13 PMnode: b92f2e27.99214
navigation.attitude : msg.payload : null
null

I tried to use a "change" to delete roll and pitch from the message in two different change nodes to branch the thread message payloads, but that failed. 

Could someone point me in the right direction on the best way to pull the values from the payload? I would also like to do this with the long/lat position values once I get it working.
Reply


Messages In This Thread
How to split pitch and roll into two objects in node red? - by craig - 2020-01-26, 07:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)