Red Ardupilot and Blue Shield with EM406 GPS

Hi guys.. I am testing my GPS with ardupilot and shield. But I wonder why I could not read any data.
I can only read ""Still Waiting: No Valid Fix"" from the serial monitor.
What are the reasons for this problem?
I tried retrieving the GPS data outdoors but also failed.
Btw, i tried using the RAW_GPS_TESTER and it works.
I am able to read data like A0,A2,0,5B,29, .... ,B0,B3.

But when I moved on to EM406_Tester,
I could not read any data from the serial monitor except "Still Waiting: No Valid Fix"

Any one knows what might be the cause?

This is the defines.h of mine..

// For Alpha Testers only
// ----------------------
#define GROUNDSTATION 0 // 0 = Ardupilot GS, 1 = Jason's GS
#define READ_COMMANDS 0 // ground station parser - not finished!
#define REMZIBI 0 // (boolean) use to enable Remzibi - not finished!

// Do not Change below this line
// -----------------------------

#define WP_10_BYTES 10

// PID cases
// ----------------
#define CASE_SERVO_ROLL  0
#define CASE_SERVO_PITCH 1


// Auto Pilot modes
// ----------------
#define MANUAL 0
#define STABILIZE 1
#define FLY_BY_WIRE 2
#define AUTO 5
#define RTL 6
#define LOITER 7

// Events
// ------
#define EVENT_WILL_REACH_WAYPOINT 1
#define EVENT_SET_NEW_WAYPOINT_INDEX 2
#define EVENT_LOADED_WAYPOINT 3
#define EVENT_LOOP 4

// GPS flags
// ---------
//GPS_update
#define GPS_NONE 0
#define GPS_POSITION 1
#define GPS_HEADING 2
#define GPS_BOTH 3
#define GPS_IMU 4
#define GPS_IMU_ERROR 8

//GPS_fix
#define VALID_GPS 0x00
#define BAD_GPS 0x01
#define FAILED_GPS 0x03



#define WP_START_BYTE 0x18        // where in memory home WP is stored + all other WP
#define MPDEGREE 0.000009
#define BATTERY_VOLTAGE(x) (x*(INTPUT_VOLTAGE/1024.0))/0.000294117



#define HOLD_ALT_ABOVE_HOME 8 // bitmask value

//GPS SIRF configuration strings...
#define SIRF_BAUD_RATE_4800    "$PSRF100,1,4800,8,1,0*0E\r\n"
#define SIRF_BAUD_RATE_9600    "$PSRF100,1,9600,8,1,0*0D\r\n"
#define SIRF_BAUD_RATE_19200    "$PSRF100,1,19200,8,1,0*38\r\n"
#define SIRF_BAUD_RATE_38400    "$PSRF100,1,38400,8,1,0*3D\r\n" 
#define SIRF_BAUD_RATE_57600    "$PSRF100,1,57600,8,1,0*36\r\n"
#define GSA_ON   "$PSRF103,2,0,1,1*27\r\n"   // enable GSA
#define GSA_OFF  "$PSRF103,2,0,0,1*26\r\n"   // disable GSA
#define GSV_ON   "$PSRF103,3,0,1,1*26\r\n"  // enable GSV
#define GSV_OFF  "$PSRF103,3,0,0,1*27\r\n"  // disable GSV
#define USE_WAAS   1     //1 = Enable, 0 = Disable, good in USA, slower FIX...
#define WAAS_ON    "$PSRF151,1*3F\r\n"       // enable WAAS
#define WAAS_OFF   "$PSRF151,0*3E\r\n"       // disable WAAS

//GPS Locosys configuration strings...
#define USE_SBAS 0
#define SBAS_ON "$PMTK313,1*2E\r\n"
#define SBAS_OFF "$PMTK313,0*2F\r\n"

#define NMEA_OUTPUT_5HZ "$PMTK314,0,5,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n" //Set GGA and RMC to 5HZ 
#define NMEA_OUTPUT_4HZ "$PMTK314,0,4,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n" //Set GGA and RMC to 4HZ
#define NMEA_OUTPUT_3HZ "$PMTK314,0,3,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n" //Set GGA and RMC to 3HZ
#define NMEA_OUTPUT_2HZ "$PMTK314,0,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n" //Set GGA and RMC to 2HZ
#define NMEA_OUTPUT_1HZ "$PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0*28\r\n" //Set GGA and RMC to 1HZ

#define LOCOSYS_REFRESH_RATE_200 "$PMTK220,200*2C" //200 milliseconds
#define LOCOSYS_REFRESH_RATE_250 "$PMTK220,250*29\r\n" //250 milliseconds

#define LOCOSYS_BAUD_RATE_4800 "$PMTK251,4800*14\r\n"
#define LOCOSYS_BAUD_RATE_9600 "$PMTK251,9600*17\r\n"
#define LOCOSYS_BAUD_RATE_19200 "$PMTK251,19200*22\r\n"
#define LOCOSYS_BAUD_RATE_38400 "$PMTK251,38400*27\r\n"





And this is the easystar_25.h of mine
  /***************************************/
 /*ArduPilot 2.5 Header file, good luck!*/
/***************************************/

//Hardware Configuration
#define SHIELD_VERSION 1 // Old (red) shield versions is 0 (or 0 = no shield), the new (blue) shield version is 1, -1 = no shield

// Airframe settings
//1-1
#define GPS_PROTOCOL 1 // 0 = NMEA, 1=SIRF, 2=uBlox, 3 = IMU Choose protocol
//1-2
#define GCS_PROTOCOL 0 // 0 = Standard ArduPilot (LabVIEW/HappyKillmore), 1 = special test, 2 = Ardupilot Binary(not implemented), 5 = Jason's GCS, -1 = no GCS (no telemtry output)

#define REVERSE_ROLL 1 //To reverse servo roll, PUT -1 to invert it!!!
//1-3
#define REVERSE_PITCH 1 //To reverse servo pitch, PUT -1 to invert it!!!
//1-4
#define REVERSE_THROTTLE 0 // 0 = Normal mode. 1 = Reverse mode...
//1-5
#define INTPUT_VOLTAGE 5200.0 // (Millivolts) voltage your power regulator is feeding your ArduPilot to have an accurate pressure and battery level readings. (you need a multimeter to measure and set this of course)
//1-6
#define BATTERY_EVENT 0 // (boolean) 0 = don't read battery, 1 = read battery voltage (only if you have it wired up!)
//1-7
#define AIRSPEED_SENSOR 1 // (boolean) Do you have an airspeed sensor attached?
//1-8
#define MIXING_MODE 0 //Servo mixing mode 0 = Normal, 1 = V-tail (v tail not tested yet).

// IR sensors
//2-1
#define ENABLE_Z_SENSOR 0  // 0 = no Z sensor, 1 = use Z sensor (no Z requires field calibration with each flight)
//2-2
#define XY_SENSOR_LOCATION 0 //XY Thermopiles Sensor placement
//Mounted on top:         0 = cable in front, 1 = cable behind
//Mounted on botton:     2 = cable in front, 3 = cable behind
//2-3
#define PITCH_TRIM 0 //(Degrees +- 5) allows you to offset bad IR placement
//2-4
#define ROLL_TRIM 0 // (Degrees +- 5) allows you to offset bad IR placement


// RADIO
//3-1
#define SET_RADIO_LIMITS 1 // 0 = no, 1 = set the limits of the Channels with the radio at launch each time
//3-2
#define SET_RADIO_TRIMS 1 // 0 = no, 1 = set the trims of the Channels with the radio at launch each time
//3-3
#define RADIO_TYPE 0 // 0 = sequential PWM pulses(Fasst, Spektrums), 1 = simultaneous PWM pulses (Corona RP8D1)
//3-4
#define CH1_MIN 1220 // (Microseconds) Range of Ailerons/ Rudder
//3-5
#define CH1_MAX 2043 // (Microseconds)
//3-6
#define CH2_MIN 1041 // (Microseconds) Range of Elevator
//3-7
#define CH2_MAX 1765 // (Microseconds)
//3-8
#define CH1_TRIM 1500 // (Microseconds) This is the resting position for your sticks - 1500 = no trim
//3-9
#define CH2_TRIM 1500 // (Microseconds) Trims are normally set automatically in setup.
//3-10
#define CH3_TRIM 1015 // (Microseconds) Trims are normally set automatically in setup.
//3-11
#define THROTTLE_IN 1 // (boolean) Disables throttle when set to 0
//3-12
#define THROTTLE_OUT 1 // 1 = throttle, 0 = no throttle at all! (good for saving fingers on the bench.)
//3-13
#define FAILSAFE_PWM 950 // must be at least 50 µs less than throttle trim (ch3)

//NAVIGATION: HEADING
//Note: Some Gains are now variables
#define HEAD_P .714 //Heading error proportional (same used to move the rudder)... DO not add too much or you will oscillate left and right.  (drunk driver effect)
//4-1
#define HEAD_I .095 //heading error integrator. Do not add too much or you will overshoot.
//4-2
#define HEAD_MAX 3500 //(Degrees *100) The maximum output in degrees to control the roll setpoint
//4-3
#define HEAD_MIN -3500 //(Degrees *100) The min output in degrees to control the roll setpoint
//4-4
#define HEAD_I_MAX 1000 //(Degrees *100) The maximum output in degrees to control the roll setpoint
//4-5
#define HEAD_I_MIN -1000 //(Degrees *100) The min output in degrees to control the roll setpoint
//4-6
#define XTRACK_GAIN .2 // amount to compensate for crosstrack - use debug mode to find correct value
//4-7
#define LOITER_RADIUS 40 // radius in meters of a Loiter
//4-8
#define REMEMBER_LAST_WAYPOINT_MODE 1 //If set 1 = will remember the last waypoint even if you restart the autopilot. 0 = Will start from zero everytime you restart the system.
//4-9
#define WP_ALTITUDE_RADIUS 10 // (meters) accuracy needed to find our waypoint in meters
//4-10
#define ABSOLUTE_WAYPOINTS 1 // 0 = relative, 1 = absolute - not implemented
//4-11
#define AP_STICK_MIXING 1 // 0 = no mix, 1 = mix

//NAVIGATION: ALTITUDE
//5-1
#define ALTITUDE_PITCH_P 1.5 //Altitude error proportional, pitch setpoint
//5-2
#define ALTITUDE_PITCH_MAX 500 // most the plane will pitch up in degrees to raise altitude
//5-3
#define ALTITUDE_PITCH_MIN -1500 // (Degrees *100) most the plane will pitch down in degrees to lower altitude


//NAVIGATION: SPEED GAINS
//6-1
#define ALTITUDE_THROTTLE_P 1.33
//6-2
#define ALTITUDE_AIRSPEED_MAX 15 //(0-125) Maximum extra speed for gaining altitude
//6-3
#define ALTITUDE_AIRSPEED_MIN -15 //(0-125) Maximum reduded speed for loosing altitude


//ATTITUDE: ROLL GAINS
//7-1
#define ROLL_P .65 //     START WITH THIS VALUE TO TUNE - overall proportional term determins how much rudder you use to turn
//7-2
#define ROLL_I .4 //    roll PID integrator
//7-3
#define ROLL_Ps .6 //    Controls rate of rudder turn - direct proportional effect; value of 1 = no dampening
//7-4
#define ROLL_Is .2 //    Controls rate of rudder turn - speed at which the non proportional effect happens - .2 = 5 seconds
//7-5
#define ROLL_MIN -2500 //maximum output of Rudder
//7-6
#define ROLL_MAX 2500 //maximum output of Rudder


//ATTITUDE: PITCH GAINS
//8-1
#define PITCH_P .65 //    Pitch Proportional
//8-2
#define PITCH_I .35 //    Pitch integrator
//8-3
#define PITCH_COMP .30 //<------Very important, Pitch compensation vs. Roll bank angle.


//ATTITUDE: THROTTLE OUTPUT GAINS
//9-1
#define THROTTLE_ABSOLUTE 3 //Absolute
//9-2
#define THROTTLE_P .32 //Proportional
//9-3
#define THROTTLE_I .04 //Integrator
//9-4
#define THROTTLE_I_MAX 50 // (0-125) 50=70% Integrator limit.
//9-5
#define THROTTLE_CRUISE 25 // (0-125) %throttle, or (int)target airspeed for cruising
//9-6
#define THROTTLE_OFFSET_MAX 35 // (0-125) 70 = 56% maximum throttle
//9-7
#define THROTTLE_MAX 60 // (0-125) 70 = 56% maximum throttle


  /*****************/
 /*Debugging Stuff*/
/*****************/
//10-1
#define DEBUG 0 // 0 = no debugging, will cause plane to enter debugging simulation mode
//10-2
#define TURNRATE 55 // (degrees) how fast we turn per second in degrees at full bank
//10-3
#define CLIMBRATE_UP 1000 // (meters * 100) how fast we climb in simulator at 90°
//10-4
#define CLIMBRATE_DOWN 3000 // (meters * 100) how fast we climb in simulator at 90°
//10-5
#define OUTPUT_INFO 1 // set to 0 to avoid printing telemetry out - Tester only

Thanks

Darren, http://diydrones.com/forum/topics/darrens-project?xg_source=activity

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Are my readings normal?
    Are these values read from the serial monitor correct?
    Are these values accurate?
    If the alt is altitude, why does the values changes so much?
    and I am somewhere level 6, which means cannot be 70metres above the ground.
    How does GPS read ground speed?
  • 3D Robotics
    What version of the code are you using?

    Is your GPS module's red LED on?
This reply was deleted.

Activity