referring to the ArduCoper Wiki under the section Optional Magnetometer i an trying to compile the suggested test sketch called APM_Compass_Test.pde.
I get the following error :-
APM_Compass_test.cpp:13:37: error: AP_Math.h: No such file or directory
APM_Compass_test.cpp: In function 'void setup()':
APM_Compass_test:26: error: 'class APM_Compass_Class' has no member named 'SetOrientation'
APM_Compass_test:26: error: 'APM_COMPASS_COMPONENTS_UP_PINS_FORWARD' was not declared in this scope
APM_Compass_test:27: error: 'class APM_Compass_Class' has no member named 'SetOffsets'
APM_Compass_test:28: error: 'class APM_Compass_Class' has no member named 'SetDeclination'
APM_Compass_test.cpp: At global scope:
APM_Compass_test_orig:10: error: redefinition of 'long unsigned int timer'
APM_Compass_test:17: error: 'long unsigned int timer' previously declared here
APM_Compass_test.cpp: In function 'void setup()':
APM_Compass_test_orig:12: error: redefinition of 'void setup()'
APM_Compass_test:20: error: 'void setup()' previously defined here
APM_Compass_test.cpp: In function 'void loop()':
APM_Compass_test_orig:21: error: redefinition of 'void loop()'
APM_Compass_test:34: error: 'void loop()' previously defined here
I have had no problems compiling and uploading flight software to my working quad but now i am playing around with the DIYDrones magnetometer i have fitted.
Any help would be greatly appreciated.
Regards,
Tony
You need to be a member of diydrones to add comments!
Replies
The Heli.h still seems to have a reference to APM_Compass.h
In file included from ArducopterNG.cpp:216:
/Heli.h:45:89: error: APM_Compass.h: No such file or directory Since the library is not included with the RC2 It does not compile.
That makes perfect sense thankyou. Unfortunately my magnetometer worked today once with the compass test sketch but then it stop showing changing numbers and a reboot did not fix it, i wasnt 100% happy about the voltage change soldering i had done so i opted to cut it off and use the sparkfun one with a voltage modifier.
One question tho, now that i have to fix the mag. to the frame can you offer any advice as to its orientation, it looks like y should be place in the same plane as the APM and to confirm are the GPS plugs at the front i.e. mag. y axis should point towards the gps plugs end of the APM. Can it be mounted anywhere on the frame or sould it be near the pivot point of the quad??
Regards,
Tony
Thanks for the information.
Heres the thing, say i point the end of the board north and see y go to 500 and 180 degrees y goes to -500 that i understand. Are you saying that were ever i choose to stop rotating and put the board down the y number should be between -100 and 100. So i could be -5 and i could use that as a number but equally it could be 54 depending on where i stop the rotation and note the numbers, this doesn;t sound very accurate or am i missing the bigger picture here :).
Tony
Is it right tho that the numbers go up and down?? Have i got to try and make a note of the biggest in each axis (im assume thats what the 3 offsets refer to)??
Tony
C:\Arducopter\arduino\libraries
the libraries do point to:
http://arducopter.googlecode.com/svn/trunk/libraries
use subversion for checkout.
can you follow this?
robert
Thanks.
I used tortoise to download the whole svn from http://arducopter.googlecode.com/svn/
and set arduino preferences to the dir that contains arducopter, arducopterNG and libraries and then open the APM_Compass_Test from within the libraries folder and hey all compiled ok and magnetometer readings look clear now.
Do i just keep spinning the quad in 3d until i get the biggest numbers in the offset or do i have to specifically start the program with the board facing north not too clear on the instructions there.
Again thanks for any help on this.
Regards,
Tony
The Arducopter_alpha_1.01.zip doesn't contain a library called AP_Math or a file called AP_Math so where should the build come from to get the APM_Compass_Test from the wiki working??
Should it be from the trunk under Auducopter??
Tony
I now get the following error only :-
APM_Compass_test.cpp.o:(.bss.APM_Compass+0x0): multiple definition of `APM_Compass'
APM_Compass\APM_Compass.cpp.o:C:\Arducopter\arduino\libraries\APM_Compass/APM_Compass.cpp:57: first defined here
Where am i supposed to put the file downloaded from the Wiki cos i have tried it everywhere.
When i load the alpha flight code i see the arduino program has pulled in all the libraries to and i can see them as tabs at the top but when i load the APM_Compass_Test.pde i see no libraries included at the top.
I thought i understood this Arduino environment but totally confused now :(
Any help please.
Regards,
Tony
if it's not there, then you have an incomplete installation.
robert