GPS sensor

Development & General Chat for the superb openxvario project.

Moderator: rainer

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

I also got sometime the issue that altitude and old Vspeed is locked at power on. In fact the baro sensor seems locked. I do not know why.
Most of the time, just powering off and on once solves the issue.

It is strange that you say that altitude seems more responsive.
In this oXs version, altitude sent to Tx is still altitude based only on baro sensor.
I presume there is no real need for a more reactive altitude.
So it is logic that other movements does not have an impact.

When mpu6050 and first VARIO are installed, oXs calculates another vertical speed.
This new measurement is named VERTICAL_SPEED_I.
The old one still exist (and is named VERTICAL_SPEED).
In the config.h file you can select which of the 2 measurements has to be sent as VSpeed. You can also sent the other one in a field like T1 or T2 in order to get it on screen and in a log. So you can compare.

Using some debug options allows to get raw data too (e.g. from baro and accelerometers) on Pc terminal and so you get more data per second and it is easier to look at reaction times. This requires still to copy paste the data from Pc terminal into a program like excel chart.

mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

in fact the config.h currently on github ask to send PPM_VSPEED as Vspeed.
This measurement is a special one that you can use when you use the PPM option.
It allows to select from TX which measurement has to be sent e.g. as vertical speed.
It allows to switch between 2 while flying. It can be useful to test.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

An OK , I must of just imagined the altitude speed response increase...
I don't have ppm connected...yet!
I will look to see where I need to change the v.speed then.
Thanks again.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Just replace line
VSpd , PPM_VSPEED , 1 , 1 ,0 , \

with
VSpd , VERTICAL_SPEED_I , 1 , 1 ,0 , \

and remove the line
T2 , VERTICAL_SPEED_I , 1 , 1 , 0 , \
because oXs does not work fine if the same measurement (VERTICAL_SPEED_I) is sent twice.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

working now! :D
yes i can really see the difference in v.speed response. much faster now, just about instant. 8-)

nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

the altitude sometimes not working at power up effects the v.speed too, will have to make sure its working before throw the glider and try interpreting the tones lol, but will be obvious because altitude will keep saying zero so i will soon know!
just need some nice weather to try it out for real now.
thanks again.
nigel.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: GPS sensor

Post by jhsa »

nigelsheffield wrote:working now! :D
yes i can really see the difference in v.speed response. much faster now, just about instant. 8-)
I have some 6050's (Right one?) and I will try that as well.. Thanks guys.. :)

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
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

We are using the gy-86, has the ms5611 and 6050 and compass but I don't think compass is being used?
I also bought the gy521 which has just the 6050 on it but not tried that yet, I was going to try to connect it in parralel with the ms5611 but with resistors to limit the signal volts to 3.3v and see if it worked...but I think it might stand more chance of working if supplied with 3.3v with no resistors so I ordered 3.3v ldo but not arrived yet....
But you can try it first now and see if it works lol.
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

I confirm that compass is currently not used by oXs.
Compass is normally used in order to get a better yaw value (avoiding drift from gyro).
As far I understood, yaw value can be totally discarded when looking at the vertical acceleration in Earth reference.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: GPS sensor

Post by jhsa »

I think I have the one without pressure sensor.. must check.. I bought them just because they were cheap and I could need them in the future.. You never know ;)

I'm still working on other little projects, then I will try it of course.. Winter is long around here, so I have time :)

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
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

It would be handy if it worked adding 6050 to the gy-63 because then I can upgrade my existing sensors cheaply...
Testing some more, I did not notice much bad effect from side to side movement but moving up and down fairly rapidly repeatedly , seemed to confuse the results a little, but soon settled after I stopped and moved a little more realistically.
Winter here is long too and I don't think there will be any flying opportunity to test for quite some time , wind wind rain and more wind lol..
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: GPS sensor

Post by jhsa »

Yeah, thermals are also non existent for a while I guess :) I also have no hills around here, so I could only test the descending part :)

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
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: GPS sensor

Post by Carbo »

jhsa wrote:Yeah, thermals are also non existent for a while I guess :) I also have no hills around here, so I could only test the descending part :)

João
Thermals.png
Come on, no excuses! Thermals are announced.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

http://www.xcweather.co.uk/forecast/wf4_5jr

I am on a east facing very slight bump/slope this is what I have to contend with.......
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: GPS sensor

Post by jhsa »

;) :)
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
kcaldwel
Posts: 40
Joined: Wed Mar 12, 2014 7:49 pm
Country: Canada

Re: GPS sensor

Post by kcaldwel »

Thanks for all the help!

I haven't managed to get the GPS working yet, but while going through the config file description, I noticed you already have code to do L/D data collection, with user settable intervals for steady data, etc. Very cool! Now I need an airspeed sensor...

Since an RC glider is always flying relative to the person on the ground, I was thinking a display of the L/D over the ground would be a useful, using the GPS ground speed and baro altimeter vertical speed. Even audio tones as a speed director would be great for maximizing the L/D over the ground up and down wind. The ultimate would be if it reverted to a vario if the glider started to climb.

Once you start with this thing, it is addictive. I've got to get some work done on airplanes!

Thanks again,

Kevin
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

In a previous version of oXs (about 2 weeks ago), it was possible to set up if L/D data was based on airspeed sensor or on GPS ground speed.
Still tests made by Carbo have demonstrated that it was not useful. Therefore, it has been removed when we made an other algorithme to calculate L/D.

Note: about L/D, I think there is also a lua script that allows to calculate it on TX side.
kcaldwel
Posts: 40
Joined: Wed Mar 12, 2014 7:49 pm
Country: Canada

Re: GPS sensor

Post by kcaldwel »

Hang glider instrument decks and full-size sailplane flight computers have calculated glide over the ground and glide slope to goal for a long time. I've found the function useful there. Since an RC glider is on "glide to goal" back to the field a lot, I think L/D over the ground and back to the field would be useful for me. I'll look at the LUA if I ever get this GPS to function.

http://flytec.com/6030.html

The FrSky GPS comes up immediately when you do "Discover new sensors", even if it does not have lock. It shows GPS speed, etc. in the sensor list on the Taranis. That is certainly handy when you want to see if the GPS is connected properly, which I am doing a lot at the moment. Waiting to see if the GPS will lock and show up in the telemetry in the middle of a storm isn't hat good!

Kevin
kcaldwel
Posts: 40
Joined: Wed Mar 12, 2014 7:49 pm
Country: Canada

Re: GPS sensor

Post by kcaldwel »

GPS success! The rain let up and I finally got a GPS lock, and with the config file I got from Nigel it works! It also appears to be updating very often, so hopefully the 10Hz is working as well.

I have one odd thing though. The GPS position shows me at 53 degrees 23'W, 49degrees 46'N. My actual position is about 124 degrees 58'W, 49 degrees 46'N. The latitude is right, but the longitude is wrong. Any idea why?

Thanks again for everyone's help, and patience through my basic questions. It's been a fun learning experince, and I now have a working high speed GPS!

Kevin
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

Good that is working now !
Where are you ?
Have you tried looking at the logs and going to Google earth?
There is a setting on taranis for different GPS but I can't remember what it does but it might be that.?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

About wrong GPS longitude.
I think I found a bug (overflow in intermediate calculation) in file oXs_out_frsky.cpp
I put a new version on github in branch openXsensor_imu.
Could you test it.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

If the long was wrong on mine I did not notice it on Google earth?!?
Would bug only effect some locations?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

Yes, it was an overflow when degree of long exceeded some value. So, with quite small long there was no issue.
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

jhsa wrote:I think I have the one without pressure sensor.. must check.. I bought them just because they were cheap and I could need them in the future.. You never know ;)

I'm still working on other little projects, then I will try it of course.. Winter is long around here, so I have time :)

João

if its the gy521 which i have too, i just googled a bit and someone has succesfully used it on 5v arduino without any level shifting.
not saying its a good idea but good to know.
ic12 bus i presume will have the same number as the one on the gy86?
if so i dont see why it wont work?
reading more you can have loads of sensors on i2c bus, i wonder why frsky did not just use that instead of s.port, but i guess i2c bus sensors is one thing , getting meaningful data for telemetry is another.....

so this could just be stacked on top of the gy63 using vcc, gnd, scl, sda and a wire from int to pin 2 of arduino?
kcaldwel
Posts: 40
Joined: Wed Mar 12, 2014 7:49 pm
Country: Canada

Re: GPS sensor

Post by kcaldwel »

mstrens wrote:About wrong GPS longitude.
I think I found a bug (overflow in intermediate calculation) in file oXs_out_frsky.cpp
I put a new version on github in branch openXsensor_imu.
Could you test it.
I'll give it a try, thanks!

It did make me realize how big Canada is again. I'm on Vancouver Island off the west coast of Canada at 124W, and the 53W I was getting was just off the east coast of Newfoundland. 70 degrees of longitude, and still just about in the same country!

I don't think I'll be able to run a LUA to do L/D over the ground. The LUA to do the triangle racing takes up pretty much the entire capabilities of the Taranis.

Kevin
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

Well you could run the LD over ground script on its own, using the LD over ground may during the triangle racing well be considered cheating anyway lol.. :D .
Seriously I don't think LD over ground would take much lua space , it could probably be incorporated into the GPS triangle racing script, I bet the code pretty much there already ....
Carbo
Posts: 467
Joined: Fri Aug 02, 2013 6:55 pm
Country: Germany
Location: Freinsheim RP

Re: GPS sensor

Post by Carbo »

Maybe there is an easy solution:
If you want to optimize the plane performance, you have to use an airspeed sensor. If you want to calculate tactical flight tasks, you will use GPS. Both speeds will normally not be available. If no airspeed is configured, oXs could be switched to use GPS-Speed.

What do you think, Michel?
kcaldwel
Posts: 40
Joined: Wed Mar 12, 2014 7:49 pm
Country: Canada

Re: GPS sensor

Post by kcaldwel »

There are obviously many things I do not understand about editing the config file. I cannot get any telemetry, GPS or otherwise, from my oXs using the latest imu file. I've tried it untouched, and tried editing the config it to make sure the GPS is on and turn off the imu functions that I don't have sensors for with no joy either. Not even vario telemetry comes through.

There is obviously something fundamental I am doing wrong.

I tried putting the new oXs_out_frsky.cpp file in the one package I have that works, but that won't compile. It is obviously not compatible with the other older files.

If I go back to the GPS file Nigel gave me, everything works, but the longitude.

Sorry, I can't try the GPS correction until I sort out how to edit the config file better. A million monkeys...

Kevin
nigelsheffield
Posts: 308
Joined: Fri Nov 08, 2013 9:56 pm
Country: -

Re: GPS sensor

Post by nigelsheffield »

Check the config file carefully against the one that works to see differences,
It might be the force s.port needs in commenting?
mstrens
Posts: 1435
Joined: Fri Dec 27, 2013 7:49 pm
Country: -

Re: GPS sensor

Post by mstrens »

can you attach your config to a post.
I can check it.

Post Reply

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