
Quick question... how many waypoints can you have in a mission? what is the maximum? thanks!
wareck wrote:Hi
I fly with his version since Christmas.
In order to have good result you must:
-fly in accro to tune your general PID
-Fly in horizon or angle to adjust level pid and digital trim
-when it's good, calibrate acc and mag
-tune GPS HOLD (must be accurate without and with Wind)
-tune baro (baro is needed for mission fly)
and after that your can try RTH an mission...
If you miss one of this step, fly in autonomous is dangerous...
Hypermobile wrote:...
Flipped the Mission switch, And the quad was drifting away, fast... faster....WHAAAAA!!!
I quickly Flipped the Mission switch.
And i was JUST be able to recover the Quad from crashing bad.
...
Code: Select all
/*
* EEPROM Clear FOR ATMEGA2560
*
* Sets all of the bytes of the EEPROM to 0.
* This example code is in the public domain.
*/
#include <EEPROM.h>
void setup()
{
// write a 0 to all 4096 bytes of the EEPROM
for (int i = 0; i < 4096; i++)
EEPROM.write(i, 0);
// turn the LED on when we're done
digitalWrite(13, HIGH);
}
void loop()
{
}
scrat wrote:wareck wrote:Hi
I fly with his version since Christmas.
In order to have good result you must:
-fly in accro to tune your general PID
-Fly in horizon or angle to adjust level pid and digital trim
-when it's good, calibrate acc and mag
-tune GPS HOLD (must be accurate without and with Wind)
-tune baro (baro is needed for mission fly)
and after that your can try RTH an mission...
If you miss one of this step, fly in autonomous is dangerous...
I think you have to calibrate acc and mag first. If you trim your copter in ANGLE mode and after that you calibrate ACC...trim is gone. So first thing is to calibrate ACC.
o_lampe wrote:Hypermobile wrote:...
Flipped the Mission switch, And the quad was drifting away, fast... faster....WHAAAAA!!!
I quickly Flipped the Mission switch.
And i was JUST be able to recover the Quad from crashing bad.
...
After several missions successfully solved, I had the same problem with a dissappearing copter.
The only thing I changed in the code was, adding the beeper. The mission was still there after flashing. ( No CRC error message like I have seen before )
I didn't erase the eeprom before i flashed the new code, which in my opinion leads to a fatal error.
BTW: There is a program to erase eeprom in the arduino IDE. But it isn't erasing the whole memory of a Mega2560!!
How big is the eeprom in a mega2560??
<edit> just googled the eeprom size is 4kb= 4096 Byte. The code should be:Code: Select all
/*
* EEPROM Clear FOR ATMEGA2560
*
* Sets all of the bytes of the EEPROM to 0.
* This example code is in the public domain.
*/
#include <EEPROM.h>
void setup()
{
// write a 0 to all 4096 bytes of the EEPROM
for (int i = 0; i < 4096; i++)
EEPROM.write(i, 0);
// turn the LED on when we're done
digitalWrite(13, HIGH);
}
void loop()
{
}
Is that correct?
Hypermobile wrote:o_lampe wrote:Hypermobile wrote:...
Flipped the Mission switch, And the quad was drifting away, fast... faster....WHAAAAA!!!
I quickly Flipped the Mission switch.
And i was JUST be able to recover the Quad from crashing bad.
...
After several missions successfully solved, I had the same problem with a dissappearing copter.
The only thing I changed in the code was, adding the beeper. The mission was still there after flashing. ( No CRC error message like I have seen before )
I didn't erase the eeprom before i flashed the new code, which in my opinion leads to a fatal error.
BTW: There is a program to erase eeprom in the arduino IDE. But it isn't erasing the whole memory of a Mega2560!!
How big is the eeprom in a mega2560??
<edit> just googled the eeprom size is 4kb= 4096 Byte. The code should be:Code: Select all
/*
* EEPROM Clear FOR ATMEGA2560
*
* Sets all of the bytes of the EEPROM to 0.
* This example code is in the public domain.
*/
#include <EEPROM.h>
void setup()
{
// write a 0 to all 4096 bytes of the EEPROM
for (int i = 0; i < 4096; i++)
EEPROM.write(i, 0);
// turn the LED on when we're done
digitalWrite(13, HIGH);
}
void loop()
{
}
Is that correct?
I Didn't CLEAR EEPROM before uploading the new firmware. So that is the Same as in you case.
But maybe a good thing to do it every time you reflash; It doesn't hurt anybody if you do it.
And maybe (not sure) you can hurt someone if you don't.
Good to know i'm not the only one.
PID's were tested earlier, and it was stabile. (GPS HOLD & BARO; Hand free flying)
Just bought 4 new RCTimer 2830-14 750 KV (should be the same as TBS 750KV rebranded),
and to be sure 1 new ESC, of the Burned out Motor.
engamila wrote:Hello EOSBandi and all
When I try a mission using multiwii 2.3 navb7 version(Released 16/02/2014) unexpected thing happened.First I upload FC to one way point(altitude 10m) and RTH point.Then I drift the quad using throttle and after that I activate the mission.In this situation quad suddenly drift to some height (Not way point height) and come to the ground.(Not RTH).Again drift around 1m and felt down to the ground.Second time I delete all the way points.After that I drift the quad increasing throttle(around 10m) and switched to auto land.In this situation quad lower down 2 -3m and suddenly lift more than 20m unexpectedly fly away at-least 1km. Fortunately we could find the quad.
I switched both auto-land and baro mode in same time.In the first case switched both mission and baro same time.What is the wrong in these steps? Please help me.!!!!!
I don't want to be rude, but I cannot put countermeasures into the code against gross negligence.....
If you reflash your controller NEVER assume that your EEPROM content is still valid, and most importantly NEVER assume that your mission is still valid.
Before initiate mission ALWAYS read back your mission to the GUI.
Hypermobile wrote:I don't want to be rude, but I cannot put countermeasures into the code against gross negligence.....
If you reflash your controller NEVER assume that your EEPROM content is still valid, and most importantly NEVER assume that your mission is still valid.
Before initiate mission ALWAYS read back your mission to the GUI.
hi Eos,
I actually did Clear the mission in WinGui, and Downloaded the mission from the quad to check to be sure is was Alright.
but is was also thinking...(found it on a Dutch Multicopter Site...)...Maybe you get interference with Solar storms?
http://www.hoogtezicht.nl/multirotors/m ... m-activity
and
http://www.hoogtezicht.nl/multirotors/m ... kopter-gps
There is a picture of a stationary Quad during a sun storm...
Gps Measured a traveling distance of 64 Meters, and speeds of 10 m/s
That would be a reasonable reason. or what do you think?
Just thinking, Maybe for a new feature in Wingui?!
Solar Storm Activity flying advice. The Information is available online.
EOSBandi wrote:Hypermobile wrote:I don't want to be rude, but I cannot put countermeasures into the code against gross negligence.....
If you reflash your controller NEVER assume that your EEPROM content is still valid, and most importantly NEVER assume that your mission is still valid.
Before initiate mission ALWAYS read back your mission to the GUI.
hi Eos,
I actually did Clear the mission in WinGui, and Downloaded the mission from the quad to check to be sure is was Alright.
but is was also thinking...(found it on a Dutch Multicopter Site...)...Maybe you get interference with Solar storms?
http://www.hoogtezicht.nl/multirotors/m ... m-activity
and
http://www.hoogtezicht.nl/multirotors/m ... kopter-gps
There is a picture of a stationary Quad during a sun storm...
Gps Measured a traveling distance of 64 Meters, and speeds of 10 m/s
That would be a reasonable reason. or what do you think?
Just thinking, Maybe for a new feature in Wingui?!
Solar Storm Activity flying advice. The Information is available online.
Well, it called gps glitch detection, and it is already sketched up.... it definitely will be implemented before final release.
csurf wrote:I'd like to please make a feature request for WinGUI...
please add a 'baro calibration' button in order to manually re-calibrate the barometer.
It's currently possible to do a baro/gyro calibration using the sticks, but I'm not sure if the serial protocol supports initiating barometer calibration separately. I believe this would require some sort of change to the serial protocol in order to be able to increase the 'calibratingB' variable that controls the baro calibration... Again, I'm not sure if the serial protocol currently supports this, though I doubt it...
The barometer sensors are subject to heat-induced drift due to the MWC board/PCB gradually heating up to its working temperature after being powered on. So, it would be helpful to be able to click a button and manually recalibrate the barometer after the board temperature has stabilized...
FYI, the APM supports doing a manual, general pre-flight calibration which also includes baro calibration.
As a side note, I find it somewhat strange that barometer calibration was setup this way (it depends upon the value of a global variable), instead of having a separate 'calibrateBaro()' function that can be called at will...
EOSBandi wrote:csurf wrote:I'd like to please make a feature request for WinGUI...
please add a 'baro calibration' button in order to manually re-calibrate the barometer.
It's currently possible to do a baro/gyro calibration using the sticks, but I'm not sure if the serial protocol supports initiating barometer calibration separately. I believe this would require some sort of change to the serial protocol in order to be able to increase the 'calibratingB' variable that controls the baro calibration... Again, I'm not sure if the serial protocol currently supports this, though I doubt it...
The barometer sensors are subject to heat-induced drift due to the MWC board/PCB gradually heating up to its working temperature after being powered on. So, it would be helpful to be able to click a button and manually recalibrate the barometer after the board temperature has stabilized...
FYI, the APM supports doing a manual, general pre-flight calibration which also includes baro calibration.
As a side note, I find it somewhat strange that barometer calibration was setup this way (it depends upon the value of a global variable), instead of having a separate 'calibrateBaro()' function that can be called at will...
Gyro's are suffering the same temperature induced drift, so it is quite OK to calibrate gyro's and barometers simultaneously, and you HAVE to calibrate gyros too when temperature changes...
csurf wrote:another quick question about RTH...
I'm looking at the code and trying to understand what happens during a GPS NAV event, such as RTH, if the GPS fix is temporarily lost (possibly due to issues with the serial link and/or if the sat count drops below 5).
For example, it *appears* that an RTH action will be completely aborted if the # of sat's drops below 5 or if the GPS fix is lost. Is this correct or incorrect?
If so, would it be possible to instead attempt to temporarily do an alt/pos hold in order to see if the fix comes back, and/or attempt to auto-land if the GPS fix/sat count doesn't improve within a pre-configured timeout???
It seems pretty dangerous & scary that an RTH/NAV event will be instantly & completely aborted if there are any issues with the GPS readings... What, then, happens to the quad? What throttle/control values will be passed on to it? It seems like a high risk for a fly-away or crash...it would be safer to at least try to do an alt-hold or land gracefully...
EOSBandi wrote:csurf wrote:another quick question about RTH...
I'm looking at the code and trying to understand what happens during a GPS NAV event, such as RTH, if the GPS fix is temporarily lost (possibly due to issues with the serial link and/or if the sat count drops below 5).
For example, it *appears* that an RTH action will be completely aborted if the # of sat's drops below 5 or if the GPS fix is lost. Is this correct or incorrect?
If so, would it be possible to instead attempt to temporarily do an alt/pos hold in order to see if the fix comes back, and/or attempt to auto-land if the GPS fix/sat count doesn't improve within a pre-configured timeout???
It seems pretty dangerous & scary that an RTH/NAV event will be instantly & completely aborted if there are any issues with the GPS readings... What, then, happens to the quad? What throttle/control values will be passed on to it? It seems like a high risk for a fly-away or crash...it would be safer to at least try to do an alt-hold or land gracefully...
Two cases :
GPS fix lost : It is very likely a HW error. The assumptions (and experience) says that it will not fix itself in the fly... so aborting gps assisted modes is the only option. Without GPS there is no poshold, and without poshold autoland is very close to a semi controlled crash landing (it is more than likely that it will flip over at land....)
Throttle and RC control ALWAYS passed to the copter (even during navigation) so when you see the gps error then you simply fly home via rc controls... (Out of sight flying is prohibited or will be prohibited in many countries)
GPS satnum below five... it is usually a temporary event, so RTH or NAV is just paused till sats raised above 5. Why pause ? Since with 5 sats or below poshold is a crazy horse in a 20x20 meter area.... as always you will have an error message and you can decide what would you do.
o_lampe wrote:Why is it be impossible to do a temporary PosHold after a GPS failure?
Just use the vertical acceleration values instead and try to keep them "zero". Or am I too naive?
o_lampe wrote:Regarding the temperature drift: It would be possible to use a small heating element below the sensor area that keeps the temp on a steady value ( say 40°C ) MWII-software would start calibration once the temp has been reached and wouldn't have to be changed afterwards.
e_lm_70 wrote:@csruf
MultiWii code has already the temperature reading of the baro sensor for properly adjust the altitude reading.
csurf wrote: This change in board temperature can cause a big error in the calculated altitude readings.
e_lm_70 wrote:MultiWii code has already the temperature reading of the baro sensor for properly adjust the altitude reading.
csurf wrote: This change in board temperature can cause a big error in the calculated altitude readings...
QuadBow wrote:csurf wrote: This change in board temperature can cause a big error in the calculated altitude readings.
Why should a digital microcontroller show a big error when temperature changes?
The only parts being affected by a temperature change are the analogue sensors.e_lm_70 wrote:MultiWii code has already the temperature reading of the baro sensor for properly adjust the altitude reading.
But, as it has already been pointed out, the baro has an integrated temperature chip which not only provides the temperature information to multiwii but mainly is used for an internal compensation of the temperature drift.csurf wrote: This change in board temperature can cause a big error in the calculated altitude readings...
Therefore, the error you are afraid of has already been minimized by the multiwii design.
csurf wrote:uggh, another antagonistic response, what a pain...
csurf wrote:Even the APM suffers from this type of drift, and its code also uses temperature in order to calculate air pressure.
csurf wrote:The request for a manual gyro/baro calibration via the serial protocol/GUI doesn't seem like an unreasonable one.
QuadBow wrote:csurf wrote:uggh, another antagonistic response, what a pain...
I would not name my respond antagonistic. Might it be the case that you don't allow others to have a different opinion?
QuadBow wrote:csurf wrote:Even the APM suffers from this type of drift, and its code also uses temperature in order to calculate air pressure.
That would mean, your copter altitude is drifting until the final temperature has been reached.
QuadBow wrote:csurf wrote:The request for a manual gyro/baro calibration via the serial protocol/GUI doesn't seem like an unreasonable one.
I am still trying to find a use case for your proposal. What is the benefit of zeroing the baro in the air? You better do so on the ground - and that is already been done by multiwii.
GUSHELFER wrote:hola, podria ayudarme ?? estoy trabajando con una crius multiwii v2.5 con gps en i2c, modulo nav , bluetoot, lcd, TODO FUNCIONA O.K !!! PERO llegue al punto que no puedo usar mas que multiwii2.3 ya que las otra versiones "NAV" NO ESTA TERMINADO EL I2C PARA EL GPS, ADEMAS LOS SKETCH SON MUY GRANDES PARA ELLA, TENDRE ALGUNA SOLUCION??? COMO CONECTO EL GPS DE I2C A SERIE???? COMO ACHICO EL SKETCH ??? GRACIAS
GUSHELFER wrote:
hola, podria ayudarme ?? estoy trabajando con una crius multiwii v2.5 con gps en i2c, modulo nav , bluetoot, lcd, TODO FUNCIONA O.K !!! PERO llegue al punto que no puedo usar mas que multiwii2.3 ya que las otra versiones "NAV" NO ESTA TERMINADO EL I2C PARA EL GPS, ADEMAS LOS SKETCH SON MUY GRANDES PARA ELLA, TENDRE ALGUNA SOLUCION??? COMO CONECTO EL GPS DE I2C A SERIE???? COMO ACHICO EL SKETCH ??? GRACIAS
Cimbora, tiszteld már meg az itt lévőket azzal, hogy veszed a fáradságot és angolul írod a mondandódat...
Code: Select all
*bearing = 9000 + atan2(-off_y, off_x) * 5729.57795f;
Code: Select all
*bearing = atan2(off_x,off_y) * 5729.57795f;
Code: Select all
int32_t* lat1, int32_t* lon1, int32_t* lat2, int32_t* lon2,
Code: Select all
int32_t pos1[], int32_t pos2[]
Code: Select all
GPS_bearing(GPS_coord,GPS_poi,...
EOSBandi wrote:GUSHELFER wrote:hola, podria ayudarme ?? estoy trabajando con una crius multiwii v2.5 con gps en i2c, modulo nav , bluetoot, lcd, TODO FUNCIONA O.K !!! PERO llegue al punto que no puedo usar mas que multiwii2.3 ya que las otra versiones "NAV" NO ESTA TERMINADO EL I2C PARA EL GPS, ADEMAS LOS SKETCH SON MUY GRANDES PARA ELLA, TENDRE ALGUNA SOLUCION??? COMO CONECTO EL GPS DE I2C A SERIE???? COMO ACHICO EL SKETCH ??? GRACIAS
Cimbora, tiszteld már meg az itt lévőket azzal, hogy veszed a fáradságot és angolul írod a mondandódat...
BeringBullet wrote:Is this code base stable enough to use as a daily flyer? if I am not using the nav point, I like the idea of the fence/RTH code.
Plüschi wrote:In gps.cpp, function GPS_bearing()Code: Select all
*bearing = 9000 + atan2(-off_y, off_x) * 5729.57795f;
could be simpler, faster and shorterCode: Select all
*bearing = atan2(off_x,off_y) * 5729.57795f;
Also the parametersof the function do not need to be pointers. Instead they can be declared asCode: Select all
int32_t* lat1, int32_t* lon1, int32_t* lat2, int32_t* lon2,
and the function can be called withCode: Select all
int32_t pos1[], int32_t pos2[]
which makes the whole thing much more readable, short and simple.Code: Select all
GPS_bearing(GPS_coord,GPS_poi,...
Code: Select all
void do_something_specific(*uint8_t someParam){
if (someGlobalVariable > 5) //magic number usage
doSomethingElse(someParam);
anotherGlobalVariable=10; //why the hell would we do this here and risk causing problems elsewhere???
someOtherGlobal = SOME_GLOBAL_DEFINE * 3556.35334f; //huh? magic numbers and global defines FTW!!!
//return nothing, operate on globals in a mashed-up fashion, i.e. this was a pointless function
}