Click here to Skip to main content
15,881,711 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
G_P_X G_P_Y G_P_Z A_P_X A_P_Y A_P_Z phi theta psi
0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 -175.88 11.9751 -175.88
-0.488282 0.427246 0.793458 0 0 0 -175.88 11.9751 -175.88
-0.488282 0.427246 0.793458 0 0 0 -175.88 11.9751 -175.88
-0.488282 0.427246 0.793458 0.0230712 0.00201416 -1.03601 -175.88 11.9751 -175.88

-0.488282 0.427246 0.793458 0.0230712 0.00201416 -1.03601 -175.88 11.9751 -175.88

-0.488282 0.427246 0.793458 0.0230712 0.00201416 -1.03601 -175.88 11.9751 -175.88

-0.488282 0.427246 0.793458 0.0230712 0.00201416 -1.03601 -175.88 11.9751 -175.88

-0.488282 0.427246 0.793458 0.0230712 0.00201416 -1.03601 -176.012 12.052 -176.012

-0.488282 0.488282 0.915528 0.0230712 0.00201416 -1.03601 -176.012 12.052 -176.012

-0.488282 0.488282 0.915528 0.0230712 0.00201416 -1.03601 -175.781 12.1289 -175.781

-0.488282 0.488282 0.915528 0.0289306 0.00695799 -1.03601 -175.781 12.1289 -175.781

-0.488282 0.488282 0.915528 0.0289306 0.00695799 -1.03601 -175.781 12.1289 -175.781

-0.488282 0.488282 0.915528 0.0289306 0.00695799 -1.03601 -175.781 12.1289 -175.781

-0.488282 0.488282 0.915528 0.0289306 0.00695799 -1.03601 -175.781 12.1289 -175.781

-0.488282 0.488282 0.915528 0.0289306 0.00695799 -1.03601 -175.946 12.041 -175.946

-0.488282 0.427246 0.854493 0.0289306 0.00695799 -1.03601 -175.946 12.041 -175.946

-0.488282 0.427246 0.854493 0.0289306 0.00695799 -1.03601 -176.088 11.997 -176.088

-0.488282 0.427246 0.854493 0.013916 0.0120849 -1.02905 -176.088 11.997 -176.088

-0.488282 0.427246 0.854493 0.013916 0.0120849 -1.02905 -176.088 11.997 -176.088

-0.488282 0.427246 0.854493 0.013916 0.0120849 -1.02905 -176.088 11.997 -176.088

-0.488282 0.427246 0.854493 0.013916 0.0120849 -1.02905 -176.088 11.997 -176.088

-0.488282 0.427246 0.854493 0.013916 0.0120849 -1.02905 -175.726 12.2607 -175.726

-0.549317 0.366211 0.854493 0.013916 0.0120849 -1.02905 -175.726 12.2607 -175.726

-0.549317 0.366211 0.854493 0.013916 0.0120849 -1.02905 -175.473 12.3596 -175.473

-0.549317 0.366211 0.854493 0.0230712 0.0120849 -1.03308 -175.473 12.3596 -175.473
the respective codes are
C#
while(readbyte(value)== TRUE) // read serial data using readbyte function 1 byte each time non blocking mode
            {
                buffer [count++] = value;    // serial ANCII data save into an array
                if(count == 221)
                 {

                    if(parse_serial_data(buffer,221,&new_packet)==0)
                        {

                            SensordataSaved();
                            count = 0;


                            std::cout<<gStateData.gyro_pro_x<<"  "<<gStateData.gyro_pro_y<<"  "<<gStateData.gyro_pro_z<<"  ";
                            std::cout<<gStateData.accel_pro_x<<"  "<<gStateData.accel_pro_y<<"  "<<gStateData.accel_pro_z<<"  ";
                            std::cout<<gStateData.psi<<"  "<<gStateData.theta<<"  "<<gStateData.psi<<endl;

                            text<<gStateData.gyro_pro_x<<'\t'<<gStateData.gyro_pro_y<<'\t'<<gStateData.gyro_pro_z<<'\t';
                            text<<gStateData.accel_pro_x<<'\t'<<gStateData.accel_pro_y<<'\t'<<gStateData.accel_pro_z<<'\t';
                            text<<gStateData.psi<<'\t'<<gStateData.theta<<'\t'<<gStateData.psi<<endl;

                        }


                    break;
                    }

                break;
                }
Posted
Updated 6-Jul-14 23:24pm
v2
Comments
Stefan_Lang 10-Jul-14 5:58am    
Sorry, out of Kryptonite: can't read your mind.

As long as you don't offer the slightest explanation as to the declarations and contents contained in those data structures you process, and the numbers you're printing out, we cannot possibly understand what your problem is, nor help resolving it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900