IMU sample fetching over RS485


 
Thread Tools Search this Thread
Top Forums Programming IMU sample fetching over RS485
# 1  
Old 07-23-2008
IMU sample fetching over RS485

Hi,

I'm writing a program that will take the byte values put out by an IMU and perform the integrations to find position.

Right now, I am only concerned with how to properly recieve the data from the IMU. I can worry about the integrations and things later. The IMU will connect to my laptop via an RS422 port to USB converter for testing. Ultimately, it will be connected to a Linux processor board with a RS485 port.

The data stream from the IMU runs at 115200 Baud and each sample is 37 bytes long. The first four bytes are sync bytes, with a lot of other bytes with a 8-bit checksum at the end.

What I would like to do is to get a 37 byte sample starting at the synchronization bytes and first use the checksum to validate the data. Then I would like to strip away all of the bytes except for the Timer bytes, Gyro Bytes, Accelerometer Bytes and Magnetometer Bytes. Then I will store these bytes so that I can start the integrations.

This code will be part of a larger program later on so it cannot run within a while loop, but for now it would be fine for my testing purposes on my laptop. I don't need to get every sample coming over the serial port, I just need to make sure that I get a full sample and not partial.

I've done low datarate stuff over the RS232 port, but RS485 is different and this is a faster datarate. I am thinking about using some low priority interrupt to get a 37 byte sample every so often and store the byte values.

Does anyone know how I would approach this?

Thank you,
aloha_boi
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Sample output

hi gurus , i want the command to get the output in the desired format . basically to convert columns to rows. please refer to the attachment. (3 Replies)
Discussion started by: r_t_1601
3 Replies

2. Shell Programming and Scripting

Sample Script

Below is the code. Its the 1st line of a file. How can I remove the bracket and display like below. 123 web int 1 09:30:45 2013 I dont want to use AWK or SED or PERL. I need to use only the bash shell scripting commands to do it. (3 Replies)
Discussion started by: ghosh_tanmoy
3 Replies

3. UNIX for Advanced & Expert Users

su option is not fetching the password

Hi, Please find the below code. function ABC { echo "Enter Element Name:" read ename echo "Enter Element Source path:" read spath echo "Enter Element Destination path:" read dpath echo "cp -p $spath/$ename $dpath/$ename" echo... (8 Replies)
Discussion started by: gthangav
8 Replies

4. Shell Programming and Scripting

help in fetching a field from a file

I have an input file with contents like : '1LTYSJSD2KQ8KLE' -audit_grp_id , internal error qty < recycle qty requested, skipping record '1LTYSJSD2KQ8KLE' -audit_group_id, 0 records has been written, 1 was skipped '1LTZLJRDFBEWJX9' -audit_grp_id , internal error qty < recycle qty requested,... (3 Replies)
Discussion started by: rkrish
3 Replies

5. Shell Programming and Scripting

Sample Practical

Hello Today I had a beautiful test to write some commands using Ubuntu, now I want to make sure of my answers to be reassured, if I had a mistake please correct me List all files details under ubuntu Desktop. my answer: cd Desktop |ls -l Navigate to your Desktop directory and... (7 Replies)
Discussion started by: S4K
7 Replies

6. UNIX for Dummies Questions & Answers

Sample scripts

Hi All' I'm a newbe, and just is started to learn unix. Where can I find a complete sample scripts? I looking for a sample scripts which log in at another unix host and and execute another script server side. Any input welcome (5 Replies)
Discussion started by: ioniCoder
5 Replies

7. Shell Programming and Scripting

How do I do this: -$: sample.sh <INPUT>

I apologize for the confusing title .. What I want to do is write a script that pulls specific input from the command line (after the script name) rather than from within the script. Example: -$: howfarbetween.sh Montreal Chicago Where the script would run based on the inputs of the two... (3 Replies)
Discussion started by: jmvbxx
3 Replies

8. Programming

Help need a sample program

Hi all, Can some one provide me a sample program which measures the performance (both latency and throughput) of TCP and UDP protocol (2 Replies)
Discussion started by: magnetpest2k7
2 Replies
Login or Register to Ask a Question