Hi Everyone,
I’m trying to send fake gps data, taken from DWM1001-dev for indoor positioning. I’ve send all data to my pixhawk 6c with pymavlink method gps_input_send().
lat = int(latitude * 1e7) # Deg E7
lon = int(longitude * 1e7) # Deg E7
alt = int(altitude * 1000)
gps_id = int(1)
fix_type = int(3)
satellites_visible = int(16)
ignore_flags = int(249)
hdop = int(0.6)
vdop = int(0.6)
vn = int(0)
ve = int(0)
vd = int(0)
speed_accuracy = int(0.1)
horiz_accuracy = int(1.0)
vert_accuracy = int(1.0)
yaw = int(0)
time_usec = rospy.Time.now()
time_sec = int(time_usec.secs *1e6 + time_usec.nsecs / 1000)
try:
master.mav.gps_input_send(
time_sec,
gps_id,
ignore_flags,
time_week_ms,
time_week,
fix_type,
lat,
lon,
alt,
hdop,
vdop,
vn,
ve,
vd,
speed_accuracy,
horiz_accuracy,
vert_accuracy,
satellites_visible,
yaw
)....
Next i checked if the publish rate in mission planner was 5Hz, and it was fine.
When i run the code, i get the 3d fix but i can’t arm because the altitude isn’t configure correctly, but i’m sure that i’ve set it correctly.
What i’m wrong?
Thank to everyone that will help me.