Hi @sietse -
Below find python script and instructions that sends both GPS and heading information to the autopilot as NMEA messages. If you’re sending the same NMEA heading messages correctly, and have setup the autopilot to receive them correctly, then you should be all set! I would guess checking the parameters in step 5 should get your setup working…
The setup:
- In BlueOS, navigate to terminal, take red-pill, and nano a new file named fake_gps_yaw.py, save (cntrl o) and exit (cntrl x).
- chmod +X fake_gps_yaw.py
- Edit the file (nano fake_gps_yaw.py) and on line 96, change the IP address of the vehicle to an interface it has a connection on - typically this would be 192.168.2.2 as this is the static IP on the Pi ethernet adapter by default, the example is what I used for my unit that is only connected via WiFi and received that dhcp address.
response = requests.post(‘http://192.168.1.23:6040/mavlink’, json=payload) - Optionally edit the error message on line 101 to use the same IP address.
- In autopilot parameters, verify that EK3_SRC1_POSXY, EK3_SRC1_YVELXY, EK3_SRC1_YAW, are all set to GPS. Also verify that GPS_TYPE is set to MAV.
- Run the script. The vehicle will jump to the coordinates and heading described in the file, and update as the script runs - see the attached video.
fake_gps_yaw.py.zip (3.2 KB)