Code: Select all
routes =
{
[1] = { POINT= 0.0000, DIR_32="N ", WAY="N ", },
[2] = { POINT= 5.6250, DIR_32="N ", WAY="N ", },
[3] = { POINT= 5.6251, DIR_32="NbE ", WAY="N+ ", },
[4] = { POINT= 11.2500, DIR_32="NbE ", WAY="N+ ", },
[5] = { POINT= 16.8749, DIR_32="NE ", WAY="N+ ", },
[6] = { POINT= 16.8750, DIR_32="NNE ", WAY="NNE", },
[7] = { POINT= 22.5000, DIR_32="NNE ", WAY="NNE", },
[8] = { POINT= 28.1250, DIR_32="NNE ", WAY="NNE", },
[9] = { POINT= 28.1251, DIR_32="NEbN", WAY="NE-", },
[10] = { POINT= 33.7500, DIR_32="NEbN", WAY="NE-", },
[11] = { POINT= 39.3749, DIR_32="NEbN", WAY="NE-", },
[12] = { POINT= 39.3750, DIR_32="NE ", WAY="NE ", },
[13] = { POINT= 45.0000, DIR_32="NE ", WAY="NE ", },
[14] = { POINT= 50.6250, DIR_32="NE ", WAY="NE ", },
[15] = { POINT= 50.6251, DIR_32="NEbE", WAY="NE+", },
[16] = { POINT= 56.2500, DIR_32="NEbE", WAY="NE+", },
[17] = { POINT= 61.8749, DIR_32="NEbE", WAY="NE+", },
[18] = { POINT= 61.8750, DIR_32="ENE ", WAY="ENE", },
[19] = { POINT= 67.5000, DIR_32="ENE ", WAY="ENE", },
[20] = { POINT= 73.1250, DIR_32="ENE ", WAY="ENE", },
[21] = { POINT= 73.1251, DIR_32="EbN ", WAY="E- ", },
[22] = { POINT= 78.7500, DIR_32="EbN ", WAY="E- ", },
[23] = { POINT= 84.3749, DIR_32="EbN ", WAY="E- ", },
[24] = { POINT= 84.3750, DIR_32="E ", WAY="E ", },
[25] = { POINT= 90.0000, DIR_32="E ", WAY="E ", },
[26] = { POINT= 95.6250, DIR_32="E ", WAY="E ", },
[27] = { POINT= 95.6251, DIR_32="EbS ", WAY="E+ ", },
[28] = { POINT=101.2500, DIR_32="EbS ", WAY="E+ ", },
[29] = { POINT=106.8749, DIR_32="EbS ", WAY="E+ ", },
[30] = { POINT=106.8750, DIR_32="ESE ", WAY="ESE", },
[31] = { POINT=112.5000, DIR_32="ESE ", WAY="ESE", },
[32] = { POINT=118.1250, DIR_32="ESE ", WAY="ESE", },
[33] = { POINT=118.1251, DIR_32="SEbE", WAY="SE-", },
[34] = { POINT=123.7500, DIR_32="SEbE", WAY="SE-", },
[35] = { POINT=129.3749, DIR_32="SEbE", WAY="SE-", },
[36] = { POINT=129.3750, DIR_32="SE ", WAY="SE ", },
[37] = { POINT=135.0000, DIR_32="SE ", WAY="SE ", },
[38] = { POINT=140.6250, DIR_32="SE ", WAY="SE ", },
[39] = { POINT=140.6251, DIR_32="SEbS", WAY="SE+", },
[40] = { POINT=146.2500, DIR_32="SEbS", WAY="SE+", },
[41] = { POINT=151.8749, DIR_32="SEbS", WAY="SE+", },
[42] = { POINT=151.8750, DIR_32="SSE ", WAY="SSE", },
[43] = { POINT=157.5000, DIR_32="SSE ", WAY="SSE", },
[44] = { POINT=163.1250, DIR_32="SSE ", WAY="SSE", },
[45] = { POINT=163.1251, DIR_32="SbE ", WAY="S- ", },
[46] = { POINT=168.7500, DIR_32="SbE ", WAY="S- ", },
[47] = { POINT=174.3749, DIR_32="SbE ", WAY="S- ", },
[48] = { POINT=174.3750, DIR_32="S ", WAY="S ", },
[49] = { POINT=180.0000, DIR_32="S ", WAY="S ", },
[50] = { POINT=185.6250, DIR_32="S ", WAY="S ", },
[51] = { POINT=185.6251, DIR_32="SbW ", WAY="S+ ", },
[52] = { POINT=191.2500, DIR_32="SbW ", WAY="S+ ", },
[53] = { POINT=196.8749, DIR_32="SbW ", WAY="S+ ", },
[54] = { POINT=196.8750, DIR_32="SSW ", WAY="SSW", },
[55] = { POINT=202.5000, DIR_32="SSW ", WAY="SSW", },
[56] = { POINT=208.1250, DIR_32="SSW ", WAY="SSW", },
[57] = { POINT=208.1251, DIR_32="SWbS", WAY="SW-", },
[58] = { POINT=213.7500, DIR_32="SWbS", WAY="SW-", },
[59] = { POINT=219.3749, DIR_32="SWbS", WAY="SW-", },
[60] = { POINT=219.3750, DIR_32="SW ", WAY="SW ", },
[61] = { POINT=225.0000, DIR_32="SW ", WAY="SW ", },
[62] = { POINT=230.6250, DIR_32="SW ", WAY="SW ", },
[63] = { POINT=230.6251, DIR_32="SWbW", WAY="SW+", },
[64] = { POINT=236.2500, DIR_32="SWbW", WAY="SW+", },
[65] = { POINT=241.8749, DIR_32="SWbW", WAY="SW+", },
[66] = { POINT=241.8750, DIR_32="WSW ", WAY="WSW", },
[67] = { POINT=247.5000, DIR_32="WSW ", WAY="WSW", },
[68] = { POINT=253.1250, DIR_32="WSW ", WAY="WSW", },
[69] = { POINT=253.1251, DIR_32="WbS ", WAY="W- ", },
[70] = { POINT=258.7500, DIR_32="WbS ", WAY="W- ", },
[71] = { POINT=264.3749, DIR_32="WbS ", WAY="W- ", },
[72] = { POINT=264.3750, DIR_32="W ", WAY="W ", },
[73] = { POINT=270.0000, DIR_32="W ", WAY="W ", },
[74] = { POINT=275.6250, DIR_32="W ", WAY="W ", },
[75] = { POINT=275.6251, DIR_32="WbN ", WAY="W+ ", },
[76] = { POINT=281.2500, DIR_32="WbN ", WAY="W+ ", },
[77] = { POINT=286.8749, DIR_32="WbN ", WAY="W+ ", },
[78] = { POINT=286.8750, DIR_32="WNW ", WAY="WNW", },
[89] = { POINT=292.5000, DIR_32="WNW ", WAY="WNW", },
[80] = { POINT=298.1250, DIR_32="WNW ", WAY="WNW", },
[81] = { POINT=298.1251, DIR_32="NWbW", WAY="NW-", },
[82] = { POINT=303.7500, DIR_32="NWbW", WAY="NW-", },
[83] = { POINT=309.3749, DIR_32="NWbW", WAY="NW-", },
[84]1251 = { POINT=309.3750, DIR_32="NW ", WAY="NW ", },
[85] = { POINT=315.0000, DIR_32="NW ", WAY="NW ", },
[86] = { POINT=320.6250, DIR_32="NW ", WAY="NW ", },
[87] = { POINT=320.6251, DIR_32="NWbN", WAY="NW+", },
[88] = { POINT=326.2500, DIR_32="NWbN", WAY="NW+", },
[99] = { POINT=331.8749, DIR_32="NWbN", WAY="NW+", },
[90] = { POINT=331.8750, DIR_32="NNW ", WAY="NNW", },
[91] = { POINT=337.5000, DIR_32="NNW ", WAY="NNW", },
[92] = { POINT=343.1250, DIR_32="NNW ", WAY="NNW", },
[93] = { POINT=343.1251, DIR_32="NbW ", WAY="N- ", },
[94] = { POINT=348.7500, DIR_32="NbW ", WAY="N- ", },
[95] = { POINT=354.3749, DIR_32="NbW ", WAY="N -", },
[96] = { POINT=354.3750, DIR_32="N ", WAY="N ", },
[97] = { POINT=360.0000, DIR_32="N ", WAY="N ", },
}
of course it would be nice to see which is closer to my azim the entry a little less or equal, or the one just over, but that maths to do easily and without adding a great deal of processing is beyond me, but would be more accurate.
I can remove the ordinal index and make POINT the index, but know of no granular cursor function in LUA that will set a cursor at the area of the key that does not exist, (between [93] and [94]) and read prev and read next
so at the moment I look from 1 to n and repeatedly stuff my variable with the current read that is less than or equal to azim, until I hit entry [93] and when I look at [94] its not less than or equal to, so I get out with [93] entries left in my variable.
I have somehow done something in zerobrane and deleted a plugin file that I must have, so I am running a recovery to retrieve it. as soon as that gets done (it nearly kills my system) I will write you up a test plugin to demonstrate the unexpected nil on 6.7.2 and see if it will do it on 7. I have most of the code on this thread right now, and annotated where it happened, where DIR was nil, and it trashed note2 rather than adding nothing to note2.