surveillance UAV
3 posters
RigidChips :: Rigid-Chips :: Files :: Works In Progress
Page 1 of 1
surveillance UAV
Hey everyone! This will probably be my most complicated creation (as far as scripting goes) yet. i have gotten it to auto balance and to stay at a certain altitude that you set. i understand how to use the coordinates and rotation scripting, but i dont understand how to utilize it to make the airplane fly in a circle around set coordinates.
would i have to use Lua?
if thats the case, then i probably wont me able to make this. i cant figure out how to d Lua and the tutorials on the internet dont help.
the controls are Z and X for engines, C and V for auto on and off, A and S for yaw, and Q and W to change the altitude you want to maintain.
CAUTION: do not make the altitude you want too far from the altitude you are currently at, or else you will start doing flips. the only way to steer while in autopilot is to use yaw.
- Code:
// [RCD]
Val
{
ALTITUDE(default=0, max=1000)
AUTO(default=0, max=1)
ENGINE(default=0, max=20000)
LBRAKE(default=0, max=50, step=50)
PITCH(default=0, min=-15, max=15, step=5)
RBRAKE(default=0, max=50, step=50)
ROLL(default=0, min=-5, max=5, step=3)
YAW(default=0, min=-5, max=5, step=5)
}
Key
{
0:PITCH(step=5)
1:PITCH(step=-5)
2:ROLL(step=-3)
3:ROLL(step=3)
4:ENGINE(step=500)
5:ENGINE(step=-500)
6:AUTO(step=-1)
7:YAW(step=-5), LBRAKE(step=50)
8:YAW(step=5), RBRAKE(step=50)
10:AUTO(step=1)
14:ALTITUDE(step=1)
15:ALTITUDE(step=-1)
}
Body
{
Core() {
E:Chip(angle=-2) {
E:Chip(angle=-2) {
E:Trim(angle=-ROLL) { }
}
}
W:Chip(angle=-2) {
W:Chip(angle=-2) {
W:Trim(angle=-ROLL) { }
}
}
N:Frame() {
N:Jet(angle=90, power=ENGINE) { }
}
S:TrimF(angle=90) {
S:Trim(angle=90) {
E:Trim(angle=-PITCH) { }
W:Trim(angle=PITCH) { }
}
N:RudderF(angle=-90, option=1) {
E:Chip() {
S:Frame(angle=-110) {
S:RLW(angle=-70, brake=LBRAKE) { }
}
S:Frame(angle=110) {
S:RLW(angle=70, brake=RBRAKE) { }
}
}
}
S:Chip(angle=YAW) { }
}
}
}
Script
{if AUTO=(1){
PITCH=_AX(core)*(25)+_Y()-ALTITUDE
ROLL=_AZ(core)*(25)
if _AX(core)>30{
PITCH=PITCH-15}
}
would i have to use Lua?
if thats the case, then i probably wont me able to make this. i cant figure out how to d Lua and the tutorials on the internet dont help.
the controls are Z and X for engines, C and V for auto on and off, A and S for yaw, and Q and W to change the altitude you want to maintain.
CAUTION: do not make the altitude you want too far from the altitude you are currently at, or else you will start doing flips. the only way to steer while in autopilot is to use yaw.
Sting Auer- Hover
- Posts : 170
Join date : 2010-09-19
Location : Aw crap i think I'm lost.
Re: surveillance UAV
You will need Lua for that, unfortunately.
Seeing as it's such abig thing with the community, I'll make a sub-forum in the tutorials section for people to spam Lua help requests. If you don't get something, anything at all, go ahead and ask. If you can teach yourself RCScript (or be taught), you can learn Lua.
As for the model:
It's pretty hard to get off the ground, as it spins a fair bit. Can I suggest standardizing the controls? It makes it easier for others to fly, and the key layout is a little more intuitive (you don't need to move your hand as much). Also, maybe put some writing on the screen, to explain controls, shhow altitude, engine, etc.
Seeing as it's such abig thing with the community, I'll make a sub-forum in the tutorials section for people to spam Lua help requests. If you don't get something, anything at all, go ahead and ask. If you can teach yourself RCScript (or be taught), you can learn Lua.
As for the model:
It's pretty hard to get off the ground, as it spins a fair bit. Can I suggest standardizing the controls? It makes it easier for others to fly, and the key layout is a little more intuitive (you don't need to move your hand as much). Also, maybe put some writing on the screen, to explain controls, shhow altitude, engine, etc.
JHaskly- Admin
- Posts : 235
Join date : 2010-07-16
Age : 28
Location : Brisbane
Re: surveillance UAV
you would need to define functions(use label for defining them and goto for accessing them). you'll also need arrays, which AFAIK don't exist in RCScript. one could compress the data(something similar to convert RGB to an integer number), but the precision would be limited.
RA2lover- Walker
- Posts : 382
Join date : 2010-10-11
Age : 29
Location : Brazil
Re: surveillance UAV
ok thanks guys.
Sting Auer- Hover
- Posts : 170
Join date : 2010-09-19
Location : Aw crap i think I'm lost.
RigidChips :: Rigid-Chips :: Files :: Works In Progress
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum