[GPS] Mod Driver - GeoCaching, Lag, Compass, Cell Tower, Altitude, GPS support. - Windows Mobile Apps and Games

GPS Mod Driver (From original post in Diamond thread Ending Here)
This Driver installs between your gps application and the GPS driver that reads the hardware gps.
- Lag is compensated, by guessing your position 'some number' of milliseconds in the future, current course and speed changes are included in the guess.
- Driver corrects for invalid data in the gps strings, Out of range DOP values, and Heading values of 'NaN' (Not A Number). Position, Speed, and course are reported, even though the distance traveled is less than 30 meters.
- Cell Tower location is used when GPS is unavailable
- Altitude is corrected from/to WGS84/ASL
- Hardware Compass Support
- Allows selction of many input sources, including MSApi (GetPosition api)
- Suports GPS applications on any COM port, as well as GPSApi (GetPosition api)
Hardware Compass Support information is in Post Number two
QueStub support is in post Number Six, Garmin can now use GPS Intermediate Driver, so no longer needs QueStub
Newest Version:
3.4.4
Add back in the detection of dead input port
3.4.5
Fix GpsApi when calling app is stupid
- Caller asks for V1 data with V2 dwSize (I return V1 as version with V2 size, and V2 data in the return
FixGpsApi GPSGetDeviceStatus
Change ReadNewData to detect, and call GPSGetDeviceStatus, and set the waiting handles (if there are any)
3.4.6
Remove trap on stuck GPS from msapi, only COM ports are detected (TP2)
Rename gpx and csv files to: "ModDriver_{date}_{time}{In or Out}.{gpx or csv}"
3.5.0
Add GPX tracklog 'ending' to each log write, fseek back to overwrite.
Change time sync to CellInit, since clock is functioning when service loads.
- Detect when Cell service not loaded, and sync on GPS open port
3.5.1
Created a new device MsClock, provides current device time with millisecond resolution
Created and linked MachClock.dll (uses MsClock)
- Provides SystemTime and FileTime with 1 m/s resolution
- Uses device clock for base time
- Re-Sync time on device wake-up from sleep
Used MachClock to keep time in sync (all apps and drivers)
Fixed a bug in appending GPX tracks to existing logs
3.5.2
Move DeviceStatus maintenece to ModDriver
- Modify COM_Read, COM-Write to support transfer of data to caller (GPSApi.dll)
Remove Power up/down redundentcies from ModDriver and MachCell
Add Thread open count to MsClock
Fix Power up notify in MsClock
Fix Extra calls to UpdateDeviceStatus in ModDriver, when no-one is listening
Create Named event in GPSapi.dll to track mutiple instances of dll
3.5.3
Include AutoLog, RegUtil, and CardPath into MachClock.dll
- Should save some ram since the code will only load once (shared for all apps and drivers)
- On my device running GpsModSetup saves 20kb of ram
MachCell should have saved another 20kb too, but since it is a service I can't prove it
- Fix a COM port read issue when GSV is not sent regularaly (some BT recievers)
3.5.4 - 3.5.6
Fix EnableLogs Registry read error issue
Remove close COM port on PurgeCom (bug)
Fix time error
Fix GPX logging
- Could stop/delay output data
3.5.7
ModDriver could be sending data to the application way too often
MsClock driver was not being used by ModDriver
MsClock bit of tweeking, and was made faster too
could have stayed running 'awake' when nothing was using it.
GPX log files was still broken sometimes, another tweek there too.
reset the device clock to the GPS time (+500m/s)
added some logging to MsClock, but only for testing
3.5.8
Logging Owner Process Name in ModDriver and MsClock
Extra Delay removed reading some COM input devices
When input port times out, reader thread could stay active (or even duplicate)
MsClock, only reset device clock if it needs resetting (read current clock, and compare first)
Changed timing on EnableSmooth
- Used to return data at 600, 400+, 600...
- Now 500, 500+, 500, 500+,
Better handling when reader app crashes without closing the ports
- System sends me Ioctl_Psl_Notify
- I force close reader port, SetLastError( 6 )
- In GPSApi I react to GetLastError() == 6, by exiting the reader thread.
3.6.0
- Fixed a minor issue with sudden loss of BT com port
Version 3.10 and newer: Added Direct support for reading cell tower location.
See the change log and Cell Tower features starting on post 1346 here
External Card Storage
- If the card is removable, installing a device driver to it is just a BAD idea, don't do it!
- My attached shortcuts don't work, make your own or edit mine.
- Your card may not be avalable during early boot, so driver may not autoload.
- Driver will take londer to load, so phone will take longer to boot.
- ModSettings will take longer to load
- Uninstall is not as perfect, but still works fine, except it is possible that the dll on the card may not be removed if it is in use at the time.
- Did I say don't install to a card unless you have to?
- Install the driver cab, change your GPS application to the indicated port or to use Gps Intermediate Driver, instead of the original internal com port.
- Run GpsModSetup (found in start), you will see live gps data from the ModDriver on the main page. Tapping the screen will toggle to a sattelite view screen.
Menu/[Profile] (driving or Walking): to use a preset setup, Save will update driver to use new profile. If auto profile is enabled you will not be able to make this selection, but can still edit the profile's values.
Menu/System: to change the values used by ModDriver.
- Log File: Creates a debug log in \Mach2003 of the device.
- Extended: Adds more information to the logs.
- Track Log: Creates a GPX and CSV file to card\Mach2003 that can be viewed in Google Earth, or many other applications.
- Raw Data: Includes an extra GPX and CSV file for the raw input readings from the GPS source.
- Smooth: Allows Mod Driver to insert an extra GPS output at half the sleep time, so that some map displays are less jumpy.
GpsModDriver section
- Sleep Time: Amount of time that Mod Driver will wait for a new GPS reading. Default devices are 1000 ms.
- ComTimeOut: Passed on to the windows com driver when using a COM input port, amount of time readfile will wait for ANY data to arrive on the port.
- Keep Alive: Driver will keep reading raw data for this many milliseconds after the last reader port is closed. Allows for switching GPS applications without loosing fix.
Be very careful changing the following port, you may need a factory (HARD) reset if you change a port to one that is already in use!
- Com Port: The output port Mod Driver will use to send data to your GPS Application.
- Enable: Enable (or disable) All Mod Driver functions.
Internal GPS Device section
These settings are written to the internal GPS device registry, and MAY be used by the original driver
- Sleep Time: Time to Wait for data when no data is available ro read.
- Poll Rate: How often to check for new data from the internal driver.
- Input Buffer: Amount of phycical RAM to reserve for READING the internal GPS device.
- Output Buffer: Amount of RAM to reserve for communication to MS GPSID driver.
Be very careful changing the following port, you may need a factory (HARD) reset if you change a port to one that is already in use!
- Com Port: Com Port for GPSID data, same as using the 'External GPS' control panel 'software port' item.
- Enable: Enable (or disable) the internal GPS, same as "allow windows to manage device" under external GPS settings.
Menu/Extras: To configure additional settings.
Altitude Table section
- Altitude Fix, To enable driver to correct altitude to true (ASL)
- Prefer GPS, To use GPS altitude when avaiable instead of the table values
- Kill Feature Remove Table, Use to remove the altitude correction feature, and the table file from your card.
Auto Profile Selection
- Gsensor Angle, angle from vertical when to switch to/from walking profile.
- Enable portrait, To autoswitch profile when in portrait mode
- Enable landscape, To autoswitch profile when in landscape mode
Cell Tower Location
- Service is Running Now, Reports current service status, tap to update
- Enable Cell Service, ...
- Enable Service, Only with GPS, starts and stops cell service when Mod Driver is used/closed
- Enable Internet Cell Data, Allows Servicer to use data connection to resolve location of unknown cell towers
- Entries To Save, restricts the size of the cell tower database
- Default MCC, Can be set to YOUR Mobile Country Code for when your RIL does not have this vital information
- ReStart, Stop/Start Buttons.
- Export, To export known cell tower locations to a GPX file
- Update, Used to resolve all unknown cell tower locations, ignores Enable data Flag (use while connected through A/S)
- Kill Feature Remove Service, Use if you don't want cell tower location features.
Menu/Ports: To enable Mod Driver to use other input ports.
Port Scan Mode
- Scan On Power Only, default, allows scanning for a better input port only when the device is plugged in.
- Scan on Battery Too, allows port scan at all times, regardless if device is plugged in or not.
- Never Scan, disables the port scan feature.
- Scan Only Once, does an imediate scan, then sets itself to "never scan".
Input Port section
- Port (MSAPI, or Com Ports from 1 to 9)
- Enable, allows Mod Driver to read this port
- Fix, applies Mod Driver Lag, speed, and heading fixes to this port (some devices might not need these fixes)
- Order, Mod Driver tries to find GPS data on the Enabled ports in this order, 0 first, then 1, 2... (99) is auto entered for the "output" port, as it can not be used for input as well.
All screens have an 'Undo' and 'Save' button. Undo will revert all changes made to the screen, save will update the driver to use the new settings.
Profile Screens
- Name: Used for profile selection and display (alters the names on menu and selection screens)
- Set To Defaults button: Sets all profile fields to factory default values, as installed from the latest CAB.
To Insert Speed and Course section
- Distance Moved: Meters times 10 to update course and speed (30 = 3.0 meters)
- Zero Speed Time: Milliseconds to speed when distance above is not exceeded, your speed will "stick" until this time passes when not moving.
- Minimum Speed: Any speed below this value will be considered as "zero" to filter out erratic slow readings.
To Calcualte Lag Position section
- Speed Threshold: kph times 10 to update LagAdvance position (50 = 5.0 kph), readings with speeds below this value will not have lag applied.
- Lag Advance (ms): Number of milliseconds to project your position into the future to compensate for delay in GPS readings
Toggle Enable section
- Speed Fix: Allow the driver to correct speed
- Prefer GPS: If GPS raw data has a valid speed, use it instead of calcualting speed from position.
- Course Fix: Allow the driver to correct Course
- Prefer GPS: If GPS raw data had a valid course, use it instead of calculating course from position.
- Dop Fix: Allow the driver to correct bad dop values
- Compass: Allow hardware compass with this profile
Auto Input Selection
Mod Driver allows you to select more that one source port for reading GPS data. No matter what input port is used, your GPS application can read Mod Driver to get GPS data.
- You can enable Bluetooth GPS devices as well as MSAPI, and the internal COM port devices.
- 'Order' assigns the preferred port to use, 0 is the most prefered, 1 is next...
- When first started (any GPS application opens Mod Driver port), driver scans ports starting from 0, to find input data.
- If the scan mode is enabled, it tries lower order ports every 30 seconds or so, and switches 'up' to a better port if fixed data is there.
- If the current port looses connection, Driver will try any enabled port to get good data (regardless of scan mode).
- To install a BT device, pair it with your phone, and add an external com port to it.
Altitude Fix
The NMEA standard requires GPS altitude to contain Altitude above sea level (standard was made by boat people), and seperation from the WGS84 ellipsoid used in calculating the ASL. Sea level varies on the planet by up to +- 100 meters from the ellipsoid due to gravitational force changes. Using data from NGA (2008), a table was created (stored on CARD under \Mach2003, 64kb), and is used to determine the seperation value for the current GPS position. In testing, we found that the table value was more current (a more accurate value) then even the devices' driver was using. Prefer GPS will override the table value, and use what the device thinks is correct only if the GPS data actually has the seperation value. You CAN disable this feature and save a bit of card memory by deleting the Altitude*.RAW file. (if card memory can not be found, the file is retained in the devices \Windows folder).
There are also a couple of shortcuts attached here to auto-select a profile. You can copy them to start menu, or to app keys to assign to a hardware button. There is also a shortcut for running the "scan once" selection without "starting up" mod settings.
KillDriver.exe
Used to remove a stuck un-install of the driver instead of using SKTools.
Copy the un-zipped file to the device and run it. It will remove all the files, registry entries, plus the Mod Driver entry in the uninstall database.
It may leave behind some registry entries, and does leave behind the files under \Windows\App Install. You may delete these files manually after running the kill driver application.

GPS Mod Driver - Hardware Compass Support
Mod Driver supports the hardware compass on the HTC, and Samsung devices that have a hardware compass.
- Mod Driver uses Compass Heading below Delta Speed for the current profile in place of GPS heading.
- Compass speed is configurable, default is 2.5 kph (works with Garmin Mobile XT)
- Not all GPS applications will use the heading without a speed, your results will vary.
Samsung Devices need to have the SDK 2.0 cab installed (attached here).
When a hardware Comapass is detected an additional menu item is available for presetting the difference between the hardware compass and actual heading. This is required because your phone may be mounted slightly off angle, and it also reports a 'magnetic' heading instead of the GPS 'True' heading.
Compass hardware does NOT detect landscape rotation properly, but Mod Driver adjusts for this automatically.
Calibration factors are retained for each profile, so mounting (or holding) position is accounted for.
Hardware compass is quite useless in an automobile because of the huge amount of metal around you, and teh EMI that the car generates. You can disable the compass under "Driving" profile, and when using auto profile selection, the compass will only be used when you have the phone out of it's car cradle. Or if you don't use auto-profile, when you select walking profile.
The best way to calibrate the driver's compass value to to just edit the value directly, note that you can not enter a negitive value, but just add 360, and enter that (ie: -21 degrees = 339 degrees).
To calibrate the compass
Choose compass from the menu button.
Be prepared to exceed your current 'Delta Speed' Value for at least 10 seconds, and travel in a relatively straght path.
Compass Screen:
- Num Averages: The number of compass/g_sensor readings to average together
- Landscape Angle: For HTC only, the amount of rotation to determine that landscape is triggered.
- Poll Time: How often to read the sensors.
- The portrait and Landscape buttons are not selectable, but will show the current orientation of the device.
- Values for the current calibration from GPS to COmpass heading can be enetered manually, or viewed here.
- Reset to Zero, allows a simple reset function for each orientaion.
- Calibrate button enters self calibarate mode (see below)
- Help?, condensed version of this post
Calibration
There are three 'status' messages displayed. One for speed, averages, and overall status.
Each message has a check box that will tell you if that item has been satisfied.
Press Calibrate button,
Notice that count (at the bottom) will count down the number of seconds until you get to Delta Speed.
Once at speed, the count will change to teh number of readings included in the calibration average.
Compass and GPS heading are updated as messages arrive from the driver (about once a second).
Once 10 readings are taken for the average value, the updated value will be shown.

any advantage for using this?

Hi Mach2003,
nice work! Awaiting unpatiently your test results!

Mach2003 said:
Edit: Math is done, I found a formulla that works! I am testing it now with a fixed 1 second "De-Lag" time.
Click to expand...
Click to collapse
That's good news, well done!
If the formula 'decreases' lag this way, it should be easy to adjust the components to compensate for any amount of lag.
And for those without lag, who just want a more accurate GPS driver, the formula could be optional.

Now that Mod Driver supports GPS Intermediate Driver as a port, QueStub is no longer required. In fact GPS Intermediate Driver works better as it re-connects after a sleep cycle
Garmin Moble XT (and Others):
Garmin Mobile XT, refuses to use the GpsModPort to read gps data, it insists on using the original com port. QueStub is an application that changes the reg entries for the default gps port to the GpsModDriver port, runs the Que program, and restores the values back when Que exits. It is only 5 kb when sitting in memory.
Make sure at least one of these is set/exists before running QueStub.cab!
Code:
1) The 'QuePath' REG_SZ here: [HKLM\Software\Garmin\Que] the complete path to your gps program, "\Internal Storage\Garmin\QuePPC.exe" for example.
2) "\Garmin\Que.exe",
3) "\Internal Storage\Garmin\Apps\WM\QuePPC.exe",
4) "\Internal Storage\Garmin\WM\QuePPC.exe",
5) "\Storage Card\Garmin\Apps\WM\QuePPC.exe",
6) "\Storage Card\Garmin\WM\QuePPC.exe"
7) "\My Storage\Garmin\Apps\WM\QuePPC.exe",
8) "\My Storage\Garmin\WM\QuePPC.exe"
QueStub can be used for ANY ONE application, not just Garmin Mobile XT. Use it if your application insists on opening the original COM port, even when set to use GpsModDriver's port. Just insert your application into one of the registry as above.

Sure, good thinking.

I just have to say that this is going to pretty awesome! Be sure to have a donate link if this actually works to reduce/eliminate the percieved lag in gps software

0.4 version added to first post.
I liked the result overall with 2.8 seconds LagAdvance.
I have my mapping (Garmin Mobile XT) set for actual GPS position, and not stick to roads.
When turning, you appear to make a wide turn, going off the road a bit.
You appear to jump back a few meters when slowing while on a curve.
The perfect time of advance is not consistant, some times 2000 would be better than 2800. Find a good balance that works for you. Your phone may require a much different setting. Too big, and you appear to pass an intersection before you actually get there, too little, and you pass the interection before you appear to get there. Drive at a consistant speed, and straight during the adjustments.
Note that you must close your mapping program (realy close it, not let it run in the background), or change the port from the GpsModPort, before editing the registry, or any changes will not take effect.
Please report your results here.
Next up (besides fixing anything that goes wrong): Create a UI for the registry settings.

i try to install that and edit all of the registry and its success..
but, every time i change enable the com 6 in my garmin, it always change back to COM 4.. is it normal?
look my attachment for the video..

Garmin Mobile Xt requires a trick.
Make sure your external GPS settings are correct, I'll assume COM4, and the ModDriver at the default COM6.
Close XT, and then change this key:
Code:
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\GPS Intermediate Driver\Multiplexer]
"DriverInterface"="COM6:"
Unfortanatly you need to reset the external GPS settings to COM4, and then modify the key ater each soft reset. I have this 'patch' on my list of things to automate.

Would this work on the kaiser and titan?

It *should* work on ANY device, but see the CDMA Diamond comment on post 1...

Mach2003 said:
It *should* work on ANY device, but see the CDMA Diamond comment on post 1...
Click to expand...
Click to collapse
a bit confusing. for cdma users, hard reset, then install the driver? or install the driver, then hard reset?

sadthai said:
a bit confusing. for cdma users, hard reset, then install the driver? or install the driver, then hard reset?
Click to expand...
Click to collapse
No if you install this you will have to hardreset, or this does not work for cdma

Two users reported after installing this driver on a CDMA Diamond, they had to Hard Reset their phones. The driver did not load properly and CAUSED the need to hard reset the phone. They HAD to reset to 'factory' due to the driver appearing to lock up the device entirely on first boot.

Mach2003 said:
Two users reported after installing this driver on a CDMA Diamond, they had to Hard Reset their phones. The driver did not load properly and CAUSED the need to hard reset the phone. They HAD to reset to 'factory' due to the driver appearing to lock up the device entirely on first boot.
Click to expand...
Click to collapse
Now...
GSM Diamond,
CDMA Diamond,
other GSM phones, anyone ???

I use i-Mate ULTIMATE 9502 and this fix is AWESOME!!!!

altought it was returning to COM4..
it works great.. my gps signal is 0, but no lag at all in my diamond.. nice work..

I tried installing it for tomtom. but it did not work.
can someone post a short tutorial how to install this on tomtom?

Related

GPS Troubleshooting?

Update:
I have used Pocket Earth 3.5 to help show what I believe is my GPS running appropriately.
When setting up and detecting an operational port, my GPS detects and runs on Com5 with a rate of 1200, even when manually set to use the following configuration (GPS program port set at comm 8 and hardware port set at comm 4, with baud rate of 34800).
It both show:
Waiting for GPS data...
PSRFTXT,CHNL: 1273
GPRMC,235947.035,V,,,,,,,120806,,,N48
GPRMC,235948.044,V,,,,,,,120806,,,N41
another running capture shows:
GPRMC,000152.032,V,,,,,,,130806,,,N46
GPRMC,000153.032,V,,,,,,,130806,,,N47
GPRMC,000154.042,V,,,,,,,130806,,,N47
I believe this information shows that my device is functioning appropriately (but according to the reference below it looks like I am getting incomplete word groupings / sentences), but at the same point in time I can't get any other application to show a gps fix or even signal. I have used several radio stacks and left my device in the open for more than 20 minutes without so much as a small degree of signal showing up from any of the birds. I do get listings of the birds that are in the air, but not enough to lock or provide positioning. Does anyone have anythoughts or ability to translate the running feed shown above? I can get my tilt to function without issue, but my athena running PK 3.0 isn't happy...
Lastly, Googlemaps seems to provide a blue flashing dot from time to time, but won't give me anything better than a 5km ring of accuracy. The other apps don't even do that :-(
Any help, understanding, decoding, or tools would be greatly appreciated.
v/r
Bob
+12404756858
Reference: http://www.cis.udel.edu/~mills/ntp/html/drivers/driver20.html
$GPRMC,POS_UTC,POS_STAT,LAT,LAT_REF,LON,LON_REF,SPD,HDG,DATE,MAG_VAR,MAG_REF*CC<cr><lf>
$GPGLL,LAT,LAT_REF,LONG,LONG_REF,POS_UTC,POS_STAT*CC<cr><lf>
$GPGGA,POS_UTC,LAT,LAT_REF,LONG,LONG_REF,FIX_MODE,SAT_USED,HDOP,ALT,ALT_UNIT,GEO,G_UNIT,D_AGE,D_REF*CC<cr><lf>
POS_UTC - UTC of position. Hours, minutes and seconds [fraction (opt.)]. (hhmmss[.fff])
POS_STAT - Position status. (A = Data valid, V = Data invalid)
LAT - Latitude (llll.ll)
LAT_REF - Latitude direction. (N = North, S = South)
LON - Longitude (yyyyy.yy)
LON_REF - Longitude direction (E = East, W = West)
SPD - Speed over ground. (knots) (x.x)
HDG - Heading/track made good (degrees True) (x.x)
DATE - Date (ddmmyy)
MAG_VAR - Magnetic variation (degrees) (x.x)
MAG_REF - Magnetic variation (E = East, W = West)
FIX_MODE - Position Fix Mode ( 0 = Invalid, >0 = Valid)
SAT_USED - Number Satellites used in solution
HDOP - Horizontal Dilution of Precision
ALT - Antenna Altitude
ALT_UNIT - Altitude Units (Metres/Feet)
GEO - Geoid/Elipsoid separation
G_UNIT - Geoid units (M/F)
D_AGE - Age of last DGPS Fix
D_REF - Reference ID of DGPS station
CC - Checksum (optional)
<cr><lf> - Sentence terminator.
Alternate GPS sentences (other than $GPRMC - the default) may be enabled by setting the relevent bits of 'mode' in the server configuration line
* server 127.127.20.x mode X
bit 0 - enables RMC ( value = 1)
bit 1 - enables GGA ( value = 2)
bit 2 - enables GLL ( value = 4)
multiple sentences may be selected
If you have a ring.... you aren't using your GPS, you are using the built-in GMAPS feature that rely on cell position...
There is a 3d here in ATHENA>ATHENA section on GPS optimizzation.
http://forum.xda-developers.com/showthread.php?t=375959
Also, COM 5 is the actual GPS hardware port. If you have anything talking to COM5, nothing else will be able to get to the GPS chip.
GO to start>settings>system>external GPS.
Set the software tab to something other than 5. COM4 or COM9 are usually pretty reliable
Set the hardware tab to (None) and the baud to 4800
Tick the box on the access tab.
tap ok.
Then set all your GPS programs to use the one you specified on the Software tab.
I find that Google maps on mine always uses the ring if i set it to com 5, but if i let it go through the MS driver as above, it then seems to be able to get the lock quite well.
rhedgehog said:
Also, COM 5 is the actual GPS hardware port. If you have anything talking to COM5, nothing else will be able to get to the GPS chip.
GO to start>settings>system>external GPS.
Set the software tab to something other than 5. COM4 or COM9 are usually pretty reliable
Set the hardware tab to (None) and the baud to 4800
Tick the box on the access tab.
tap ok.
Then set all your GPS programs to use the one you specified on the Software tab.
I find that Google maps on mine always uses the ring if i set it to com 5, but if i let it go through the MS driver as above, it then seems to be able to get the lock quite well.
Click to expand...
Click to collapse
You sir are a star (a sirf-star?) , using my other settings it's been struggling to get a signal today, just tried what you suggested and 6 sats locked in under 4 mins only difference is that the baud rate is 38400

[07.07.2009, v 1.3.1] Astrolabe - SMS your GPS position

Download. Simply decompress it and copy it on your Windows Mobile 6 device and run it. (Works on my Polaris.)
Details
Source code
Description
Use your PDA to acquire your GPS position and send it through an SMS.
The GPS position is update every 5 seconds (in order to conserve energy).
SMSs can be sent automatically at regular time intervals.
Do you like hiking?
What if you go out in the wilderness and have an accident? How do you direct a rescue team to your location?
You can use Astrolabe on your PDA to acquire your GPS position and send it through an SMS to your friends / parents / children / rescue team.
Privacy
SMSs are not encrypted, so anyone who tracks your phone number can tell your precise position by reading the SMSs with your GPS position.
However, it's debatable whether this is relevant because if someone tracks your phone number, they may already know the position of your phone in the communication grid.
Power saving modes explained
The following power saving modes are available: none, manual, auto.
None
In this mode there is no power saving. The application and the GPS are running even if the PDA is in standby.
GPS positions are retrieved as soon as they are available and are automatically sent through SMSs as soon as it is mandated.
Warning: In this mode, the battery is drained quickly (because keeping the GPS active requires a lot of power). Therefore, the "Auto" power saving mode is active by default.
Use this mode only when GPS position availability is critical.
Manual
In this mode the power consumption is the same as if the application (including the GPS) is not running.
However, you must keep your PDA on in order for GPS positions to be retrieved and automatically sent through SMSs.
Use this mode only when power consumption must be at minimum.
Auto
In this mode the application is running all the time, but the GPS is sleeping most of the time.
Once every 30 minutes, the GPS is awoken for maximum 5 minutes in order to get a GPS position and automatically send it through SMS. When a GPS position is available, this timer is reset.
In this mode, since the PDA sleeps most of the time, it may miss the narrowest chance it may have to get a GPS signal. In order to be sure that GPS positions are retrieved and automatically sent through SMSs, you must keep your PDA on.
Warning: Do not rely on the ability of a PDA in standby mode to automatically acquire a GPS position in (maximum) 5 minutes. Check this yourself!
Use this mode in most cases.
Tests showed that in this mode the battery (of a HTC Polaris, 1350 mAh) would be depleted in about 16 hours, if no GPS signal is available; if there is a GPS signal, the autonomy should be greatly increased (an informal test indicates more than twice the autonomy). Without power saving, the battery would be depleted in about 6 hours.
Do you like hiking?
What if you go out in the wilderness and have an accident? How do you direct a rescue team to your location?
Click to expand...
Click to collapse
what if there isent any signal?
(joking..)
Nice app btw
If there is no signal, the program waits until it acquires a new GPS position. Then, a new SMS is sent within (generally) 5 seconds.
(Of course, if the repeat time is X, the SMS is sent only if more time than X has passed since the last sent SMS.)
Note: Keeping the GPS active drains the battery quickly.
6ITdtvFQqY said:
If there is no signal, the program waits until it acquires a new GPS position. Then, a new SMS is sent within (generally) 5 seconds.
(Of course, if the repeat time is X, the SMS is sent only if more time than X has passed since the last sent SMS.)
Note: Keeping the GPS active drains the battery quickly.
Click to expand...
Click to collapse
I hace seen many programs like yours, almost all drains battery when there is no GPS signal (inside buildings). Only one programs deals it better, but that has many other issues. One way to stop draining the battery is to read 'N' (say 50) number of NMEA messages from GPS and then turn off GPS for about 'M' (5 - 15) minutes. Then try again. This will save lot of battery. May be you can try implementing it.
You can download a new version which has 2 new features.
You can see the trail of GPS locations where you were. The trail is updated once per minute.
A power save mode is available. If this mode is active, the PDA's power consumption is the same as if the application is not running; however, you must have your PDA on in order for GPS locations to be retrieved and automatically sent through SMSs.
Warning: Keeping the GPS active drains the battery quickly. Therefore, the power save mode is active by default.
Download
Details.
tahdor said:
I hace seen many programs like yours, almost all drains battery when there is no GPS signal (inside buildings). Only one programs deals it better, but that has many other issues. One way to stop draining the battery is to read 'N' (say 50) number of NMEA messages from GPS and then turn off GPS for about 'M' (5 - 15) minutes. Then try again. This will save lot of battery. May be you can try implementing it.
Click to expand...
Click to collapse
As you can see, I've implemented a manual power save mode.
In theory, an automated power save mode can be implemented, where the GPS is woke up every 30 minutes to get a location and then sent back to sleep. However, I have no idea what that would do to the device, that is, waking it up every half hour and then shutting it down.
But most importantly, if a GPS location can't be retrieved, what would the device do? The user could be sleeping in a motel for the night (or move through caves or canyons) and the walls could block the GPS signal. Should the device keep trying and thusly consume energy (for how long?), or go back to sleep and miss even the smallest chance of getting a GPS location in those 30 minutes?
An automated power save mode is in conflict with the criticality of having a GPS location any time it is available. Of course, if the device has no power this becomes irrelevant, so a power save mode is necessary. But it's important for the user to understand what's going on.
The current manual mode allows the user to understand that and allows the settings (especially the trail) to remain active all the time. For the moment I consider this to be the best solution.
Accelerometer
Hi,
Your program i very interesting, it will be great to manage the accelerometer
and send a SMS when the phone do not move or when it goes from vertical to
horizontal position.
What do you think of that?
Regards
doco76 said:
send a SMS when the phone do not move or when it goes from vertical to horizontal position.
Click to expand...
Click to collapse
In what context would someone use such a feature? I mean, what does an accelerometer provide that the GPS's altitude does not?
I guess an SMS could be sent as soon as a significant change in altitude occurs (because this could indicate a fall).
Very good idea, thank you
I know you're still developing this program,
Can you add customizable SMS feature? I might need to send an sms in my native language.
And
The program will send SMS automaticaly to Predefined Numbers feature would be great
May it be easy
I know you're still developing this program
Click to expand...
Click to collapse
The development is actually frozen. I am just implementing critical stuff, like power saving, and doing bug fixing.
Can you add customizable SMS feature? I might need to send an sms in my native language.
Click to expand...
Click to collapse
You can simply send a normal SMS. I'll add a "copy GPS position to clipboard" feature to go with that.
The program will send SMS automaticaly to Predefined Numbers feature would be great
Click to expand...
Click to collapse
SMSs are sent to a predefined agenda contact. Someone who wants to send SMSs with his GPS location should normally do so to a regular agenda contact, so he'll already have an agenda contact or can setup one anytime. What particular usage would there be for an SMS sent to a phone number instead of an agenda contact?
I'll have a new version by tomorrow (if tests are okay) with multiple power saving modes: none, manual (as is now), automatic (where the GPS is automatically woken up to get a location - 5 every 30 minutes). I'll include the "copy GPS position to clipboard" in there.
In automatic power saving mode, tests showed that the battery (of my Polaris, 1350 mAh) would be depleted in about 16 hours (if no GPS signal is available; if it is and reception is good, the autonomy should be greatly increased). Without power saving, the battery would be depleted in about 6 hours.
Although the new version is already up, I'll make a small change later today.
Version 1.3.1 is up. See the first post.
I am going for a hike up the cobbler and Ben Ime in the Arrochar Alps on friday so i will take my polaris and see how things go.
Well that hike went well and i have taken my polaris on a few other hikes.
To be honest you have almost developed a GPS application for your phone. The sms ability is great, but what i really liked was the trail plotting ability.
A standalone GPS will provide you with a line route against gradient maps. I don't expect there to be gradient maps but just a route line sampled at regular intervals would be great. It would be a good aid to plotting your route with a paper map.
Can i ask if the trail samples can be increased?
The current default power saving mode is "Auto", which means that Astrolabe can only take a GPS location once every 30 minutes. As such, the trail can't be updated more often. Moreover, if the 5 minutes window when Astrolabe attempts to get a GPS location is missed (because the GPS reception is poor), the next one is 30 minutes later, which mean that the trail accuracy is getting worse.
You can change the power saving mode is "None", in which case the trail is updated once per minute... but the battery dies out fast.
Instead of changing the power saving mode, you could manually start your PDA every time you think it's necessary to get a GPS location (and trail location). (Just look in Astrolabe to make sure that the time of the last GPS location is the current time.)
(As I said, the power saving modes will cause confusion.)
I added the trail feature after a bunch of us got lost in the woods. After some 2 hours of being off course we were debating whether to return or go further. Fortunately someone went 200 meters further and saw the road (from where we started). With this feature I could have seen that we were going in the right direction.

Make bluetooth always visible (2.1)

Hi,
Since we alwas have to go into settings to make bluetooth visible for 120(?) seconds i was wondering if it is possible to make bluetooth always visible.
I found this guide: http://blag.tsukasa.net.au/2009/08/25/always-discoverable-on-android/
But it seems like hcid.conf is not present on 2.1 roms.
Can we get this to work on 2.1 roms?
Ty!
are you speaking from the pov of the hero being needing to be discovered by another device?
that isn't the sort of thing one needs to do more than one time per device though. once you've done it, the other device should remember the hero's info. just enable bt next time on both devices and voila, it should connect. right?
and there is the power control widget to enable/disable bt (along with other alternatives on the market and the sense toggle widgets if you're on a sense rom).
If you want your bt to be set to "discoverable" constantly then your battery will disappear really fast and it's a security risk as well (hence this feature doesn't exist in any bt device I've used including android). that's why apps like "bump" enable it only when, well, bumped, and in a way that both devices can talk briefly without user configuration necessary (but still user approval and instructions are needed before any file/secure info transfers can occur).
there's a difference between these three modes:
bt off (saves most power, bt is battery hungry...),
bt on (icon in display; can connect to devices that it has previously been paired with such as your bt handsfree or your computer for file transfers just be enabling the other device's bt - this puts it in sort of a receive mode where it will ack the other device to show itself but doesn't use a TON of battery, however it's still better for battery to turn off bt when not in use)
bt on and discoverable (which is, by bt design, only going to run for a short period such as 2 minutes because it opens up your device to others seeing it and trying to add it and also is transmitting over bt constantly so uses the most signal... 2 minutes seems pretty long to me actually, I've seen shorter in other devices).
I'm sorry, but that is just rubbish.
I've had Nokia's since bluetooth was first released, and they have always been discoverable. Their battery hasn't been worn down by that either.
If bluetooth is on but not discoverable, then your device is constantly looking for those devices that it has been paired with before. If it is discoverable, then other devices can pick up on this and locate your phone - same battery usage, surely.
Take for example now, I'm sat in a public area and I can search for devices. The devices that show up are therefore discoverable, no? In that case, plenty of devices are discoverable.
To be discoverable and hidden behind a password is no issue, and it amazed me that Android missed this out. It was infact one of the things I disliked about Blackberry.
It doesn't kill battery (any more than having undiscoverable bluetooth on), and it is a useful service - if a friend (who hasn't accessed my device before) wishes to send me a file, I don't expect to have to pull out my phone, tell it that it can expect a file, before accepting the password and waiting for said file. It's just an extra, unnecessary step.
What is the point of having bluetooth on, if no other device (other than those with previous access) can see it?
"Someone is trying to send you a file" is all you need. That is what happens in 'discoverable' mode. That is what Android is missing.
yes its a shame on x10 too is smart phone weakness. x10 kick a//
The setting you're searching for is in /system/etc/bluetooth/main.conf
DiscoverableTimeout = 0
The default is 120 (2 minutes). 0 will stay on forever.
Actually I found that in /etc/bluez/main.conf with root explorer but how to edit that value to 0?
VandaL^ said:
Actually I found that in /etc/bluez/main.conf with root explorer but how to edit that value to 0?
Click to expand...
Click to collapse
mount the folder as r/w and if you long press, choose to open in text editor
Tnx dude, I forgot to long press on file, what I did was open the file and than try to edit. But I've edited the value now to 0 or 600, reboot phone and when bt is on discoverable again shows only 120 seconds?
VandaL^ said:
Tnx dude, I forgot to long press on file, what I did was open the file and than try to edit. But I've edited the value now to 0 or 600, reboot phone and when bt is on discoverable again shows only 120 seconds?
Click to expand...
Click to collapse
Could you check if the value in the file also has been reverted?
I check instantly after I saw that he shows 120 seconds and the value was 0.
hi all
will you please show a step by step how to configure the bluetooth discoverable time.
thank you

[XU][ZPerience][VeXU] GPS Settings

Hello,
Like some of the other users, I had GPS problems after installing these two ROMs: connecting to the satellites took a very long time, if at all. Below I describe my fix, gathered from searching on the web, including here on XDA, and by using trial-and-error testing. Hope it helps others.
Install GPS Test by Chartcross. This helps monitor the GPS activities. There are other similar apps out there, but I like this one for the purpose of monitoring the GPS.
Install FasterGPS, by Dominik Schürmann. This is to edit the file /system/etc/gps.conf. You could edit it manually, but I like the GUI of this app.
Check if your /system/etc/suplcert/cacert.txt is "MIIDazCC......neEj8Nq/", then under the advanced settings, make sure SUPL_HOST is "supl.sonyericsson.com", SUPL_PORT=7275. Each cacert corresponds to a particular SUPL server. The above cacert is for the Sony server. If the host doesn't correspond to the cert, then you will not benefit from a quick retrieval of GPS info via the internet. Instead your GPS will download the info from the satellites themselves at a very slow rate (50 b/s according to Wikipedia). Your GPS would still work, but it won't acquire a fix quickly. Sorry I don't know what the cert for Google is.
Set NTP server to something close to you. Some people suggest to enter several servers (more can't hurt), some people suggest not to do that (more does hurt, if the previous ones fail.) I imagine that, at the higher level, the ntp pool servers don't usually fail. Thus I choose a single server that is close to me. In addition, I stay at the "country" level instead of going down to the numerical prefix level. (I.e. I don't bother with 0.uk.pool.ntp.org.) I figure going down to the numerical prefix level would more likely expose me to server failures.
Set INTERMEDIATE_POS=1 (enabled), then set ACCURACY_THRES=0 (passing all positions). With this value GPS Test usually reports satellites "in view" very quickly [<= 1 sec]. [Note: "in view" not "fix".] When I set the threshold to something non-zero (even a large value like 5000), it takes several seconds to see them.
Set ENABLE_WIPER=1, which supposedly turns on wifi positioning. Not sure what that does, but sounds like it can help . I assume the GPS system reads info from the wifi to get a rough estimate position. GPS Test probably isn't affected by this, although something like Maps might.
Set REPORT_POSITION_USE_SUPL_...=1. Again this sounds like a useful thing. My trial-and-error testing didn't discover anything conclusive about this. If anyone know more, please let me know.
Set DEFAULT_AGPS_ENABLE=TRUE, DEFAULT_USER_PLANE=TRUE. These are probably already true by default, but I figure it doesn't hurt to be explicit.
Reboot your phone if you had to change the SUPL setting. I had to do this to see the change. Would love to hear your experience on this.
With the above settings, GPS Test usually reports about 10 satellites in view in about 1 sec; satellites signals popping up above 10 db in about 5 sec, and the GPS acquiring a fix with about 4 satellites in less than 30 sec. All this _inside_ my house, which is a timber frame house with tile roof. I get this even with airplane mode on, i.e. no network connection!
If I use GPS Test to download AGPS data first, then the fix could be even faster, at less than 15 sec. And once the GPS has acquired a fix then, within a short time span, it will do so again very quickly (< 5 sec). Thus I have no problem as I switch from app to app and the GPS sensor turns on and off.
If my AGPS data is several days old, I still can get a fix in about 1 min.
Still, sometimes no matter what I do, the GPS would take more than 1 min to acquire a fix. Not sure why this happens, but it usually occurs after I haven't used the GPS in a while. In those cases I might have to wait up to 5 min for a fix.
Notes:
I assume you have root (since you managed to install ROMs )
According to the official ntp pool website,
As pool.ntp.org will assign you timeservers from all over the world, time quality will not be ideal. You get a bit better result if you use the continental zones (For example europe, north-america, oceania or asia.pool.ntp.org), and even better time if you use the country zone (like ch.pool.ntp.org in Switzerland)
Click to expand...
Click to collapse
More about my choice of accuracy threshold: if a threshold is active, it seems like the GPS would wait for the signal of a satellite to be of a certain strength before reporting it as in view. I figure it is better to just grab all the satellites possible, even if there is no signal yet.
The app GPS Status & Toolbox, by MobiWIA - EclipSim is also a very useful monitoring tool. I like the feature that reports how "stale" the AGPS data is. Wish GPS Test had this as well.
Toggling on the GPS from the settings menu simply allows apps to turn on the GPS. This doesn't use any battery. Only when an app starts using the sensor does it take energy. I recommend having this on. Having said that, do make sure you don't have any rogue app keeping your GPS engaged.
Install NTPSync, by Dominik Schürmann again. This helps set your clock. Not sure if this is necessary, but it gives me a good feeling that my clock is accurate
gps
its still not working
zivalarasa said:
its still not working
Click to expand...
Click to collapse
After running GPS Test out in the open for, say, 1 min, does it report any "in view" satellite at all? Any satellite have signal > 10db?
GPS Test
HHest said:
After running GPS Test out in the open for, say, 1 min, does it report any "in view" satellite at all? Any satellite have signal > 10db?
Click to expand...
Click to collapse
GPS test runs and doesnt find any sattellite. It ran for around 10 minz
zivalarasa said:
GPS test runs and doesnt find any sattellite. It ran for around 10 minz
Click to expand...
Click to collapse
I assume you had GPS working at some point prior to installing the ROM? If you've done all the steps (particularly steps 3, 5, and very importantly 9), then I'm afraid I'm out of suggestions.
spelling?
On the off chance... perhaps you have a spelling error?
I find it quite easy to spell "sonyericsson" wrong, especially the ericsson part. Now I have a way to memorize it: "Eric" (that's easy), "Eric's" (as in something belonging to Eric), ericsson = "Eric's son"

[Q] Default accept “Improve Location Accuracy” popup with GooglePlayServices update

I have an application which is installed in the phones cab drivers use to track the location and distance traveled by the cab. (The phone is rooted and we have all privileges on the phone). In the first implementation of our application we used LocationManager.requestLocationUpdates to get location updates from GPS and Network providers. Since we need to capture every kilometer traveled by the cab we enabled "High Accuracy" mode in location settings.
For two reasons we are willing to move to Fused-location-provider
For some reason (a known bug in android: https://code.google.com/p/android/issues/detail?id=57707) NETWORK_PROVIDER is not providing location updates.
For some reason the devices are suddenly loses GPS fix and are not gaining again until the device reboots.
We observed that FusedLocationProvider is giving better results and are planning to change our application to use FusedLocationProvider. Now the problem is - our devices have an older version of GooglePlayServices which does not have LocationServices. Two options we have are
Use older version of FusedLocationProvider using LocationRequest and LocationClient. Though it is giving good results outdoors(which is our primary requirement), we are not getting location updates(not-at-all) indoors even with wifi enable and with good network signal (This also seems to be a known issue (Location updates not working indoors as claimed by Fusion Location Provider APIs). So, i suspect there could be some bugs in older version of GooglePlayServices and/or FusedLocationProvider which would have been fixed in later versions.
Update GooglePlayServices on all phones (by installing apk over the air) and use LocationServices to get location updates with high accuracy as priority. This implementation is giving location updates even indoors which is what we expect -- Here the problem is when I update GooglePlayServices with an apk when I request location updates in my application it is opening 2 popups one asking for confirmation to improve location accuracy and the other is to turn on ability for google apps to use my location. It is working fine even if I don't accept second popup but if I don't accept the first popup it is changing the location setting to "Device Only" mode (which means only GPS provider is used).
Improve Location Accuracy https://40.media.tumblr.com/53af918884f8ab444ec6352e3e710007/tumblr_npfjbwwnKV1uxztu6o1_540.jpg
Permission to enable google apps to use location
https://40.media.tumblr.com/0eb9a64f55032fe2250a18dd6e0755cc/tumblr_npfjbwwnKV1uxztu6o2_540.jpg
We can not expect all our drivers to accept the popup when it is shown. I would like to know if there is any way I can do "default accept" kind of thing for the first popup so that my devices remain in "High Accuracy" mode.
I found a solution to disable location consent which comes when high accuracy mode is enabled manually in Location Settings as suggested in http://forum.xda-developers.com/galaxy-s2/themes-apps/mod-disable-google-location-consent-t2791431 That solution was working with our old application but with updated GooglePlayServices it is not working. I saw some google-play-services-MOD-apks out there on net so I thought it would be possible to modify the apk, sign it and install it., but when I try to modify the Google play services apk and signit with one click signer and install it is failing with inconsistent certificates error.
Any way of achieving this - like executing a command in device shell , issuing an intent or modifying the GooglePlayServices apk itself is fine with me.
Device Type : MotoE - XT1022
Android Version : 4.4.4
Build Number : KXC21.5-40

Categories

Resources