MAVLink questions

Hi all,

I am hoping someone might be able to help me understand the MAVLink and UAVTalk protocols a bit better, specifically with regard to implementing flight termination more gracefully than simply crashing.  My questions relate to the uplink only.

1. Is there a regular transmission that is sent from GCS to the air vehicle that can be used to detect loss of uplink?  And if so, are there any bytes in this packet that are constant or at least predictable and can be validated by an onboard flight termination device?

2. If a "go to home" command is issued to the air vehicle by the flight termination device, does the sequence number matter?  In other words, does the autopilot obey the command regardless of how incorrect the sequence number is?  I realise that this may be autopilot specific.

Thanks is advance,
Andrew

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Thank you.  The command that is sent to the air vehicle is entered in a user field in the configuration software and stored in the flight termination device, so all of these possibilities are, er, possible.  Just wanted to know whether I had to parse the uplinked MAV packets, and from what I have learned so far it seems that I do not.

    Cheers,
    Andrew.

  • Perfect, thanks Bill and Kevin.

    Regarding monitoring of the telemetry uplink, I think the MAVLink uplink heartbeat should work fine, as long as it is sent often enough.

    The hardware will not have authority over PWM or PPM entering the autopilot, so it will not be able to initiate a RTL that way, but sending a MAVLink command to the autopilot should be fine.  Obviously if the autopilot does not respect the RTL command within a certain time frame, the flight termination device may take more definitive action.

    Cheers,
    Andrew.

  • Developer

    I've written a GCS, so I'll give this a shot:

    1) Yes - the GCS sends mavlink heartbeats (with the vehicle type listed as GCS)

    2) For APM (at least) the sequence # matters if you are setting a new current waypoint (go to home would be setting 0 as the current waypoint).  Setting mode to RTL does not need a sequence number (it is just a mode set)

  • Developer

    Thanks for the clarification. :-)

    I don't see anyway around monitoring MAVLink Heartbeat messages. To trigger failsafe you can either send a MAVLink message to RTL, or you could set the mode switch PWM to correspond to the failsafe option i.e. RTL as when you have TX loss.

    I haven't looked to see if there is a rejection of packets with the same or out of sequence number, but it's only an 8 bit value. If you sent the command multiple times, it will loop round quite quickly and will be a fit, if you understand what I mean.

    If i have any other ideas to keep it simple, I'll let you know.

  • Hi Bill,

    Sorry I should have introduced myself - I run Millswood Engineering.  Kevin contacted me a while back regarding flight safety matters and has been instrumental in encouraging and shaping a redesign of the current Failsafe board to be smaller, more capable, and better suited to the needs of multicopters.

    Hence all the questions.  Suggestions welcome!

    Cheers,
    Andrew

  • Thanks Bill and Drone Savant for the added detail.

    In fact the device that will be listening to the uplink and potentially sending a RTL command will be an update of this device.

    I am not planning on monitoring the downlink, so any heartbeat must be GCS -> MAV.

    I would prefer to make the device protocol agnostic, hence the question about sequence number.  If a suitable RTL command can be framed at configuration time (rather than run time), this will avoid the need to parse MAVLink packets and have the added benefit of reducing processor overhead.  Obviously the RTL command needs to be entered by the user at configuration time, and stored in non-volatile memory onboard the flight termination device.

    If I have to parse I will, but my preference is to avoid it if poss.

    Cheers,
    Andrew.

  • Ah, thanks Bill.

    I will try to read more of the MAVLink documentation.

  • Thank you Bill,

    Yes, they were rather specific questions.

    If there is no retry protocol, it is reasonable to assume that the autopilot must obey commands regardless of sequence number.

    Cheers,
    Andrew

  • Looks like it was a vain hope.
    I guess once a question slips off the front page it is destined for eternal obscurity.

    Sigh.

  • Anyone?

This reply was deleted.

Activity

Gremsy liked Gremsy's profile
Mar 12
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…