AstleyIndustries

yst2

Apr 20th, 2021 (edited)
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. clamp(deltaangle(Heading, smooth(Time<SET_TIME | (1 - smooth(clamp01((rate(Latitude)*rate(Latitude)+rate(Longitude)*rate(Longitude))>SENSITIVITY), clamp01((rate(Latitude)*rate(Latitude)+rate(Longitude)*rate(Longitude))>SENSITIVITY)*100000 + 1/RESET_TIME))<0.99 ? Heading : sign(Yaw)*(9999999), Time<0.1 | (1 - smooth(clamp01((rate(Latitude)*rate(Latitude)+rate(Longitude)*rate(Longitude))>SENSITIVITY), clamp01((rate(Latitude)*rate(Latitude)+rate(Longitude)*rate(Longitude))>SENSITIVITY)*100000 + 10))<0.99 ? 9999999 : abs(Yaw)*ANG_VEL)), -1, 1)
  2.  
  3. SET_TIME : Amount of time from start before the heading is recorded.
  4. SENSITIVITY : Horizontal speed squared that registers a change in location.
  5. RESET_TIME : Amount of time from a detected change in location. Should be big enough to allow the value to be reset.
  6. ANG_VEL : Angular velocity.
Add Comment
Please, Sign In to add comment