We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am JA7FKF Satoh. Thank you for providing a great sketch.
Now I am trying to make an AZ / EL rotator. LSM303 is used to detect AZ / EL. The library was specified by FEATURE_AZ_POSITION_POLOLU_LSM303.
I read the source because the AZ displayed on the LED is a little strange.
The original source is as follows.
void read_azimuth(byte force_read){ .............. #ifdef FEATURE_AZ_POSITION_POLOLU_LSM303 .............. float heading = compass.heading();
//float heading = atan2(lsm.magData.y, lsm.magData.x); // heading += declinationAngle; // Correct for when signs are reversed. /* if (heading < 0) heading += 2 * PI; if (heading > 2 * PI) heading -= 2 * PI; raw_azimuth = (heading * RAD_TO_DEG) * HEADING_MULTIPLIER; // radians to degree
The unit of the return value of POLOLU's heading function is a degree, so I thought it was necessary to modify the source.
My modifications are as follows.
float heading = compass.heading(); //float heading = atan2(lsm.magData.y, lsm.magData.x); // heading += declinationAngle(); // Correct for when signs are reversed.
Incidentally, we also included the conversion of declination and AXIS. The declination and AXIS values were set in Settings.h.
At a minimum, it is suggested that the source correct the difference between radians and degree.
Thank you!!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am JA7FKF Satoh.
Thank you for providing a great sketch.
Now I am trying to make an AZ / EL rotator. LSM303 is used to detect AZ / EL.
The library was specified by FEATURE_AZ_POSITION_POLOLU_LSM303.
I read the source because the AZ displayed on the LED is a little strange.
The original source is as follows.
void read_azimuth(byte force_read){
..............
#ifdef FEATURE_AZ_POSITION_POLOLU_LSM303
..............
float heading = compass.heading();
The unit of the return value of POLOLU's heading function is a degree, so I thought it was necessary to modify the source.
My modifications are as follows.
#ifdef POLOLU_LSM_303_DECLINATION_ANGLE // JA7FKF
heading += (POLOLU_LSM_303_DECLINATION_ANGLE); // JA7FKF
#endif // POLOLU_LSM_303_DECLINATION_ANGLE // JA7FKF
#ifdef POLOLU_LSM_303_CHANGE_AXIS // JA7FKF
heading += (POLOLU_LSM_303_CHANGE_AXIS); // JA7FKF
#endif // POLOLU_LSM_303_CHANGE_AXIS // JA7FKF
// if (heading < 0) heading += 2 * PI; // JA7FKF
// if (heading > 2 * PI) heading -= 2 * PI; // JA7FKF
while (heading < 0) heading += 360; // JA7FKF
while (heading > 359.99) heading -= 360; // JA7FKF
raw_azimuth = (heading * RAD_TO_DEG) * HEADING_MULTIPLIER; // radians to degree
Incidentally, we also included the conversion of declination and AXIS.
The declination and AXIS values were set in Settings.h.
At a minimum, it is suggested that the source correct the difference
between radians and degree.
Thank you!!
The text was updated successfully, but these errors were encountered: