How I can get 2nd GPS data and what setting I have to do to use 2nd GPS?

I am using Pixhawk 6c Autopilot. I have connected 2 GPS from this Autopilot. I powered my Pixhawk and armed it, and after some time I disarmed it. The .bin file is created in the SD card. I converted this .bin file to .mat matlab file. Now I want to see the data collected from GPS1 and data collected from GPS2. Where will I get this 2 data?..

What are the settings I have to change to get the data of 2nd GPS in the matlab file along with the 1st GPS data…Please help.

If anyone have any suggestions please let me know. It will be a big help.

Without knowing your setup, including components used, parmeters and the .bin file nobody can really help you.

1 Like

Please look into the picture. I have shown the Photo of the setup which we are using. Also I am attaching a .bin file of this setup. Please let me know how I can get the data of GPS1 and GPS2 Data simultaneously in the SD card. Please let me know if I have to change some parameters anywhere.

This is the .bin file of the experiment - 00000001.BIN - Google Drive

Please give some suggestions, how i can fix this.

You have only activated one GPS (GPS_TYPE,1). I assume you have not configured anything and are using the default parameters. To activate the second GPS, this must be activated in the parameters (GPS2_TYPE,1). See also here GPS Blending (aka Dual GPS) — Plane documentation (ardupilot.org)

Thanks. Now I am getting GPS_0 and GPS_1 data in the SD card. I have used the bellow settings.

  • GPS2_TYPE = 1 / “AUTO” or the specific number corresponding to the type of GPS
  • GPS_AUTO_SWITCH = 2 / “Blend”. Alternatively set to 1 / “UseBest” to only use the better GPS. The better GPS is decided based on the GPS’s self reported accuracy.

It says that… " The first GPS’s data appears with an instance number of 0 in the GPS and GPA messages. (ie GPS[0].x, GPA[0].x messages) The second GPS’s data appears with an instance number of 1 in the GPS and GPA messages. The blended GPS data appears with an instance number of 2 in the GPS and GPA messages."

But I am not getting the data for the blended that means I am not getting any instance number of 2.

Can you please figure out the problem. What should I change to solve this problem. I am attaching the .bin of the experiment along with this. Please help to solve this issue.

Please help to solve this issue …!!!

Your flight controller firmware probably does not support GPS blending. Have you compiled custom FW for the FC?

Moreover, what would ever be gained by blending an excellent module’s output (the F9P) with a largely inferior one (the M8N)?

Good point Yuri, I did not notice that.