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

found some solid values for take off and touch down

parent 20f547f4
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,7 @@ sleep 2 ...@@ -10,7 +10,7 @@ sleep 2
./setsource "T trim add" "summand 1" "Altitude PID" "Correction" ./setsource "T trim add" "summand 1" "Altitude PID" "Correction"
#./setsource 14 0 8 0 #./setsource 14 0 8 0
./setparam "Throttle trim" 0 0.45 ./setparam "Throttle trim" 0 0.5
#./setparam 13 0 0.45 #./setparam 13 0 0.45
./setparam "Alt Setpoint" 0 -0.88 ./setparam "Alt Setpoint" 0 -0.88
#./setparam 11 0 -0.5 #./setparam 11 0 -0.5
#! /bin/bash #! /bin/bash
cut_off="-0.25" cut_off="-0.15"
regex='[+-]?[0-9]+\.?[0-9]*$' regex='[+-]?[0-9]+\.?[0-9]*$'
...@@ -8,9 +8,13 @@ regex='[+-]?[0-9]+\.?[0-9]*$' ...@@ -8,9 +8,13 @@ regex='[+-]?[0-9]+\.?[0-9]*$'
alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")" alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")"
while awk 'BEGIN { if ('$alt'>='$cut_off') {exit 1}}'; do while awk 'BEGIN { if ('$alt'>='$cut_off') {exit 1}}'; do
alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")" if (( $(bc <<< "$alt < -0.5") )); then
./setparam 'Alt Setpoint' 0 $( bc <<< "$alt + 0.1") alt="$(echo "$(./getparam 'VRPN Alt' 0)" | grep -Eo "$regex")"
echo "$alt too high" ./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 sleep .5
done 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