Hacker News new | past | comments | ask | show | jobs | submit login

I have two questions: 1) Is it possible to do literate programming in Python / Numpy, something like MathCAD. Where I can either convert python expressions to latex equations or vice versa.

I am trying to convert my supervisor to open source and he has used MathCAD for 20 years and he really likes the functionality that you can directly print out a sheet with all the formulas and solutions in one equation. I have all the capability of the calculations in Python/Numpy just not the pretty printing part without actually having to write out the equations/expressions twice. I have tried to ask on StackOverflow but the answers didn't work.

2) Can the arduino + accelerometer be used for calculating position given the initial position by integrating to velocity and further integrating to time. Will it work with 4-6 accelerometers and output the data to a PC in realtime or will it save the data to an SD card and post-process it later.

Thanks in advance.




1) I've found this library (http://pylit.berlios.de/literate-programming/index.html) which might help with your objective, but I'm not sure if it will solve your specific application. I'm certain you could create some sort of shell or wrapper script that will handle the pretty printing. If I understand you right, you could feed the MathCAD input into the wrapper which prints the appropriate source expressions, and then translates and runs your MathCAD into Python for evaluation. Does that help?

2) Short answer, yes. However, you should expect a certain amount of error in your readings and then you'd need some way to resolve the constants in your double integration. If you had some initial bearing, that might suffice if you have two simultaneously captured samples to feed in for the two constants.

I assume you want only accelerometers and want to avoid an external source for capturing your bearing. It would take a clever solution to decipher your bearing without some external source, but I'm not willing to say it can't be done. If you can't find a way and end up with some sort of external source/reference for bearing, you might as well use dead-reckoning to determine your position.

4-6 accelerometers in realtime? If you just processing raw data, I think you could find a way to do it onboard in quasi-realtime (important to note that the arduino is not a realtime device and this could skew your results as well). However, you'll probably want to do some processing on the data to get a normalized sample for integration.

Yes, you could easily transmit the data to a PC OR save it to some external storage for realtime processing. Lots of modules available which provides that functionality (bluetooth, xbee, x10, wifi).

Hope this helps.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: