It seems that the second GPS takes longer to have a low hdop. The erratic green line happened while I was trimming. However, when stabilized, first GPS has hdop around 0.7 and second GPS around 1.2. Both have M8N chip. It is true that examining both GPS logs, GPS 2 seems noisier.
However, I disabled GPS 2:
GPS_TYPE 1
GPS_TYPE2 0
and this is what happened:
Rover_20180702_251.BIN
I have no idea about why this happened. I continued with two GPS’s.
Reason for this malfunction with a single GPS?
Here is a log of altitude as shown by both GPS’s:
The circuit is horizontal. GPS 1 shows altitude difference of 10m, and GPS 2 of 21m.
Status of both GPS’s:
According to:
Downloading and Analyzing Data Logs in Mission Planner (Rover)
Downloading and Analyzing Data Logs in Mission Planner (Copter)
Status 0 = no GPS, 1 = GPS but no fix, 2 = GPS with 2D fix, 3 = GPS with 3D fix
How is it that GPS 1 status reaches 4?
The long logs (including mentioned above trimming) are due to not knowing a convenient method to start and stop a log. According to above:
On Plane and Rover dataflash logs are created soon after start-up. On Copter they are created after you first arm the copter.
Unless I miss something, I think arming and disarming should start and stop a log also in rover. At present I keep turning on and off.
So, in rover, how can I start and stop a log?
The podium of this circuit is a big structure of concrete and steel beams. Approaching to it a conventional compass its needle orientation is modified when approaching it to a podium steel beam:
The compass must be close to the steel beam to deviate its needle. It is true that “Mag anomally” is heard in Mission Planner (and is heard in videos below) when the car approaches the podium, but also in intermediate circuit points.
How can I find this “Mag anomally” in the logs?
Certainly lowering TURN_MAX_G the car goes slower and can stop completely, as can be seen on videos below. I left it finally at 0.3 (lower values don’t seem to change much).
In following tests I tried to increase speed, changing CRUISE_SPEED and SERVO2_MAX (left finally at 1600, as a safety measure). The main problem is the lack of trajectory repeatability: laps are different, and with same parameters you may have good laps, car going offtrack, or a crash against a barrier.
Other problem is reaching waypoint 1 after starting (beside podium). In many cases the car deviates and hits the right or left barrier.
Reason for this?
For following tests I trimmed waypoints and tried this mission:
Waypoint 100 is to be used as a safe final parking place if close to a barrier. It has been placed far from waypoint 1/34/67 so as to start a second set of three laps pressing button Auto in Mission Planner after mission ends and goes to Hold mode.
Rover_20180703_268.BIN
CRUISE_SPEED 3.2
SERVO2_MAX 1600
TURN_MAX_G 0.3
WP_SPEED 0
3x2 laps. Difficult start, knocking right barrier approaching waypoint 1.
After t=670 (lap 5, waypoint 67):
-Heard: “Mag anomaly. Yaw aligned”.
-Steering oscillates (can be seen in the video at 4K).
-Car recovers and goes on.
These are STER DesTurnRate and TurnRate is detail:
Observe steering servo:
Reason for this oscillations?
For next three tests I tried CRUISE_SPEED=4.5, and six laps (repeating mission). First two failed and third succeeded.
Rover_20180703_269.BIN
At the end the car goes offtrack and backwards. This is NTUN.XT:
Rover_20180703_270.BIN
At the end the car goes offtrack and stops over an elevation. This is NTUN.XT:
Rover_20180703_271.BIN
Success, with even better fit to mission waypoints at 4.5m/s than at 3.2m/s above, but shows
lack of trajectory repeatability.
In missions above trajectory fit to some waypoints is poor, particularily at 84. and at the videos it can be seen that the car goes offtrack after the long straight. Why poor fit in particular places?
Above it was mentioned unknown origin problems going from two gps’s to one. I wonder if magnetic problems would be improved with two external compasses. Common compasses are HMC5883 and HMC5983. A difference is that the second one has also SPI bus, so on the Pixhawk could be connected one to I2C as now, and a HMC5983 on the SPI bus. Module GY-282 supports choosing connection:

Will a HMC5983 on a GY-282 be recognized when connected to a Pixhawk through SPI?
A last thing about range finders, which I have began to consider. I have an analog one (1) on the left and an I2C (2) on the right. This is a log, which shows activity:
From:
Complete Parameter List (Rover)
RNGFND_TURN_ANGL: …Positive means to turn right, negative means turn left.
This is for (1) so being at the left should have a positive value to turn right.
But RNGFND2_TURN_ANGL does not exist, so
how is what to do in rover when rangefinder 2 approaches an obstacle indicated?
Briefly:
-Could I miss something when disabling second GPS?
-Why GPS status reaches 4 (undocumented)?
-How can I start and stop a log in rover without turning off?
-What about “Mag anomally” heard at times? How does it appear in logs?
-Reason for deviations at mission start, before waypoint 1?
-Reason for occasional steering oscillations?
-How can trajectory repeatability be improved?
-Why in certain points trajectory fit is poor?
-Will a HMC5983 be recognized on SPI? Will a second external compass do any good?
-Action when rangefinder 2 approaches an obstacle? (RNGFND2_TURN_ANGL does not exist)