CentralTransPoint wrote:Raiden38 wrote:Hi! Thanks so much for this! Only problem is that I need to convert it to PHP for use on a webpage.
I'm trying to use the follow exemple:
so if I get it right: (Which I am probably sure I don't)
i1 = 4487851
i2 = -2861056
s1 = 100000000000000004487851
s2 = -11000000000000002861056.
field09 = Makes no sense with all those 0 from PadLeft
field10= Makes no sense with all those 0 from PadLeft
field11 = Makes no sense with all those 0 from PadLeft
The actual result imported from Nissan GPS give:
field09 = -1573672526
field10 = 30
field11 = 699
These number are not even the calculation, my understand is that, except for the i1 and i2 calculation, the number does not changes, it's only data conversion, to fix the format (adding zeros)..
I have got some another results with my formulas and your source data.
But in any case, as I see, my formulas work wrong with coordinates which are less than zero.
As I said before I tested my program with points located in Europe. So my formulas do not take into account negative coordinates.
If it is not so hard for you, please input some test coordinates within your Nissan navigation system, export points to USB-card and send me exported file. I will try to make my formulas workable with negative coordinates.
Unfortunatelly my Nissan navigation system does not allow me input any coordinates on the Western hemisphere because, the navigation system does not contain any maps for that coordinates. There are only European maps within.
I looked through your formula and it's very snowball in that it relies heavily on strings. I think though going over your numbers of where you insert zeroes and ignored bits they are more or less the same. The main difference is mine works in Europe and North America. I had Nikki test it when she was still in Britain. I also worked with her to define two regions for the python script (Python, BTW, may be easier to translate to PHP as Perl and Python are similar though as a Python programmer I know they helava-not! Anyway, this is the region covered by my script: https://fusiontables.google.com/embedvi ... =3&hml=KML
As you can see, a European LEAF can go anywhere from Afghanistan to Iceland, though not all of Iceland or Afghanistan. I wanted to work with someone in Iceland in fact to see what regions their LEAF covered. I would also love to work with someone in Australia and Japan to get those regions covered. The Python Script is agnostic with respect to region, it's only in field 7 of the first record (The Address Book header). Beyond that, there is no regional encoding except for that field where North America is 32 and Europe is 48. I would love to learn the other regions and have someone with a LEAF in Australia, Japan, or another region not covered by the map above to create a new address book with bookmarks for the far north-east, far north-west, far south-east, and far south-west regions of their Navigation map and send me the file from the car so I could verify it works in other regions and lock down what field 7 should be in those regions.
https://svn.timehorse.com/public-repos/ ... dresses.py
(Sorry, it's still Python 2.7; someone modified it for Python 3.x on Git Hub so feel free to use that; git hub should inform me of changes in case I need to backport.)