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
8 More Discussions You Might Find Interesting
1. Programming
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
2. Shell Programming and Scripting
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
3. UNIX for Dummies Questions & Answers
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. UNIX for Advanced & Expert Users
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
7. Shell Programming and Scripting
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
8. Shell Programming and Scripting
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
LEARN ABOUT SUSE
mlmmj-recieve
mlmmj-recieve(1) General Commands Manual mlmmj-recieve(1)
NAME
mlmmj-recieve - recieve mails for an mlmmj managed mailinglist
SYNOPSIS
mlmmj-recieve -L /path/to/listdir [-h] [-V] [-P] [-F]
-h: This help
-F: Don't fork in the background (debugging only)
-L: Full path to list directory
-P: Don't execute mlmmj-process (debugging only)
-V: Print version
DESCRIPTION
The mlmmj-recieve binary is the one specified in the mailserver configuration file (aliases file), which writes the mail to the <list-
dir>/incoming directory and invokes mlmmj-process unless the -P option is specified. On systems using mailservers supporting the
/etc/aliases file, a line to activate an mlmmj managed mailinglist would look like this:
list: "|/usr/bin/mlmmj-recieve -L /var/spool/mlmmj/list/"
It's very important to specify the full path to the binary, or the mailinglist will not function.
When the -F option is used, it will not fork in the background. The reason it forks is that if delivery of a mail takes longer time than
the mail server will allow a command to be idle before presumed dead, the mail server would kill it.
SEE ALSO
mlmmj-process(1)
AUTHORS
This manual page was written by the following persons:
Soren Boll Overgaard <boll@debian.org> (based on html2man output)
Mads Martin Jorgensen <mmj@mmj.dk>
mlmmj-recieve September 2004 mlmmj-recieve(1)