Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
- SET_TIME : Amount of time from start before the heading is recorded.
- SENSITIVITY : Horizontal speed squared that registers a change in location.
- RESET_TIME : Amount of time from a detected change in location. Should be big enough to allow the value to be reset.
- ANG_VEL : Angular velocity.
Add Comment
Please, Sign In to add comment