Show Posts
Pages: [1]
1  Forum 2005-2010 (read only) / Exhibition / Re: Arduino 3DOF Head Tracker on: January 09, 2009, 05:03:09 am
Thank you, i really appreciate your help.
2  Forum 2005-2010 (read only) / Exhibition / Re: Arduino 3DOF Head Tracker on: January 08, 2009, 08:18:15 am
I have some questions.if you could answer i would be glad.In your code,

void A2Ddata(unsigned int n) {
  long tempG = 0, tempX = 0, tempY = 0, tempZ = 0;

  for(unsigned int k = 1; k <= n; k++){
    tempG += analogRead(gPin);  
  }
  gRaw = tempG*10/n;  ????
}



???? what the value you get ?   is it radians/sec or deg/sec ?   is tempG  given you as raw value of the sensor ?
especially i didnt understand the  temG*10/n ?    what this calc. do?




A2Ddata(smiley-cool;   ????   why did you send 8 ?

    //Calculate gyro turn rate
    rate = (gRaw*Vin/100-gOffset)*0.0150;   ??

    if (abs(rate) > 2.5) {
      angle += (rateold+rate)*0.010;  //trapz intergration   ???
    }
    rateold = rate;


??  what this rate means ?
??? this should be the integration to calculate angle.




// code to reduce gyro drift under steady conditions
    if (rate < 5) {
      if (rate > 0) {
        gOffset++;
      }
      else{
        gOffset--;
      }
    }

Did you use this in your code?



I am sorry about these question, it is a lot. But really i need these because i am at the end of edge my thesis. Thanks your help
3  Forum 2005-2010 (read only) / Exhibition / Re: Arduino 3DOF Head Tracker on: January 06, 2009, 08:59:31 pm
Well Done work..Does your code eliminate bias drift of the yaw gyro, exactly?
4  Forum 2005-2010 (read only) / Frequently-Asked Questions / do two things at the same time for GPS / INS intgr on: January 03, 2009, 11:21:04 am
Hello. My english is not good to explain what i meant exactly, sorry about that.

I am working on a project about GPS/INS integration,i need to sample accelerometer and gyros for within 20ms but i from analog inputs, but while i need to get serial info from GPS by serial port at 4800 baud rate. How could i do both of them at the same code, is should be like this

void loop()
{
   if( (millis() - lastreda_analog) > 20ms ) // sampling analog inputs 50Hz
     {
        // reading_analog_value
     }

   if( (millis() - lastread_gps_value) > 1s) // getting data at 4800 baud rate at 1 Hz
    {
       // reading GPS values from serial port
    }

Pages: [1]