Servers by jDrones

Flight Mode Finding Problem


(Rjiun Raj K) #1

Dear Friends,

My current project is with Pixhawk serial communication with Raspberry Pi 3. I got a successful connection, i can read certain values from pixhawk using Raspberry Pi. I got the accelerometer readings, altitude, position, velocity and all. My final aim is to get and identify the current Flight Mode using MAVLink protocol. Someone please help me to find the current Flight mode using MAVLink protocol using Heartbeat command or something else.

Something i found here, http://mavlink.org/messages/common type cntrl+f , search ‘#0


(tridge) #2

flight mode is in the HEARTBEAT message, in the custom_mode field.
Note that you may find the source code of MAVProxy useful.
Cheers, Tridge


(Rjiun Raj K) #3

in MAVProxy, where they defined all the available modes as enumerators??

i saw defines.h for MAVLink, that they defined all the flight modes there.


(Rjiun Raj K) #4

Now i’m editing the MAVProxy and creating new modules to perform.
I can set position, velocity and altitude using MAVProxy, but how can i get the current values? Can I use High resolution imu readings through MAVProxy(python), not MAVLink (cpp) which I already have.


(peterbarker) #5

in MAVProxy, where they defined all the available modes as enumerators??

i saw defines.h for MAVLink, that they defined all the flight modes there.

https://github.com/ArduPilot/pymavlink/blob/master/mavutil.py#L1421


(peterbarker) #6

Now i’m editing the MAVProxy and creating new modules to perform.
I can set position, velocity and altitude using MAVProxy, but how can i get
the current values? Can I use High resolution imu readings through

The example module has an… example of this :slight_smile:

You generally can’t get “high resolution” IMU readings - the bandwidth
typically isn’t there to transport it.


(Rjiun Raj K) #7

Thank you very much sir.
now I’m trying to add some more flight modes.


(peterbarker) #8

Thank you very much sir.
now I’m trying to add some more flight modes.

Have fun! You might check my flight-mode-object branch, here:


(Rjiun Raj K) #9

Thank you again sir, it’s usefull. I’ll try to build a px4 code.


(Rjiun Raj K) #10

Sir
Can I read the current position and velocity reading through MAVProxy?
Can I get it in NED Frame?