I need some help with the meaning of the single GPS values present in the logfiles. Attached is a graph of latitude nad longitude from a very short flight. The blue curve shows the GPS_RAW_INT values, which is the position information of a normal GPS receiver (no RTK). The red curve (GPS2_RAW) is the position information of an external high-precision system, which I fed into Ardupcopter via MAVLink. The yellow curve (GLOBAL_POSITION_INT) is, as far as I understand it, the position estimation of the copter itself. Now, I am wondering why the GLOBAL_POSITION_INT is that much different from the single GPS positions. GPS_AUTO_SWITCH was set to 1, which means that only one GPS should be used and the copter used GPS2 for sure during this record.
Here are some questions:
- How exactly is the GLOBAL_POSITION_INT calculated? How can I force Arducopter to trust GPS2 if it is available (it is the exact position)?
- Do GPS_RAW_INT and GPS_RAW already include the correction for the spatial GPS receiver offsets from the flight controller?
Thanks in advance!