Hello guest, if you read this it means you are not registered. Click here to register in a few simple steps, you will enjoy all features of our Forum.
This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPS overtakes baro for altitude
#1
I have the Flywoo compass/baro unit, it’s an add on item that uses the sda/scl pads. I’ve noticed when I fly without gps lock that altitude is accurate and all good. Once gps kicks in with enough satellites for a fix then altitude goes to crap with (what I believe) is gps data providing altitude.

Is there a way in the cli to ensure baro always takes preference over gps for altitude?

Thanks guys,
Ph2t.
Reply
Login to remove this ad | Register Here
#2
What version of Betaflight are you using? This was a known issue in older version of Betaflight where if you got a GPS lock after take off the Altitude data would be trash. 

Most people do not notice this issue as they either wait for a GPS lock or at time they do not have any Barometer onboard to notice the values suddenly appear garbage in the OSD.

Basically, in Betaflight altitude is derived from the barometer (if available), GPS (if available), or a combination of both (default).

Try and run the CLI command:
get position_alt_source

It should return back:
position_alt_source = DEFAULT
Allowed values: DEFAULT, BARO_ONLY, GPS_ONLY

Then set it to BARO_ONLY:
set position_alt_source BARO_ONLY

Do not forget to save.

This works for all my quads that are on BetaFlight 4.2 and I cant remember which version of 4.1 had the fix applied.
[-] The following 2 users Like kafie1980's post:
  • ph2t, sircolin
Reply
#3
Thanks Kafie, I tried this but got errors when attempting to set it to BARO_ONLY. It says something along the lines of can't set name. I'll check again and post. Also when I issue the STATUS command I see that I2C Errors is 1. I wonder it that's linked?

The BARO does work I believe, configurator shows it as active in the graphic legend at the top of the program when connected to the FC. When I fly without any GPS lock altitude appears to be accurate, if I get a GPS lock then altitude goes screwy as I know the FC is now taking the altitude data from the GPS.
Reply
#4
I tried this to double check before I posted on both my SourceOne (Lumenier LUX F7 Ultimate) and Explorer (HGLRC 722 mini) builds but in both cases I have FC's with onboard barometers.

Perhaps the behaviour is different if the barometer is connected via I2C. I do not have anything setup with an external barometer via I2C to test.

Can you show a screen grab of the errors when you run the commands via CLI? How about you disable GPS first and try?
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  GPS wiring question sdtrent 17 4,514 18-May-2024, 10:56 AM
Last Post: SnowLeopardFPV
  GPS Comparison peveleigh 0 132 12-May-2024, 04:02 PM
Last Post: peveleigh
  Custom settings for M10Q GPS maxer 2 1,031 05-May-2024, 05:28 PM
Last Post: Denethor
  GPS Antenna for a car cam JellyBellyXL 4 267 19-Apr-2024, 03:37 PM
Last Post: JellyBellyXL
  gps problem oleg.andreychenko 0 140 10-Apr-2024, 08:53 PM
Last Post: oleg.andreychenko


Login to remove this ad | Register Here