package com.enqualcomm.support.bean;\r
\r
+import com.enqualcomm.support.utils.ICLogger;\r
+\r
import java.util.ArrayList;\r
import java.util.HashMap;\r
import java.util.List;\r
\r
public class ICLocation {\r
\r
- public static class GpsSatellitePriv {\r
+ public static class GpsSatellitePriv {\r
int prn;\r
float snr;\r
+\r
public GpsSatellitePriv(int _prn, float _snr) {\r
- prn=_prn;\r
- snr=_snr;\r
+ prn = _prn;\r
+ snr = _snr;\r
}\r
+\r
public int getPrn() {\r
return prn;\r
}\r
+\r
public float getSnr() {\r
return snr;\r
}\r
}\r
+\r
public List<GpsSatellitePriv> numSatelliteList = new ArrayList<GpsSatellitePriv>(); // 卫星信号\r
public List<GpsSatellitePriv> max3Satellite = new ArrayList<GpsSatellitePriv>(); // 卫星信号\r
- private static boolean adding_satlite_flag=false;\r
- public void set_adding_satlite_flag(boolean flag){\r
- adding_satlite_flag=flag;\r
+ private static boolean adding_satlite_flag = false;\r
+\r
+ public void set_adding_satlite_flag(boolean flag) {\r
+ adding_satlite_flag = flag;\r
}\r
\r
- public List<GpsSatellitePriv> getNumSatelliteList(){\r
+ public List<GpsSatellitePriv> getNumSatelliteList() {\r
if (adding_satlite_flag)\r
return null;\r
return numSatelliteList;\r
}\r
\r
\r
-\r
private LOCATION_STAT currentStat;\r
- private GPS_LocationPoint currentLP=null;\r
- private LBS_Data currentLBS=null;\r
- public class GPS_LocationPoint{\r
+ private GPS_LocationPoint currentLP = null;\r
+ private LBS_Data currentLBS = null;\r
+\r
+ public class GPS_LocationPoint {\r
public double lat;\r
public double lon;\r
public float speed;\r
}\r
\r
\r
- public static class GPS_locationStatus{\r
+ public static class GPS_locationStatus {\r
public List<GpsSatellitePriv> numSatelliteList = new ArrayList<GpsSatellitePriv>(); // 卫星信号\r
public int used_gps_numbs;\r
public float hdop;\r
public int search_time_cost;\r
public int locating_status;\r
}\r
- public class LBS_Data{\r
- HashMap<String ,Integer> wifi_aps=null;\r
- HashMap<String , Integer> gsm_stations=null;\r
+\r
+ public class LBS_Data {\r
+ HashMap<String, Integer> wifi_aps = null;\r
+ HashMap<String, Integer> gsm_stations = null;\r
}\r
- public enum LOCATION_STAT{\r
+\r
+ public enum LOCATION_STAT {\r
LOCATION_OPEN,\r
LOCATION_FIXED,\r
LOCATION_SEARCHING,\r
}\r
\r
\r
- public static final int NORMAL_MOD=1; //location rate 1 time per 15 minutes\r
- public static final int LOWPOWER_MOD=2; // location rate 1 time per hour\r
- public static final int REALTIME_MOD=3; //location rate 1 time per minutes\r
- public static final int EMERGNECY_MOD=4; //location rate 1 time per minutes com.ic.work 5 minutes\r
- public static final int CUSTOM_MOD=5; //location rate 1 time per minutes\r
- public static final int CUSTOM_MOD8_GPS=8; //location rate 1 time per minutes\r
- public static final int CUSTOM_MOD8_WIFI=9; //location rate 1 time per minutes\r
+ public static final int NORMAL_MOD = 1; //location rate 1 time per 15 minutes\r
+ public static final int LOWPOWER_MOD = 2; // location rate 1 time per hour\r
+ public static final int REALTIME_MOD = 3; //location rate 1 time per minutes\r
+ public static final int EMERGNECY_MOD = 4; //location rate 1 time per minutes com.ic.work 5 minutes\r
+ public static final int CUSTOM_MOD = 5; //location rate 1 time per minutes\r
+ public static final int CUSTOM_MOD8_GPS = 8; //location rate 1 time per minutes\r
+ public static final int CUSTOM_MOD8_WIFI = 9; //location rate 1 time per minutes\r
\r
private int mworkingMod;\r
private int location_cycle;\r
\r
- public static final float MAX_HDOP=10.0f;\r
- public static final int MAX_GPS_NOSIGNAL_COUNT=15;\r
- public static final int MAX_GPS_SEARCH_TIMEOUT=120;\r
- public void setWorkingMod(int wkmod){ mworkingMod=wkmod;}\r
- public void setLocation_cycle(int _locatCycle){ location_cycle=_locatCycle;}\r
- public int getWorkingMod(){return mworkingMod;}\r
- public int getLocation_cycle(){return location_cycle;}\r
+ public static final float MAX_HDOP = 10.0f;\r
+ public static final int MAX_GPS_NOSIGNAL_COUNT = 15;\r
+ public static final int MAX_GPS_SEARCH_TIMEOUT = 120;\r
+\r
+ public void setWorkingMod(int wkmod) {\r
+ mworkingMod = wkmod;\r
+ }\r
+\r
+ public void setLocation_cycle(int _locatCycle) {\r
+ location_cycle = _locatCycle;\r
+ }\r
\r
- public ICLocation(){\r
+ public int getWorkingMod() {\r
+ return mworkingMod;\r
+ }\r
+\r
+ public int getLocation_cycle() {\r
+ return location_cycle;\r
+ }\r
+\r
+ public ICLocation() {\r
if (currentLP == null)\r
- currentLP=new GPS_LocationPoint();\r
+ currentLP = new GPS_LocationPoint();\r
\r
currentStat = LOCATION_STAT.LOCATION_CLOSED;\r
if (currentLBS == null)\r
currentLBS = new LBS_Data();\r
- if (currentLBS.gsm_stations==null)\r
- currentLBS.gsm_stations=new HashMap<String,Integer>();\r
- if (currentLBS.wifi_aps==null)\r
- currentLBS.wifi_aps=new HashMap<String,Integer>();\r
+ if (currentLBS.gsm_stations == null)\r
+ currentLBS.gsm_stations = new HashMap<String, Integer>();\r
+ if (currentLBS.wifi_aps == null)\r
+ currentLBS.wifi_aps = new HashMap<String, Integer>();\r
\r
init_data();\r
}\r
\r
- public void setLocationStat(LOCATION_STAT stat){\r
+ public void setLocationStat(LOCATION_STAT stat) {\r
this.currentStat = stat;\r
}\r
- private void init_data(){\r
+\r
+ private void init_data() {\r
// currentLP.lat=2232.9806f;\r
// currentLP.lon=11404.9355f;\r
// currentLP.speed=000.1f;\r
\r
\r
}\r
- public LOCATION_STAT getLocationStat(){\r
+\r
+ public LOCATION_STAT getLocationStat() {\r
return currentStat;\r
}\r
+\r
private String LocationTime;\r
- public void setLocationTime(String time){\r
\r
- LocationTime=time;\r
+ public void setLocationTime(String time) {\r
+\r
+ LocationTime = time;\r
}\r
- public String getLocationTime(){\r
+\r
+ public String getLocationTime() {\r
return LocationTime;\r
}\r
+\r
private String LocationType;\r
- public void setLocationType(String type){\r
\r
- LocationType=type;\r
+ public void setLocationType(String type) {\r
+\r
+ LocationType = type;\r
}\r
- public String getLocationType(){\r
+\r
+ public String getLocationType() {\r
return LocationType;\r
}\r
- public GPS_LocationPoint getLocation(){\r
+\r
+ public GPS_LocationPoint getLocation() {\r
return currentLP;\r
}\r
\r
- public void setHod(float _hot){\r
- currentLP.hdop=_hot;\r
+ public void setHod(float _hot) {\r
+ currentLP.hdop = _hot;\r
}\r
\r
- public float getHdop(){\r
+ public float getHdop() {\r
return currentLP.hdop;\r
}\r
\r
- public void setSpeed( float _speed){\r
- currentLP.speed=_speed;\r
+ public void setSpeed(float _speed) {\r
+ currentLP.speed = _speed;\r
}\r
- public float getSpeed(){\r
+\r
+ public float getSpeed() {\r
return currentLP.speed;\r
}\r
\r
- public void setLocation(double lat,double lon){\r
- currentLP.lat=lat;\r
- currentLP.lon=lon;\r
+ public void setLocation(double lat, double lon) {\r
+ currentLP.lat = lat;\r
+ currentLP.lon = lon;\r
}\r
\r
- public void setLocationlatlonName(String latname,String lonname){\r
- currentLP.lat_name=latname;\r
- currentLP.lon_name=lonname;\r
+ public void setLocationlatlonName(String latname, String lonname) {\r
+ currentLP.lat_name = latname;\r
+ currentLP.lon_name = lonname;\r
}\r
- public void setLocation(String lat,String lon){\r
- currentLP.latStr=lat;\r
- currentLP.lonStr=lon;\r
+\r
+ public void setLocation(String lat, String lon) {\r
+ currentLP.latStr = lat;\r
+ currentLP.lonStr = lon;\r
}\r
- public void setLocationGPS(String lat,String lon){\r
- currentLP.latGPSStr=lat;\r
- currentLP.lonGPSStr=lon;\r
+\r
+ public void setLocationGPS(String lat, String lon) {\r
+ currentLP.latGPSStr = lat;\r
+ currentLP.lonGPSStr = lon;\r
}\r
- public void setHeading(float heding){\r
- currentLP.heading=heding;\r
+\r
+ public void setHeading(float heding) {\r
+ currentLP.heading = heding;\r
}\r
\r
- public float getheading(){\r
+ public float getheading() {\r
return currentLP.heading;\r
}\r
\r
- public void setUsedStarts(int starts){\r
- currentLP.used_gps_numbs=starts;\r
+ public void setUsedStarts(int starts) {\r
+ currentLP.used_gps_numbs = starts;\r
}\r
\r
- public int getUsedStarts(){\r
+ public int getUsedStarts() {\r
return currentLP.used_gps_numbs;\r
}\r
\r
- public void setLocation(double lat,double lon,float speed,float heading,int userdgpsnumbers,float hdop){\r
- currentLP.lat=lat;\r
- currentLP.lon=lon;\r
- currentLP.speed=speed;\r
- currentLP.heading=heading;\r
+ public void setLocation(double lat, double lon, float speed, float heading, int userdgpsnumbers, float hdop) {\r
+ currentLP.lat = lat;\r
+ currentLP.lon = lon;\r
+ currentLP.speed = speed;\r
+ currentLP.heading = heading;\r
currentLP.used_gps_numbs = userdgpsnumbers;\r
- currentLP.latStr="";\r
- currentLP.lonStr="";\r
- currentLP.hdop=hdop;\r
- }\r
- public void setLocation(String lat,String lon,float speed,float heading,int userdgpsnumbers,float hdop){\r
- currentLP.lat=0;\r
- currentLP.lon=0;\r
- currentLP.speed=speed;\r
- currentLP.heading=heading;\r
+ currentLP.latStr = "";\r
+ currentLP.lonStr = "";\r
+ currentLP.hdop = hdop;\r
+ }\r
+\r
+ public void setLocation(String lat, String lon, float speed, float heading, int userdgpsnumbers, float hdop) {\r
+ currentLP.lat = 0;\r
+ currentLP.lon = 0;\r
+ currentLP.speed = speed;\r
+ currentLP.heading = heading;\r
currentLP.used_gps_numbs = userdgpsnumbers;\r
- currentLP.latStr=lat;\r
- currentLP.lonStr=lon;\r
- currentLP.hdop=99.9f;\r
+ currentLP.latStr = lat;\r
+ currentLP.lonStr = lon;\r
+ currentLP.hdop = 99.9f;\r
}\r
\r
- public void clearLBSdata(){\r
+ public void clearLBSdata() {\r
currentLBS.gsm_stations.clear();\r
}\r
- public void clearWiFidata(){\r
+\r
+ public void clearWiFidata() {\r
currentLBS.wifi_aps.clear();\r
}\r
\r
- public void append_gsmstation(String station,int rssi){\r
- currentLBS.gsm_stations.put(station,rssi);\r
+ public void append_gsmstation(String station, int rssi) {\r
+ currentLBS.gsm_stations.put(station, rssi);\r
}\r
- public void append_wifiap(String wifi,int rssi){\r
- currentLBS.wifi_aps.put(wifi,rssi);\r
+\r
+ public void append_wifiap(String wifi, int rssi) {\r
+ currentLBS.wifi_aps.put(wifi, rssi);\r
}\r
\r
\r
// CID,Cell Identity,基站编号,是个16位的数据(范围是0到65535)。\r
\r
\r
- private String MCC="0";\r
- private String MNC="0";\r
- private int LAC=0;\r
- private int CID=0;\r
- private int rxlevel=0;\r
- private boolean datachanged=false;\r
- public void setMCC(String mcc){ MCC=mcc;datachanged=true;}\r
- public void setMNC(String mnc){MNC = mnc;datachanged=true;}\r
- public void setLAC(int lac){LAC=lac;datachanged=true;}\r
- public void setCID(int cid) { CID=cid;datachanged=true;}\r
- public void setRxlevel(int level) {rxlevel=level;}\r
- public boolean isDataChanged(){return datachanged;}\r
- public String getMCC(){\r
+ private String MCC = "0";\r
+ private String MNC = "0";\r
+ private int LAC = 0;\r
+ private int CID = 0;\r
+ private int rxlevel = 0;\r
+ private boolean datachanged = false;\r
+\r
+ public void setMCC(String mcc) {\r
+ MCC = mcc;\r
+ datachanged = true;\r
+ }\r
+\r
+ public void setMNC(String mnc) {\r
+ ICLogger.d("MNC==> " + mnc);\r
+ MNC = mnc;\r
+ datachanged = true;\r
+ }\r
+\r
+ public void setLAC(int lac) {\r
+ LAC = lac;\r
+ datachanged = true;\r
+ }\r
+\r
+ public void setCID(int cid) {\r
+ CID = cid;\r
+ datachanged = true;\r
+ }\r
+\r
+ public void setRxlevel(int level) {\r
+ rxlevel = level;\r
+ }\r
+\r
+ public boolean isDataChanged() {\r
+ return datachanged;\r
+ }\r
+\r
+ public String getMCC() {\r
return MCC;\r
}\r
- public String getMNC(){\r
+\r
+ public String getMNC() {\r
return MNC;\r
}\r
- public int getRxlevel(){\r
+\r
+ public int getRxlevel() {\r
return rxlevel;\r
}\r
- public long getLAC(){\r
+\r
+ public long getLAC() {\r
return LAC;\r
}\r
- public long getGSMStationCID(){\r
+\r
+ public long getGSMStationCID() {\r
return CID;\r
}\r
- public LBS_Data getLBSdata(){\r
+\r
+ public LBS_Data getLBSdata() {\r
return currentLBS;\r
}\r
\r