i've messed around a little with the bs2 code for the geocrawler 4 project and would like to point out one flaw:Get_Angle:DeltaLong = -1 * DeltaLong 'reverse to conform with ArcTangent coordinate standardsDeltaLat = DeltaLat * (128 / 9999) 'adjust them so the max values are +- 128, to conform with ArcTangent standards.DeltaLong = DeltaLong * (128 / 9999)workVal = DeltaLong ATN DeltaLat ' reuse workVal (to save variable memory) to hold binary radian result of ArcTangentRETURN" (128 / 9999)" will return a decimal which of course the stamp cant handle so i replaced it with "DeltaLat = DeltaLat ** 839"and it debugs a good number .before it would only debug "0". i have further modified the code to use the parallax servo controller and hope to do some test flghts in the next month or two when time/wheather allow
You need to be a member of diydrones to add comments!
Thanks for the clear post. I assume in your block diagram that "Servo control" is actually "Servo controller"?
As for your question, GPS altitude data is intrinsically noisy due to the way GPS works, but if all you care about is the first two meters of altitude ultrasonic will work fine. We use GPS for altitude in our planes, because +-10 meters doesn't matter and we can average over many reading. I would definitely not want to do that at low altitude in a heli.
The following attached is not for the GPS, but its a modification of the code demo from Parallax for the MESMIC 2-axis accellerometer. The code nulls out the effect of gravity in order to give you relative angle on the x and y axis.
Replies
Thanks for the clear post. I assume in your block diagram that "Servo control" is actually "Servo controller"?
As for your question, GPS altitude data is intrinsically noisy due to the way GPS works, but if all you care about is the first two meters of altitude ultrasonic will work fine. We use GPS for altitude in our planes, because +-10 meters doesn't matter and we can average over many reading. I would definitely not want to do that at low altitude in a heli.
Chris
MEMSIC2125-Dual.BS2
If you send me the improved code, I'll post it here as a replacement, and add you to the credits.
-c