Hello I am having some GPS problems with my drones. Earlier I had the drones working fine and they were able to take off and fly my missions as I wanted them to. I then tried to switch the home location of my drone to something custom. After this switch I’ve had multiple GPS errors and cannot get my drone to takeoff anymore. It said it did not have a GPS lock to my drone and didn’t know the home position so I ran the following command to set it:
message COMMAND_INT 0 0 0 179 0 0 1 0 0 0 0 0 0
Now it says
Mode change to GUIDED failed: requires position and
Critical: PreArm: Need Position Estimate
Why did these errors randomly occur and how am I supposed to fix them?
Well, guided mode requires GPS fix and home location to be set.
I have set my home location still confused about why there is no GPS fix though when there was one before
Ok so when I connect to the vehicle and check the state of the EKF this is what is output:
EKF OK?: False
How do I repair the state of the EKF?
you need a GPS fix. GPS fix depends on a lot of factors. search the web for some more info.
I have tried to change the GPS_AUTO_SWITCH setting from 1 to 0. When connecting to vehicle I get this output now
EKF OK?: True
But when trying to arm it goes into an infinite cycle of arming. Online they said again this is a problem with the GPS. I am clueless on how to even get a fix. I am not using a “real” drone as my project is virtual with Gazebo and all of the support I have found was hardware issues with the drone.
Why didn’t you said that “your drones” are virtual in the very first post???
Probably it was a very bad idea to change their home location.