RigidChips
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Space fighter 1.0 prototype

2 posters

Go down

Space fighter 1.0 prototype Empty Space fighter 1.0 prototype

Post by SharpX Sun Jun 12, 2011 5:00 am

I am seriously ambitious with this one.

I wouldnt even try if I wasnt sure it was doable, so probably there is more than one approach of solving the problems this spacecraft has.

What I need, is a craft that keeps its nose in the direction its moving even after the change of direction in zero-g and zero-air-resistance environment.
Currently this craft is capable the following:
-pitch
-yaw
-roll
-changing its speed
-changing its course

The problems are with the inertial force of the craft. The craft just goes the way its ,,pushed,, by jets facing the opposite side the way its going. This raises another problem. The cameras become rather ineffective and you will loose the sense of direction. Thats why this topic was made. I belive the craft can be controlled in zero-g and zero-air-resistance environment when I have the real-time control over speed and direction with some kind of scripts or lua that auto adjust the direction of the nose to the way its moving.

Possible solutions:
-rather than controlling jets, I would like to control the speed with buttons. The scripts or lua auto adjust the thrust of the jets to the speed the information shows me(real one and planned one).
-the direction of the craft when its moving in the required environment is corrected so the crafts nose is facing the way its going. This should eliminate the loose of sense of direction you are moving.

Manually its possible only if you are god-like-pilot, but its impossible to practically use it while in combat.

Controls:
Yaw: UP/DOWN
Pitch: LEFT/RIGHT
Roll: A/D
Speed: W/S

I am hoping for practical try-outs from someone, possible from someone with the knowledge of coding.

Code:
// [RCD]
Val
{
   JETS(default=0, min=-10000, max=10000, step=10000)
   PITCH(default=0, min=-1000, max=1000, step=1000)
   ROLL(default=0, min=-1000, max=1000, step=1000)
   YAW(default=0, min=-1000, max=1000, step=1000)
}
Key
{
   0:YAW(step=1000)
   1:YAW(step=-1000)
   2:PITCH(step=1000)
   3:PITCH(step=-1000)
   7:ROLL(step=1000)
   8:JETS(step=-1000)
   9:ROLL(step=-1000)
   15:JETS(step=1000)
}
Body
{
   Core() {
      S:Jet(power=YAW) {
         S:Chip() {
            S:Chip() {
               S:Chip() {
                  S:Trim(angle=90) {
                     N:Frame(angle=30) {
                        N:Jet(angle=-120, power=-JETS) { }
                     }
                     N:Frame(angle=-30) {
                        N:Jet(angle=120, power=JETS) { }
                     }
                     S:Jet(angle=180, power=PITCH) { }
                  }
                  S:Jet(power=-YAW) {
                     S:Chip() { }
                  }
               }
               W:Jet(power=-ROLL) {
                  N:Arm() { }
                  S:Arm() { }
                  W:Trim() {
                     S:Trim(angle=90) {
                        N:Frame(angle=-30) {
                           N:Jet(angle=120, power=JETS) { }
                        }
                        N:Frame(angle=30) {
                           N:Jet(angle=-120, power=-JETS) { }
                        }
                     }
                     N:Trim(angle=90) { }
                  }
               }
               E:Jet(power=ROLL) {
                  N:Arm() { }
                  S:Arm() { }
                  E:Trim() {
                     S:Trim(angle=90) {
                        N:Frame(angle=30) {
                           N:Jet(angle=-120, power=-JETS) { }
                        }
                        N:Frame(angle=-30) {
                           N:Jet(angle=120, power=JETS) { }
                        }
                     }
                     N:Trim(angle=90) { }
                  }
               }
            }
            N:Trim(angle=90) {
               S:Frame(angle=30) {
                  S:Jet(angle=-120) { }
               }
               S:Frame(angle=-30) {
                  S:Jet(angle=120) { }
               }
               N:Jet(angle=180, power=PITCH) { }
            }
         }
      }
   }
}

If anyone has ever tried making something like this, dont be shy to post your answer in this matter then!

EDIT: Or I just could leave the air on and it fixes the loose of sense of direction Very Happy, so I just could fly the damn thing Razz.
SharpX
SharpX
Tank
Tank

Posts : 55
Join date : 2010-12-28
Location : Sorry, i was too drunk to remember, what that sign said

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by Echo_Delta_Oscar Sun Jun 12, 2011 11:21 am

This is a script for a simple feed-forward fly-by-wire control on pitch I use on some of my aircrafts. When you apply an input to the virtual control stick, the elevators move accordingly, and a parametre called trim equals the angle between the plane's nose and the horizon, used as an absolute reference frame. When control stick is released, the elevators set themselves in order to mantain the last climb angle recorded, and the plane will fly that way until another input is given or stall occurs. I'm not yet used to lua, but you might give this a chance, even converting it for roll and yaw.

Code:


   if _KEY(0)>(0) {
   Pitch=Pbar
   Trim=_TODEG(_AX())}

   if _KEY(1)>(0) {
   Pitch=Pbar
   Trim=_TODEG(_AX())}

   if _KEY(0)=(0) & _KEY(1)=(0){
   Pitch=PBar+(-Trim+_TODEG(_AX()))}
Echo_Delta_Oscar
Echo_Delta_Oscar
Hover
Hover

Posts : 105
Join date : 2011-03-24

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by SharpX Sun Jun 12, 2011 12:09 pm

When I get this code working on jets- roll, yaw and pitch like in true spaceship, then I its only half the progress, but thanks! keep your eyes peeled for an update on this matter in the next 24 hours after this short reply.

EDIT1: It works great... on trims of a aircraft, tough not with jets on a spacecraft.
I kinda expected the same thing what it does with the trims but instead its seems to be doing the opposite, it pushes the nose away from the position after I released the PITCH and YAW button.

IF I could get this thing to work I think its pretty good on larger slow moving spaceship, but on smaller agile fighter it becomes useless. why? it just leaves the nose where I last pointed it and the whole spaceship still keeps going in the in the direction where the inertial forces are pulling it(in non-atmospheric just like in space).

Please look into this matter and try converting the script to use with Jets instead of Trims, because even on larger spaceship this script becomes potentially ground-braking.

EDIT2: It just flashed through my mind. This script eliminates the problem with the roll inertia in all directions, which also good, but I still dont know how to use it with jets Very Happy. Help is still appriciated on this matter!

EDIT3: This script could also be used on a aircraft(plane, VTOL, simple hovercraft) which has a turret. Firstly the the scripts controls the flight path of the aircraft. Secondly the scripts control the rotating turret the aircraft has. In this way the script helps with the stabilization of the aircraft while the turret is aiming. Dang my brain works right now, like its loaded with chocolate Razz.
SharpX
SharpX
Tank
Tank

Posts : 55
Join date : 2010-12-28
Location : Sorry, i was too drunk to remember, what that sign said

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by Echo_Delta_Oscar Sun Jun 12, 2011 5:50 pm

I think I could use a script for the stability control for a hover prototype I made some time ago. To be specific, the angle, for each direction, should be replaced with the local _VY() of the thruster, and the resulting script would be a proper feed-back loop.

Code:
Val{

   HoverN(default=0)
   HoverS(default=0)
   HoverE(default=0)
   HoverW(default=0)
   Front(default=0, min=-5000, max=15000, step=1000)
   Side(default=0, min=-4000, max=4000, step=500)
   Ign(default=0, min=0, max=1, step=0)
   Hei(default=45, min=0, max=1000, step=0)

}

Key{

   0:Front(step=1000)
   1:Front(step=-1000)
   2:Side(step=100)
   3:Side(step=-100)
   15:Hei(step=1)
   8:Hei(step=-1)

}

Body{

Core(){
   N:Jet(name=JetN, power=HoverN, effect=1){}
   E:Jet(name=JetE, power=HoverE, effect=1){}
   W:Jet(name=JetW, power=HoverW, effect=1){}
   S:Weight(option=8){
   N:TrimF(angle=90){N:Jet(angle=180, power=Side, effect=1){}}
   N:Jet(angle=90, power=Front, effect=2){}
   N:Jet(angle=-90, power=-Front, effect=2){}
   S:Jet(angle=90, power=-Front, effect=2){}
   S:Jet(angle=-90, power=Front, effect=2){}
   E:Weight(option=8, angle=90){}
   W:Weight(option=8, angle=90){}
   E:Jet(name=JetE, power=HoverE, effect=1){}
   W:Jet(name=JetW, power=HoverW, effect=1){}
   S:Weight(option=8){
   E:Weight(option=8, angle=90){}
   W:Weight(option=8, angle=90){}
   S:Jet(angle=90, power=-Front, effect=2){}
   S:Jet(angle=-90, power=Front, effect=2){}
   S:TrimF(angle=90){S:Jet(angle=180, power=Side, effect=1){}}
   E:Jet(name=JetE, power=HoverE, effect=1){}
   W:Jet(name=JetW, power=HoverW, effect=1){}
   S:Chip(){
   S:Jet(name=JetS, power=HoverS, effect=1){}
   E:Jet(name=JetE, power=HoverE, effect=1){}
   W:Jet(name=JetW, power=HoverW, effect=1){}}}}

}

}

Script{

This is the VAAH, Variable Altitude Autostable HoverCraft, the prototype I mentioned. It was supposed to mantain a certain altitude and maneuver there, with gravity and atmosphere. This is not the answer you are looking for yet, but the script you need might be a mashup of the two. I'll try to modify it properly.
Echo_Delta_Oscar
Echo_Delta_Oscar
Hover
Hover

Posts : 105
Join date : 2011-03-24

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by SharpX Mon Jun 13, 2011 1:47 am

Ill it give it a try also, altough I am not familiar in understanding scripting past the point where I can make simple games with flash 8. Thats why I requested collaborative help from our community.
I seriously wish we had more people going on our forum. More people who would see the same potential of RC and how fun it really is.

That script can also be used on a turret on the tank. Just like in real life the script keeps the turret level with the ground while the tank is moving over rough terrain. This makes the aiming a almost effortless while moving around and odging the opponents shots. I will make a simple creation to show you what I mean Razz.
SharpX
SharpX
Tank
Tank

Posts : 55
Join date : 2010-12-28
Location : Sorry, i was too drunk to remember, what that sign said

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by Echo_Delta_Oscar Mon Jun 13, 2011 10:54 am

This spacecraft demonstrator I made features a simple but rather effective control system, and I think it might satisfy the required specifics.

Code:
Val{

   TFr(default=0, min=-20000, max=20000)
   TRe(default=0, min=-20000, max=20000)
   TE(default=0, min=-20000, max=20000)
   TW(default=0, min=-20000, max=20000)
   T5(default=0, min=-20000, max=20000)
   T6(default=0, min=-20000, max=20000)
   Tmain(default=0, min=-20000, max=20000)
   Pitch(default=0, min=-20, max=20, step=20)
   Roll(default=0, min=-20, max=20, step=20)
   Yaw(default=0, min=-20, max=20, step=20)
   Front(default=0, min=-20, max=50, step=0)

}

Key{

   0:Pitch(step=-1)
   1:Pitch(step=1)
   2:Roll(step=1)
   3:Roll(step=-1)
   15:Front(step=5)
   8:Front(step=-5)
   7:Yaw(step=1)
   9:Yaw(step=-1)
   
}

Body{

   Core(){
      S:Frame(angle=90){S:Frame(angle=-90){
      N:Jet(angle=-90, power=Tmain){}
      N:Frame(){N:TrimF(angle=90){N:Jet(name=Trudder1, power=T5){}}
      N:Frame(){N:Jet(name=T1, power=TFr){}}}
      S:TrimF(angle=90){S:Jet(name=Trudder2, power=T6){}}
      S:Frame(){S:Jet(name=T2, power=TRe){}}
      E:Frame(){E:Jet(name=T3, power=TE){}}
      W:Frame(){W:Jet(name=T4, power=TW){}}}}

}

}

Script{

   print 1,"Works in zero G only!"
   print 2,"Arrow keys for pitch and roll"
   print 3,"W/S for main engine"
   print 4,"A/D for yaw"
   print 5,"Nothing else is required to fly this craft."
   print 6,"Fuel: ",_FUEL(),", Fuel LVL: ",_FUEL()/65000," %"
   print 8,"Speed: ",_VEL(),", m/s, ",_VEL()*3600/1000,", km/h, ",_VEL()*3600/1852,", kts"

   TFr=(-_VY(T1))*10000+Pitch*1000
   TRe=(-_VY(T2))*10000-Pitch*1000
   TE=(-_VY(T3))*10000+Roll*1000
   TW=(-_VY(T4))*10000-Roll*1000
   Tmain=(-_VZ())*10000-Front*10000
   T5=(-_VY(Trudder1))*20000-Yaw*1000
   T6=(-_VY(Trudder2))*20000-Yaw*1000

}

I've tested it with 0 g, no air, breakable, and limited fuel; you may develop your spacecraft from a similar platform.

EDIT: I've taken one step ahead adding weapons to the system, thus I had to increase fuel, thus the inertia. with the simple script given, this causes a problem called saturation; after a while, exspecially at high speed, all control jets are at full power, and the spacecraft spins out of control. This has to be fixed.


Last edited by Echo_Delta_Oscar on Mon Jun 13, 2011 1:14 pm; edited 1 time in total (Reason for editing : New Issue)
Echo_Delta_Oscar
Echo_Delta_Oscar
Hover
Hover

Posts : 105
Join date : 2011-03-24

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by SharpX Mon Jun 13, 2011 2:58 pm

Now why does it jerk around like a squirrel on steroids, left to right, side to side. looks like the stabilazors are overpowered to me Razz. This thing confuses and scares me, what is it suppose to do?
Btw do you have vista or xp? maybe I have some usual RC compatible issues with vista. Oh well probably Razz

EDIT: If the craft isnt moving it seems to be adjusting the angle of the ship just fine, until I try moving forwards or backwards, then it goes super crazy with its adjusting jets Very Happy.

Ok I have few ideas how I could use this, but Ill try it tomorrow when Ive have had enough sleep.



Last edited by SharpX on Mon Jun 13, 2011 3:17 pm; edited 1 time in total
SharpX
SharpX
Tank
Tank

Posts : 55
Join date : 2010-12-28
Location : Sorry, i was too drunk to remember, what that sign said

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by Echo_Delta_Oscar Mon Jun 13, 2011 3:09 pm

I admit I didn't spend so much time on control calibration, but it works nicely before saturation. I have 7 anyway, why?

P.S: I'm connecting to port 37564 for some target pratice with the n°2 spacecraft.
Echo_Delta_Oscar
Echo_Delta_Oscar
Hover
Hover

Posts : 105
Join date : 2011-03-24

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by SharpX Mon Jun 13, 2011 3:18 pm

Its 00.17 midnight, comon Very Happy.
SharpX
SharpX
Tank
Tank

Posts : 55
Join date : 2010-12-28
Location : Sorry, i was too drunk to remember, what that sign said

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by Echo_Delta_Oscar Mon Jun 13, 2011 3:35 pm

No, here is 23.34 Very Happy
Echo_Delta_Oscar
Echo_Delta_Oscar
Hover
Hover

Posts : 105
Join date : 2011-03-24

Back to top Go down

Space fighter 1.0 prototype Empty Re: Space fighter 1.0 prototype

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum