Subversion Repositories FlightCtrl

Rev

Rev 143 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 143 Rev 149
Line 5... Line 5...
5
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
5
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
6
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7
GNU General Public License for more details. You should have received a copy of the GNU General Public License
7
GNU General Public License for more details. You should have received a copy of the GNU General Public License
8
along with this program. If not, see <http://www.gnu.org/licenses/>.
8
along with this program. If not, see <http://www.gnu.org/licenses/>.
Line 9... Line 9...
9
 
9
 
10
Please note: All the other files for the project "Mikrokopter" by H.Buss are under the licencse published by www.mikrokopter.de
10
Please note: All the other files for the project "Mikrokopter" by H.Buss are under the license (license_buss.txt) published by www.mikrokopter.de
11
*/
11
*/
12
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
12
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
13
Peter Muehlenbrock
13
Peter Muehlenbrock
14
Auswertung der Daten vom GPS im ublox Format
14
Auswertung der Daten vom GPS im ublox Format
15
Regelung fuer GPS noch nicht implementiert
15
Regelung fuer GPS noch nicht implementiert
16
Stand 10.9.2007
16
Stand 11.9.2007
17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
18
*/
18
*/
Line 19... Line 19...
19
#include "main.h"
19
#include "main.h"
Line 70... Line 70...
70
{
70
{
71
        if (actual_pos.status == 0) return; //damit es schnell geht, wenn nix zu tun ist
71
        if (actual_pos.status == 0) return; //damit es schnell geht, wenn nix zu tun ist
72
        if ((actual_pos.status > 0) && (actual_status.status > 0) && (actual_speed.status > 0))
72
        if ((actual_pos.status > 0) && (actual_status.status > 0) && (actual_speed.status > 0))
73
        {
73
        {
74
                cnt1++; //**** noch Rausschmeissen
74
                cnt1++; //**** noch Rausschmeissen
75
                if ((actual_status.gpsfix_type & 0x0f) >=2) // nur wenn Daten aktuell sind
75
                if (((actual_status.gpsfix_type & 0x03) >=2) && ((actual_status.nav_status_flag & 0x01) >=1)) // nur wenn Daten aktuell und gueltig sind
76
                {
76
                {
77
                        gps_act_position.utm_east       = actual_pos.utm_east/10;
77
                        gps_act_position.utm_east       = actual_pos.utm_east/10;
78
                        gps_act_position.utm_north      = actual_pos.utm_north/10;
78
                        gps_act_position.utm_north      = actual_pos.utm_north/10;
79
                        gps_act_position.utm_alt        = actual_pos.utm_alt/10;
79
                        gps_act_position.utm_alt        = actual_pos.utm_alt/10;
80
                        gps_act_position.speed_gnd      = actual_speed.speed_gnd/10;
80
                        gps_act_position.speed_gnd      = actual_speed.speed_gnd/10;