Skip to content
Snippets Groups Projects
Commit 6fa1318e authored by Stéphane Yang's avatar Stéphane Yang
Browse files

Changed gas parameters from variable (in drone.var) to mask (external file...

Changed gas parameters from variable (in drone.var) to mask (external file like mask_gas.txt). That way, it is faster to change without compiling. Update readme.
parent 6d854ffe
No related branches found
No related tags found
No related merge requests found
Pipeline #6280 passed
......@@ -345,19 +345,7 @@
</liaison>
<liaison>
<depart>negative_error</depart>
<arrivee>gas_low2</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_high</depart>
<arrivee>gas_high2</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_low</depart>
<arrivee>gas_low2</arrivee>
<arrivee>gas_mid2</arrivee>
<style>0</style>
<coude_list />
</liaison>
......@@ -368,7 +356,7 @@
<coude_list />
</liaison>
<liaison>
<depart>gas_low2</depart>
<depart>gas_mid2</depart>
<arrivee>throttle_decision</arrivee>
<style>0</style>
<coude_list />
......@@ -409,12 +397,6 @@
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_low</depart>
<arrivee>gas_lower2</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_lower2</depart>
<arrivee>throttle_decision</arrivee>
......@@ -623,14 +605,7 @@
<depart>alt_2</depart>
<arrivee>alt_2</arrivee>
<style>0</style>
<coude_list>
<coude>
<x>511</x>
<y>394</y>
<relatif>1</relatif>
<legende>2</legende>
</coude>
</coude_list>
<coude_list />
</liaison>
<liaison>
<depart>alt_2</depart>
......@@ -660,14 +635,7 @@
<depart>mem</depart>
<arrivee>97</arrivee>
<style>0</style>
<coude_list>
<coude>
<x>481</x>
<y>521</y>
<relatif>1</relatif>
<legende>2</legende>
</coude>
</coude_list>
<coude_list />
</liaison>
<liaison>
<depart>87</depart>
......@@ -819,4 +787,64 @@
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>12</depart>
<arrivee>98</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>98</depart>
<arrivee>90</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>98</depart>
<arrivee>89</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>6</depart>
<arrivee>three_gas</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>three_gas</depart>
<arrivee>gas_high</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>three_gas</depart>
<arrivee>gas_mid</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>three_gas</depart>
<arrivee>gas_lower</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_high</depart>
<arrivee>gas_high2</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_mid</depart>
<arrivee>gas_mid2</arrivee>
<style>0</style>
<coude_list />
</liaison>
<liaison>
<depart>gas_lower</depart>
<arrivee>gas_lower2</arrivee>
<style>0</style>
<coude_list />
</liaison>
</liaison_list>
No preview for this file type
This diff is collapsed.
This diff is collapsed.
@DYNAMIC_GAIN 0.5
@DYNAMIC_GAIN 1.0
@COMPASS_GAIN 1.0
% convert altitude from cm to [0-1] range, for example 200 means 200 cm = 1
@MAX_ALT_CM 1000
% gas percentage enough to climb if desired altitude is above measured
@GAS_HIGH 0.75
% gas percentage enough to stay stabilized if measured altitude is a little below desired altitude
@GAS_LOW 0.5
% value to substract to gas_low which will lower gas to descent/land when measured altitude is clearly below desired altitude
@GAS_MORE_LOW 0.3
0.80
0.5
0.1
......@@ -5,3 +5,18 @@ There is two altitude measures for gas control: alt and altitude_2. However only
alt is simply from the ultrasonic distance sensor which an accurate distance from ground, it requires no processing but is fragile to ultrasound absorbing surfaces (such as wet grass).
altitude_2 is a more robust altitude measure but has high variance and drifts over time. First, we simply use a recursive filter to take the mean value of the altitude (alt_2), this will help for the variance problem. Then, a checkbox is created in order to substract the current distance, this means that the current distance will be our zero (departure_alt) and the next altitudes (alt_2_offset) will be relative to this zero, this will help temporarily for the drift problem.
## Mask
### mask_3rd_axs.txt
Mask to isolate the third axis (normally, the rotation of the joystick).
### mask_gas.txt
Files for the gas power command for each desired action.
- 1st value: gas percentage enough to climb if desired altitude is above measured
- 2nd value: gas percentage enough to stay stabilized if measured altitude is a little below desired altitude
- 3rd value: value to substract to gas_low which will lower gas to descent/land when measured altitude is clearly below desired altitude
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