Profile image

(Solved)Question: Rate of descent

31.4k Dracul0Anderson  12 days ago

Does anyone know how to make a code that regulates rate of descent?

  • Log in to leave a comment
  • Profile image
    2,632 griges

    @Dracul0Anderson awesome!!

    10 days ago
  • Profile image

    @griges
    I've already tried Pitch!=0? PID(-1000*Pitch,rate(Altitude*3.2808)*60,1,0,0)/1000 : 0, works like a charm. I think this has solved my issue.

    +1 10 days ago
  • Profile image
    2,632 griges

    or button clicker? add and subtract,
    or a switch output the max Vs ?


    btw have you tried it? i think theres some error idk where tho

    10 days ago
  • Profile image
    2,632 griges

    @Dracul0Anderson i edited
    -1000*Pitch
    its already adjusted? for 1000ft/min
    if you want 3000ft/min just
    -3000*Pitch
    so half pitch is 1500ft/min

    10 days ago
  • Profile image

    @griges
    Oh no, you nailed it. How do I adjust this so I can have different rates of descent?

    11 days ago
  • Profile image
    2,632 griges

    still needs clamp,-1,1
    or i was misunderstood what the question is?

    11 days ago
  • Profile image
    2,632 griges

    @Dracul0Anderson vertical speed?
    heres what i know
    since rate(Altitude) is the rate of change the altitude in m/s, positive for going up,and vice versa
    .
    i use rate(Altitude*3.2808)*60 to get the Vs in ft/min
    to regulate it <-?
    Pitch!=0? PID(-1000*Pitch,rate(Altitude*3.2808)*60,1,0,0)/1000 : 0

    so if pitch full up(Pitch=1) and the target is (1*-1000) 1000ft/min

    the /1000 part is just because the result will be 1 if the vertical speed is 0
    i am not very good at calculating the PID, i just only know to use the P part,

    11 days ago
  • Profile image

    @griges
    What's VS?

    11 days ago
  • Profile image
    2,632 griges

    is it different than VS?

    11 days ago