phyphox Forums

Full Version: How to add Inclination tool using plus sign for designing an experiment.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Experiment editor allows to add multiple sensors in one experiment. I want to design an experiment to use Inclination (angle measurement) along with the acceleration and gyroscope sensor. How can we modify the editor for this? 
The “inclination” experiment analyses the accelerometer data and is not based on data from a different sensor. Please note that it accordingly requires an (almost) stationary device.

You could add tabs for the gyroscope and accelerometer data to the “inclination” experiment with https://phyphox.org/editor, for instance. If you are familiar with XML, you could directly edit the file at https://github.com/phyphox/phyphox-experiments (documentation at https://phyphox.org/wiki/index.php/Phyphox_file_format)…

If you scan the attached QR code from within phyphox via “+” in the main menu, you obtain an “inclination” experiment that relies on the virtual “gravity” sensor that (ideally) works with accelerated devices.

[attachment=632]
(06-16-2023, 03:15 PM)Jens Noritzsch Wrote: [ -> ]The “inclination” experiment analyses the accelerometer data and is not based on data from a different sensor. Please note that it accordingly requires an (almost) stationary device.

You could add tabs for the gyroscope and accelerometer data to the “inclination” experiment with https://phyphox.org/editor, for instance. If you are familiar with XML, you could directly edit the file at https://github.com/phyphox/phyphox-experiments (documentation at https://phyphox.org/wiki/index.php/Phyphox_file_format)…

If you scan the attached QR code from within phyphox via “+” in the main menu, you obtain an “inclination” experiment that relies on the virtual “gravity” sensor that (ideally) works with accelerated devices.

Thank you for your response, but I am unable to find the inclination for angle measurement along with the gyroscope and accelerometer using the phyphox editor, so could you help me with this.
I would suggest to load the “Inclination” experiment into the editor (at the bottom of the window). Then add the sensors you need in the “Input” tab. Add the tabs and graphs in the “Views” tab and finally connect the sensors to the graphs so that the data is displayed.

HTH
(06-18-2023, 05:49 PM)Jens Noritzsch Wrote: [ -> ]I would suggest to load the “Inclination” experiment into the editor (at the bottom of the window). Then add the sensors you need in the “Input” tab. Add the tabs and graphs in the “Views” tab and finally connect the sensors to the graphs so that the data is displayed.

HTH

Thank you for your suggestion, I'm now able to add the accelerometer(sensor) along with the inclination experiment and after connecting the sensor with graphs, graphs are being displayed but on exporting the data, I'm not getting the values of acc_x , acc_y and acc_z for all time stamps instead getting the values of same for only the last time stamp, so how to show all the values on exporting the file?
Regards
Very good point … you need to add the data containers as set(s) in the “Export” tab. Alternatively, you could quickly add these few lines “by hand” with a text editor at the very bottom of the file.
(06-21-2023, 05:36 PM)Jens Noritzsch Wrote: [ -> ]Very good point … you need to add the data containers as set(s) in the “Export” tab. Alternatively, you could quickly add these few lines “by hand” with a text editor at the very bottom of the file.

why I'm only getting all the updated values of time but not acc_x , acc_y and acc_z ?

Also, Can you please provide me with the XML file of the "inclination" experiment whose QR code you have attached above that relies on the virtual “gravity” sensor that (ideally) works with accelerated devices.
I'm working on a project where my concern lies around a event which occurs merely in a second so to analyse it efficiently if I increase the frequency rate of "inclination" experiment (currently 2 Hz) does it spoil the accuracy of data collected ?
Are there any limitations of increasing the frequency for "inclination" experiment ?
The QR code points to https://raw.githubusercontent.com/hcszt/...mu.phyphox (needed a qr code decoder to be sure…  Cool).

With inclination at full rate the (raw) data gets noisier, it does not have an influence on the overall accuracy.

I do not get your problem with the export: there is time and acceleration data in the attached image…?
Sorry, if this may seem a bit out of context, but Praveen contacted me with via email about your usecase and also pointed me to this thread. So, I am mostly here to post a QR code with multiple options. But let me quickly point out that the original inclination experiment only keeps one original value for each axis and the raw timestamp from the sensor. It then appends these time stamps to the actual list of values that are to be displayed when it calculates the angle. It does so to avoid unnecessary recalculations of the entire measurement, but this can also make things complicated if you change the data rate (because now it is limited by the analysis rate) and if you add another sensor, which is not synchronized by default and would have its own timestamps.

Now, since I also suggested to Praveen to also try the "attitude" sensor (a virtual sensor provided by the manufacturer of the phone, combining accelerometer, gyroscope and often the magnetometer to get an absolute angle, see https://phyphox.org/wiki/index.php/Attitude_sensor), I have attached a configuration with attitude, the inclination method from phyphox (just the atan of the accelerometer axes), the accelerometer and the gyroscope.

Note that the Euler angles use the common names used in aviation, but with the heading towards x and z being up. On a phone this is very unintuitive, because the equivalent to the inclination is now "yaw". But you will probably figure out the axes and if you are done testing and need a simplified and properly named version for students, I can simply provide one.

Also note that I made the average period for the inclination adjustable, because this really depends on your use case and if you also need the gyroscope I assume that the original setting would be too slow for you (again, something we can fixate once you know what you need/prefer). Unfortunately, it is not easy to provide accelerometer and gyroscope at maximum rate while providing averaging, so this might be a bit inefficient. If you are having trouble with phyphox or the measurement becoming unresponsive (especially if you lower the average period), let me know. In that case we should work with a fixed rate instead.
Pages: 1 2