The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
youtube wasnt taking uploads and Luke went to bed, he says he has a stable hover
take a look at source its a pretty simple control loop right now but it works
Well, not as good of new as I would hoped, watch around 1:20 for the best performance as of right now. Still not hovering for me but I think I'm having transmitter issues. Anyways as you can tell from the video I wont be flying again for a bit.
we think its tx, everything else looks good in code now we just need to cool the rx down, chris take a look at the scale PID and RX, we're cleaning it up now
Chris, what do you mean by dual rates and expo on TX, we are trying to compensate for some odd things in tx right now, is there a concept we're missing
Brandon, you may want to avoid making multiple posts in a row. It makes it very difficult to read the thread.
As for DR&Expo, if you have a computer radio, you can program that in.
I recommend you get a computer radio so you can switch back and forth between multiple DR&Expo settings. I use gentle settings for departure and tighter settings for cruising.
Have you flown an R/C plane or helicopter before? A common thing for beginner pilots is to give full stick corrections when only 1/10th of a stick movement is required, this leads to wild oscillating flight like you are seeing, the same as a control loop that is correcting too much at a time.
Can you take off just by using throttle? If you can't, you have some trim issues which need to be corrected before anything else.
You should be able to throttle up for takeoff, and hover with the flight computer keeping it still and level. Once you can do this, introduce small movements in one direction, then return to a hover. This is how beginner helicopter pilots are taught - as it saves the wild movements of going too far too fast.
You may also want to consider the room you are using - make sure you don't have objects that will return the down draft to the quad creating turbulence or winds which can disturb the flight artificially.
Brandon, you may want to avoid making multiple posts in a row. It makes it very difficult to read the thread.
As for DR&Expo, if you have a computer radio, you can program that in.
I recommend you get a computer radio so you can switch back and forth between multiple DR&Expo settings. I use gentle settings for departure and tighter settings for cruising.
Chris, you may want to avoid being a dbag too many times in a row. It makes it very difficult to read the thread.
Thanks Mark that makes sense, we need to just concentrate on throttle and throttle alone.
Chris thank you for the forum etiquette reminder. The posts were fast given we we had discovered the algo at the exact same time i replied and implemented it in code, i've attached our algo. i think you might be on to something as far as making it a scaling variable that can change as the flight conditions change.
using System;
namespace Quad.Net.Commons.Utilities
{
public class Scale
{
private readonly double[] _coefficients;
private readonly double _offset;
public Scale(double offset, params double[] coefficients)
{
_coefficients = coefficients;
_offset = offset;
}
public double Calculate(double value)
{
double output = 0;
for (int i = 0; i < _coefficients.Length; i++)
{
output += Math.Pow(value + _offset, i) * _coefficients[_coefficients.Length - i - 1];
}
return output;
}
}
}
namespace Quad.Net.Tests
{
[TestFixture]
public class ScaleTests
{
[Test]
public void TestQuadratics()
{
Scale scale = new Scale(-1500, 0.0000008, 0, 0, 0);
Assert.AreEqual(scale.Calculate(1000),-100);
}
}
}
Thanks Mark that makes sense, we need to just concentrate on throttle and throttle alone.
Chris thank you for the forum etiquette reminder. The posts were fast given we we had discovered the algo at the exact same time i replied and implemented it in code, i've attached our algo. i think you might be on to something as far as making it a scaling variable that can change as the flight conditions change.
using System;
namespace Quad.Net.Commons.Utilities
{
public class Scale
{
private readonly double[] _coefficients;
private readonly double _offset;
public Scale(double offset, params double[] coefficients)
{
_coefficients = coefficients;
_offset = offset;
}
public double Calculate(double value)
{
double output = 0;
for (int i = 0; i < _coefficients.Length; i++)
{
output += Math.Pow(value + _offset, i) * _coefficients[_coefficients.Length - i - 1];
}
return output;
}
}
}
namespace Quad.Net.Tests
{
[TestFixture]
public class ScaleTests
{
[Test]
public void TestQuadratics()
{
Scale scale = new Scale(-1500, 0.0000008, 0, 0, 0);
Assert.AreEqual(scale.Calculate(1000),-100);
}
}
}
Move your _coefficients.Length statement to it's own local variable, before you loop and then reference that. It's much faster in netMF than referencing the property.
Also, underscores are against most best practices for .Net
While we are on the issue, I was thinking it might be nice to have a cheat sheet with major .Net features, and the performance hits involved. One this that has stood out to me is that the ms code rarely uses properties, relying on public variables instead. It would be nice to develop our own "Best Practices" especially as it relates to pseudo real-time code.
One of the major things I seen thrown around a lot is this concept that you can never know how long .Net is going to take to execute any given line. I think with enough understanding we should be able to quantify every line. This is especially important to the success of this project.
Just to keep you guys in the loop, I had a major hardware failure (blew out the bearing on a motor) that has stopped me for the moment from trying to fly again. I have every reason to believe that it could have actually flow. I think the only thing that was stopping me from doing so was what Seto and Mark both identified. Seto if you do have a quad that you would be willing to try on .net and an extra MCU I could provide you with the tools to get running on my platform. For that matter if anyone else out there is interested let me know and I will put together an architecture of how it works. That being said I did put in an order for replacement parts this morning, so hopefully i will be back up soon.
I have a quadcopter and a uC but it's taking forever for hobbyking to get my motors and ESCs out. I'm grounded till those come. They have been on order for a month now #%#@$%$#@%#$.