Skip to content
Snippets Groups Projects
Commit a4383818 authored by ucart's avatar ucart
Browse files

found some solid values for take off and touch down

parent 4e99f95b
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ sleep 2
./setsource "T trim add" "summand 1" "Altitude PID" "Correction"
#./setsource 14 0 8 0
./setparam "Throttle trim" 0 0.45
./setparam "Throttle trim" 0 0.5
#./setparam 13 0 0.45
./setparam "Alt Setpoint" 0 -0.88
#./setparam 11 0 -0.5
#! /bin/bash
cut_off="-0.25"
cut_off="-0.15"
regex='[+-]?[0-9]+\.?[0-9]*$'
......@@ -8,9 +8,13 @@ regex='[+-]?[0-9]+\.?[0-9]*$'
alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")"
while awk 'BEGIN { if ('$alt'>='$cut_off') {exit 1}}'; do
alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")"
./setparam 'Alt Setpoint' 0 $( bc <<< "$alt + 0.1")
echo "$alt too high"
if (( $(bc <<< "$alt < -0.5") )); then
alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")"
./setparam 'Alt Setpoint' 0 $( bc <<< "$alt + 0.15")
else
alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")"
./setparam 'Alt Setpoint' 0 $( bc <<< "$alt + 0.25")
fi
sleep .5
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment