What is the fastest sample rate of the Activity.getActivityInfo() . RawAmbiantPressure?

I am trying to maximise my variometer App. I tried to collect every 100ms but the reading are quite funky.

Any idea of the fastest sampe rate ?

Thanks all.

  • As far as I could tell the most reliable way to get ambient pressure is to use SensorHistory. "The amount of information that is available is device dependent. This means that one device may provide more information than another."

    private function getPrIterator(period) {

        if ((Toybox has :SensorHistory) && (SensorHistory has :getPressureHistory)) {

            return SensorHistory.getPressureHistory({:period => period, :order => 0});

        }

        return null;

    }

    then use it like so:

    sensorIter = getPrIterator(graphSize);

    if (sensorIter != null) {    

        var sample = sensorIter.next();

       // check if sample is valid

        ......    

        var sampleValue = sample.data;

       // Do something with value

       .......

    }

  • With SH, you only get updates every couple of minutes.

  • Hi Jerome,

    I'd mentioned it before in another thread, when I tried reading it at rates faster than once per second it just replicated the value continually until the next second.  To verify this I put a counter in that incremented every time the value was the same as the previous sample, and displayed the counter value on the watch display.  Then put the watch in my home made baro chamber to make sure the pressure was changing rapidly, and watched the counter.  At 50ms sample rate I could see it count from 0..19 continuously, at 100ms 0..9, and 200ms 0..4.

  • Thanks for the answer. 1sec is what I experienced as well. 

    With "real time" baro, a gyroscope and a bit of math, I would develop a space shuttle...

    Jerome

  • Jerome,

    One other thing I meant to ask you about is how you compensate for weather related barometric pressure changes when using the raw ambient pressure value.

    In my fast reading altimeter app, upon startup I calculate the altitude based on the ambient pressure and the standard atmosphere, and subtract the current reading of the Garmin altitude app (which the user can adjust to compensate for weather related changes).  Then, all later readings are adjusted by that offset.  The only downside of using that method is I have to exit my app and go into the Garmin altimeter app to re-adjust if weather conditions change, but that's a minor inconvenience.  Since I don't use the app much (I mostly hike, and have another app I've written for that which is much better) I didn't bother building in a user calibration screen, but that wouldn't be that much work if I wanted to do it that way.

    Curious how you addressed this minor detail.

  • It is common practice for pilots and skydivers to calibrate altimeters.

    In my app, the user just needs to restart the app.

    Good luck. 

  • Skydiving apps should not be allowed in the store.  See the wiki for App Store exceptions:

    https://forums.garmin.com/developer/connect-iq/w/wiki/10/app-approval-exceptions

    "Apps designed for scuba diving, free diving, skydiving, base-jumping, and extreme flight sports will not be listed on the app store for the following reasons:"

  • Thanks jim_m_58 for the reminder.

    I would then change my word above. My app is not intended to be use for skydiving and certainly not as the official skydiver altimeter. It is an app develop to get general altitude reference only.

    Thank again

  • Looks like all you did was remove the word "skydiving" from the description in the store, but it's pretty clear that's what it's designed for.  What else would use the features mentioned?

  • Hello again,

    It is an altimeter, an altimeter that works, contrary to the current firmware Garmin altimeter. So, it has the same applications that Garmin market, the info are just differently displayed.