// Public Methods ////////////////////////////////////////////////////////////////////
void AP_GPS_406::init(enum GPS_Engine_Setting nav_setting)
{
    _change_to_sirf_protocol();         // Changes to SIRF protocol and sets baud rate
    _configure_gps();                           // Function to configure GPS, to output only the desired msg's

    AP_GPS_SIRF::init(nav_setting);                     // let the superclass do anything it might need here

    idleTimeout = 1200;
}
void
AP_GPS_UBLOX::init(enum GPS_Engine_Setting nav_setting)
{
    // XXX it might make sense to send some CFG_MSG,CFG_NMEA messages to get the
    // right reporting configuration.

	Debug("uBlox nav_setting=%u\n", nav_setting);

    _port->flush();

    _epoch = TIME_OF_WEEK;
    idleTimeout = 1200;

    // configure the GPS for the messages we want
    _configure_gps();

    _nav_setting = nav_setting;
}
Exemple #3
0
void
AP_GPS_UBLOX::init(AP_HAL::UARTDriver *s, enum GPS_Engine_Setting nav_setting)
{
	_port = s;

    // XXX it might make sense to send some CFG_MSG,CFG_NMEA messages to get the
    // right reporting configuration.

	Debug("uBlox nav_setting=%u\n", nav_setting);

    _port->flush();

    _epoch = TIME_OF_WEEK;

    // configure the GPS for the messages we want
    _configure_gps();

    _nav_setting = nav_setting;
	_step = 0;
	_new_position = false;
	_new_speed = false;
}
Exemple #4
0
AP_GPS_UBLOX::AP_GPS_UBLOX(AP_GPS &_gps, AP_GPS::GPS_State &_state, AP_HAL::UARTDriver *_port) :
    AP_GPS_Backend(_gps, _state, _port),
    _step(0),
    _msg_id(0),
    _payload_length(0),
    _payload_counter(0),
    _fix_count(0),
    _class(0),
    _new_position(0),
    _new_speed(0),
    need_rate_update(false),
    _disable_counter(0),
    next_fix(AP_GPS::NO_FIX),
    rate_update_step(0),
    _last_5hz_time(0)
{
    // stop any config strings that are pending
    gps.send_blob_start(state.instance, NULL, 0);

    // configure the GPS for the messages we want
    _configure_gps();
}