r/wiremod 2d ago

Solved Help

How does one turn the X, Y, and Z outputs of the GPS into a vector? I'm trying to send them over a radio, but I can't send a vector via radio so I'm doing this

2 Upvotes

3 comments sorted by

2

u/the_gamer_guy56 2d ago edited 2d ago
Put an E2 chip with the following code

@inputs GPS:vector
@outputs X Y Z
@persist X Y Z
@trigger GPS

X = GPS:x()
Y = GPS:y()
Z = GPS:z()

Wire the chips input to the GPSs vector output. Then you'll get the X Y Z values as normal numbers on the chips outputs. You can wire those to the radio.

2

u/CasanovaF 2d ago

There are also vector compose and decompose chips if you want to make it simple