I want to calculate stair steps count using pressure sensor and pedometer - embedded

guys
i want to make wearable device which have provision of stairs steps count. i have LPS25HB (pressure sensor), LSM6DS3 (accelerometer) pressure sensor give the altimeter and accelerometer give the steps count.
but my pressure sensor is one type barometer and its value changed according to atmospheric pressure.values variation 3~5 feets from reading of pressure sensor.

All you are interested in is relative change in altitude. The absolute altitude is irrelevant - though you could get that by augmenting the data with GPS.
You cannot of course distinguish perhaps between stairs and a steep hill, but from a fitness monitoring point of view that too is perhaps irrelevant; "work done" (i.e calories burned) is simply a function of the steps taken and altitude gained.
Because local atmospheric pressure changes with weather conditions and temperature as well as altitude an air pressure sensor cannot be an accurate source of absolute altitude without calibration to some known reference under the prevailing conditions.

Related

Calibration of magnetometer attached to a vehicle as Figure 8 calibration isn't possible in such scrnaroo

I was trying to find a way to calibrate a magnetometer attached to a vehicle as Figure 8 method of calibration is not really posible on vehicle.
Also removing magnetomer calibrating and fixing won't give exact results as fixing it back to vehicle introduces more hard iron distortion as it was calibrated without the vehicle environment.
My device also has a accelerometer and gps. Can I use accelerometer or gps data (this are calibrated) to automatically calibrate the magnetometer
Given that you are not happy with the results of off-vehicle calibration, I doubt that accelerometer and GPS data will help you a lot unless measured many times to average the noise (although technically it really depends on the precision of the sensors, so if you have 0.001% accelerometer you might get a very good data out of it and compensate inaccuracy of the GPS data).
From the question, I assume you want just a 2D data and you'll be using the Earth's magnetic field as a source (as otherwise, GPS wouldn't help). You might be better off renting a vehicle rotation stand for a day - it will have a steady well known angular velocity and you can record the magnetometer data for a long period of time (say for an hour, over 500 rotations or so) and then process it by averaging out any noise. Your vehicle will produce a different magnetic field while the engine is off, idle and running, so you might want to do three different experiments (or more, to deduce the engine RPM effect to the magnetic field it produces). Also, if the magnetometer is located close to the passengers, you will have additional influences from them and their devices. If rotation stand is not available (or not affordable), you can make a calibration experiment with the GPS (to use the accelerometers or not, will depend on their precision) as following:
find a large flat empty paved surface with no underground magnetic sources (walk around with your magnetometer to check) then put the
vehicle into a turn on this surface and fix the steering wheel use the cruise control to fix the speed
wait for couple of circles to ensure they are equal make a recording of 100 circles (or 500 to get better precision)
and then average the GPS noise out
You can do this on a different speed to get the engine magnetic field influence from it's RPM
I had performed a similar procedure to calibrate the optical sensor on the steering wheel to build the model of vehicle angular rotation from the steering wheel angle and current speed and that does not produce very accurate results due to the tire slipping differently on a different surface, but it should work okay for your problem.

Forward and backward movement detection with IMU

We have an embedded device mounted in a vehicle. It has accelerometer, gyrosopce and GPS sensors on board. The goal is to distinguish when vehicle is moving forward and backward (in reverse gear). Sensor's axis are aligned with vehicle's axis.
Here's our observations:
It's not enough to check direction of acceleration, because going backwards and braking while moving forward would show results in the same direction.
We could say that if GPS speed decreased 70 -> 60 km/h it was a braking event. But it becomes tricky when speed is < 20 km/h. Decrease 20 -> 10 km/h is possible when going both directions.
We can't rely on GPS angle at low speeds.
How could we approach this problem? Any ideas, articles or researches would be helpful.
You are looking for Attitude and heading reference system implementation. Here's an open source code library. It works by fusing the two data sources (IMU and GPS) to determine the location and the heading.
AHRS provides you with roll, pitch and yaw which are the angles around X, Y and Z axises of the IMU device.
There are different algorithms to do that. Examples of AHRS algorithms are Madgwick and Mahony algorithms. They will provide you with quaternion and Eurler angles which can easily help you identify the orientation of the vehicle at any time.
This is a cool video of AHRS algo running in real time.
Similar question is here.
EDIT
Without Mag data, you won't get high accuracy and your drift will increase over time.
Still, you can perform AHRS on 6DoF (Acc XYZ and Gyr XYZ) using Madgwick algorithm. You can find an implementation here. If you want to dive into the theory of things, have a look at Madgwick's internal report.
Kalman Filter could be an option to merge your IMU 6DoF with GPS data which could dramatically reduce the drift over time. But that requires a good understanding of Kalman Filters and probably custom implementation.

what is the minimum distance measurable with gps, minimum distance between 2 moving points

I have 2 movable points. When the distance between them exceeds 10 ft, I want to get an alert. Is this possible? What is the minimum distance that is measurable?
Maybe this will help you further.
How accurate is GPS?
It depends. GPS satellites broadcast their signals in space with a certain accuracy, but what you receive depends on additional factors, including satellite geometry, signal blockage, atmospheric conditions, and receiver design features/quality.
For example, GPS-enabled smartphones are typically accurate to within a 4.9 m (16 ft.) radius under open sky (VIEW SOURCE AT ION.ORG). However, their accuracy worsens near buildings, bridges, and trees.

Distance estimation based on signal strength

I have set of data which includes position of a car and unknown emitter signal level. I have to estimate the distance based on this. Basically signal levels varies inversely to the square of distance. But when we include stuff like multipath,reflections etc we need to use a diff equation. Here come the Hata Okumura Model which can give us the path loss based on distance. However , the distance is unknown as I dont know where the emitter is. I only have access to different lat/long sets and the received signal level.
What I am asking is could you guys please guide me to techniques which would help me estimate the distance based on current pos and signal strength.All I am asking for is guidance towards a technique which might be useful.
I have looked into How to calculate distance from Wifi router using Signal Strength? but he has 3 fixed wifi signals and can use the FSPL. However in an urban environment it doesnot work.
Since the car is moving, using any diffraction model would be very difficult. The multipath environment is constantly changing due to moving car, and any reflection/diffraction model requires well-known object geometry around the car. In your problem you have moving car position time series [x(t),y(t)] which is known. You also have a time series of rough measurement of the distance between the car and the emitter [r(t)] of unknown position. You need to solve the stationary unknown emitter position (X,Y). So you have many noisy measurement with two unknown parameters to estimate. This is a classic Least Square Estimation problem. You can formulate r(ti) = sqrt((x(ti)-X)^2 + (y(ti)-Y)^2) and feed your data into this equation and do least square estimation. The data obviously is noisy due to multipath but the emitter is stationary and with overtime and during estimation process, the noise can be more or less smooth out.
Least Square Estimation

Calculate vehicle velocity from NMEA sentences

I wanted to get the position(latitude and longitude) and velocity of my vehicle by using SIM908 GPS/GPRS module. The module will be kept in my vehicle.
I'm able to get the position(latitude and longitude) of my vehicle from the NMEA sentences, but for the velocity, I'm not so sure about it.
I found that in the NMEA sentence, there is a $GPVTG which contains the "speed over ground in km/h".
My question is, does the "speed over ground in km/h" means my vehicle velocity on the road? Or I need to do some calculations from it to get the actual velocity of my vehicle?
If the "speed over ground in km/h" doesn't mean my vehicle velocity on the road, then what can I do to get my vehicle's velocity?
What kind of vehicle do you have?
In a car, speed ofer ground is the speed on the road.
In a ship, speed over ground can differ from the speed through water (as the water can have currents). Same in the air.
The GPS can only know the speed over ground, as is is the real physical movement that the satellite receiver measures. It does not now about currents.
Typically this is already the value that you need. For water/air speed you need a special measuring device like a log.