I have a pixhawk. The GPS port was damaged in a crash and doesn’t work reliably now.
I connected the 3DR uBlox GPS to the SERIAL4/5 port. It works - kind of.
Good:
The ardupilot system passes the pre_arm check on the pixhawk.
It will follow planned waypoints in AUTO mode.
Bad:
In mission planner flight data, lat and lng is 0, but lat2 and lng2 shows a good positions.
I use a Teensy 3.0 to transmit Mavlink telemetry data to my Taranis FRsky Plus RC through my TELEM1 port. It still works, but it no longer passes any GPS information.
Question:
How can I get my pixhawk to use the SERIAL4/5 port the same as the GPS port (as the primary GPS)? It kind of does, but not fully.
All I did was swtch hal.uartB with hal.uartE so that uartB is the 2nd GPS and uartE is the 1st.
I think this whole cpp file is where the firmware sets what serial ports are doing what.
So, I saved that and compiled a new firmware and uploaded to the Pixhawk.
Success, so far.
The telemetry on my FrSky Taranis comes up with coordinates, now! The GPS (same 3DR/ublox GPS) now is more stable and wanders (dithers) less. Drone can fly in loiter mode now.
Solved…?
I know there are a number of people who are being told by 3DR to buy another Pixhawk, but this clearly works and is free. Granted, you’re not going to be using a 2nd GPS.
But I suppose I have failed to describe the problem well.
With a broken GPS (Serial 3) header, you can indeed connect your 3DR uBlox GPS to the Serial4/5 header. You can change the protocol and baud rate of Serial4 to match the GPS settings of Serial3 (this is indeed the default setting in the code for Serial4).
Good:
Your GPS will fire up, and the position will be reported through lat2,long2, etc… Yeah!!!
You can do ‘auto’ planned missions.
Bad:
However, in the Flight Data part of Mission Planner the GPS Fix indicator in the HSI with continue to indicate “No Fix”. And give no GPS Fix Data (numSats, 2D/3D, etc…).
Several flight modes don’t work well.
The position of the GPS dithers much more (I cannot understand why this happens).
If you are using a Teensy 3.1 to take the MavLink Data from Telem1/2 and transmit that to your Taranis, it won’t transmit any coordinates to your RC.
Altering the code in the way I did fixes the problem!
All I did was swtch hal.uartB with hal.uartE so that uartB is the 2nd GPS and uartE is the 1st.
I think this whole cpp file is where the firmware sets what serial ports are doing what.
So, I saved that and compiled a new firmware and uploaded to the Pixhawk.
Success, so far.
The telemetry on my FrSky Taranis comes up with coordinates, now! The GPS (same 3DR/ublox GPS) now is more stable and wanders (dithers) less. Drone can fly in loiter mode now.
Solved…?
I know there are a number of people who are being told by 3DR to buy another Pixhawk, but this clearly works and is free. Granted, you’re not going to be using a 2nd GPS.[/quote]
Stefan it worked perfectly for me, thank you very much for sharing the solution, i used Ubuntu and apm planner.Thanks again.