LibrePilot Forum
Development => Hardware => Topic started by: brukutu on March 24, 2016, 03:34:06 pm
-
Hi All.
I have a very unusual issue.
I am using a M8N with Ext Mag.
GPS Show it gets a lock, however Revo board thinks no gps is connected. However Librepilot shows me the gps lock and number of sats. Also every now and then the GPS logo on the flight data page goes orange or green, the back to black with a cross.
I have tried cofig the M8N like it states for a cc3d board using ucenter, have tried with original config also.
Almost feels like the GPS is not sending the messages which Librepilot looks for in order to know there is a gps connected?
-
As I pulled usb cable out I noticed this.
But goes back to GPS not found almost straight away
-
You don't need to configure GPS like the CC3D manual config page, with 8M the messages used are not the same also.
If you have issues, revert GPS to factory settings using Ucenter and just connect to Revo.
With default settings Revo uses the Autoconfig feature, keep UBX protocol @57600 in Hardware tab
Try using Wizard, at least config is know and works without adding any trouble.
If you lost GPS connection, double check cable/wires.
Please post you current config, just in case: File > Export UAV settings...
-
Thanks for the response.
I think I just came right :)
I believe the baud rate of 19 was to low, upped it to 56. Perhaps the update rate of 200ms was to much and it was leaving packets behind?
Disabled auto configure on the Revo.
I also looked at the code and did manually the following changes to the GPS with ucenter.
ubx_cfg_msg_t msg_config_ubx7[] = {
// messages to disable
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_AOPSTATUS, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_CLOCK, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_DGPS, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_POSECEF, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SBAS, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_TIMEGPS, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_VELECEF, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SOL, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_STATUS, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_VELNED, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_TIMEUTC, .rate = 0 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_POSLLH, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_HW, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_HW2, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_IO, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_MSGPP, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_RXBUFF, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_RXR, .rate = 0 },
{ .msgClass = UBX_CLASS_MON, .msgID = UBX_ID_MON_TXBUF, .rate = 0 },
{ .msgClass = UBX_CLASS_RXM, .msgID = UBX_ID_RXM_SVSI, .rate = 0 },
// message to enable
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_PVT, .rate = 1 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_DOP, .rate = 1 },
{ .msgClass = UBX_CLASS_NAV, .msgID = UBX_ID_NAV_SVINFO, .rate = 10 },
};
Plugged it in and working :)
Now, i have an external mag attached to the small flexi port where i saw the i2c mapping and options.
How do I use the external mag?
I recall to have read somewhere to use an external i2c mag you need the latest dev version?
See latest screenshots.
Also not I have not yet attached the mag to the UAV and also have not yet calibrated. I assume the mag status there is for the internal mag? as right now the external one is not connected.
-
You need the "next" branch
look here how to setup a build env:
https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual
The autoconfig works fine, no need manual config except for cc3d.
Yes, maybe baudrate too low.
Take a look here for autonomous/gps features:
https://librepilot.atlassian.net/wiki/display/LPDOC/Advanced+features
And this video for AuxMag, using next branch:
https://www.youtube.com/watch?v=o4V_ZGG0Hk0
-
I am in the process of installing the dev tools so that I can do i2c mag.
In the mean time i have been playing with current version. Why would the board do this? I have calibrated the accelerometer but it goes to that sideways thing.
If i try take off it obviously flips over straight away as it seems to think its at a 45 deg angle.
-
Because LP uses 3D magnetometer, in other words it is not just used to determine heading but also whether aircraft is up-side down. If you have Mag not green all the time (jumps to orange) then you wont be able to fly in INS31. Mag must be calibrated outdoors, far from metallic elements, and it must be away from magnetic interference.
Also your GPS is orange, that also must be green to fly stable, and you should never use it indoors with INS31.
When you use INS31 it uses all sensors accel,gyro,mag,baro,gps fused/blended together with EKF. Of course EKF is designed to handle noisy signal, but there is a limit to that. If you feed algorithm with totally wrong measurements that deviate a lot, it won't handle that and will give crappy estimates/stabilization.
You should fly in Complementary, if you really want GPS mode using flight modes, you really need to have a good measurements from all sensors, that's why it is more difficult.
-
OK.
Got ext mag working and calibrated.
problem is the photo.
I have calibrated it level and so on. Now that is how it is when it is leveled. This only happens with gps instead of complimentary enabled.
-
More info
Also, when the GPS has no lock, it does not stay black. it goes red cross as in no gps detected. However GPS widget works and shows gps status. As soon as it has a part lock or full lock it goes orange or green
-
I think the problem is in this photo attached, I just dont know how to fix it?
Sorry, i edited your post :(
-
Read the text above bars.
Watch the video i posted above.
Adjust the AuxMag orientation.
-
I did read the text above.
I tried -180,-90,0-90,180 in each one in all conbinations. Still couldnt find one that would give me 0s.
Watching video again now. maybe i missed something.
-
If you search all combinations from 3 entries maybe you need more time to find the good one :)
Good orientation give 0 on all bars and also still at 0 whatever the orientation.
If mag chip is on the bottom face of GPs pcb, set Roll to 180°
Next play with Yaw orientation.
You can also check if mag chip is orientated at 45° or not...
-
Why do you invent something about Accelerometers here ?
Here is the text above the bars:
The bargraphs show the difference between the onboard and auxiliary magnetometer measurements.
When the auxiliary magnetometer rotation is set correctly, all bargraphs should show all zero (bargraph centered) whatever the vehicle's orientation.
This assumes both magnetometers are calibrated and without alarm.
-
Does anyone know how I can physically look at my external mag to determine orientation? I need to have all the values in the mag setup page to be 0. I tried just looking at the compass in GCS but it just keeps spinning and never stops. If I could simply set the quad down and face south for example and the on screen compass points east then I'll know the offset.
-
If the compass is spinning this is because the Mag is not currently used and you moved the board while gyro are initializing.
For physical orientation, compare the onboard Mag from Revo and The Auxmag, referring to the small dot on package.
Or simply use the bars to find the correct orientation.
The Roll value can be easily found because based on Z axis reading and how is facing the chip (up or down)
Next try Yaw orientation using 90° steps, assuming the Auxmag chip orientation is orientated something 90° from board point of view.
When all bargraphs remains/still to 0, the orientation is correct.
Like the help text says, this assumes both Mag are calibrated and without error.
https://www.youtube.com/watch?v=qLsd4O75N9o
-
Guys I'm all wired up for external mag on the flexi port. How do I get next branch /developer tools in LibrePilot pilot to enable i2c?
Sent from my SM-G920F using Tapatalk
-
Simply uses the wizard and select the right GPS with I2c mag.
-
Had issues with the mingw 64 gdal line.. Saying it's missing so wouldn't allow to select all. I ended up removing that line.. It's currently running.. can I add it later or not... Thanks again
Sent from my SM-G920F using Tapatalk