So I found in the patch notes for AC3.5-rc5 that Do-set-home sets EKF origin, but I can’t figure out how to do it right. Mission planner does it well, but when I try to do it myself, MAVProxy gives me a response of 4 (which I assume to be fail). What special sauce is required to set EKF home?
Here’s what I do in dronekit (with lat, lon, lat set to 0):
Olle,
Excellent, glad to hear it worked! It is actually important to at least roughly pick your actual location because the compass declination is looked up from a small database within ardupilot. Having the declination wrong could lead to the vehicle’s heading being off although for most places in the world the differences is only a few degrees.
I have analyzed the problem further. I have compared the MAVlink messages with Wireshark.
The only difference between the Mission Planner Message and the dronekit-python message is the component ID now, which is 0xbe for MP and 0x00 with dronekit.
I haven’t found out how I can control this field via the API yet. From the documentation I am not sure if it is even accessible without editing the dronekit-python source code?
Same problem here @moobsen@ollenorelius, mission planner working, dronekit not and gives result 4 “Executed but failed”. Have you found a solution?
Yes, system and component ids in the mavlink header are related to the sender of the packet: system 0xff = 255 (common GCS id), component 0xbe = 190 = Mission Planner component id
Maybe I can test a sightly modified version of the MAVproxy style code suggested by @peterbarker
vehicle._master.set_gps_global_origin_send(
target_system,
lat*10000000, # lat
lon*10000000, # lon
0*1000) # no height change
Hello.Can somebody help me with instructions on how to setup EKF origin without Mission Planner.If I could enter a permanent one in some config file.That would be best so i could use the Lidar based nongps Rover as soon as it boots and connects to companion computer.Thanks