I got an idea for a new microcontroller based on this tutorial. With the GPS position of other targets now availalbe, you could make a TCAS Microcontroller (Traffic Collision Avoidance System). By calculating the closest point of approach (CPA), determining if it is within a protected airspace around your vehicle and time to CPA calculations, you would have a working TCAS. You could go further by actually using the different colors to display targets on the screen, depending on if they are other traffic, proximate traffic, possible threats or real threats. And calculating the relative altitude difference shouldnt be a problem, since you have your own altitude and the targets altitude. I guess it would be pretty cool to slap onto a 2x2 screen, since its basically a radar showing you all aircraft with their relative altitude + - your altitude + the feature to give you traffic warnings (or even resolution advisories, if you have like a lot of time to figure that out?)
Very nice video! might i suggest an XML tutorial next? it seems like a rather important part of advanced Stormworks, and i feel as though many new players are struggling with XML editing.
From what i have tested, this radar setup works for airplanes. Only thing to do is to stabilize the roll by using a pivot and tilt sensor. By doing that the avarage deviation between the calculated radar value and the actual coordnates is between 5 - 25 meters. Tracking other planes and guiding something like a aim120 is in deed possible. Thanks for the showcase/tutorial
This will not work for any elevation angle other then 0 due to the bad spherical to cartesian conversion, do this instead x = cos(azi)*cos(elev)*dist y = sin(azi)*cos(elev)*dist z = sin(elev)*dist
Really good tutorial! since you asked for feedback. Maybe try to explain more frequently why you are doing certain ways so people understand what to do instead of just following a step by step instruction. Dont get me wrong, you did something exactly like this a couple of times. I just like to see more of that :) I find dumming down something a bit really helps while doing tutorials. But thats me nitpicking honestly, like i said, you even did it a couple of times. And maybe for time sake you didnt do it more frequently, dunno. Tho if it were that last case id concider doing a 2 parter (potentially twice the watchtime and more time to really get in there :) ) Really enjoyed it, its clear a lot of prep went into this, I hope you'll do more of this!
I forgot it, sorry, it's in the description. Thanks for the feedback. I thought about always repeating for it to be easy to understand, my thoghts however where that I mention everything once or twise but then they learn so I don't need to repeat it. It makes it so the viewer has to learn... I hope it works. Thanks again!
@@se-ssi no worries, thanks for the update! Tutorials are tricky! Too much info gets great understanding and a pain to watch. Too little wouldnt really be a tutorial. You are doing wayy better than my first year of them. And arguably to this day which pains me to say😂😂.
Great video! The maths explanations were on point, I got all that but I’m a bit new to stormworks so I’m wondering how you would implement this as autopilot. For example how would you input the destination you want to get to, would it be from a radio or another gps somewhere else or what? Thanks again for the tutorial 🙏
You can check my workshop out and you should find a microcontroller called autopilot. But it's really the same as a GPS turret. And the way you put in the destination can simply be entering target coordinates on a keyboard.
Wouldn't you have to use the horizontal distance to the target to get the relative y and x? With youre code the target could be flying high and therefore give out Incorrect coordinates couse you are using the direct distance. Correct me if I'm wrong.
[ ^0.5 ]? And so it was permissible to do? Haha)))) I've always written [ c = math . sqrt (a^2 + b^2) ] and didn't even think it was possible to shorten it a bit. It's curious. TY))
15:04 do I connect the composite input directly to the radar on the corner? Because you never made it clear and I am so confused on where you link composites
@@se-ssi I fixed a confusing problem, I paused the video at 10:39 because of a fix I made. I decided to output the "yawAngle" and "pitchAngle" to my pivots and it saved my life, it can now track things, what I will do is I will work out a solution for radar leading and test it out
Is there a fix for the roll of a GPS turret ( the turret that is pointing at a GPS cord) I need one becasue i am trying to mount a turret on a ship. keep in mind that a stabilizer for the turret is not an option (too big)
Yes there is. You can look at my GPS turret lua code for the full rotation compensation of every axies here: steamcommunity.com/sharedfiles/filedetails/?id=2999916357 But if you only want the roll compensation this should work: selfRoll = (input.getNumber(16)*math.pi*2) --Physics sensor channel 16 should be the roll. output.setNumber(1, (-yaw * math.cos(selfRoll)) - pitch * math.sin(selfRoll)) --Yaw control output.setNumber(2, pitch * math.cos(selfRoll) - yaw * math.sin(selfRoll)) --Pitch control You might have to play with putting a - around each output if reversed.
@@se-ssi I would love to, but I don't understand English well, and translators don't help much. 😅 and I kind of solved the problem (I just wrote off the code incorrectly) although the turret still crashes, but less often
Rotating the coordinate system. Its more advanced, which is why I didn't include it. See my targeting system mc lua block script for some example code.
Ngl, I'm very confused why we're using the tangent function to find Z. Isn't the distance to the target always going to be the hypotenuse, and thus it shouldn't factor into a tangent formula?
Sine works just as well and makes more sense. So you can just use sin() instead. Sorry for the confusing code. I decided to use tan for some reason but sin results in the exact same numbers.
I got a question could you please make a tutorial on how to make the gps missile microcontroller beacause i cant find any tutorial on how to make obe and i dont want do download either 😅😅
Yeah but stabilization of radar is working only for ships. On planes this thing will be give poor data, because of fast rotation and peak angles. Why you dont give us code to correct convert radar to global coordinates based on 3 tilt sensors and compas or on phisics block?
My pro versions do that. This video is meant to be as simple as possible for the people to learn. If a more advanced version is requested enough I might make one.
@@se-ssi Dude this thing is perfect. You are genius. I cant make this for two years. And you just do exactly what i need. God thanks for send me this talanted person. And thank you very much for this goddest creation. I wont forget you. Im so happy. Now im able to move further. Its a giant lead for me. Oh boy.
@Malenhagen Thank you for using it and giving feedback. It's beacuse of this feedback I continue to make these creations. It gives me the happiness and motivation I need to continue. So thank you so much! stay tuned. I'm releasing my best creation so far, soon. (On the workshop first)
Why when I look for stormworks tutorial I get frantic with his tutorials that require you to assemble then reassemble half way through the tutorial. TH-cam terrible recommendations!!
I got an idea for a new microcontroller based on this tutorial. With the GPS position of other targets now availalbe, you could make a TCAS Microcontroller (Traffic Collision Avoidance System).
By calculating the closest point of approach (CPA), determining if it is within a protected airspace around your vehicle and time to CPA calculations, you would have a working TCAS.
You could go further by actually using the different colors to display targets on the screen, depending on if they are other traffic, proximate traffic, possible threats or real threats.
And calculating the relative altitude difference shouldnt be a problem, since you have your own altitude and the targets altitude.
I guess it would be pretty cool to slap onto a 2x2 screen, since its basically a radar showing you all aircraft with their relative altitude + - your altitude + the feature to give you traffic warnings (or even resolution advisories, if you have like a lot of time to figure that out?)
Very nice video! might i suggest an XML tutorial next? it seems like a rather important part of advanced Stormworks, and i feel as though many new players are struggling with XML editing.
Mabye!
No you will. I will make you do it
From what i have tested, this radar setup works for airplanes. Only thing to do is to stabilize the roll by using a pivot and tilt sensor. By doing that the avarage deviation between the calculated radar value and the actual coordnates is between 5 - 25 meters. Tracking other planes and guiding something like a aim120 is in deed possible. Thanks for the showcase/tutorial
Be awesome if you included a lead calculator with it
This is was so helpful for me. Thank you so much for the smart work!
Think the sensor arrays could definitely be compacted down into a single physics sensor. It’s been really handy since that things come out.
This will not work for any elevation angle other then 0 due to the bad spherical to cartesian conversion, do this instead
x = cos(azi)*cos(elev)*dist
y = sin(azi)*cos(elev)*dist
z = sin(elev)*dist
It's a simplified version. But after all of my testing, it sill works just fine. Might be more efficient that way however.
Really good tutorial! since you asked for feedback. Maybe try to explain more frequently why you are doing certain ways so people understand what to do instead of just following a step by step instruction. Dont get me wrong, you did something exactly like this a couple of times. I just like to see more of that :) I find dumming down something a bit really helps while doing tutorials.
But thats me nitpicking honestly, like i said, you even did it a couple of times. And maybe for time sake you didnt do it more frequently, dunno. Tho if it were that last case id concider doing a 2 parter (potentially twice the watchtime and more time to really get in there :) ) Really enjoyed it, its clear a lot of prep went into this, I hope you'll do more of this!
I forgot it, sorry, it's in the description. Thanks for the feedback. I thought about always repeating for it to be easy to understand, my thoghts however where that I mention everything once or twise but then they learn so I don't need to repeat it. It makes it so the viewer has to learn... I hope it works. Thanks again!
@@se-ssi no worries, thanks for the update! Tutorials are tricky! Too much info gets great understanding and a pain to watch. Too little wouldnt really be a tutorial.
You are doing wayy better than my first year of them. And arguably to this day which pains me to say😂😂.
Epic intro.
Very good video! Thank you.I understen hou it works.😊
Lol I was just making this by my own. But still thanks for the video. If I'll make some mistakes I'll watch it again
13:53 two velocity pivots, but it's a robotic one. And yes I made some mistakes and I came back)
Ahh, my bad, sorry
It's ok) still very good tutorial
Great video! The maths explanations were on point, I got all that but I’m a bit new to stormworks so I’m wondering how you would implement this as autopilot. For example how would you input the destination you want to get to, would it be from a radio or another gps somewhere else or what? Thanks again for the tutorial 🙏
You can check my workshop out and you should find a microcontroller called autopilot. But it's really the same as a GPS turret. And the way you put in the destination can simply be entering target coordinates on a keyboard.
@@se-ssi thanks a bunch, will check it out later
What's Your Steam Account?@@se-ssi
Nice
Wouldn't you have to use the horizontal distance to the target to get the relative y and x? With youre code the target could be flying high and therefore give out Incorrect coordinates couse you are using the direct distance. Correct me if I'm wrong.
I see what you mean. I did it that way first. But you can skip it by using tan, as in the video.
quite good job sessi, underrated, sadly
[ ^0.5 ]? And so it was permissible to do? Haha)))) I've always written [ c = math . sqrt (a^2 + b^2) ] and didn't even think it was possible to shorten it a bit. It's curious. TY))
this video was very helpful but for some reason it appears as though it no longer works
Look at the example version available in the description. You can compare to find what's causing your problem.
Can we make an autopilot / position holder just using GPS?
That is possible.
well I did everything you did radar works fine but Im having problem with Weapon/Laser controls It doesnt track the vehicle that radar tracks
Compare with the example version on the workshop. Or join the discord and I can help you.
15:04 do I connect the composite input directly to the radar on the corner? Because you never made it clear and I am so confused on where you link composites
The composite should be connected to the GPS output of the radar to gps mc.
@@se-ssi does it require player guidance?
@@se-ssi I fixed a confusing problem, I paused the video at 10:39 because of a fix I made.
I decided to output the "yawAngle" and "pitchAngle" to my pivots and it saved my life, it can now track things,
what I will do is I will work out a solution for radar leading and test it out
this shit is fucking rocket science...
Is there a fix for the roll of a GPS turret ( the turret that is pointing at a GPS cord) I need one becasue i am trying to mount a turret on a ship. keep in mind that a stabilizer for the turret is not an option (too big)
Yes there is. You can look at my GPS turret lua code for the full rotation compensation of every axies here: steamcommunity.com/sharedfiles/filedetails/?id=2999916357
But if you only want the roll compensation this should work:
selfRoll = (input.getNumber(16)*math.pi*2) --Physics sensor channel 16 should be the roll.
output.setNumber(1, (-yaw * math.cos(selfRoll)) - pitch * math.sin(selfRoll)) --Yaw control
output.setNumber(2, pitch * math.cos(selfRoll) - yaw * math.sin(selfRoll)) --Pitch control
You might have to play with putting a - around each output if reversed.
what should I do if the radar seems to see the target but the turret is spinning from side to side trying to aim at it?
Join the discord server for help. There I can help you!
@@se-ssi I would love to, but I don't understand English well, and translators don't help much. 😅
and I kind of solved the problem (I just wrote off the code incorrectly) although the turret still crashes, but less often
Is it just me or should the z coordinate be calculated with sin instead of tan?
Tan gives the same output in this case. But yes sin makes more sense.
how would i do this without rotating the radar
Rotating the coordinate system. Its more advanced, which is why I didn't include it. See my targeting system mc lua block script for some example code.
when i do it the turret doesnt want to move
You are welcome to come ask me on the discord server. We can try to figure out what's wrong. Link's in the description on the video.
Ngl, I'm very confused why we're using the tangent function to find Z. Isn't the distance to the target always going to be the hypotenuse, and thus it shouldn't factor into a tangent formula?
Sine works just as well and makes more sense. So you can just use sin() instead. Sorry for the confusing code. I decided to use tan for some reason but sin results in the exact same numbers.
@@se-ssi Appreciate the response!
Does this work with a sweeping Radar? If not why not?
If you add the sweep angle to the detected yaw angle. I'd just make the turret yaw pivot sway instead.
@@se-ssi I’m gonna do the second one. Thanks!
i tried to build one, and the radar-gps module worked, but i couldn't get a response for the gps-turret module. Any suggestions?
Compare with the example version on the workshop. See if you have code errors...
@@se-ssi ok, thanks!
I got a question could you please make a tutorial on how to make the gps missile microcontroller beacause i cant find any tutorial on how to make obe and i dont want do download either 😅😅
your only hope is to download LMFAO you need to be an engineer if you wana make this.
ill try this wheen im home, does this work with the radar on Clockwise?
Sure. Just reverse the yaw
Is there any way to account for roll without the pivots?
Yes. Using a rotation matrix or vector math. See my newest version on my workshop : se-ssi's Workshop
Called: Radar_deprecated To GPS (PRO)
@@se-ssi Thank you
Yeah but stabilization of radar is working only for ships. On planes this thing will be give poor data, because of fast rotation and peak angles.
Why you dont give us code to correct convert radar to global coordinates based on 3 tilt sensors and compas or on phisics block?
My pro versions do that. This video is meant to be as simple as possible for the people to learn. If a more advanced version is requested enough I might make one.
@@se-ssi Oh god. Please tell me you can share it. Please.🙏
@@se-ssi oh. I founded it in your workshop.
@@se-ssi Dude this thing is perfect. You are genius. I cant make this for two years. And you just do exactly what i need. God thanks for send me this talanted person. And thank you very much for this goddest creation. I wont forget you. Im so happy. Now im able to move further. Its a giant lead for me. Oh boy.
@Malenhagen Thank you for using it and giving feedback. It's beacuse of this feedback I continue to make these creations. It gives me the happiness and motivation I need to continue. So thank you so much! stay tuned. I'm releasing my best creation so far, soon. (On the workshop first)
1st
your mic is very quiet
Noted!
Why when I look for stormworks tutorial I get frantic with his tutorials that require you to assemble then reassemble half way through the tutorial. TH-cam terrible recommendations!!
You have saved me so much pain 🫡