Shop OBEX P1 Docs P2 Docs Learn Events
Altimeter accuracy — Parallax Forums

Altimeter accuracy

r.daneelr.daneel Posts: 96
edited 2015-05-14 00:05 in Propeller 1
The overview for the Altimeter Module MS5607 on the Parallax web page indicates:

"The Altimeter Module is a high resolution (20 cm) altimeter sensor. It will give extremely accurate, altitude, pressure, and temperature readings."

Is it really accurate, or is it just precise? How accurate can the (pressure) altitude be when weather conditions change - if the is a high pressure system over my location one day, and a low pressure the next, surely this altimeter will be affected by those weather conditions? Other than change in altitude, and perhaps rate of change, I'm struggling to see the usefulness of these altitude sensors - unless I suppose I can calibrate them for local conditions at the start of every use.

Comments

  • xanaduxanadu Posts: 3,347
    edited 2015-04-23 23:06
    If you need accurate ASL you will always have to compensate for non standard temperature. Otherwise the pressure sensor is extremely precise. I can move it six inches and see the change.

    If you don't want to calibrate then you're stuck with pressure altitude which won't give you accurate ASL but will give you precise rate of change over time.
  • r.daneelr.daneel Posts: 96
    edited 2015-04-23 23:41
    Well, the pressure sensor may be precise and accurate, but how accurately can that be translated to altitude when the change in pressure may just be due to local weather conditions? It's not just temperature fluctuations that make a difference (and this sensor has it's own temperature sensor on board anyway I think), but local pressure variations due to weather. I'm not questioning how good the sensor is (but is senses pressure, not altitude), just wondering how useful pressure altitude really is given that it can vary significantly due to changing weather conditions. Pilots can get local pressure readings from the airport they're about to land at and so compensate, but that's not readily available to my robot...
  • xanaduxanadu Posts: 3,347
    edited 2015-04-24 00:02
    I can only recommend you read the documentation. If I remember correctly one of the best forum members wrote quite a bit on the subject. I'm a pilot and have flown Bendix King to Garmin touch panel avionics. The pressure sensor in question is more of an instrument than an altimeter. Pilots rely on local altimeter settings like you said but that still doesn't guarantee true ASL.
  • r.daneelr.daneel Posts: 96
    edited 2015-04-24 01:48
    Here's the thing. I was playing with the sensor today. In the morning the pressure was reading a bit over 1000mb, but by afternoon the weather had turned and the pressure was now reading about 990mb - that translates to a difference in elevation/altitude of about 80m. I just wonder what use the altimeter is other than, as I mentioned earlier, to measure change and rate of change in elevation/altitude. If I have to calibrate, or compensate, multiple times per day as the weather changes to get an accurate altitude then it just seems a bit pointless - it's almost never going to be accurate.
  • CRST1CRST1 Posts: 103
    edited 2015-04-24 03:55
    ALL altimeters need to be calibrated on startup and when the pressure changes, no exceptions. In my plane the altimeter tries to compensate on startup by remembering the altitude when it was shut down and adjusting the bar pressure on startup so the altitude is the same as shutdown. This does not help when the weather changes while it is on. There is no way that is possible on any altimeter unless it is linked to a site with a pressure readout and that would only be accurat at that location. There is no way an altimeter or sensor that knows what the pressure alt is at every location possible.
  • r.daneelr.daneel Posts: 96
    edited 2015-04-24 06:16
    Well, yes, I know that - now... It didn't actually occur to me when I first started playing with the altimeter. I just wonder what use it really is, say for a quadcopter other than as a guide to change in altitude. Surely you couldn't rely on it, even if it was calibrated at the start of the the flight.
  • PublisonPublison Posts: 12,366
    edited 2015-04-24 06:33
    r.daneel wrote: »
    Well, yes, I know that - now... It didn't actually occur to me when I first started playing with the altimeter. I just wonder what use it really is, say for a quadcopter other than as a guide to change in altitude. Surely you couldn't rely on it, even if it was calibrated at the start of the the flight.

    I would think it would be useful on a quad, given the limited area, and flight time. The initial calibration would not change that much from start to finish of flight.
    I think it would be useful in "Return To Home" scenario. The altitude may not be accurate, but it would be the same when landing in the same spot.
  • xanaduxanadu Posts: 3,347
    edited 2015-04-24 08:40
    What exactly did you want to do with the altimeter? How accurate do you need?

    You may be better off with a high quality GPS like a uBlox, but even GPS doesn't always do well with altitude at times.
  • max72max72 Posts: 1,155
    edited 2015-04-24 08:54
    Take your average quad.
    Suppose to have 15 minutes of autonomy.
    During that time local pressure won't change so much.
    This is what usually happens with multirotors.
  • PublisonPublison Posts: 12,366
    edited 2015-04-24 09:27
    xanadu wrote: »
    What exactly did you want to do with the altimeter? How accurate do you need?

    You may be better off with a high quality GPS like a uBlox, but even GPS doesn't always do well with altitude at times.

    I've got the new uBlox from Parallax, and the readings will vary by 5 meters or so. GPS historically has not know to be good at altitude. (unless you in the military) :)
  • Tracy AllenTracy Allen Posts: 6,664
    edited 2015-04-24 09:49
    Here are links that discuss this and other issues. The first link is extensive, the one where PhiPi introduced the Altimeter Module MS5607 along with a great tutorial.
    New-Altimeter-Barometer-Module
    how-to-set-reference-point
    Altimeter-temperature-changing-the-altitude
    Altimeter-Barometer-Temperature-Anomaly

    You're correct about the usefulness of the pressure sensor as an altimeter when conditions are changing. Even when conditions are stable there can be temperature inversions that depart significantly from the standard lapse rate. Also there can be local effects, for example on a mountainside that makes its own weather. The description really should not say "accurate" due to the nature of the beast. If you find yourself camping on a mountainside next to a known lake, you can recalibrate on the spot, but if you later find yourself lost next to a nondescript outcropping, the altimeter calibrated that morning at the lake might add more confusion than help. That said, I agree about using it for a quadcopter. The weather will not change much during a flight of 10 minutes, and nonliinearity and lapse rate will not be important factors. Unless maybe the quad is probing a tornado. Better find a different altimeter for that purpose!
  • PublisonPublison Posts: 12,366
    edited 2015-04-24 10:03
    Thanks Tracy for tracking those down. I was going to try and find them tonight.
  • W9GFOW9GFO Posts: 4,010
    edited 2015-04-24 12:23
    r.daneel wrote: »
    How accurate can the (pressure) altitude be when weather conditions change -

    You said it right there. "Pressure altitude" is basically your altitude above sea level on a standard day. It rarely coincides with your true altitude. The sensor (if accurate) will always give you the true pressure altitude. It is up to you to translate that into the true altitude.

    Typically you calibrate on the ground before each flight. For a short flight the weather is not likely to change much.
  • W9GFOW9GFO Posts: 4,010
    edited 2015-04-24 12:26
    r.daneel wrote: »
    Well, yes, I know that - now... It didn't actually occur to me when I first started playing with the altimeter. I just wonder what use it really is, say for a quadcopter other than as a guide to change in altitude. Surely you couldn't rely on it, even if it was calibrated at the start of the the flight.

    Depends upon what you are relying on it for. If you intend to use it to know your precise distance from the ground, such as in judging a landing, then no. But if you are using it to clear an obstacle, reach a certain vantage point or to hold an altitude then yes.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-04-24 12:57
    I wonder if "differential altimetry" would improve things. Basically you would have two altimeters: one on the ground, the other in the UAV, with an XBee radio link between them. As the air pressure changes, the "common mode" pressure altitude of both would change in unison, but the altitude difference between UAV and ground should still give a true reading (except in the case of the anomalies mentioned above by Tracy).

    -Phil
  • xanaduxanadu Posts: 3,347
    edited 2015-04-24 13:51
    I wonder if "differential altimetry" would improve things. Basically you would have two altimeters: one on the ground, the other in the UAV, with an XBee radio link between them. As the air pressure changes, the "common mode" pressure altitude of both would change in unison, but the altitude difference between UAV and ground should still give a true reading (except in the case of the anomalies mentioned above by Tracy).

    -Phil

    That would be pretty neat to try. The one on the ground would have a static mount. The difference between where it thinks it is and where it really is could be calculated as the altimeter setting, then beamed up to another craft. You would have to have a known good altitude to program into the ground altimeter, if that is accurate the rest should be.
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-04-24 17:46
    This has me a little confused. I am at 446 feet above sea level but the demo program for the Altimeter in the Parallax Kickstart says I am at 197 feet. How is this determined? It would be very difficult to use this on a quad or helicopter if it is not at least somewhat accurate.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2015-04-24 17:54
    NWCCTV,

    You have to compensate the altimeter for local air pressure at sea-level. With a pressure-based altimeter, there's no such thing as absolute altitude.

    -Phil
  • NWCCTVNWCCTV Posts: 3,629
    edited 2015-04-24 18:03
    Phil, I changed the alt#5611 to alt#5604 as you suggested in another thread and it corrected the problem. Now I just need to figure out how to get the Current Sea Level working correctly. Thanks.
  • r.daneelr.daneel Posts: 96
    edited 2015-04-24 18:05
    You have to compensate the altimeter for local air pressure at sea-level. With a pressure-based altimeter, there's no such thing as absolute altitude.

    At the time you want to measure your altitude. Calibrating on a day with a high pressure overhead will not be useful on the following day if there is a low pressure overhead.
  • W9GFOW9GFO Posts: 4,010
    edited 2015-04-24 19:44
    NWCCTV wrote: »
    Phil, I changed the alt#5611 to alt#5604 as you suggested in another thread and it corrected the problem. Now I just need to figure out how to get the Current Sea Level working correctly. Thanks.

    You should be able to make a routine where you input the known altitude then it applies the necessary correction each time it is powered up. All you would need is two buttons to increment/decrement the altitude.
  • xanaduxanadu Posts: 3,347
    edited 2015-04-24 19:48
    r.daneel wrote: »
    At the time you want to measure your altitude. Calibrating on a day with a high pressure overhead will not be useful on the following day if there is a low pressure overhead.

    That is pretty much implied at this point. So what did you want to do with this sensor?

    Did you want to be able to pull up your altitude anywhere you are, like a portable project?

    Making an altimeter is totally doable, if I can get it working anyone can :)
  • r.daneelr.daneel Posts: 96
    edited 2015-04-24 23:18
    Yeah, I wanted an altimeter for a portable project. I'd rather not have to calibrate the thing every time I use it - I know that's what has to happen unless I get a laser altimeter, but it just never occurred to me. It should have, but it didn't. I'll probably ditch the altimeter - it isn't essential, just a nice thing to have.
  • xanaduxanadu Posts: 3,347
    edited 2015-04-25 09:05
    To find altitude above sea level I agree with you the calibration part sucks. I still maintain it's not that bad and certainly worth a shot.

    Measuring above ground level, or measuring your elevation change it's going to work just fine for you. You might be a foot or so off after an hour if the weather is changing, but a foot off isn't that bad for a DIY project. You also do not need a local setting for this to work.
  • Hal AlbachHal Albach Posts: 747
    edited 2015-04-25 19:46
    How about when the system powers up the altimeter reading is taken and stored to become ground level. Take off, fly about, irritate the the neighbors, peek in their windows, then return to launch point and the altimeter will be able to let the copter know how close the ground is using the difference between the first reading and a current reading.. This should work as long as you return to the take off site.
  • ksltdksltd Posts: 163
    edited 2015-05-02 12:27
    An altimeter is used for measuring changes in altitude, not determining altitude. They're remarkably sensitive and respond very quickly.

    Since you have a GPS, you should have a 3D position from that and can use it to seed your ASL, which is subsequently maintained by your altimeter.
  • mmowenmmowen Posts: 38
    edited 2015-05-14 00:05
    Here's a code snippet for an alternative that works for me in an aviation application using a Freescale MXP4115AP sensor, referenced to reported altimeter setting at an airport AWOS or ASOS system.

    AltimetrySnippet.spin
    CON
      VS                            = 5.0
      VS_RECIPROCAL                 = 1.0/VS
    
    VAR
      long  SLinHg                  ' altimeter setting, sea level, inches of mercury
    
    DAT
      MSLval  word        -5000,          0,       5000,      10000,      15000,      20000,     25000
      inHgval long  35.74440921,29.92479422,24.89931844,20.58245917,16.89480251,13.76304329,11.11998511
    
    OBJ
      F                             : "FloatMath"
    
    {
      MPX4115AP circuit:
    
                      ┌─────────────┐
                      │             │
     +5V  ───────────┤             ├──────┐
                      │  MPX4115AP  │       750Ω
                      │             │      ├────── VOUT ──── to ADC
                      │             │       0.33µ
                      └──────┬──────┘      
                             
    
    }                                                              
    
    PUB Main | V, altitude
      {
        presuming you have a 10 bit ADC available somewhere, poll it for
        a count value, convert that to a voltage (V) in the range 0..VS
        and preset the sea level pressure in inches of mercury in SLinHg
      }
        V := ADC.Get(MXP4115channel)
        altitude := kPatoMSL(MPX4115AP(V),SLinHg)
      
    PRI MPX4115AP(V)
    ' static pressure (see: http://en.wikipedia.org/wiki/Atmospheric_pressure)
    '        Vout = Vs * (0.009*P-0.095) ± (Pressure Error x Temp. Factor x 0.009 x VS)
    '        Vs = 5.0
    '        TA = 0 to 85°C
    '        15..115kPa (2.18...16.7 psi) [4.43000591..33.9633786 inHg]
    '        Voff = 0.204±0.069
    '        V/P = 46mV/kPa
    '        Vspan = 4.59V
    {
      solving for P:
        Vout/VS = 0.009*P-0.095
        Vout/VS+0.095 = 0.009*P
        (Vout/VS+0.095)/0.009 = P
    }
      return F.FMul( F.FAdd( F.FMul( V, VS_RECIPROCAL ), 0.095 ), 111.1111111 )  'kPa (kilo Pascals)
    
    PRI kPatoMSL(kPa,SLP) | inHg, i, MSL
      inHg := F.FMul( kPa, 0.295333727 )
      repeat i from 0 to 6
        if F.FCmp(inHg,inHgval[i]) => 0
          quit
      MSL := MSLval[i-1] + F.FTrunc( F.FMul( F.FSub( 1.0, F.FNormalize(inHg,inHgval[i],inHgval[i-1]) ), 5000.0 ) )
      MSL += F.FTrunc( F.FMul( F.FSub( SLP, inHgVal[1] ), 1000.0 ) )
      return MSL ' mean sea level referenced altitude (linear interpolated)
    
    PRI kPatoInHg(kPa)
      return F.FMul( kPa, 0.295333727 )
    
Sign In or Register to comment.