minute = str2int(tok.p+2, tok.p+4);
seconds = str2float(tok.p+4, tok.end);
- tm.tm_hour = hour;
- tm.tm_min = minute;
- tm.tm_sec = (int) seconds;
- tm.tm_year = r->utc_year - 1900;
- tm.tm_mon = r->utc_mon - 1;
- tm.tm_mday = r->utc_day;
+ tm.tm_hour = hour;
+ tm.tm_min = minute;
+ tm.tm_sec = (int) seconds;
+ tm.tm_year = r->utc_year - 1900;
+ tm.tm_mon = r->utc_mon - 1;
+ tm.tm_mday = r->utc_day;
+ tm.tm_isdst = -1;
fix_time = mktime( &tm ) + r->utc_diff;
r->fix.timestamp = (long long)fix_time * 1000;
return;
}
- D("gps emulation will read from %s", device);
+ D("gps emulation will read from '%s' qemud channel", QEMU_CHANNEL_NAME );
if ( socketpair( AF_LOCAL, SOCK_STREAM, 0, state->control ) < 0 ) {
LOGE("could not create thread control socket pair: %s", strerror(errno));
return 0;
}
+static int
+qemu_gps_inject_location(double latitude, double longitude, float accuracy)
+{
+ return 0;
+}
+
static void
qemu_gps_delete_aiding_data(GpsAidingData flags)
{
static int qemu_gps_set_position_mode(GpsPositionMode mode, int fix_frequency)
{
// FIXME - support fix_frequency
- // only standalone supported for now.
- if (mode != GPS_POSITION_MODE_STANDALONE)
- return -1;
return 0;
}
qemu_gps_stop,
qemu_gps_cleanup,
qemu_gps_inject_time,
+ qemu_gps_inject_location,
qemu_gps_delete_aiding_data,
qemu_gps_set_position_mode,
qemu_gps_get_extension,