Browse Source

minor changes, fixed IMU class

git-svn-id: https://arducopter.googlecode.com/svn/trunk@1225 f9c3cf11-9bcb-44bc-f272-b75c42450872
master
jasonshort 14 years ago
parent
commit
f75c7b47ff
  1. 22
      libraries/AP_GPS/AP_GPS_HIL.cpp
  2. 4
      libraries/AP_GPS/AP_GPS_IMU.cpp
  3. 2
      libraries/AP_GPS/AP_GPS_IMU.h

22
libraries/AP_GPS/AP_GPS_HIL.cpp

@ -41,17 +41,17 @@ int AP_GPS_HIL::status(void) @@ -41,17 +41,17 @@ int AP_GPS_HIL::status(void)
void AP_GPS_HIL::setHIL(long _time, float _latitude, float _longitude, float _altitude,
float _ground_speed, float _ground_course, float _speed_3d, uint8_t _num_sats)
{
time = _time;
latitude = _latitude*1.0e7;
longitude = _longitude*1.0e7;
altitude = _altitude*1.0e2;
ground_speed = _ground_speed*1.0e2;
ground_course = _ground_course*1.0e2;
speed_3d = _speed_3d*1.0e2;
num_sats = _num_sats;
new_data = true;
fix = true;
valid_read = true;
time = _time;
latitude = _latitude*1.0e7;
longitude = _longitude*1.0e7;
altitude = _altitude*1.0e2;
ground_speed = _ground_speed*1.0e2;
ground_course = _ground_course*1.0e2;
speed_3d = _speed_3d*1.0e2;
num_sats = _num_sats;
new_data = true;
fix = true;
valid_read = true;
_setTime();
}

4
libraries/AP_GPS/AP_GPS_IMU.cpp

@ -1,7 +1,7 @@ @@ -1,7 +1,7 @@
// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: t -*-
/*
GPS_MTK.cpp - Ublox GPS library for Arduino
Code by Jordi Muñoz and Jose Julio. DIYDrones.com
Code by Jordi MuÒoz and Jose Julio. DIYDrones.com
This code works with boards based on ATMega168/328 and ATMega1280 (Serial port 1)
This library is free software; you can redistribute it and/or
@ -46,7 +46,7 @@ void AP_GPS_IMU::init(void) @@ -46,7 +46,7 @@ void AP_GPS_IMU::init(void)
// optimization : This code doesn't wait for data. It only proccess the data available.
// We can call this function on the main loop (50Hz loop)
// If we get a complete packet this function calls parse_IMU_gps() to parse and update the GPS info.
void AP_GPS_IMU::update(void)
void AP_GPS_IMU::read(void)
{
byte data;
int numc = 0;

2
libraries/AP_GPS/AP_GPS_IMU.h

@ -12,7 +12,7 @@ class AP_GPS_IMU : public GPS @@ -12,7 +12,7 @@ class AP_GPS_IMU : public GPS
// Methods
AP_GPS_IMU(Stream *s);
void init();
void update();
void read();
// Properties
long roll_sensor; // how much we're turning in deg * 100

Loading…
Cancel
Save