Navigation fail-safe commands.

General discussions on the Gluon-project that don't fit elsewhere. If required, I will create more subforums.

Moderator: lukasz

Navigation fail-safe commands.

Postby daedalus » Sun Aug 21, 2011 11:59 am

Is it possible with the actual navigation commands to implement some fail-safe options. Something like, if battery voltage drops below some value or home distance is too big abort the current mission and execute another navigation sequence (e.g. fly to home position at 100m then circle above)?
As I understand the IF and UNTIL are not checked after moving to next navigation command.
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania

Re: Navigation fail-safe commands.

Postby Rangarid » Sat Aug 27, 2011 11:55 pm

You can use the UNTIL command. For example:

do your flight code here
UNTIL (VAR > X) [var = home distance, distance for example 1000m]
FLY_TO_RELATIVE(0,0,100)

Until the distance of 1000m is reached you can do whatever you want, if home distance gets larger then 1km it flies back to your home position. Or something similiar to this. Works with battery voltage as well.

do your flight code here
UNTIL (VAR < X) [var = battery voltage, x = 10]
FLY_TO_RELATIVE(0,0,100)

As long as battery has more then 10V do whatever you want, after that set the FLY_TO_RELATIVE(0,0,100). Then it returns to home if battery voltage is under or same as 10V.

There is an example in the wiki:
1 CLIMB(35m)
2 CIRCLE_RELATIVE(lon: 0m, lat: 0m, radius: 100m, height: 150m)
3 UNTIL(Height(m) > 145)
4 FLY_TO_REL(lon: -150m, lat: 150m, height: 145m)
5 FROM_TO_REL(lon: -150m, lat: 150m, height: 145m)
6 FROM_TO_REL(lon: 150m, lat: 150m, height: 145m)
7 FROM_TO_REL(lon: 150m, lat: -150m, height: 145m)
8 FROM_TO_REL(lon: -150m, lat: -150m, height: 145m)
9 GOTO(5)

Let me explain it for you:
1. the plane will get some altitude until it reaches 35m
2. the plane will come back and flies circles above your head in a 100m radius and the height of 150m
3. it will fly circles and circles until height is 145m
for 4-8 have a look at the picture:
Image
The numbers on the lines are the numbers of the code. This one will fly to the 4 points forever until it crashes because battery is empty ;)
Attachments
gluon.jpg
gluon.jpg (32.22 KiB) Viewed 5709 times
Rangarid
 
Posts: 3
Joined: Thu Jan 13, 2011 12:21 pm

Re: Navigation fail-safe commands.

Postby Tom » Tue Aug 30, 2011 12:17 pm

What a complete answer ;-)

@daedalus Micropilot (c) has navigation commands which are continuously executed in parallel to the "normal" ones. This functionality can be used for all kinds of fail safe commands.
Is this what you were referring to?
User avatar
Tom
Site Admin
 
Posts: 1016
Joined: Fri Nov 13, 2009 6:27 pm
Location: Belgium

Re: Navigation fail-safe commands.

Postby daedalus » Tue Aug 30, 2011 1:08 pm

Thank you Rangarid for your explanation. It sounds great, but my understanding was that UNTIL command is checked after executing all previous commands and then repeating only the previous navigation command, not an entire block of commands.

A fail-safe command should kick in no matter which line the navigation program is currently executing. Suppose you have a long flight plan, 30min, but after 5min the battery voltage drops too much - abort and come home.

@Tom, not necessarily navigation commands executed in parallel but to constantly check some fail-safe parameters (min. voltage, max. home distance, max. flight time, etc.). I might be wrong, but I think you already have some options in GluonPilot code - when there is no radio link it switches to automatic mode, if there is no navigation program it returns to home at 100m.
daedalus
 
Posts: 38
Joined: Tue Apr 05, 2011 4:50 pm
Location: Romania


Return to General

Who is online

Users browsing this forum: No registered users and 22 guests

cron