Introduction to the openx vario/altimeter

Development & General Chat for the superb openxvario project.

Moderator: rainer

Post Reply
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

can you vary the Rpm value with the pot ?

User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

Ohh!... Yes I can.. I can go from -76 to +870

Ummm... Now what?
Last edited by Flaps 30 on Wed Feb 27, 2013 10:35 pm, edited 1 time in total.
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: Introduction to the openx vario/altimeter

Post by RightRudder »

Flaps 30 wrote:
RightRudder wrote:I think having the altitude at field = zero would be best.
Which we already have at a touch of the Menu button with Open9x


Yes but do you really need to be able to set your field elevation and read the sea level pressure in the rpm field? Why is that important, I'm just curious.
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

RightRudder - No real reason. Other than to get things into the ball park and hopefully understand a little more about the software. So far we have the temperature reading what it should be, and moving forward on the pressure setting.
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

Flaps 30 wrote:Ohh!... Yes I can.. I can go from -76 to +870

Ummm... Now what?
Are your pot`s correctly calibrated ? It should go somewhat from 0 to 990

User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

I am using the rudder control channel. Yes it is calibrated.

The Pressure Calibration Offset was set to 475 when I uploaded the sketch file
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

This is unlike as mine. Since Rpm is the gain value for the Kalman filter. So to find the best fit setting it is not a good idea to have the spring loaded stick for.
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

I thought what should be displayed in the Rpm field was the pressure and not the gain value of the filter. Perhaps I should start over again and disable all of the remote sensitivity stuff, as it only confuses the whole issue for me..
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

Pressure is T2 :)

Rpm = Kalman Filter value
Vfas = internal Vcc of Arduino
T1 = Temperature
Dist = Absolute Altitude
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

And now I get really confused... Is it just me that is confused? ;)

From Rainer's previous post - RPM = the current air pressure
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

Not sure but I thing it was changed with the latest SW version.

I checked the code again. Inside the first 828 lines you can configure your settings. Just activate or deactivate the #defines with delete or insert // in front.

Sorry for the confusing. ;)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

Okay... Better leave that for now.. Another issue has raised its head with regard to commenting out the three items to get things back to manual operation.

You cannot comment out both of these items without getting a compilation error #define PPM_AllwaysUsed #define PPM_ProgrammingMode One of them has to be active. You cannot comment out #define PIN_PPM 2 without a compilation error, regardless of the condition of the previous two items.

Ohh.. The Arduino sketch tool won't let me copy paste anything. So if you want the errors. I will have to do it long hand. It also will not show line numbers.. So I really loath it with a passion and that doesn't get any better with use. :(

No worries Promix. You have helped a lot on this and we are moving somewhere. :)
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

Ok, this is my complete working configuration. You may compare it with yours ;)
Attachments
Settings.txt
(12.18 KiB) Downloaded 357 times
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

Thanks for that.. I will have a look at it and play around with it tomorrow and report back. :)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

Not so good since last night. You are right Promix. The pressure is on T2 and Not RPM which is now supposed to be the active Kalman filter value.

Changing this ---> #define SEND_PressureAsT2 9000 did alter what was displayed in T2. But I couldn't get it to make any sense to relate it to my local pressure of 1029.00 mb the display with the 9000 offset displayed 208. So I gave up on that.

The figure in the Rpm field was 180 even though the value in the Kalman filter was 200. Changing that value in the sketch file to 300 made no difference to what was being displayed. So I gave up on that.

After all of that (and the frustration with the sketch file tool that gets worse by the day) my thoughts turned to this horrid *redundant remote sensitivity adjustment system that is doing my head in. Commenting out #define PIN_PPM 2 gives a compilation error. Grrrr!!!!! I don't want a blinking LED or the switch on delay that it brings with it. I want this remote out of my life!! :evil:

And so it went on.. As to what I really want out of this and what could go into the bin to simplify the software. Out goes remote sensitivity on the Kalman filter along with temperature, cell voltage(s), Pressure, internal Vcc of the Arduino display, absolute altitude display. Of course what would be ideal, would be a vario that just did its job of 'varioing' and maybe a little bit of self learning to take out minor variations/noise. Throw in the dual sensor instead of the other stuff would be good. :)

Time for a coffee I reckon. :)

* My view on what is unlikely to need any change once a value has been found to work for the majority.
RightRudder
Posts: 241
Joined: Tue Jan 15, 2013 9:41 pm
Country: -

Re: Introduction to the openx vario/altimeter

Post by RightRudder »

Flaps 30 wrote:SNIP...
Ohh.. The Arduino sketch tool won't let me copy paste anything. So if you want the errors. I will have to do it long hand. It also will not show line numbers.. So I really loath it with a passion and that doesn't get any better with use. :(
Hey flaps you could always do a pint screen, paste it into paint and save as a jpg and then attach it to your post. I'm not sure how these guys insert code snips into windows with scroll bars, that's cool. I'll have to figure that out one day.

Cheers
Joe
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

Flaps, don`t give up :)
Flaps 30 wrote:Changing this ---> #define SEND_PressureAsT2 9000 did alter what was displayed in T2. But I couldn't get it to make any sense to relate it to my local pressure of 1029.00 mb the display with the 9000 offset displayed 208. So I gave up on that.

The figure in the Rpm field was 180 even though the value in the Kalman filter was 200. Changing that value in the sketch file to 300 made no difference to what was being displayed. So I gave up on that.
The readout on display is a bit strange because this field is misused and never intended to show pressure even because of missing digits. So I think your T2 value of 208 means 2080, just subtract 8000 in sketch for offset and u are fine.
Today I have the same local pressure here and my display shows "129 with a small trailing 4" and it means 1029,4
The zero digit is always missing ;)
I am sure Bertrand will fix this if openxvario comes to a final version. All this is still experimental :)
See my the attached pic from test to compare what it should look like. In the lower left you can see my Rpm value of 990 to make Vspd more calm for reading.

For the Rpm issue, If you have enabled the pot cal method you don`t need to do any further entry to the sketch.
In 0pen9x just add a 100% pod mix to the dedicated vario channel, thats it.
Then you can turn the pot to vary the gain for Vspd sensitivity.

Have another coffee and relax :D
Attachments
P1070738.JPG
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Introduction to the openx vario/altimeter

Post by rainer »

Flaps 30 wrote:Not so good since last night. You are right Promix. The pressure is on T2 and Not RPM which is now supposed to be the active Kalman filter value.

Changing this ---> #define SEND_PressureAsT2 9000 did alter what was displayed in T2. But I couldn't get it to make any sense to relate it to my local pressure of 1029.00 mb the display with the 9000 offset displayed 208. So I gave up on that.

The figure in the Rpm field was 180 even though the value in the Kalman filter was 200. Changing that value in the sketch file to 300 made no difference to what was being displayed. So I gave up on that.
The rpm field has a vary low resolution it only displays the actual values rounded to a multiple of 30.
look at this comment in the config area:

Code: Select all

//(unprecise field! resolution is in steps of 30RPM!)
that´s the reason. For the tests that Ingo did, i thought this would be sufficient, so we moved the sensitivity to RPM.

You can (almost) freely choose which value you want in this (or most of the other) field(s) by configuring this section of the code:

Code: Select all

/***************************************************************************************/
/* Which data to send in which telemetry field                                         */
/* ==> choose freely one value per Telemetry field                                     */
/***************************************************************************************/
//**************** the DIST field (GPS Distance) (choose only one)**********************/
#define SEND_AltAsDIST 0   // 0 Altitude in DIST the numeric value (in cm) is an offset that will
                           // be subtracted from the actual height for higher display precision.
                           // e.g: Actual height is 456,78 Meters ( DIsplay in DIst would be 456 7)
                           // if we subtract 300 display will be 156 78
                           // This is due to the fact that the highest precission in this field
                           //  will only be transmitted up to an altitude of 327.68 m
//#define SEND_SensitivityAsDist // sensitivity in DIST
//#define SEND_PressureAsDIST    // pressure in DIST field

//************************** the T1 (temperature 1) Field? (choose only one) **********/
#define SEND_TEMP_T1         // MS5611 temperature as Temp1
//#define SEND_PressureAsT1 9000 // pressure in 1/10th of mBar in T1 Field subtracted by
                               // the number in the define statment. 
                               // e.g. 950mbar => 9500 -offset of 9000 => 500 in display

//************************** the T2 (temperature 2) Field? (choose only one) **********/
//#define SEND_TEMP_T2    // MS5611 temperature as Temp2
//#define SEND_SensitivityAsT2  // Kalman Param R in Temp2
#define SEND_PressureAsT2 9000 // pressure in 1/10th of mBar in T1 Field subtracted by
                               // the number in the define statment. 
                               // e.g. 950mbar => 9500 -offset of 9000 => 500 in display

//************************** the RPM Field? (choose only one) *************************/
//(unprecise field! resolution is in steps of 30RPM!)
//#define SEND_AltAsRPM      // Altitude in RPM ;-)
#define SEND_SensitivityAsRPM  // Kalman Param R in RPM
//#define SEND_PressureAsRPM // pressure in RPM Field
Flaps 30 wrote:After all of that (and the frustration with the sketch file tool that gets worse by the day) my thoughts turned to this horrid *redundant remote sensitivity adjustment system that is doing my head in. Commenting out #define PIN_PPM 2 gives a compilation error. Grrrr!!!!! I don't want a blinking LED or the switch on delay that it brings with it. I want this remote out of my life!! :evil:

And so it went on.. As to what I really want out of this and what could go into the bin to simplify the software. Out goes remote sensitivity on the Kalman filter along with temperature, cell voltage(s), Pressure, internal Vcc of the Arduino display, absolute altitude display. Of course what would be ideal, would be a vario that just did its job of 'varioing' and maybe a little bit of self learning to take out minor variations/noise. Throw in the dual sensor instead of the other stuff would be good. :)
Yes the compilation error was a bug. i´ve fixed it here allready, but wanted to do some more tests and fix 2 othere bugs related to the tests that Ingo (promix) did before i commit it again. ( i just arrived back home an hour ago...)
<hollywood>So lean back... take a deep breath. It´s all going to be fine </hollywood>


Rainer
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Introduction to the openx vario/altimeter

Post by rainer »

One more thing regarding the pressure display in the field T2:

Code: Select all

#define SEND_PressureAsT2 9000 // pressure in 1/10th of mBar in T1 Field subtracted by
// the number in the define statment.
// e.g. 950mbar => 9500 -offset of 9000 => 500 in display
so if for example you have a display of 1234
You have to ignore the superscription of the last digit. SO the actual number is: 1234. You add 9000 to this and get: 10234 which is the pressure in 1/10th of millibar.
So the actual pressure is: 1023.4 mBar
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

Last first. I have finally got a sensible figure for T2. Local pressure is 1028.0mb reading on T2 flickering between 128 and 129,, No superscript number is showing. The Offset used was 9038. For the record 9000 gave a readout of 196

Regarding the compilation error. The software in use is Version 124. From what you are saying I guess that the bug is in that version?

The temperature compensation ended up as -70 Temp=(int)(TEMP*10)-70;

More coffee needed.
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

Promix wrote:The readout on display is a bit strange because this field is misused and never intended to show pressure even because of missing digits. So I think your T2 value of 208 means 2080, just subtract 8000 in sketch for offset and u are fine. Today I have the same local pressure here and my display shows "129 with a small trailing 4" and it means 1029,4
The zero digit is always missing ;)
As you can see. The result I got was somewhat different as to an offset value of 8000. Rather strange that it didn't follow the book.
Promix wrote:For the Rpm issue, If you have enabled the pot cal method you don`t need to do any further entry to the sketch. In 0pen9x just add a 100% pod mix to the dedicated vario channel, thats it. Then you can turn the pot to vary the gain for Vspd sensitivity.
Ohh! Is that all of that stuff I'm trying to kill off? :roll: ... I suspect it is. Until I prove otherwise. I am happy to stick with changing the sensitivity of the filter on the sketch file. Thanks all the same. Good try. :lol:
User avatar
rainer
Posts: 391
Joined: Tue Jan 01, 2013 9:20 pm
Country: Germany
Location: near Düsseldorf

Re: Introduction to the openx vario/altimeter

Post by rainer »

actually the pressure is mainly being displayed in this way to be able to run tests in Ingo´s pressure chamber. We just needed to be able to compare the measured value against the "real" pressure in the test device. .... for a real variometer use it´s probably not needed anyway :D
The T2 field cannot display values higher than 2000 if we write to it using the frsky telemetry protocoll, so i had to add in the substract "9000" to assure that we stay below 2000.

I would suggest to just IGNORE the pressure value right now. as soon as all the calibration and testing is completed we can change the T2 field to display milliBars instead of 1/10th of milliBars and all will be fine without all the subtract 9000 stuff..
is anybody really interested to read out pressure in 1/10th of mBar?

what really would be nice, if we could get a chance to write to a couple of fields like T1,T2,RPM,... via alternative ID´s in order to use the full precision of the variables behind them ( -32768 to +32768 or 0 to 65535) but due to the "re-use" of existing field/ID´s this is not yet possible..

Regarding the temperature calibration: In the next version i will as well add an offset for temperature calibration to make life easier.
build your own vario ==> https://github.com/openXsensor/openXsensor/wiki (Formerly https://code.google.com/p/openxsensor/ and https://code.google.com/p/openxvario/)
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

Flaps 30 wrote:
Promix wrote:For the Rpm issue, If you have enabled the pot cal method you don`t need to do any further entry to the sketch. In 0pen9x just add a 100% pod mix to the dedicated vario channel, thats it. Then you can turn the pot to vary the gain for Vspd sensitivity.
Ohh! Is that all of that stuff I'm trying to kill off? :roll: ... I suspect it is. Until I prove otherwise. I am happy to stick with changing the sensitivity of the filter on the sketch file. Thanks all the same. Good try. :lol:
I couldn`t resist :twisted:
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Introduction to the openx vario/altimeter

Post by Rob Thomson »

From my point... Only two values are of any real use.

1. Rate of climb and decent.
2. Altitude relative to launch position.

Everything else seems a bit pointless :-D

Sent from my Nexus 7 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
Flaps 30
Posts: 1490
Joined: Tue Dec 27, 2011 6:04 pm
Country: -
Location: Wokingham Berkshire

Re: Introduction to the openx vario/altimeter

Post by Flaps 30 »

rainer wrote:actually the pressure is mainly being displayed in this way to be able to run tests in Ingo´s pressure chamber. We just needed to be able to compare the measured value against the "real" pressure in the test device. .... for a real variometer use it´s probably not needed anyway :D.
That is true as I mentioned earlier. I can understand the need to display Vspeed and height above the airfield being of use, and to some I suppose the Kalman value ;)... The rest IMO isn't of much use.

If you are leaving in the pressure. That will more than likely require an offset.
Promix wrote:I couldn`t resist :twisted:
:)

Edit - I didn't see your post Rob.. Yup. Same thoughts... Did you get to test the vario in the air today?
User avatar
Promix
Posts: 109
Joined: Wed Dec 28, 2011 10:23 am
Country: -

Re: Introduction to the openx vario/altimeter

Post by Promix »

+1
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Introduction to the openx vario/altimeter

Post by Rob Thomson »

Posted my flight test in a separate thread:smile:

Sent from my Nexus 7 using Tapatalk 2
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Introduction to the openx vario/altimeter

Post by jhsa »

Guys you won't believe this.. I was waiting for my vario sensor for 1 month now..
Received the package, openned it and voilá....... a nice and shinny blue accelerometer :(

Was so looking forward to get the bloody sensor.. I'm really angry now, which doesn't happen very often.. :twisted: :(

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
Rob Thomson
Site Admin
Posts: 4543
Joined: Tue Dec 27, 2011 11:34 am
Country: United Kingdom
Location: Albury, Guildford
Contact:

Re: Introduction to the openx vario/altimeter

Post by Rob Thomson »

Oh dear. Well.. guess you can wire it up to tell you how fast you are accelerating up/down/left and right?
Slope Soaring, FPV, and pretty much anything 'high tech'
...........if you think it should be in the wiki.. ask me for wiki access, then go add it!
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Introduction to the openx vario/altimeter

Post by jhsa »

yeah, I guess I just stick it up my backside and jump out of a cliff holding the 9x in my hands.. :mrgreen:
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “OpenXVario - an open source vario supported by the open source firmwares!!”