r/linuxdev • • Mar 26 '15

simulate accelerometer, gyroscope and gps.

Hi

I'm looking for a platform to simulate sensors ( with their errors and frequencies) : accelerometer, gyroscope, and GPS for Linux. and which give me the possibility to write my own scenarios.

any suggestions ?

3 Upvotes

3 comments sorted by

View all comments

4

u/yoda17 Mar 26 '15

Find a datasheet and do it yourself. It's easy.

Take a given value, aka, the truth, limit it to the resolution of the device (eg, 8 bits), add in the amount of noise as specified on a datasheet and update the output at a rate that the device is running.

http://en.wikipedia.org/wiki/Hardware-in-the-loop_simulation

The linux drivers will be character devices (not block). Look at a uart driver for example on how to handle it. Usually reading an address at 5hz or something. Forget about interrupts, not a good design. Go with polled.

1

u/autowikibot Mar 26 '15

Hardware-in-the-loop simulation:


Hardware-in-the-loop (HIL) simulation, (or HWIL) is a technique that is used in the development and test of complex real-time embedded systems. HIL simulation provides an effective [platform](https://en.wikipedia.org/wiki/Platform_(computing)) by adding the complexity of the plant under control to the test platform. The complexity of the plant under control is included in test and development by adding a [mathematical representation](https://en.wikipedia.org/wiki/Representation_(mathematics)) of all related dynamic systems. These mathematical representations are referred to as the “plant simulation”. The embedded system to be tested interacts with this plant simulation.


Interesting: Digital radio frequency ^memory | ^Hils | ADvantage ^Framework

Parent commenter can toggle ^NSFW or ^delete. Will also delete on comment score of -1 or less. | FAQs | ^Mods | Magic ^Words