+ Reply to Thread
Page 3 of 8 FirstFirst 12345 ... LastLast
Results 21 to 30 of 76

Thread: Olympus Technologies open testing

  1. #21
    Wire Amateur Neo Kabuto's Avatar
    Join Date
    May 2009
    Posts
    73

    Default Re: Olympus Technologies open testing

    I was testing the Vector Triad Calculator Mk-II code, and it seems to have a few bugs. I got it to work with the following:
    [highlight=E2]@name Vector Triad calculator Mk-II
    @inputs Laser:wirelink Thrust1:wirelink Thrust2:wirelink Thrust3:wirelink
    @outputs AltDist
    @persist Vec1mod:vector Vec2mod:vector Vec3mod:vector

    if(first()){
    timer("vecfinder",10)
    if(Thrust1 & Thrust2 & Thrust3){
    Vec2mod = Thrust1:entity()os() - Thrust2:entity()os()
    Vec3mod = Thrust1:entity()os() - Thrust3:entity()os()
    Vec1mod = entity()os() - Thrust1:entity()os()
    }else{stoptimer("vecfinder")}}

    if(Thrust1 & Thrust2 & Thrust3){
    interval(10)
    Alt = ranger(1000)
    if(Laser:number("Active")){
    VecBase = vec(entity()os():x() - Laser:number("X"),entity()os():y() - Laser:number("Y"),0)
    }else{VecBase = vec(0,0,0)}

    AltDist = Alt:distance()
    if(AltDist > 60){
    interval(10)
    HovAlt = ((60 - Alt:distance())/8)
    }

    if(AltDist < 60){
    interval(10)
    HovAlt = ((60 - Alt:distance())/3)
    }

    Vec1 = -(VecBase + Vec1mod):setZ(HovAlt)
    Vec2 = -(Vec1 + Vec2mod):setZ(HovAlt)
    Vec3 = -(Vec1 + Vec3mod):setZ(HovAlt)

    Thrust1:setVector("Vector",Vec1)
    Thrust2:setVector("Vector",Vec2)
    Thrust3:setVector("Vector",Vec3)
    }[/highlight]
    (I changed the height to 60 so it could go up the gm_construct stairs better.)

    EDIT: This code seems to have problems sitting still. It works well with the laser pointer, but it drifts by itself.

  2. #22
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Olympus Technologies open testing

    Could you explain how you implemented it? All I can seem to get it to do is flip and thereby slam itself repeatedly into the ground :huh:

    And thanks a lot for not only finding a bug, but nearly fixing it yourself. I've been having a ton of trouble with the triad calculator lately.
    Last edited by Lyinginbedmon; 05-31-2009 at 12:28 PM.

  3. #23
    Wire Amateur Neo Kabuto's Avatar
    Join Date
    May 2009
    Posts
    73

    Default Re: Olympus Technologies open testing

    I put the vector triad on the underside of a 2x2 PHX square, with the E2 in the center. I was trying to get it to look like the top part of Zeus, but it somehow got flipped it the process. It looks like that is the problem. When I flipped mine over, it crashed to the ground. Should I try writing a "flipped version"?

    EDIT: I also played with the weights and Keep Upright so it would float better.
    Last edited by Neo Kabuto; 05-31-2009 at 12:44 PM.

  4. #24
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Olympus Technologies open testing

    I got it to work somewhat successfully with:[highlight=E2]Plate = entity():isWeldedTo()
    Ang = Plate:angles()

    Plate:applyAngForce(-$Ang)[/highlight]Which is a pretty basic stabiliser code, but it kept making the plate spin wildly (Though left to it's own devices it still managed to stay in relative mid-air).

    Certainly having the ranger always point beneath towards the ground would help solve that issue. With Zeus that would be easily done by simply using the ranger with the lowest Z value as the bottom ranger, which is an effect that could easily be duplicated for testing platforms.

    I haven't tried it with Zeus' chassis yet, so I'll need to see how that goes.

  5. #25
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Olympus Technologies open testing

    Okay, after some looking over by Bobysmalone in the Zeus thread and some tidying up on my part, I've got yet another potential variant of the calculator code that hopefully has fewer problems staying stable and more effectiveness at actually functioning properly.[highlight=E2]@name Vector Triad calculator Mk-IIII
    @inputs Laser:wirelink Thrust1:wirelink Thrust2:wirelink Thrust3:wirelink
    @outputs AltDist
    @persist Self:entity VTh1:entity VTh2:entity VTh3:entity

    if(first()){
    Self = entity()
    VecBase = Selfos()}

    if($Thrust1 | $Thrust2 | $Thrust3){
    VTh1 = Thrust1:entity()
    VTh2 = Thrust2:entity()
    VTh3 = Thrust3:entity()}

    if(Thrust1 & Thrust2 & Thrust3){
    interval(10)
    Pos = Selfos()
    Vec1mod = Pos - VTh1os() #The mods are now recalculated with each execution to retain accuracy
    Vec2mod = Pos - VTh2os() #Therefore they don't need to be persisted anymore
    Vec3mod = Pos - VTh3os()

    if(Laser:number("Active")){
    VecBase = Pos - Laser:xyz("Pos")} #Untested but seems to be the right name from the init LUA file for the receiver
    else{VecBase = Pos}

    AltDist = ranger(70):distance() #It doesn't need to go beyond 70 to function
    if(AltDist > 60){HovAlt = ((60 - AltDist)/8)}
    elseif(AltDist < 60){HovAlt = ((60 - AltDist)/3)}

    Vec1 = (VecBase + Vec1mod) - VTh1os() + vec(0,0,HovAlt)
    Vec2 = (VecBase + Vec2mod) - VTh2os() + vec(0,0,HovAlt)
    Vec3 = (VecBase + Vec3mod) - VTh3os() + vec(0,0,HovAlt)

    Thrust1:setVector("Vector",Vec1)
    Thrust2:setVector("Vector",Vec2)
    Thrust3:setVector("Vector",Vec3)}[/highlight]

  6. #26
    Wire Sofaking Hitman271's Avatar
    Join Date
    Feb 2008
    Location
    Why? You looking for somebody?
    Posts
    731

    Default Re: Olympus Technologies open testing

    Try this

    Code:
    EW = entity():isWeldedTo()
    A = entity():Angles() 
    
    EA = A*60 + EW:angVel()*10
    
    Lev=sqrt( (EW:inertia():length()^2)/3 )
    
    EW:applyAngForce(-EA*Lev)
    Quote Originally Posted by Anticept View Post
    This is not some place where you can toss your dick around and expect people to suck it.
    Community Gpu Thread. Post Yours!

    Bouncy Ball

  7. #27
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Olympus Technologies open testing

    Nope, you've missed the point entirely.

    I could use applyForce to make the triad completely irrelevant and have whatever I shot the E2 at float and hover, but the triad is very precise and significantly malleable by changing just a couple variables. With the triad, I can even add rotation, which I couldn't do as easily as with applyForce.

  8. #28
    Wirererer andre124's Avatar
    Join Date
    Apr 2009
    Posts
    151

    Default Re: Olympus Technologies open testing

    Well for some reason whenever i try your codes none of them work. The only thing that works for me is the Lethe cloak device. Even then i have to remove the activator and change
    Code:
    if(Cloak == 1){		
    	Body = entity():getConstraints()
    		
    	timer("working...",10)
    		Base:setNumber(Entry, Body:entity(Entry):getAlpha())
    		Body:entity(Entry):setAlpha(0)
    		
    	if(Entry == Body:count()){	
    		stoptimer("working...")
    		Entry = 0
    		Cloak = 0}
    	else{Entry += 1}}
    To
    Code:
    if(Activate == 1){		
    	Body = entity():getConstraints()
    		
    	timer("working...",10)
    		Base:setNumber(Entry, Body:entity(Entry):getAlpha())
    		Body:entity(Entry):setAlpha(0)
    		
    	if(Entry == Body:count()){	
    		stoptimer("working...")
    		Entry = 0
    		Cloak = 0}
    	else{Entry += 1}}
    And add Activate into the inputs

    Well heres my problem:
    Whenever i place the codes (Just as you have posted them) It always comes up with things such as @name Vector Triad calculator Mk-IIII cannot be capital. So ill change them to so its not capital. Then it will come up with Directive @name vector triad calculator mk-IIII is invalid (Or something like that). So ill change that around a little and it will start saying the same thing for others such as @input,@output and @persist.

    Can you tell me if im doing something wrong or is it just me?

    I do have wire svn and its completely updated.

  9. #29
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: Olympus Technologies open testing

    You're not doing anything wrong, I just need to overhaul a lot of the code on the first page now that I've got Gmod back.

    The Olympus Technologies drones, totally not SkyNet in Gmod form.
    Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
    The gBrain Project, the drone controls system that thinks it's better than you

  10. #30
    Wirererer andre124's Avatar
    Join Date
    Apr 2009
    Posts
    151

    Default Re: Olympus Technologies open testing

    Oh ok thanks for that any ideas when you will be doing so?

+ Reply to Thread
Page 3 of 8 FirstFirst 12345 ... LastLast

Similar Threads

  1. Olympus Technologies
    By Lyinginbedmon in forum Finished contraptions
    Replies: 110
    Last Post: 08-03-2010, 02:44 PM
  2. Testing Video Stuffs!
    By -=Fox=- in forum Off-Topic
    Replies: 1
    Last Post: 09-09-2008, 02:15 PM
  3. Replies: 3
    Last Post: 08-23-2008, 07:13 PM
  4. Wire 2 Testing Server
    By -orb- in forum Servers
    Replies: 18
    Last Post: 02-03-2008, 12:41 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots