Help with Direction to home 180 deg off
Help with Direction to home 180 deg off
Hello,
I am not sure where even to begin. I have a Paris Multiwii PNP board with the Paris GPS board with mag on the GPS board.
I seem to be having an issue with the direction to home function. The current heading is reported correctly, but the dir to home is 180 deg. off.
has anyone ever experienced this and what possibly is the issue?
I have pushed the original code back on both the Paris Multiwii board and the GPS board.
Thanks.
Ross
I am not sure where even to begin. I have a Paris Multiwii PNP board with the Paris GPS board with mag on the GPS board.
I seem to be having an issue with the direction to home function. The current heading is reported correctly, but the dir to home is 180 deg. off.
has anyone ever experienced this and what possibly is the issue?
I have pushed the original code back on both the Paris Multiwii board and the GPS board.
Thanks.
Ross
Re: Help with Direction to home 180 deg off
Depends upon orientation of the GPS board, Its intened to have the cable coming from GPS board facing forward (as this is more common)
Info is on their website under the GPS board
It will be an #define board option in v 2.2
If using 2.1...
v2.1 Code changes for PARIS Main CPU (not the GPS CPU which does not need any code) - check/comment bold text
def.h PANEL
scroll down a fair way 40%
#if defined(SIRIUS) //Special GPS PARIS version with 2nd 5883L in GPS pod underneath - wire forward - primary 5883L line cut
#define ITG3200
#define BMA180
#define BMP085
#define HMC5883
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = -X; magADC[PITCH] = Y; magADC[YAW] = Z;} //normal Sirius MAG on top is X Y -Z
#
Info is on their website under the GPS board
It will be an #define board option in v 2.2
If using 2.1...
v2.1 Code changes for PARIS Main CPU (not the GPS CPU which does not need any code) - check/comment bold text
def.h PANEL
scroll down a fair way 40%
#if defined(SIRIUS) //Special GPS PARIS version with 2nd 5883L in GPS pod underneath - wire forward - primary 5883L line cut
#define ITG3200
#define BMA180
#define BMP085
#define HMC5883
#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = -X; accADC[PITCH] = -Y; accADC[YAW] = Z;}
#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = Y; gyroADC[PITCH] = -X; gyroADC[YAW] = -Z;}
#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = -X; magADC[PITCH] = Y; magADC[YAW] = Z;} //normal Sirius MAG on top is X Y -Z
#
Re: Help with Direction to home 180 deg off
thank you shikra I have all those setting set in place. As i said the heading is reported correctly. only the direction home is 180 off. my board is set cable forward, any other thoughts.
Re: Help with Direction to home 180 deg off
Yeah re-reading more carefully I see that now. How are you reading direction home - on the standard GUI? Not got a clue to be truthfull.... Never really paid much attention to GPS direction on the GUI. I will next time though.
Maybe its indictaor only? could test carefully to see if OK in flight. Hopefully someone else can verify soon for ya..
Maybe its indictaor only? could test carefully to see if OK in flight. Hopefully someone else can verify soon for ya..
Re: Help with Direction to home 180 deg off
what started this issue was trying to integrate an osd that reads the serial stream from the multiwii. it showed the direction 180 off. I then tested with the gui and found that it is 180 off as well. that way i know the direction home was incorrect in the stream and not in the osd interpretation.
Re: Help with Direction to home 180 deg off
Are you using Rushduino? Which version?
I will refer to recent development versions (see http://code.google.com/p/rush-osd-devel ... 2FRush_OSD) that has not been published yet. Other versions may have known bugs.
There are 5 displayed items that could be relevant:
1. The heading in degrees (either -179..180 or 0..359 depending on which version you use).
2. The heading graph. (older versions were offset by about 11 degrees).
3. Distance to home.
4. Direction to home in numbers (0..359) that just the direction from your current location to the home location.
5. Direction to home arrow. This is the difference between the direction to home and the current heading.
(that was completely useless in the original Rushduino firmware. Fixed in all versions that exist in the above site).
Now if there is a problem I suggest that you write down the home coordinates. Now while the copter is armed move it to a new location 50m or more from the home location and write down the new coordinates, direction to home, distance to home, heading and where the arrow is pointing. Try to change the heading and see if the arrow keeps pointing to the same direction. Try to see that the coordinates that you wrote are correct (you can use google earth). Now try to figure out which values are wrong.... you can post these values (but then your location will be disclosed).
-- Itai
I will refer to recent development versions (see http://code.google.com/p/rush-osd-devel ... 2FRush_OSD) that has not been published yet. Other versions may have known bugs.
There are 5 displayed items that could be relevant:
1. The heading in degrees (either -179..180 or 0..359 depending on which version you use).
2. The heading graph. (older versions were offset by about 11 degrees).
3. Distance to home.
4. Direction to home in numbers (0..359) that just the direction from your current location to the home location.
5. Direction to home arrow. This is the difference between the direction to home and the current heading.
(that was completely useless in the original Rushduino firmware. Fixed in all versions that exist in the above site).
Now if there is a problem I suggest that you write down the home coordinates. Now while the copter is armed move it to a new location 50m or more from the home location and write down the new coordinates, direction to home, distance to home, heading and where the arrow is pointing. Try to change the heading and see if the arrow keeps pointing to the same direction. Try to see that the coordinates that you wrote are correct (you can use google earth). Now try to figure out which values are wrong.... you can post these values (but then your location will be disclosed).
-- Itai
Re: Help with Direction to home 180 deg off
mmm. I don't usually bother with arrows etc on OSD, but I know when using mobidrone OSD with GPS/directions stuff enabled on first flights - it was also reporting direction home out by approx degrees. Think that is with 2.1
Re: Help with Direction to home 180 deg off
Ok,
Here is some pictures and some information.
I am not too afraid of the GPS zombies seeing my location so here you go.
43.1471360N 71.8897060W Home Location set
43.1466050N 71.8893960W around 70 M away still facing same heading as when I left home location.
When I checked google maps... I was very happy with the location accuracy of the gps information.
I still am stumped as to why the direction home is off.
Here is where I set the home location.
after walking directly in one direction (south) here is the data
Any thoughts ? I do not know how to check bearings in google maps. but I did put the lat/lon dat in for both locations and it is very accurate. I bet within a few feet.
Shouldn't the home direction arrow and heading be directly behind me? that is the arrow should point down and the bearing be around north +- (156 - 180)?
Here is some pictures and some information.
I am not too afraid of the GPS zombies seeing my location so here you go.
43.1471360N 71.8897060W Home Location set
43.1466050N 71.8893960W around 70 M away still facing same heading as when I left home location.
When I checked google maps... I was very happy with the location accuracy of the gps information.
I still am stumped as to why the direction home is off.
Here is where I set the home location.
after walking directly in one direction (south) here is the data
Any thoughts ? I do not know how to check bearings in google maps. but I did put the lat/lon dat in for both locations and it is very accurate. I bet within a few feet.
Shouldn't the home direction arrow and heading be directly behind me? that is the arrow should point down and the bearing be around north +- (156 - 180)?
Re: Help with Direction to home 180 deg off
You can use the ruler tool on Google earth to calculate distance and bearing.
I see only the left side of the screen images. There is no view of the distance to home (should be ~64 m), direction to home (should be ~337 degrees) and heading.
Also, please tell which version of the Rushduino firmware you are using!
(Probably a recent version because it displays "Disarmed" and not "Motors off").
The MultiWii firmware always sends distance to home = 0 when the motors are off (also see
DONT_RESET_HOME_AT_ARM option of MultiWii).
Thanks,
-- Itai
I see only the left side of the screen images. There is no view of the distance to home (should be ~64 m), direction to home (should be ~337 degrees) and heading.
Also, please tell which version of the Rushduino firmware you are using!
(Probably a recent version because it displays "Disarmed" and not "Motors off").
The MultiWii firmware always sends distance to home = 0 when the motors are off (also see
DONT_RESET_HOME_AT_ARM option of MultiWii).
Thanks,
-- Itai
Re: Help with Direction to home 180 deg off
Hi Ross,
I just went outside with a very similar setup, mtk 3339 on tinyGPS and a minimOSD.
Heading in osd is correct and so ist the arrow pointing back to "arm" location.
i used the latest sources (dev. 1303 from mulitwii and itais latest rushduino)
i attached both collections, they are allready configured to my sensors and flying wing so you'll need to discard those specific settings but it saves your from trouble of downloading every single file
don't forget the magnetic declination for your place -14.84f
kind regards Chris
I just went outside with a very similar setup, mtk 3339 on tinyGPS and a minimOSD.
Heading in osd is correct and so ist the arrow pointing back to "arm" location.
i used the latest sources (dev. 1303 from mulitwii and itais latest rushduino)
i attached both collections, they are allready configured to my sensors and flying wing so you'll need to discard those specific settings but it saves your from trouble of downloading every single file
don't forget the magnetic declination for your place -14.84f
kind regards Chris
- Attachments
-
- Rush_OSD.zip
- (21.12 KiB) Downloaded 130 times
-
- MultiWii_1303.zip
- (136.09 KiB) Downloaded 132 times
Re: Help with Direction to home 180 deg off
loaded your files and configured to use SirusGPS and had the same effect.
Home bearing and arrow is 180 off. I am going to contact Quinton @ multiwiicopter ( as that is where I got the boards) and see if he has any input.
Only other option at this point is to say %&*#@- it and just change the code in the OSD to reflect the information that the Paris Multiwii is putting out.
Home bearing and arrow is 180 off. I am going to contact Quinton @ multiwiicopter ( as that is where I got the boards) and see if he has any input.
Only other option at this point is to say %&*#@- it and just change the code in the OSD to reflect the information that the Paris Multiwii is putting out.
Re: Help with Direction to home 180 deg off
power67 wrote:loaded your files and configured to use SirusGPS and had the same effect.
Home bearing and arrow is 180 off. I am going to contact Quinton @ multiwiicopter ( as that is where I got the boards) and see if he has any input.
Only other option at this point is to say %&*#@- it and just change the code in the OSD to reflect the information that the Paris Multiwii is putting out.
If your GPS unit is running with a serial/I2C converter, my opinion is to investigate on S/W that do the data conversion.
All GPS connected directly to FC with serial port are working well, the home arrow is correct.
Bye
Re: Help with Direction to home 180 deg off
Indeed,
The GPS_directionToHome contains the direction from home to copter when i2c_gps_nav is used....You have to rotate it by 180deg and wrap up in the MultiWii code....
The GPS_directionToHome contains the direction from home to copter when i2c_gps_nav is used....You have to rotate it by 180deg and wrap up in the MultiWii code....
Re: Help with Direction to home 180 deg off
Thank you EOSBandi, I was going to try to get ahold of you tonight. I spoke to Quinton and he thought you may be able to point me in the right direction. Can you give me an idea of where to look in the code.
Man, I thought I was going crazy. and it was just me.
is the calculation that the copter uses to get back home different than what is shown in the serial stream? Where in the code should I begin and does this need to be addressed in further versions? is this addressed in the Multiwii code or the I2c gps code?
Thanks for the response
Ross
Man, I thought I was going crazy. and it was just me.
is the calculation that the copter uses to get back home different than what is shown in the serial stream? Where in the code should I begin and does this need to be addressed in further versions? is this addressed in the Multiwii code or the I2c gps code?
Thanks for the response
Ross
Re: Help with Direction to home 180 deg off
EOS,
is this where I should make the correction?
in the multiwii / GPS.ino
if yes, what is the best method to correct would the following work?
I just want to make sure that I dont break the current Nav aspect of your code.
Thanks
Ross
is this where I should make the correction?
in the multiwii / GPS.ino
Code: Select all
varptr = (uint8_t *)&GPS_directionToHome;
*varptr++ = i2c_readAck();
*varptr = i2c_readAck();
GPS_directionToHome = GPS_directionToHome / 100; // 1deg =1000 in the reg, downsize
if (GPS_directionToHome>180) GPS_directionToHome -= 360;
if yes, what is the best method to correct would the following work?
Code: Select all
varptr = (uint8_t *)&GPS_directionToHome;
*varptr++ = i2c_readAck();
*varptr = i2c_readAck();
GPS_directionToHome = GPS_directionToHome / 100; // 1deg =1000 in the reg, downsize
//added to correct inverted axis
GPS_directionToHome += 180;
if (GPS_directionToHome>180) GPS_directionToHome -= 360;
I just want to make sure that I dont break the current Nav aspect of your code.
Thanks
Ross
Help with Direction to home 180 deg off
as an interim fix, it is ok. I'll fix it in the upcoming v2.2 release of i2c-nav
Re: Help with Direction to home 180 deg off
Hey EOSBandi,
I upgraded my tricopter to the new Multiwii 2.2 today,
Did you get a change to fix the 180 off direction home yet, or do I have to do the above fix again for this version?
I have not uploaded the new r62 i2c_nav yet, should I?
Let me know Please
Thanks for all your work.
Ross
I upgraded my tricopter to the new Multiwii 2.2 today,
Did you get a change to fix the 180 off direction home yet, or do I have to do the above fix again for this version?
I have not uploaded the new r62 i2c_nav yet, should I?
Let me know Please
Thanks for all your work.
Ross