Orbiter-Forum  

Go Back   Orbiter-Forum > Blogs
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

  1. Old Comment
    RisingFury's Avatar

    Attempts at DirectX

    Is it UMMU compatible?
    Posted 01-23-2013 at 12:24 AM by RisingFury RisingFury is offline
  2. Old Comment
    Samuel Edwards's Avatar

    Attempts at DirectX

    Huzzah for simplicity!
    Posted 01-22-2013 at 04:11 PM by Samuel Edwards Samuel Edwards is offline
  3. Old Comment
    Zatnikitelman's Avatar

    Attempts at DirectX

    Of course the wonderful thing about Object Oriented and/or Functional programming is that you can store the complex setup in something else to be called later, without having to retype it all :D
    Posted 01-22-2013 at 03:35 PM by Zatnikitelman Zatnikitelman is offline
  4. Old Comment
    Samuel Edwards's Avatar

    Attempts at DirectX

    Oh nice, George. Before too long, you'll be getting hired to do this kinda stuff.

    Keep at it, man!

    SE
    Posted 01-20-2013 at 03:38 AM by Samuel Edwards Samuel Edwards is offline
  5. Old Comment
    Posted 01-19-2013 at 08:23 PM by IronRain IronRain is online now
  6. Old Comment

    I Built It!!!.....About a week ago.

    A fellow lego builder...
    Posted 01-15-2013 at 10:55 AM by reconwarrior21 reconwarrior21 is offline
  7. Old Comment
    Gerdih's Avatar

    First term completed

    I also learn Python at University, I still dont know why I dont learn other codes that are more used. Actually I think that my faculty is the only one that teach Python. Here we study at christmas and we have exams on january. When exams are finished we have about 2-3 weeks free time before starting again (our real christmas vacations ). Congratulations for your first term.
    Posted 01-14-2013 at 11:25 AM by Gerdih Gerdih is offline
  8. Old Comment
    Quick_Nick's Avatar

    First term completed

    I'm going back to my own university for the second semester in about 12 hours. ._.
    Posted 01-10-2013 at 10:37 AM by Quick_Nick Quick_Nick is offline
  9. Old Comment
    ky's Avatar

    First term completed

    Congrats George, keep up the good work here and in college
    Posted 12-30-2012 at 12:40 AM by ky ky is offline
  10. Old Comment
    Xyon's Avatar

    Clicky...

    Gary - it's not massively loud, nor is the bump exceptionally massive, but it's infinitely better than a rubber dome. I'd say it's comparable to the model M in mechanics (though the buckled springs did provide a slightly better typing sensation) but excels in both maintenance (it's a LOT easier to put the keys back on after taking them off, although the unlabelled ones mean I need to concentrate harder on where each key goes) because the switches are contained, and in aesthetics... just look at it!

    If and when I ever get back on TS you'll hear how clicky it is, but my overall typing noise has decreased, as I'm not bottoming out on the old rubber-dome keyboard and wasting lots of energy making noise - the switches handle that for me.
    Posted 12-29-2012 at 10:14 AM by Xyon Xyon is offline
    Updated 12-29-2012 at 10:17 AM by Xyon
  11. Old Comment
    RisingFury's Avatar

    First term completed

    First year is the worst. It's the biggest shock. Keep at it
    Posted 12-29-2012 at 09:13 AM by RisingFury RisingFury is offline
  12. Old Comment
    Samuel Edwards's Avatar

    First term completed

    way to go, George! Keep at it, dude!
    Posted 12-29-2012 at 05:27 AM by Samuel Edwards Samuel Edwards is offline
  13. Old Comment
    Tycho's Avatar

    First term completed

    Congratulations on making it through your first term of university unscathed! That's no small feat! Good luck and I hope your experience continues to be positive.
    Posted 12-29-2012 at 03:07 AM by Tycho Tycho is offline
  14. Old Comment
    Tycho's Avatar

    Merry Christmas!

    Thank you! And to you as well!
    Posted 12-29-2012 at 03:06 AM by Tycho Tycho is offline
  15. Old Comment
    RisingFury's Avatar

    Clicky...

    Facecam, next time you type something. It'd be nice to see how you face lights up
    Posted 12-28-2012 at 05:12 PM by RisingFury RisingFury is offline
  16. Old Comment
    garyw's Avatar

    Clicky...

    Clicky? Does the keyboard have a serious 'click' noise when you type? I miss that from the old IBM keyobards:



    These ones have serious tactile feeling and nice loud CLICK sounds.
    Posted 12-28-2012 at 04:28 PM by garyw garyw is online now
  17. Old Comment
    Samuel Edwards's Avatar

    Clicky...

    Oh nice keyboard. And I'm glad you and your kids and wife/partner had a great day.

    Merry Christmas, and have a happy New Year!

    Posted 12-28-2012 at 03:38 PM by Samuel Edwards Samuel Edwards is offline
  18. Old Comment
    dgatsoulis's Avatar

    A fun ride in math-land

    Finished checking irregular 2D shapes. It works great.
    Posted the video and the code on the SDK forum, I might as well place it here too.



    Here is the code:
    Code:
    -- sanity checks
    v = vessel.get_interface('GL1')
    if v == nil then
        term.out ('Could not find 1. Aborting')
        return
    elseif v:get_classname() ~= 'DeltaGlider' then
        term.out ('Wrong vessel class. Aborting')
        return
    end
    
    -- set the types of notes position size and color on screen
    note = oapi.create_annotation()
    note:set_pos (0.002,0.23,0.5,0.5)
    note:set_colour ({r=1,g=1,b=0})
    note:set_size (0.8)
    
    gnote = oapi.create_annotation()
    gnote:set_pos (0.815,0.23,0.998,0.5)
    gnote:set_colour ({r=1,g=1,b=0})
    gnote:set_size (0.8)
    
    
    -- wait for goals to be completed (I'm using this code for challenges, so I'm keeping this format)
    contact = false
    vessel_inside=0
    goal2=0
    goals=vessel_inside+goal2
    
    while goals < 5 do --arbitrary number larger than the number of goals so the script doesn't close. In my challenge I set this to the number of goals
        gnote:set_text (string.format ("                GOALS\n---------------------------------\n• Check If the DeltaGlider is\n  on the ground or in the air\n• Return Ground or Airborn\n• If Ground Contact is true \n  check if inside cyan area\n• Return Inside or Outside"));
        
    vessel_inside=0
    
        --my vessel's coordinates. I need to have them in the same units as the coordinates of the shapes
        hobj = v:get_surfaceref()
        equ = oapi.global_to_equ (hobj, v:get_globalpos())
        x0 = equ.lng*180/PI
        y0 = equ.lat*180/PI
    
        -- coordinates of the triangle points. important to move counter-clockwise to get to the next point
        xa1 = 27.997948
        xa2 = 28.003588
        xa3 = 27.996508
        ya1 = 35.998773
        ya2 = 35.997393
        ya3 = 36.002883
    
        -- areas of the triangles defined by each side of the shape above and my coordinates
        a_1 = 0.5*((xa1*ya2)-(ya1*xa2)-(x0*ya2)+(y0*xa2)+(x0*ya1)-(y0*xa1))
        a_2 = 0.5*((xa2*ya3)-(ya2*xa3)-(x0*ya3)+(y0*xa3)+(x0*ya2)-(y0*xa2))
        a_3 = 0.5*((xa3*ya1)-(ya3*xa1)-(x0*ya1)+(y0*xa1)+(x0*ya3)-(y0*xa3))
    
        -- check if all areas are positive
        if a_1>0 and a_2>0 and a_3>0 then 
           vessel_inside=1
        end
    
         -- coordinates of the irregular rectangle points. Important to move counter-clockwise to get to the next point
        xb1 = 28.010138
        xb2 = 28.012718
        xb3 = 28.010758
        xb4 = 28.005328
        yb1 = 35.997543
        yb2 = 35.997983
        yb3 = 36.000623
        yb4 = 36.000973
    
        -- areas of the triangles defined by each side of the shape above and my coordinates
        b_1 = 0.5*((xb1*yb2)-(yb1*xb2)-(x0*yb2)+(y0*xb2)+(x0*yb1)-(y0*xb1))
        b_2 = 0.5*((xb2*yb3)-(yb2*xb3)-(x0*yb3)+(y0*xb3)+(x0*yb2)-(y0*xb2))
        b_3 = 0.5*((xb3*yb4)-(yb3*xb4)-(x0*yb4)+(y0*xb4)+(x0*yb3)-(y0*xb3))
        b_4 = 0.5*((xb4*yb1)-(yb4*xb1)-(x0*yb1)+(y0*xb1)+(x0*yb4)-(y0*xb4))
        
        -- check if all areas are positive
        if b_1>0 and b_2>0 and b_3>0 and b_4>0 then 
           vessel_inside=1
        end
    
        -- coordinates of the irregular pentagon points. important to move counter-clockwise to get to the next point
        xc1 = 28.016268
        xc2 = 28.020388
        xc3 = 28.021108
        xc4 = 28.018698
        xc5 = 28.014218
        yc1 = 35.997183
        yc2 = 35.998113
        yc3 = 36.000933
        yc4 = 36.002633
        yc5 = 36.001333
    
        -- areas of the triangles defined by each side of the shape above and my coordinates
        c_1 = 0.5*((xc1*yc2)-(yc1*xc2)-(x0*yc2)+(y0*xc2)+(x0*yc1)-(y0*xc1))
        c_2 = 0.5*((xc2*yc3)-(yc2*xc3)-(x0*yc3)+(y0*xc3)+(x0*yc2)-(y0*xc2))
        c_3 = 0.5*((xc3*yc4)-(yc3*xc4)-(x0*yc4)+(y0*xc4)+(x0*yc3)-(y0*xc3))
        c_4 = 0.5*((xc4*yc5)-(yc4*xc5)-(x0*yc5)+(y0*xc5)+(x0*yc4)-(y0*xc4))
        c_5 = 0.5*((xc5*yc1)-(yc5*xc1)-(x0*yc1)+(y0*xc1)+(x0*yc5)-(y0*xc5))
    
        -- check if all areas are positive
        if c_1>0 and c_2>0 and c_3>0 and c_4>0 and c_5>0 then 
           vessel_inside=1
        end
    
        --msgs and info on screen
        msg = string.format("-------------------\n        Info\n-------------------\n• X: %.6f \n• Y: %.6f\n-------------------\n    Messages\n------------------- ",x0, y0)
        note:set_text (msg)
        alt = v:get_altitude()
        contact = false
        if contact == false then
            contact = v:get_groundcontact()
            if contact == true then
               msg = msg.."\n• Ground"
            end
            note:set_text (msg)
            if alt >= 3 then
              contact = false
              msg = msg.."\n• Airborn"
            end
         end
        if vessel_inside<1 and contact == true then
            msg = msg.."\n• Outside"
        end
        if vessel_inside>0 and contact == true then
            msg = msg.."\n• Inside"
        end 
        note:set_text (msg)
        	
        proc.skip()
    	
        -- for challenges. check if goals have been met and close the script
        hobj = v:get_surfaceref()
           planet = v:is_landed() 
           if oapi.get_objname(planet) ~= 'Earth' then 
             planet = nil 
           end
             goal2=0
             if planet ~= nil then goal2=1
             end
             goals=vessel_inside+goal2
             if goals > 4 then -- same as at the beginning minus one. I use it for challenges, but here I don't want to close the script
             end
    end
     
    oapi.del_annotation (gnote)
    Posted 12-26-2012 at 08:54 PM by dgatsoulis dgatsoulis is offline
  19. Old Comment
    dgatsoulis's Avatar

    A fun ride in math-land

    Quote:
    Originally Posted by RisingFury
    ]Do your test with a 3 to 5 km long runway and let me know what happens, please
    I tested it and did not find any noticable errors for lattitudes up to 85. At around 87, it started to get visible. I posted an attachment in the OrbiterSDK thread. Next I'll check irregular shapes.

    Quote:
    Originally Posted by Urwumpe
    try it with a runway directly at the south pole. it could get funny.
    Yes it got very funny as I approached the pole. At exactly -90 the DG was returning me Y values all over the place and it got into NaN space as soon as I fired the engines.
    Posted 12-24-2012 at 03:18 AM by dgatsoulis dgatsoulis is offline
  20. Old Comment
    Samuel Edwards's Avatar

    Well.....it didn't end

    Just please make it a Tuesday next time guys?!
    Posted 12-24-2012 at 02:44 AM by Samuel Edwards Samuel Edwards is offline

All times are GMT. The time now is 07:33 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2007 - 2012, Orbiter-Forum.com. All rights reserved.