public Location toSysLocation() { Location location = new Location(LocationManager.GPS_PROVIDER); location.setAccuracy(8f); Bundle extraBundle = new Bundle(); location.setBearing(bearing); Reflect.on(location).call("setIsFromMockProvider", false); location.setLatitude(latitude); location.setLongitude(longitude); location.setSpeed(speed); location.setTime(System.currentTimeMillis()); location.setExtras(extraBundle); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { location.setElapsedRealtimeNanos(277000000); } int svCount = VirtualGPSSatalines.get().getSvCount(); extraBundle.putInt("satellites", svCount); extraBundle.putInt("satellitesvalue", svCount); return location; } }
private Location copyOf(Location location) { if (location == null) return null; Location copy = new Location(location); copy.setAccuracy(location.getAccuracy()); copy.setAltitude(location.getAltitude()); copy.setBearing(location.getBearing()); copy.setExtras(location.getExtras()); copy.setLatitude(location.getLatitude()); copy.setLongitude(location.getLongitude()); copy.setProvider(location.getProvider()); copy.setSpeed(location.getSpeed()); copy.setTime(location.getTime()); return copy; }
public Location toSysLocation() { Location location = new Location(LocationManager.GPS_PROVIDER); location.setAccuracy(8f); Bundle extraBundle = new Bundle(); location.setBearing(bearing); Reflect.on(location).call("setIsFromMockProvider", false); location.setLatitude(latitude); location.setLongitude(longitude); location.setSpeed(speed); location.setTime(System.currentTimeMillis()); location.setExtras(extraBundle); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { location.setElapsedRealtimeNanos(277000000); } int svCount = VirtualGPSSatalines.get().getSvCount(); extraBundle.putInt("satellites", svCount); extraBundle.putInt("satellitesvalue", svCount); return location; } }
l.setLatitude(object.getDouble("latitude")); l.setSpeed((float) object.getDouble("speed")); l.setBearing((float) object.getDouble("bearing")); l.setTime(object.getLong("time"));
public Location toSysLocation() { Location location = new Location(LocationManager.GPS_PROVIDER); location.setAccuracy(8f); Bundle extraBundle = new Bundle(); location.setBearing(bearing); Reflect.on(location).call("setIsFromMockProvider", false); location.setLatitude(latitude); location.setLongitude(longitude); location.setSpeed(speed); location.setTime(System.currentTimeMillis()); location.setExtras(extraBundle); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) { location.setElapsedRealtimeNanos(277000000); } int svCount = VirtualGPSSatalines.get().getSvCount(); extraBundle.putInt("satellites", svCount); extraBundle.putInt("satellitesvalue", svCount); return location; } }
private void sendLocation(GpxTrackPoint point) { Location loc = new Location(providerName); loc.setLatitude(point.getLat()); loc.setLongitude(point.getLon()); loc.setTime(System.currentTimeMillis()); loc.setBearing((float) point.getHeading()); loc.setAccuracy(1.0f); loc.setSpeed((float) point.getSpeed()); loc.setAltitude(100.0); // bk added Method method; try { method = Location.class.getMethod("makeComplete", new Class[0]); if (method != null) { try { method.invoke(loc, new Object[0]); } catch (Exception exception) { } } } catch (NoSuchMethodException e) { e.printStackTrace(); } Log.d("SendLocation", "Sending update for " + providerName); mLocationManager.setTestProviderLocation(providerName, loc); }
mBearing = (float) Math.toDegrees(Math.atan2(latVeolocity, lonVeolocity)); location.setBearing(mBearing);
location.setLongitude(longitude); location.setSpeed(speed); location.setBearing(bearing);
if (lcdata_float != NOT_AVAILABLE) lc.setBearing(lcdata_float);
if (lcdata_float != NOT_AVAILABLE) lc.setBearing(lcdata_float);
loc.setProvider(mocLocationProvider); loc.setSpeed(0.8f); loc.setBearing((float) Core.azimuth); loc.setTime(System.currentTimeMillis()); try {
mLastLoc.setBearing(mLastHeading);
if (lcdata_float != NOT_AVAILABLE) lc.setBearing(lcdata_float);
private Location copyOf(Location location) { if (location == null) return null; Location copy = new Location(location); copy.setAccuracy(location.getAccuracy()); copy.setAltitude(location.getAltitude()); copy.setBearing(location.getBearing()); copy.setExtras(location.getExtras()); copy.setLatitude(location.getLatitude()); copy.setLongitude(location.getLongitude()); copy.setProvider(location.getProvider()); copy.setSpeed(location.getSpeed()); copy.setTime(location.getTime()); return copy; }
private Location copyOf(Location location) { if (location == null) return null; Location copy = new Location(location); copy.setAccuracy(location.getAccuracy()); copy.setAltitude(location.getAltitude()); copy.setBearing(location.getBearing()); copy.setExtras(location.getExtras()); copy.setLatitude(location.getLatitude()); copy.setLongitude(location.getLongitude()); copy.setProvider(location.getProvider()); copy.setSpeed(location.getSpeed()); copy.setTime(location.getTime()); return copy; }
private Location copyOf(Location location) { if (location == null) return null; Location copy = new Location(location); copy.setAccuracy(location.getAccuracy()); copy.setAltitude(location.getAltitude()); copy.setBearing(location.getBearing()); copy.setExtras(location.getExtras()); copy.setLatitude(location.getLatitude()); copy.setLongitude(location.getLongitude()); copy.setProvider(location.getProvider()); copy.setSpeed(location.getSpeed()); copy.setTime(location.getTime()); return copy; }
private Location copyOf(Location location) { if (location == null) return null; Location copy = new Location(location); copy.setAccuracy(location.getAccuracy()); copy.setAltitude(location.getAltitude()); copy.setBearing(location.getBearing()); copy.setExtras(location.getExtras()); copy.setLatitude(location.getLatitude()); copy.setLongitude(location.getLongitude()); copy.setProvider(location.getProvider()); copy.setSpeed(location.getSpeed()); copy.setTime(location.getTime()); return copy; }
location.setBearing(mLastLocation.getBearing());
l.setLatitude(mService.getGpsParams().getLatitude()); l.setLongitude(mService.getGpsParams().getLongitude()); l.setBearing((float) mService.getGpsParams().getBearing());
l.setSpeed((float)GpsParams.speedConvert(params.getSpeed())); l.setAltitude((float)GpsParams.altitudeConvert(params.getAltitude())); l.setBearing((float)params.getBearing()); GpsParams p = new GpsParams(l); mDestination[id].updateTo(p);