Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Code Samples & Tips > Official Updates
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Official Updates Updates to official libraries could be found here.
This forum is only available to licensed users.

New GPSDriver library

Reply
 
LinkBack Thread Tools Display Modes
  #71 (permalink)  
Old 11-24-2008, 09:30 PM
Junior Member
 
Join Date: Mar 2008
Posts: 33
Default

Quote:
Originally Posted by bish0p View Post
That Seems to have fixed it back to what it was is the GPS.dll converter.
It would appear I spoke to soon, it works as the old GPS.dll on the desktop, but is still wrong on the device.
Reply With Quote
  #72 (permalink)  
Old 11-25-2008, 08:50 AM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

It seems to be the same on the device as the desktop for me and it's hard to see how it could be different, are you sure you copied the correct GPS.dll to the device? Nevertheless it is still wrong at -6 degree longitude intervals i.e -6, -12, -18 ... Looks like the implementation of Fix needs a tweak! This is how VB .NET does it.
Code:
public static double Fix(double Number)
{
    
if (Number >= 0.0)
    {
        
return Math.Floor(Number);
    }
    
return -Math.Floor(-Number);
}
Reply With Quote
  #73 (permalink)  
Old 11-25-2008, 04:34 PM
Junior Member
 
Join Date: Mar 2008
Posts: 33
Default

Quote:
Originally Posted by agraham View Post
It seems to be the same on the device as the desktop for me and it's hard to see how it could be different, are you sure you copied the correct GPS.dll to the device? Nevertheless it is still wrong at -6 degree longitude intervals i.e -6, -12, -18 ... Looks like the implementation of Fix needs a tweak! This is how VB .NET does it.
I have replaced the GPS.DLL converter object with the GPSDriver.DLL converter object

Then I feed the WGS84LatLonToUTM function 51.115180, -114.095520 on the desktop I get 11 U 703283 5666646
on the device I get 10 U 1122746 5700438

Both gave the smae results using the converter object in the GPS.DLL
Reply With Quote
  #74 (permalink)  
Old 11-25-2008, 04:47 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 6,072
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I should of course had said "are you sure you copied the correct GPSDriver.dll to the device?" in my previous post

I've just tried your data and I get the same correct result on both desktop and device for the old GPS.dll and the new (but still faulty) GPSDriver.dll. Are you really really sure you don't have the old GPSDriver.dll on the device as that incorrect result is what the original GPSConverter produces.
Reply With Quote
  #75 (permalink)  
Old 11-25-2008, 07:24 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

@agraham, You are right of course. My solution didn't work correctly with whole numbers.
I've updated the file in the first post.
Reply With Quote
  #76 (permalink)  
Old 11-25-2008, 07:31 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

@bish0p, please download the updated file in the first post.
I guess that you've previously tested on the device a compiled application which used the source code of the older library.
Now after you'll update the source code (cs file) as well, the problem should be solved.
Reply With Quote
  #77 (permalink)  
Old 11-25-2008, 09:34 PM
Junior Member
 
Join Date: Mar 2008
Posts: 33
Default

Quote:
Originally Posted by Erel View Post
@bish0p, please download the updated file in the first post.
I guess that you've previously tested on the device a compiled application which used the source code of the older library.
Now after you'll update the source code (cs file) as well, the problem should be solved.
Your right the .cs file had not been updated.
Reply With Quote
  #78 (permalink)  
Old 11-26-2008, 07:25 PM
Junior Member
 
Join Date: Jul 2008
Posts: 46
Default

Hello,

I'm testing your demo app and it appears an error like 'Error getting device state'
Error number 87.

Do you have any ideas?

Regards.
Reply With Quote
  #79 (permalink)  
Old 11-27-2008, 04:36 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 15,726
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Are you working with an internal GPS?
Try to comment this line and see if GetGPSDate works.
Reply With Quote
  #80 (permalink)  
Old 11-27-2008, 04:48 PM
Junior Member
 
Join Date: Jul 2008
Posts: 46
Default

Hi Erel,

Yes it's internal an HTC 3300.

And I can't see the GetGPSDate as a property.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Door library (Beta) - Special library Erel Official Updates 60 01-13-2011 11:23 AM
Merging Outlook library and Phone library Erel Official Updates 11 09-15-2010 09:22 AM
PhoneticAlgorithms Library (ex-StringComparison Library) moster67 Additional Libraries 10 11-11-2008 07:46 PM


All times are GMT. The time now is 12:39 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0