| Autor | Neuer Beitrag |
| | |
| Mitglied Registriert seit: Jan 2008 Beiträge: 1016 Ort: The Netherlands (Haarlem) | I have a small problem but might be tricky/impossible to solve? Hopefully somebody sees something I miss...... I have set the " Sollhöhe (Setpoint)" to 250 but it seems the MK can now not get higher then around 50 meters? -Altitude Control is checkmarked in Configuration. -"Höhenfunktion per Schalter" not checkemarked (no spare channel) (I thought that 250 are maximum values in the MK-tool and that it means here 250 meters; I guess not.) Can I fill in something that makes it unlimited?Or can I choose any poti and together with NOT checking "Höhenfunktion per Schalter"(and are you sure this works then ..... no alt control with THIS poti !?) The problem is that I don't want to uncheck "altitude control" in the config page because if I do that I don't see the ALT in the EPI-OSD anymore. I also don't want to use the 3-postion switch with the GPS since I don't want to "lock" the altitude all the time using the GPS. Danke for your ideas. (If you want to answer in German, please do. I can read it pretty ok, but the writing is the problem....) DANKE! THanks. _______________ Started Building: Jan 2008.
ME FC, V1.2 BR-Ctrl, Custom Carbon MK8 frame, 8x Axi 2217-20, 4x4900 30C Lipo, Futaba FF-9, Wi232, Epi-Osd, EzOsd, Yellow Jacket Pro Diversity, Headplay Video Goggles. |
| | |
| Mitglied Registriert seit: Oct 2008 Beiträge: 401 | Wep,
the units for the height are not meters as one might think, it's the value used internally by the FC. The scale factor seems to be somewhere between 20 to 35 units/meter, according to some posts.
There is a parameter 'Scale' at the bottom of the 'Height' settings page. Increasing this value should give you more height. The default is 3 or 4 depending on the setting. If you set it to 10, you should be able to climb to 100m.
Klaus |
| | |
| MK-Betatester Registriert seit: Jan 2008 Beiträge: 1681 | The Datasheet of the MP4115p tells 46 mV/kPa sensitivity. The FC Board has a noninverting OPAMP with a gain of 1 + 18k*(1/6k8 +1/680) = 30.12 The ADC of the atmega644 uses an external reference voltage of 3V @10Bit, that is 0.3413 = Steps/mV Together this yields to an ADC Sensitivity of 0.3413 Steps/mV * 30.12 * 46 mV / kPa = 472.84 Steps/kPa. The FC Code adds ADC readings together tmpLuftdruck += ADC; if(++messanzahl_Druck >= 5) { tmpLuftdruck /= 2; MessLuftdruck = ADC; messanzahl_Druck = 0; HoeheD = (31 * HoeheD + (int) Parameter_Luftdruck_D * (int)(255 * ExpandBaro + StartLuftdruck - tmpLuftdruck - HoehenWert))/32; // D-Anteil = neuerWert - AlterWert Luftdruck = (tmpLuftdruck + 7 * Luftdruck + 4) / 8; HoehenWert = 255 * ExpandBaro + StartLuftdruck - Luftdruck; tmpLuftdruck /= 2; }
This gives again a factor of 10/3 more gain to at least 472.84 Steps/kPa * 10/3 = 1576.13 Steps/kPa. Now we have to remember the barometric height formula P(height)[kPa] = 101.325kPa * EXP(-1.29kg/m^3 * 9.81m/s^2 * height[m] /101.325kPa / 1000) Assuming we are at sea level we get a slope of 1.2kPa / 100 m. That gives at the end 1576.13 Steps/kPa * 1.2kPa / 100 m = 18.91 Steps / m I.e there are 19 Steps in the height measurement per meter height difference. That means one step corresponds to 5.26cm. « Bearbeitet von killagreg am 29.06.2009 01:31. » |
| | |
| Mitglied Registriert seit: Jan 2008 Beiträge: 1016 Ort: The Netherlands (Haarlem) | For me you are now talking SWAHITY... I only understood that something is theoretical is low.... Thanks for the explanation tho......but do you have a sollution to set something there that there is no alt control upper limit?? _______________ Started Building: Jan 2008.
ME FC, V1.2 BR-Ctrl, Custom Carbon MK8 frame, 8x Axi 2217-20, 4x4900 30C Lipo, Futaba FF-9, Wi232, Epi-Osd, EzOsd, Yellow Jacket Pro Diversity, Headplay Video Goggles. |
| | |
| Mitglied Registriert seit: Oct 2008 Beiträge: 401 | I love it when Gregor pulls out an excerpt of the FC and explains something like it was totally obvious. ;-) Wep, I thought you wanted to have an upper limit, only higher than the 50m you observed? This part of the Wiki shows the altitude control page of the MK-Tool. The parameter I was referring to incorrectly as 'Scale' is called 'Verstärkung (Gain)'. The explanation below says: 'Gain: increasing this value enables a higher ceiling. The Setpoint (your 250) will be multiplied with this value.' Gregor: Regarding the value which seems to be to low: Assuming Wep has set Gain to 3 (default for Kamera), that would yield 15*3, which closely mathces the ~50 Wep observerd |
| | |
| Mitglied Registriert seit: Jan 2008 Beiträge: 1016 Ort: The Netherlands (Haarlem) | Ok, this gain factor makes sense but isn't the altitude reading also affected by increasing this gain?? Or better: is ONLY the max altitude affected by this gain value? _______________ Started Building: Jan 2008.
ME FC, V1.2 BR-Ctrl, Custom Carbon MK8 frame, 8x Axi 2217-20, 4x4900 30C Lipo, Futaba FF-9, Wi232, Epi-Osd, EzOsd, Yellow Jacket Pro Diversity, Headplay Video Goggles. |
| | |
| Mitglied Registriert seit: Oct 2009 Beiträge: 54 Ort: Ammerbuch | killagreg meinte The FC Code adds ADC readings together tmpLuftdruck += ADC; if(++messanzahl_Druck >= 5) { tmpLuftdruck /= 2; MessLuftdruck = ADC; messanzahl_Druck = 0; HoeheD = (31 * HoeheD + (int) Parameter_Luftdruck_D * (int)(255 * ExpandBaro + StartLuftdruck - tmpLuftdruck - HoehenWert))/32; // D-Anteil = neuerWert - AlterWert Luftdruck = (tmpLuftdruck + 7 * Luftdruck + 4) / 8; HoehenWert = 255 * ExpandBaro + StartLuftdruck - Luftdruck; tmpLuftdruck /= 2; }
This gives again a factor of 10/3 more gain to at least 472.84 Steps/kPa * 10/3 = 1576.13 Steps/kPa.
I can't follow why this should give another gain factor of 10/3. Can you give me a hint on that? |
| | |
| MK-Betatester Registriert seit: Jan 2008 Beiträge: 1681 | twam meinte killagreg meinte The FC Code adds ADC readings together tmpLuftdruck += ADC; if(++messanzahl_Druck >= 5) { tmpLuftdruck /= 2; MessLuftdruck = ADC; messanzahl_Druck = 0; HoeheD = (31 * HoeheD + (int) Parameter_Luftdruck_D * (int)(255 * ExpandBaro + StartLuftdruck - tmpLuftdruck - HoehenWert))/32; // D-Anteil = neuerWert - AlterWert Luftdruck = (tmpLuftdruck + 7 * Luftdruck + 4) / 8; HoehenWert = 255 * ExpandBaro + StartLuftdruck - Luftdruck; tmpLuftdruck /= 2; }
This gives again a factor of 10/3 more gain to at least 472.84 Steps/kPa * 10/3 = 1576.13 Steps/kPa.
I can't follow why this should give another gain factor of 10/3. Can you give me a hint on that?
Ist nicht gleich auf den ersten Blick zu sehen. Zuerst werden 5 ADC-Readings summiert und die Summe durch 2 geteilt. Das ist dann der tmpLuftdruck. Das würde einem Faktor von 5/2 entsprechen. Nun beibt aber für die nächste Mittelung wiederum die Hälfte davon im Topf übrig. Die rekursive Formel lautet also X(i+1) = (X(i) + 5*ADC) / 4 = X(i)/4 + 5 / 4 * ADC wobei 2*X(i) = tmpLuftdruck ist. Die Folge ändert sich nicht mehr wenn X(i+1) = X(i) ist (Stabilität erreicht). Daher gilt: X(i) / 4 + 5 / 4 * ADC = X(i) | -X(i)/4 5 / 4 * ADC = 3 / 4 * X (i) | *4/3 5*4 / 4 /3 *ADC = X(i) 5/3*ADC = X(i) Da da tmpLuftdruck aber 2*X(i) ist, ergibt sich die Skalierung 10/3*ADC. Alles klar?  |
| | |
| Mitglied Registriert seit: Jan 2009 Beiträge: 356 Ort: Zürich | Hi, Zitat X(i+1) = (X(i) + 5*ADC) / 4 = X(i)/4 + 5 / 4 * ADC
I don't understand that part. Especially why you want to divide X(i) by 4 in the recursion. I get: X(i) is the value of the Luftdruck variable after i iterations at constant altitude. Assume that ADC is constant for i, and the filter has converged: X(i+1) = X(i) = (7 * X(i) + 5 ADC/2 )) / 8 which is different from your formula (I don't see 7 anywhere). Solution: 5/16 ADC = X(i)/8 5/2 ADC = X(i) - Which also seems consistent with the formula Zitat Luftdruck = (tmpLuftdruck + 7 * Luftdruck + 4) / 8;
looking like "just a low pass filter without gain". - Or did I get something wrong here? Regards Soren « Bearbeitet von dongfang am 24.11.2009 10:03. » |