Compare commits
6 Commits
master
...
improvemen
Author | SHA1 | Date | |
---|---|---|---|
5cb0a6c478 | |||
|
bad67e5fc8 | ||
|
86ddf74d86 | ||
|
10901d73fd | ||
1388da070f | |||
4c75409729 |
@ -1,87 +0,0 @@
|
||||
time,lat,lon,elevation,accuracy,bearing,speed,satellites,provider,hdop,vdop,pdop,geoidheight,ageofdgpsdata,dgpsid,activity,battery,annotation,timestamp_ms,time_offset,distance,starttimestamp_ms,profile_name,battery_charging
|
||||
2022-07-01T10:49:07.000Z,49.41185089,8.67646861,164.793212890625,3.216,179.8,5.44,0,gps,,,,,,,,55,,1656672547000,2022-07-01T12:49:07.000+02:00,0.0,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:12.660Z,49.41166303,8.67652893,160.7393798828125,6.432,171.7,4.8,0,gps,0.5,0.6,0.8,47.9,,,,55,,1656672552660,2022-07-01T12:49:12.660+02:00,21.340034055963667,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:20.000Z,49.41123636,8.67652849,161.337158203125,6.432,185.3,6.26,0,gps,1.1,0.9,1.4,47.9,,,,55,,1656672560000,2022-07-01T12:49:20.000+02:00,68.78358408663348,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:25.693Z,49.41084041,8.67651128,155.31097412109375,7.504,176.2,6.22,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672565693,2022-07-01T12:49:25.693+02:00,112.82881700560978,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:31.870Z,49.41049801,8.67656948,157.7611083984375,7.504,170.2,6.08,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672571870,2022-07-01T12:49:31.870+02:00,151.1340823915778,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:38.053Z,49.4102198,8.67658131,160.52813720703125,9.648001,175.0,5.88,0,gps,0.9,0.7,1.1,47.9,,,,55,,1656672578053,2022-07-01T12:49:38.053+02:00,182.0814600537094,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:44.222Z,49.40982577,8.67668618,170.07586669921875,6.432,174.2,6.77,0,gps,0.8,0.8,1.1,47.9,,,,55,,1656672584222,2022-07-01T12:49:44.222+02:00,226.54766344661743,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:50.379Z,49.4095211,8.6767495,176.42266845703125,9.648001,169.8,5.73,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672590379,2022-07-01T12:49:50.379+02:00,260.73375813453976,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:49:59.000Z,49.40881224,8.67658343,172.87310791015625,9.648001,160.9,7.77,10,gps,0.7,0.7,1.1,47.9,,,,55,,1656672599000,2022-07-01T12:49:59.000+02:00,340.4658819704016,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:06.000Z,49.4083738,8.67664092,168.78399658203125,8.576,172.2,4.67,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672606000,2022-07-01T12:50:06.000+02:00,389.39529840187066,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:13.000Z,49.4080936,8.676667,165.38623046875,6.432,191.0,1.81,0,gps,0.9,0.9,1.3,47.9,,,,55,,1656672613000,2022-07-01T12:50:13.000+02:00,420.6092015019477,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:20.000Z,49.40797358,8.67662421,153.93585205078125,7.504,181.3,1.8,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672620000,2022-07-01T12:50:20.000+02:00,434.3092023133824,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:27.000Z,49.40791573,8.67663151,171.08355712890625,9.648001,176.4,0.81,0,gps,0.8,0.8,1.1,47.9,,,,55,,1656672627000,2022-07-01T12:50:27.000+02:00,440.76347530339683,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:32.673Z,49.40795257,8.6766228,169.77978515625,9.648001,81.9,0.44,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672632673,2022-07-01T12:50:32.673+02:00,444.90808508192276,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:41.000Z,49.40798433,8.67665855,165.6785888671875,8.576,,0.0,12,gps,0.7,0.8,1.0,47.9,,,,55,,1656672641000,2022-07-01T12:50:41.000+02:00,449.2855378160787,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:46.645Z,49.4079701,8.67669428,167.1348876953125,9.648001,187.2,0.74,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672646645,2022-07-01T12:50:46.645+02:00,452.3164519271575,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:50:52.804Z,49.40799444,8.67669857,167.793701171875,9.648001,139.3,0.29,0,gps,1.0,0.8,1.3,47.9,,,,55,,1656672652804,2022-07-01T12:50:52.804+02:00,455.0406761917534,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:01.000Z,49.40789121,8.6766631,171.06378173828125,7.504,169.7,4.19,8,gps,0.9,0.8,1.2,47.9,,,,55,,1656672661000,2022-07-01T12:51:01.000+02:00,466.80270484734785,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:08.000Z,49.40755973,8.67658864,162.71923828125,8.576,191.2,4.02,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672668000,2022-07-01T12:51:08.000+02:00,504.0532207597726,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:17.000Z,49.40689473,8.67677555,161.97900390625,9.648001,174.2,10.19,10,gps,0.9,0.8,1.3,47.9,,,,55,,1656672677000,2022-07-01T12:51:17.000+02:00,579.2242819251658,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:25.000Z,49.40620921,8.67697955,157.0787353515625,8.576,166.9,8.33,8,gps,0.9,0.9,1.2,47.9,,,,55,,1656672685000,2022-07-01T12:51:25.000+02:00,656.8665037961891,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:33.000Z,49.40555543,8.67708163,168.9840087890625,9.648001,177.9,9.86,8,gps,1.1,0.9,1.4,47.9,,,,55,,1656672693000,2022-07-01T12:51:33.000+02:00,729.9377583515463,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:42.000Z,49.40499466,8.67692979,165.2921142578125,7.504,189.7,7.18,10,gps,1.0,0.8,1.3,47.9,,,,55,,1656672702000,2022-07-01T12:51:42.000+02:00,793.252994607475,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:47.669Z,49.40458895,8.67694948,168.7447509765625,9.648001,170.6,7.08,0,gps,0.8,0.8,1.1,47.9,,,,55,,1656672707669,2022-07-01T12:51:47.669+02:00,838.3883787584027,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:51:53.840Z,49.40416906,8.67702318,167.63067626953125,6.432,154.8,7.86,0,gps,1.2,0.8,1.4,47.9,,,,55,,1656672713840,2022-07-01T12:51:53.840+02:00,885.3815650590215,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:00.005Z,49.40382355,8.67724113,162.96783447265625,7.504,157.9,5.74,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672720005,2022-07-01T12:52:00.005+02:00,926.9112558061014,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:06.176Z,49.40350553,8.67751751,158.42529296875,8.576,145.4,7.33,0,gps,1.1,0.8,1.4,47.9,,,,55,,1656672726176,2022-07-01T12:52:06.176+02:00,967.536511168597,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:12.341Z,49.40314888,8.67785638,157.397216796875,5.36,152.5,7.16,0,gps,1.3,0.8,1.5,47.9,,,,55,,1656672732341,2022-07-01T12:52:12.341+02:00,1014.1622250937615,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:18.508Z,49.40273859,8.67812989,153.8641357421875,5.36,144.7,8.15,0,gps,0.9,0.9,1.3,47.9,,,,55,,1656672738508,2022-07-01T12:52:18.508+02:00,1063.8920579756032,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:24.674Z,49.40232416,8.67848992,161.98388671875,9.648001,145.2,8.26,0,gps,0.9,0.9,1.3,47.9,,,,55,,1656672744674,2022-07-01T12:52:24.674+02:00,1116.8285784251282,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:30.833Z,49.40220921,8.67911913,158.790283203125,9.648001,122.2,7.02,0,gps,2.4,0.9,2.5,47.9,,,,55,,1656672750833,2022-07-01T12:52:30.833+02:00,1164.1180290625236,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:36.988Z,49.40197856,8.67962545,161.365234375,7.504,126.8,7.18,0,gps,2.3,1.0,2.5,47.9,,,,55,,1656672756988,2022-07-01T12:52:36.988+02:00,1208.8400169031324,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:45.000Z,49.40163851,8.68023891,157.44244384765625,5.36,132.3,7.12,5,gps,1.5,0.9,1.8,47.9,,,,55,,1656672765000,2022-07-01T12:52:45.000+02:00,1267.151343251371,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:52:50.662Z,49.40129879,8.68054592,154.092529296875,9.648001,153.1,6.37,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672770662,2022-07-01T12:52:50.662+02:00,1310.9747028011654,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:07.000Z,49.40050412,8.68132096,153.906494140625,9.648001,158.6,4.78,10,gps,0.9,0.8,1.2,47.9,,,,55,,1656672787000,2022-07-01T12:53:07.000+02:00,1415.6330706674762,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:12.700Z,49.40034406,8.68167395,155.7847900390625,9.648001,127.2,4.9,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672792700,2022-07-01T12:53:12.700+02:00,1446.765286397072,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:20.000Z,49.40029889,8.68197948,141.802734375,8.576,129.9,4.18,0,gps,0.9,0.8,1.3,47.9,,,,55,,1656672800000,2022-07-01T12:53:20.000+02:00,1469.4374919545232,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:27.000Z,49.4000934,8.68233753,141.012939453125,7.504,129.6,4.44,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672807000,2022-07-01T12:53:27.000+02:00,1503.9830250057967,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:34.000Z,49.39977873,8.68282787,140.42315673828125,7.504,133.2,6.22,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672814000,2022-07-01T12:53:34.000+02:00,1553.8155602967113,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:39.676Z,49.39954051,8.68310713,139.63031005859375,8.576,126.6,6.31,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672819676,2022-07-01T12:53:39.676+02:00,1587.1326688887266,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:45.836Z,49.39926802,8.68338566,136.76104736328125,9.648001,127.7,6.2,0,gps,1.0,0.9,1.3,47.9,,,,55,,1656672825836,2022-07-01T12:53:45.836+02:00,1623.5236336178036,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:53:52.006Z,49.39909119,8.68379701,135.154541015625,8.576,117.7,5.37,0,gps,1.0,0.9,1.3,47.9,,,,55,,1656672832006,2022-07-01T12:53:52.006+02:00,1659.1983866658754,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:00.000Z,49.39877088,8.68459149,151.72412109375,7.504,111.4,6.57,15,gps,0.6,0.7,0.9,47.9,,,,55,,1656672840000,2022-07-01T12:54:00.000+02:00,1726.8289616121415,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:05.692Z,49.39865451,8.68498273,156.107177734375,8.576,139.1,2.47,0,gps,0.6,0.7,0.9,47.9,,,,55,,1656672845692,2022-07-01T12:54:05.692+02:00,1757.9577961166412,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:13.000Z,49.39838235,8.68510378,148.8057861328125,9.648001,162.8,5.07,0,gps,0.8,0.7,1.1,47.9,,,,55,,1656672853000,2022-07-01T12:54:13.000+02:00,1789.4628987561766,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:20.000Z,49.39808397,8.6851097,149.4029541015625,9.648001,190.4,5.89,0,gps,0.9,0.8,1.2,47.9,,,,55,,1656672860000,2022-07-01T12:54:20.000+02:00,1822.6440066516918,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:25.684Z,49.39778037,8.68529797,157.1925048828125,8.576,112.7,5.38,0,gps,1.5,0.8,1.7,47.9,,,,55,,1656672865684,2022-07-01T12:54:25.684+02:00,1859.0483636112897,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:33.000Z,49.39735536,8.6855275,166.543212890625,7.504,201.4,5.57,0,gps,1.0,0.8,1.3,47.9,,,,55,,1656672873000,2022-07-01T12:54:33.000+02:00,1909.1413715201775,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:40.000Z,49.39701056,8.68558536,165.46282958984375,6.432,172.3,4.78,0,gps,1.0,0.9,1.3,47.9,,,,55,,1656672880000,2022-07-01T12:54:40.000+02:00,1947.7093460178817,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:49.000Z,49.39683103,8.6859003,159.673095703125,8.576,78.5,5.95,13,gps,0.6,0.7,0.9,47.9,,,,55,,1656672889000,2022-07-01T12:54:49.000+02:00,1978.0072135007383,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:54:56.000Z,49.39672644,8.68651683,164.03118896484375,9.648001,117.9,6.34,0,gps,0.6,0.7,0.9,47.9,,,,55,,1656672896000,2022-07-01T12:54:56.000+02:00,2024.1147958844733,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:03.000Z,49.3964463,8.68696265,163.10009765625,9.648001,148.6,4.8,0,gps,0.7,0.7,1.0,47.9,,,,55,,1656672903000,2022-07-01T12:55:03.000+02:00,2068.9615821397474,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:12.000Z,49.39620133,8.68741868,162.3466796875,9.648001,144.3,3.96,13,gps,0.6,0.7,1.0,47.9,,,,54,,1656672912000,2022-07-01T12:55:12.000+02:00,2111.753204600708,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:19.000Z,49.39597341,8.6874125,165.5712890625,9.648001,195.5,5.6,0,gps,0.6,0.7,1.0,47.9,,,,54,,1656672919000,2022-07-01T12:55:19.000+02:00,2137.1006981760993,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:29.000Z,49.39537879,8.68760769,165.21795654296875,9.648001,172.8,7.66,10,gps,0.7,0.8,1.1,47.9,,,,54,,1656672929000,2022-07-01T12:55:29.000+02:00,2204.7115149032834,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:37.000Z,49.3949609,8.68750202,172.23260498046875,8.576,172.5,7.25,6,gps,1.1,0.8,1.4,47.9,,,,54,,1656672937000,2022-07-01T12:55:37.000+02:00,2251.803836528299,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:48.000Z,49.39423945,8.6877149,177.05401611328125,8.576,175.4,6.57,10,gps,0.8,0.8,1.1,47.9,,,,54,,1656672948000,2022-07-01T12:55:48.000+02:00,2333.491384425079,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:55:55.000Z,49.39378364,8.68773376,176.10064697265625,9.648001,176.5,6.08,0,gps,0.8,0.8,1.1,47.9,,,,54,,1656672955000,2022-07-01T12:55:55.000+02:00,2384.193519574299,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:03.000Z,49.39340213,8.68778782,176.1510009765625,7.504,178.4,5.4,10,gps,0.7,0.7,1.0,47.9,,,,54,,1656672963000,2022-07-01T12:56:03.000+02:00,2426.7955300468543,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:10.000Z,49.39303098,8.68791288,175.6314697265625,9.648001,166.6,6.07,0,gps,0.7,0.7,1.0,47.9,,,,54,,1656672970000,2022-07-01T12:56:10.000+02:00,2469.046354671533,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:15.653Z,49.39268479,8.68795369,177.4873046875,8.576,173.1,6.6,0,gps,1.0,0.9,1.3,47.9,,,,54,,1656672975653,2022-07-01T12:56:15.653+02:00,2507.6540680712505,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:21.852Z,49.39248838,8.68813889,164.92047119140625,6.432,166.0,5.87,0,gps,1.0,0.8,1.3,47.9,,,,54,,1656672981852,2022-07-01T12:56:21.852+02:00,2533.2789287080063,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:28.021Z,49.3921367,8.68808023,158.7437744140625,9.648001,169.9,6.92,0,gps,1.1,0.9,1.4,47.9,,,,54,,1656672988021,2022-07-01T12:56:28.021+02:00,2572.613741431788,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:34.192Z,49.39168962,8.68813309,158.1988525390625,8.576,171.1,6.26,0,gps,1.0,0.9,1.3,47.9,,,,54,,1656672994192,2022-07-01T12:56:34.192+02:00,2622.473758685886,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:43.000Z,49.39117231,8.68814905,152.85247802734375,7.504,180.9,6.71,8,gps,0.9,0.8,1.2,47.9,,,,54,,1656673003000,2022-07-01T12:56:43.000+02:00,2680.0076029923166,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:50.000Z,49.39076199,8.68818273,161.584228515625,7.504,188.0,6.64,0,gps,0.7,0.7,1.0,47.9,,,,54,,1656673010000,2022-07-01T12:56:50.000+02:00,2725.6981762644095,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:56:59.000Z,49.39058452,8.68776805,154.8408203125,9.648001,279.4,5.51,9,gps,1.0,0.8,1.3,47.9,,,,54,,1656673019000,2022-07-01T12:56:59.000+02:00,2761.6176369639265,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:57:04.656Z,49.39048152,8.68746322,153.287353515625,9.648001,186.3,6.89,0,gps,0.9,0.8,1.3,47.9,,,,54,,1656673024656,2022-07-01T12:57:04.656+02:00,2786.4758625260642,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:57:10.827Z,49.39009475,8.68742468,151.33355712890625,8.576,179.0,6.6,0,gps,1.4,0.9,1.7,47.9,,,,54,,1656673030827,2022-07-01T12:57:10.827+02:00,2829.5730896704777,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:57:18.000Z,49.38966856,8.68741891,177.71246337890625,7.504,266.4,4.91,0,gps,1.0,0.8,1.2,47.9,,,,54,,1656673038000,2022-07-01T12:57:18.000+02:00,2876.965095528558,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:57:26.000Z,49.3896966,8.68683682,170.60595703125,8.576,234.0,3.67,10,gps,0.7,0.8,1.1,47.9,,,,54,,1656673046000,2022-07-01T12:57:26.000+02:00,2919.2108157627968,1656672544796,Standardprofil,false
|
||||
2022-07-01T10:57:34.000Z,49.38985798,8.68647962,165.421630859375,8.576,256.8,0.9,6,gps,1.3,0.9,1.5,47.9,,,,54,,1656673054000,2022-07-01T12:57:34.000+02:00,2950.681543629,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:12.000Z,49.38983544,8.68654936,164.2235107421875,9.648001,81.5,3.51,10,gps,0.9,0.9,1.2,47.9,,,,54,,1656673212000,2022-07-01T13:00:12.000+02:00,2956.3171642923676,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:19.000Z,49.38982943,8.68686349,163.4822998046875,8.576,80.6,3.43,0,gps,0.9,0.9,1.2,47.9,,,,54,,1656673219000,2022-07-01T13:00:19.000+02:00,2979.063013246735,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:24.649Z,49.38988557,8.68711804,157.4073486328125,7.504,69.2,1.72,0,gps,0.9,0.9,1.3,47.9,,,,54,,1656673224649,2022-07-01T13:00:24.649+02:00,2998.515603181087,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:32.000Z,49.38975355,8.68742027,157.98388671875,9.648001,116.2,2.37,0,gps,0.8,0.8,1.2,47.9,,,,54,,1656673232000,2022-07-01T13:00:32.000+02:00,3024.8595835424962,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:39.000Z,49.38968475,8.68789061,158.14898681640625,8.576,90.1,5.99,0,gps,0.6,0.7,1.0,47.9,,,,54,,1656673239000,2022-07-01T13:00:39.000+02:00,3059.750840772249,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:47.000Z,49.38968741,8.68864464,156.318115234375,8.576,80.9,5.8,10,gps,0.8,0.8,1.1,47.9,,,,54,,1656673247000,2022-07-01T13:00:47.000+02:00,3114.3268166123057,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:00:56.000Z,49.38981096,8.68935897,158.6549072265625,9.648001,63.5,5.21,9,gps,0.8,0.8,1.2,47.9,,,,54,,1656673256000,2022-07-01T13:00:56.000+02:00,3167.8226320775525,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:01:03.000Z,49.38991498,8.6898232,162.62811279296875,9.648001,79.1,4.26,0,gps,0.8,0.8,1.2,47.9,,,,54,,1656673263000,2022-07-01T13:01:03.000+02:00,3203.3576563511497,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:01:13.000Z,49.39008687,8.69005123,140.983154296875,9.648001,11.8,1.66,11,gps,0.7,0.7,1.0,47.9,,,,54,,1656673273000,2022-07-01T13:01:13.000+02:00,3228.610542236974,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:01:20.000Z,49.39012705,8.69004198,148.57745361328125,9.648001,25.1,0.77,0,gps,0.7,0.7,1.0,47.9,,,,54,,1656673280000,2022-07-01T13:01:20.000+02:00,3233.128236689387,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:01:42.000Z,49.39012273,8.69044973,156.05230712890625,9.648001,80.0,0.5,9,gps,1.3,0.8,1.6,47.9,,,,54,,1656673302000,2022-07-01T13:01:42.000+02:00,3262.6440068575403,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:03:13.000Z,49.39020013,8.69013153,174.82879638671875,9.648001,184.9,0.3,12,gps,0.7,0.7,1.0,47.9,,,,52,,1656673393000,2022-07-01T13:03:13.000+02:00,3287.2300473534465,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:03:37.000Z,49.3902416,8.69011779,175.5267333984375,9.648001,10.0,0.42,7,gps,1.1,0.9,1.4,47.9,,,,52,,1656673417000,2022-07-01T13:03:37.000+02:00,3291.9473152030705,1656672544796,Standardprofil,false
|
||||
2022-07-01T11:06:03.000Z,49.39010871,8.68987621,171.87139892578125,9.648001,,0.0,6,gps,1.2,0.9,1.5,47.9,,,,52,,1656673563000,2022-07-01T13:06:03.000+02:00,3314.8399432225724,1656672544796,Standardprofil,false
|
|
67
browser.html
67
browser.html
@ -1,67 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>Track your bike</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="logo">
|
||||
<pre>
|
||||
_ _ _ _ _
|
||||
| | (_) | | | |
|
||||
___ _ __| |__ _| |_ __| | |__
|
||||
/ _ \| '__| '_ \| | __| / _\` | '_\
|
||||
| (_) | | | |_) | | |_ | (_| | |_) |
|
||||
\___/|_| |_.__/|_|\__| \__,_|_.__/
|
||||
|
||||
Peer-to-Peer Database for the Decentralized Web
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<button id="open" type="button" disabled>Open</button>
|
||||
|
||||
<button id="create" type="button" disabled>Open</button>
|
||||
|
||||
<button id="status" type="button" disabled>Open</button>
|
||||
<script src="example.js"></script>
|
||||
<script type="text/javascript" src="lib/orbitdb.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="lib/ipfs.js" charset="utf-8"></script>
|
||||
<!--<script type="text/javascript" src="functions.js"> </script>-->
|
||||
<!-- <script src="https://unpkg.com/ipfs@0.35.0/dist/index.min.js"></script> -->
|
||||
<script src="https://www.unpkg.com/orbit-db/dist/orbitdb.min.js"></script>
|
||||
<script>
|
||||
</script>
|
||||
<script>
|
||||
const simon = async (IPFS, ORBITDB) => {
|
||||
|
||||
// Create IPFS instance
|
||||
const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
|
||||
const ipfs = await Ipfs.create(ipfsOptions)
|
||||
|
||||
// Create OrbitDB instance
|
||||
const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
|
||||
// Create database instance
|
||||
const db = await orbitdb.keyvalue('first-database')
|
||||
const address = db.address
|
||||
console.log(address)
|
||||
console.log(db.address.toString())
|
||||
await db.put('timestamp', '4.9123123/-8.1231')
|
||||
const value = db.get('timestamp')
|
||||
console.log(value)
|
||||
}
|
||||
simon()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// Start the example
|
||||
//main()
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,77 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>Track your bike</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="logo">
|
||||
<pre>
|
||||
_ _ _ _ _
|
||||
| | (_) | | | |
|
||||
___ _ __| |__ _| |_ __| | |__
|
||||
/ _ \| '__| '_ \| | __| / _\` | '_\
|
||||
| (_) | | | |_) | | |_ | (_| | |_) |
|
||||
\___/|_| |_.__/|_|\__| \__,_|_.__/
|
||||
|
||||
Peer-to-Peer Database for the Decentralized Web
|
||||
</pre>
|
||||
</div>
|
||||
|
||||
<button id="open" type="button" disabled>Open</button>
|
||||
|
||||
<button id="create" type="button" disabled>Open</button>
|
||||
|
||||
<button id="status" type="button" disabled>Open</button>
|
||||
<script src="example.js"></script>
|
||||
<script type="text/javascript" src="lib/orbitdb.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="lib/ipfs.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="functions.js">
|
||||
<!-- <script src="https://unpkg.com/ipfs@0.35.0/dist/index.min.js"></script> -->
|
||||
<script src="https://www.unpkg.com/orbit-db/dist/orbitdb.min.js"></script>
|
||||
<script>
|
||||
</script>
|
||||
<script>
|
||||
//const initIPFS = async (IPFS, ORBITDB) => {
|
||||
|
||||
// Create IPFS instance
|
||||
// const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
|
||||
// Create OrbitDB instance
|
||||
//const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
|
||||
//}
|
||||
//initIPFS()
|
||||
|
||||
// async function createDb(){
|
||||
// Create database instance
|
||||
|
||||
// Create IPFS instance
|
||||
//const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1.2', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
//const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
//const db = await orbitdb.keyvalue('first-database')
|
||||
// const address = db.address
|
||||
// console.log(address)
|
||||
//console.log(db.address.toString())
|
||||
//await db.put('timestamp', '4.9123123/-8.1231')
|
||||
//const value = db.get('timestamp')
|
||||
//console.log(value)
|
||||
//}
|
||||
initIPFS()
|
||||
createDb()
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// Start the example
|
||||
//main()
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
278
example.js
278
example.js
@ -1,278 +0,0 @@
|
||||
const creatures = [
|
||||
]
|
||||
|
||||
const outputHeaderElm = document.getElementById("output-header")
|
||||
const outputElm = document.getElementById("output")
|
||||
const statusElm = document.getElementById("status")
|
||||
const dbnameField = document.getElementById("dbname")
|
||||
const dbAddressField = document.getElementById("dbaddress")
|
||||
const createButton = document.getElementById("create")
|
||||
const openButton = document.getElementById("open")
|
||||
const createType = document.getElementById("type")
|
||||
const writerText = document.getElementById("writerText")
|
||||
const publicCheckbox = document.getElementById("public")
|
||||
const readonlyCheckbox = document.getElementById("readonly")
|
||||
|
||||
function handleError(e) {
|
||||
console.error(e.stack)
|
||||
statusElm.innerHTML = e.message
|
||||
}
|
||||
|
||||
const main = async (IPFS, ORBITDB) => {
|
||||
let orbitdb, db
|
||||
let count = 0
|
||||
let interval = Math.floor((Math.random() * 300) + (Math.random() * 2000))
|
||||
let updateInterval
|
||||
let dbType, dbAddress
|
||||
|
||||
// If we're building with Webpack, use the injected IPFS module.
|
||||
// Otherwise use 'Ipfs' which is exposed by ipfs.min.js
|
||||
if (IPFS)
|
||||
Ipfs = IPFS
|
||||
|
||||
// If we're building with Webpack, use the injected OrbitDB module.
|
||||
// Otherwise use 'OrbitDB' which is exposed by orbitdb.min.js
|
||||
if (ORBITDB)
|
||||
OrbitDB = ORBITDB
|
||||
|
||||
// Init UI
|
||||
openButton.disabled = true
|
||||
createButton.disabled = true
|
||||
statusElm.innerHTML = "Starting IPFS..."
|
||||
|
||||
// Create IPFS instance
|
||||
const ipfs = await Ipfs.create({
|
||||
repo: '/orbitdb/examples/browser/new/ipfs/0.33.1',
|
||||
start: true,
|
||||
preload: {
|
||||
enabled: false
|
||||
},
|
||||
EXPERIMENTAL: {
|
||||
pubsub: true,
|
||||
},
|
||||
config: {
|
||||
Addresses: {
|
||||
Swarm: [
|
||||
// Use IPFS dev signal server
|
||||
// '/dns4/star-signal.cloud.ipfs.team/wss/p2p-webrtc-star',
|
||||
// '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star',
|
||||
// Use IPFS dev webrtc signal server
|
||||
'/dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star/',
|
||||
'/dns4/wrtc-star2.sjc.dwebops.pub/tcp/443/wss/p2p-webrtc-star/',
|
||||
'/dns4/webrtc-star.discovery.libp2p.io/tcp/443/wss/p2p-webrtc-star/',
|
||||
// Use local signal server
|
||||
// '/ip4/0.0.0.0/tcp/9090/wss/p2p-webrtc-star',
|
||||
]
|
||||
},
|
||||
}
|
||||
})
|
||||
|
||||
openButton.disabled = false
|
||||
createButton.disabled = false
|
||||
statusElm.innerHTML = "IPFS Started"
|
||||
orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
|
||||
const load = async (db, statusText) => {
|
||||
// Set the status text
|
||||
statusElm.innerHTML = statusText
|
||||
|
||||
// When the database is ready (ie. loaded), display results
|
||||
db.events.on('ready', () => queryAndRender(db))
|
||||
// When database gets replicated with a peer, display results
|
||||
db.events.on('replicated', () => queryAndRender(db))
|
||||
// When we update the database, display result
|
||||
db.events.on('write', () => queryAndRender(db))
|
||||
|
||||
db.events.on('replicate.progress', () => queryAndRender(db))
|
||||
|
||||
// Hook up to the load progress event and render the progress
|
||||
let maxTotal = 0, loaded = 0
|
||||
db.events.on('load.progress', (address, hash, entry, progress, total) => {
|
||||
loaded ++
|
||||
maxTotal = Math.max.apply(null, [maxTotal, progress, 0])
|
||||
total = Math.max.apply(null, [progress, maxTotal, total, entry.clock.time, 0])
|
||||
statusElm.innerHTML = `Loading database... ${maxTotal} / ${total}`
|
||||
})
|
||||
|
||||
db.events.on('ready', () => {
|
||||
// Set the status text
|
||||
setTimeout(() => {
|
||||
statusElm.innerHTML = 'Database is ready'
|
||||
}, 1000)
|
||||
})
|
||||
|
||||
// Load locally persisted database
|
||||
await db.load()
|
||||
}
|
||||
|
||||
const startWriter = async (db, interval) => {
|
||||
// Set the status text
|
||||
writerText.innerHTML = `Writing to database every ${interval} milliseconds...`
|
||||
|
||||
// Start update/insert loop
|
||||
updateInterval = setInterval(async () => {
|
||||
try {
|
||||
await update(db)
|
||||
} catch (e) {
|
||||
console.error(e.toString())
|
||||
writerText.innerHTML = '<span style="color: red">' + e.toString() + '</span>'
|
||||
clearInterval(updateInterval)
|
||||
}
|
||||
}, interval)
|
||||
}
|
||||
|
||||
const resetDatabase = async (db) => {
|
||||
writerText.innerHTML = ""
|
||||
outputElm.innerHTML = ""
|
||||
outputHeaderElm.innerHTML = ""
|
||||
|
||||
clearInterval(updateInterval)
|
||||
|
||||
if (db) {
|
||||
await db.close()
|
||||
}
|
||||
|
||||
interval = Math.floor((Math.random() * 300) + (Math.random() * 2000))
|
||||
}
|
||||
|
||||
const createDatabase = async () => {
|
||||
await resetDatabase(db)
|
||||
|
||||
openButton.disabled = true
|
||||
createButton.disabled = true
|
||||
|
||||
try {
|
||||
const name = dbnameField.value
|
||||
const type = createType.value
|
||||
const publicAccess = publicCheckbox.checked
|
||||
|
||||
db = await orbitdb.open(name, {
|
||||
// If database doesn't exist, create it
|
||||
create: true,
|
||||
overwrite: true,
|
||||
// Load only the local version of the database,
|
||||
// don't load the latest from the network yet
|
||||
localOnly: false,
|
||||
type: type,
|
||||
// If "Public" flag is set, allow anyone to write to the database,
|
||||
// otherwise only the creator of the database can write
|
||||
accessController: {
|
||||
write: publicAccess ? ['*'] : [orbitdb.identity.id],
|
||||
}
|
||||
})
|
||||
|
||||
await load(db, 'Creating database...')
|
||||
startWriter(db, interval)
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
openButton.disabled = false
|
||||
createButton.disabled = false
|
||||
}
|
||||
|
||||
const openDatabase = async () => {
|
||||
const address = dbAddressField.value
|
||||
|
||||
await resetDatabase(db)
|
||||
|
||||
openButton.disabled = true
|
||||
createButton.disabled = true
|
||||
|
||||
try {
|
||||
statusElm.innerHTML = "Connecting to peers..."
|
||||
db = await orbitdb.open(address, { sync: true })
|
||||
await load(db, 'Loading database...')
|
||||
|
||||
if (!readonlyCheckbox.checked) {
|
||||
startWriter(db, interval)
|
||||
} else {
|
||||
writerText.innerHTML = `Listening for updates to the database...`
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
openButton.disabled = false
|
||||
createButton.disabled = false
|
||||
}
|
||||
|
||||
const update = async (db) => {
|
||||
count ++
|
||||
|
||||
const time = new Date().toISOString()
|
||||
const idx = Math.floor(Math.random() * creatures.length)
|
||||
const creature = creatures[idx]
|
||||
|
||||
if (db.type === 'eventlog') {
|
||||
const value = "GrEEtinGs from " + orbitdb.id + " " + creature + ": Hello #" + count + " (" + time + ")"
|
||||
await db.add(value)
|
||||
} else if (db.type === 'feed') {
|
||||
const value = "GrEEtinGs from " + orbitdb.id + " " + creature + ": Hello #" + count + " (" + time + ")"
|
||||
await db.add(value)
|
||||
} else if (db.type === 'docstore') {
|
||||
const value = { _id: 'peer1', avatar: creature, updated: time }
|
||||
await db.put(value)
|
||||
} else if (db.type === 'keyvalue') {
|
||||
await db.set('mykey', creature)
|
||||
} else if (db.type === 'counter') {
|
||||
await db.inc(1)
|
||||
} else {
|
||||
throw new Error("Unknown datatbase type: ", db.type)
|
||||
}
|
||||
}
|
||||
|
||||
const query = (db) => {
|
||||
if (db.type === 'eventlog')
|
||||
return db.iterator({ limit: 5 }).collect()
|
||||
else if (db.type === 'feed')
|
||||
return db.iterator({ limit: 5 }).collect()
|
||||
else if (db.type === 'docstore')
|
||||
return db.get('peer1')
|
||||
else if (db.type === 'keyvalue')
|
||||
return db.get('mykey')
|
||||
else if (db.type === 'counter')
|
||||
return db.value
|
||||
else
|
||||
throw new Error("Unknown datatbase type: ", db.type)
|
||||
}
|
||||
|
||||
const queryAndRender = async (db) => {
|
||||
const networkPeers = await ipfs.swarm.peers()
|
||||
const databasePeers = await ipfs.pubsub.peers(db.address.toString())
|
||||
|
||||
const result = query(db)
|
||||
|
||||
if (dbType !== db.type || dbAddress !== db.address) {
|
||||
dbType = db.type;
|
||||
dbAddress = db.address;
|
||||
|
||||
outputHeaderElm.innerHTML = `
|
||||
<h2>${dbType.toUpperCase()}</h2>
|
||||
<h3 id="remoteAddress">${dbAddress}</h3>
|
||||
<p>Copy this address and use the 'Open Remote Database' in another browser to replicate this database between peers.</p>
|
||||
`
|
||||
}
|
||||
|
||||
outputElm.innerHTML = `
|
||||
<div><b>Peer ID:</b> ${orbitdb.id}</div>
|
||||
<div><b>Peers (database/network):</b> ${databasePeers.length} / ${networkPeers.length}</div>
|
||||
<div><b>Oplog Size:</b> ${Math.max(db._replicationStatus.progress, db._oplog.length)} / ${db._replicationStatus.max}</div>
|
||||
<h2>Results</h2>
|
||||
<div id="results">
|
||||
<div>
|
||||
${result && Array.isArray(result) && result.length > 0 && db.type !== 'docstore' && db.type !== 'keyvalue'
|
||||
? result.slice().reverse().map((e) => e.payload.value).join('<br>\n')
|
||||
: db.type === 'docstore'
|
||||
? JSON.stringify(result, null, 2)
|
||||
: result ? result.toString().replace('"', '').replace('"', '') : result
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
}
|
||||
|
||||
openButton.addEventListener('click', openDatabase)
|
||||
createButton.addEventListener('click', createDatabase)
|
||||
}
|
||||
|
||||
if (typeof module !== 'undefined' && typeof module.exports !== 'undefined')
|
||||
module.exports = main
|
@ -1,6 +0,0 @@
|
||||
(async () =>{
|
||||
//displayRoute();
|
||||
//showBike()
|
||||
//createDb()
|
||||
//getCurrentTime()
|
||||
})();
|
250
functions.js
250
functions.js
@ -1,12 +1,6 @@
|
||||
// needed for instantiation of ipfs
|
||||
const initIPFS = async (IPFS, ORBITDB) => {
|
||||
|
||||
// Create IPFS instance
|
||||
// const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
|
||||
// Create OrbitDB instance
|
||||
//const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
|
||||
}
|
||||
initIPFS()
|
||||
@ -15,17 +9,13 @@ async function createDb(){
|
||||
|
||||
// Create database instance
|
||||
const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
//const ipfsOptions = { repo: '/orbitdb/createdb1', }
|
||||
|
||||
const db = await orbitdb.keyvalue('routes')
|
||||
const address = db.address
|
||||
console.log(address)
|
||||
console.log(db.address.toString())
|
||||
await db.put('2022-07-01T10:49:07', '49.41185089/8.67646861',{pin: true})
|
||||
await db.put('2022-07-01T10:49:12', '49.41166303/8.67652893')
|
||||
await db.put('2022-07-01T10:49:20','49.41123636/8.67652849')
|
||||
await db.put(' 2022-07-01T10:49:25','49.41084041/8.67651128')
|
||||
await db.put('2022-07-01T10:49:31','49.41049801/8.67656948')
|
||||
await db.put('2022-07-01T10:49:25','49.41084041/8.67651128')
|
||||
await db.put('2022-07-01T10:49:31','49.41049801/8.67656948')
|
||||
await db.put('2022-07-01T10:49:38','49.4102198/8.67658131')
|
||||
await db.put('2022-07-01T10:49:44','49.40982577/8.67668618')
|
||||
@ -55,46 +45,31 @@ async function createDb(){
|
||||
await db.put('2022-07-01T11:06:03','49.39010871/8.68987621')
|
||||
let csv = "./new.csv"
|
||||
const value = db.all
|
||||
//console.log(value)
|
||||
console.log('database connected!')
|
||||
//console.log(value)
|
||||
await db.close()
|
||||
return db
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
async function loadRoute(){
|
||||
const db = await createDb()
|
||||
await db.load()
|
||||
console.log("loadroute ausgefĂĽhrt")
|
||||
const value = db.all
|
||||
console.log(value)
|
||||
return value;
|
||||
}
|
||||
async function connectDB(){
|
||||
//const ipfsOptions = { repo: '/orbitdb/los', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
const ipfs = await Ipfs.create()
|
||||
const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
const db_route2 = await orbitdb.open('/orbitdb/zdpuApZ7pMKupZjmxPQk8xp34QdAEXHFFjmA3EPWuACN88DwB/coordinates');
|
||||
//const route2 = db_route2.all
|
||||
//console.log(OrbitDB.isValidAddress('/orbitdb/zdpuAqETvwNibieag6o5ahX4d6WKXi6QZvbar3XZPJEXz3vSE/coordinates'));
|
||||
console.log(db_route2.all);
|
||||
console.log(db_route2.address.toString())
|
||||
return db_route2;
|
||||
}
|
||||
async function getCurrentCoordinate(){
|
||||
var db_conn = await createDb()
|
||||
const currentCoordinate = db_conn.all
|
||||
console.log(currentCoordinate)
|
||||
var latest_coord_string = (currentCoordinate[Object.keys(currentCoordinate)[Object.keys(currentCoordinate).length - 1]])
|
||||
var latest_coordinate_str = latest_coord_string.split("/")
|
||||
latest_coordinate_str[0] = parseFloat(latest_coordinate_str[0])
|
||||
latest_coordinate_str[1] = parseFloat(latest_coordinate_str[1])
|
||||
console.log(latest_coordinate_str)
|
||||
|
||||
return latest_coordinate_str;
|
||||
}
|
||||
@ -103,51 +78,115 @@ async function createDb(){
|
||||
|
||||
var db_conn = await createDb()
|
||||
const currentCoordinate = db_conn.all
|
||||
//console.log(currentCoordinate)
|
||||
var all_times = (Object.keys(currentCoordinate))
|
||||
var lasttime = all_times[(all_times.length-1)]
|
||||
console.log(lasttime)
|
||||
return lasttime;
|
||||
}
|
||||
|
||||
|
||||
async function getAllCoordinates(){
|
||||
var db2 = await createDb()
|
||||
const all_coordinates = db2.all
|
||||
// coordinates in this schema 49.123/8.2311
|
||||
var coordinates = Object.values(all_coordinates)
|
||||
// parse to string for split and then split by /
|
||||
var coordinate_string = coordinates.toString()
|
||||
var between_string = coordinate_string.split("/")
|
||||
var final_string = between_string.toString()
|
||||
//comma string looks now like this : 49.1212,8.1231,49.1231, ...
|
||||
var comma_string = final_string.split(',')
|
||||
// create new Array and put string back in to array for using paths/polylines with leafleat
|
||||
var newArray =[];
|
||||
// use for loop for iterating over string and put it in the right order
|
||||
for (var i = 0; i < comma_string.length; i++) {
|
||||
|
||||
var increment = i+1;
|
||||
newArray.push([comma_string[i], comma_string[increment]])
|
||||
increment = increment+1
|
||||
i = i+1
|
||||
}
|
||||
// its only for converting the string array to a float array, because leaflethjs wants only a float array
|
||||
(function(elem) {
|
||||
var callee = arguments.callee;
|
||||
return elem instanceof Array ? elem.map(function(elem2) { return callee(elem2); })
|
||||
: parseFloat(elem);
|
||||
})
|
||||
newArray = newArray.map(function(elem) {
|
||||
return elem.map(function(elem2) {
|
||||
return parseFloat(elem2);
|
||||
var db2 = await createDb()
|
||||
const all_coordinates = db2.all
|
||||
// coordinates in this schema 49.123/8.2311
|
||||
var coordinates = Object.values(all_coordinates)
|
||||
// parse to string for split and then split by /
|
||||
var coordinate_string = coordinates.toString()
|
||||
var between_string = coordinate_string.split("/")
|
||||
var final_string = between_string.toString()
|
||||
//comma string looks now like this : 49.1212,8.1231,49.1231, ...
|
||||
var comma_string = final_string.split(',')
|
||||
// create new Array and put string back in to array for using paths/polylines with leafleat
|
||||
var newArray =[];
|
||||
// use for loop for iterating over string and put it in the right order
|
||||
for (var i = 0; i < comma_string.length; i++) {
|
||||
|
||||
var increment = i+1;
|
||||
newArray.push([comma_string[i], comma_string[increment]])
|
||||
increment = increment+1
|
||||
i = i+1
|
||||
}
|
||||
// its only for converting the string array to a float array, because leaflethjs wants only a float array
|
||||
(function(elem) {
|
||||
var callee = arguments.callee;
|
||||
return elem instanceof Array ? elem.map(function(elem2) { return callee(elem2); })
|
||||
: parseFloat(elem);
|
||||
})
|
||||
newArray = newArray.map(function(elem) {
|
||||
return elem.map(function(elem2) {
|
||||
return parseFloat(elem2);
|
||||
});
|
||||
});
|
||||
});
|
||||
console.log(newArray)
|
||||
|
||||
//console.log(newArray)
|
||||
return newArray;
|
||||
}
|
||||
console.log(newArray)
|
||||
|
||||
//console.log(newArray)
|
||||
return newArray;
|
||||
}
|
||||
//array to store routes absolute
|
||||
var Absolute_Route = [];
|
||||
async function getAllRoutes(){
|
||||
var buffer_for_i = 0;
|
||||
var db2 = await createDb()
|
||||
const current_route = db2.all
|
||||
// coordinates in this schema 49.123/8.2311
|
||||
var coordinates = Object.values(current_route)
|
||||
// parse to string for split and then split by /
|
||||
var coordinate_string = coordinates.toString()
|
||||
var between_string = coordinate_string.split("/")
|
||||
var final_string = between_string.toString()
|
||||
//comma string looks now like this : 49.1212,8.1231,49.1231, ...
|
||||
const comma_string = final_string.split(',')
|
||||
// create new Array and put string back in to array for using paths/polylines with leafleat
|
||||
var route0 =[];
|
||||
var route1 = []
|
||||
// use for loop for iterating over string and put it in the right order
|
||||
//route 0
|
||||
for (var i = 0; i < comma_string.length; i++) {
|
||||
//console.log(comma_string[i])
|
||||
if (comma_string[i] == "00"){
|
||||
console.log("00 gefunden")
|
||||
buffer_for_i = i +2;
|
||||
//console.log(buffer_for_i)
|
||||
break;
|
||||
}
|
||||
route0.push([comma_string[i], comma_string[i+1]])
|
||||
i = i+1
|
||||
}
|
||||
// its only for converting the string array to a float array, because leaflethjs wants only a float array
|
||||
(function(elem) {
|
||||
var callee = arguments.callee;
|
||||
return elem instanceof Array ? elem.map(function(elem2) { return callee(elem2); })
|
||||
: parseFloat(elem);
|
||||
})
|
||||
route0 = route0.map(function(elem) {
|
||||
return elem.map(function(elem2) {
|
||||
return parseFloat(elem2);
|
||||
});
|
||||
});
|
||||
for (var i = buffer_for_i; i < comma_string.length; i++) {
|
||||
console.log(buffer_for_i)
|
||||
if (comma_string[i] == "00"){
|
||||
break;
|
||||
}else if(comma_string[i] == "11"){
|
||||
noroutes = 1;
|
||||
}
|
||||
route1.push([comma_string[i], comma_string[i+1]])
|
||||
i = i+1
|
||||
}
|
||||
(function(elem) {
|
||||
var callee = arguments.callee;
|
||||
return elem instanceof Array ? elem.map(function(elem2) { return callee(elem2); })
|
||||
: parseFloat(elem);
|
||||
})
|
||||
route1 = route1.map(function(elem) {
|
||||
return elem.map(function(elem2) {
|
||||
return parseFloat(elem2);
|
||||
});
|
||||
});
|
||||
// maybe in loop?
|
||||
Absolute_Route[0] = route0;
|
||||
Absolute_Route[1] = route1;
|
||||
console.log("routes written in buffer")
|
||||
return [route0, route1];
|
||||
}
|
||||
|
||||
async function createRouteObject(){
|
||||
var currentime = await getCurrentTime()
|
||||
var myBtn = document.createElement("p");
|
||||
@ -161,4 +200,85 @@ async function createlistitem() {
|
||||
li.appendChild(document.createTextNode("Last travelled route on: " +currentime+""));
|
||||
ul.appendChild(li);
|
||||
}
|
||||
async function clearMap() {
|
||||
console.log("clearing map")
|
||||
for(i in map._layers) {
|
||||
if(map._layers[i]._path != undefined) {
|
||||
try {
|
||||
map.removeLayer(map._layers[i]);
|
||||
}
|
||||
catch(e) {
|
||||
console.log("problem with " + e + map._layers[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
async function allRoutes(number_of_the_route) {
|
||||
|
||||
//color theming
|
||||
var color = ["blue","red","green","purple","gray","yellow"];
|
||||
var i = Math.floor(Math.random() * 5) ;
|
||||
console.log("calling prepare")
|
||||
let current = await prepare();
|
||||
const current_route = current[number_of_the_route];
|
||||
|
||||
clearMap();
|
||||
polyline = L.polyline(current_route, {color: color[i]}).addTo(map);
|
||||
var currentime = await getCurrentTime();
|
||||
var ul = document.getElementById("list");
|
||||
var li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode("Route "+ (number_of_the_route + 1) + " was travelled on: " + currentime + "" ));
|
||||
ul.appendChild(li);
|
||||
|
||||
//important for maps
|
||||
map.fitBounds(polyline.getBounds());
|
||||
map.fitBounds(polyline.getBounds());
|
||||
|
||||
return currentime;
|
||||
}
|
||||
async function singleRoute(route_nr){
|
||||
const current_route = Absolute_Route[route_nr];
|
||||
console.log(Absolute_Route[route_nr]);
|
||||
var color = ["blue","red","green","purple","gray","yellow"];
|
||||
var i = Math.floor(Math.random() * 5) ;
|
||||
clearMap();
|
||||
console.log("painting map");
|
||||
polyline = L.polyline(current_route, {color: color[i]}).addTo(map);
|
||||
//var currentime = await getCurrentTime();
|
||||
var ul = document.getElementById("list");
|
||||
var li = document.createElement("li");
|
||||
ul.appendChild(li);
|
||||
|
||||
//important for maps
|
||||
map.fitBounds(polyline.getBounds());
|
||||
map.fitBounds(polyline.getBounds());
|
||||
console.log("finished singelRoute()");
|
||||
}
|
||||
async function showRoutes(){
|
||||
console.log("Calling getAllRoutes")
|
||||
var len_of_Routes = await getAllRoutes();
|
||||
var len = len_of_Routes.length ;
|
||||
console.log("Gotten all routes");
|
||||
|
||||
var i = 0;
|
||||
|
||||
console.log("creating buttons")
|
||||
let btn0 = document.createElement("button");
|
||||
btn0.innerHTML = ("Route 1");
|
||||
btn0.onclick = function () {
|
||||
singleRoute(0);
|
||||
};
|
||||
let btn1 = document.createElement("button");
|
||||
btn1.innerHTML = ("Route 2");
|
||||
btn1.onclick = function () {
|
||||
singleRoute(1);
|
||||
};
|
||||
|
||||
i = i + 1;
|
||||
document.body.appendChild(btn0);
|
||||
document.body.appendChild(document.createElement('br'));
|
||||
document.body.appendChild(btn1);
|
||||
console.log("Finsihed showing routes")
|
||||
}
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
// needed for instantiation of ipfs
|
||||
const initIPFS = async (IPFS, ORBITDB) => {
|
||||
|
||||
// Create IPFS instance
|
||||
// const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
|
||||
// Create OrbitDB instance
|
||||
//const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
|
||||
}
|
||||
initIPFS()
|
||||
|
||||
async function createDb(){
|
||||
// Create database instance
|
||||
|
||||
// Create IPFS instance
|
||||
const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
|
||||
const ipfs = await Ipfs.create(ipfsOptions)
|
||||
const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
const db = await orbitdb.keyvalue('route1')
|
||||
const address = db.address
|
||||
console.log(address)
|
||||
console.log(db.address.toString())
|
||||
await db.put('2022-07-01T10:49:07', '49.41185089/8.67646861')
|
||||
await db.put('2022-07-01T10:49:12', '49.41166303/8.67652893')
|
||||
const value = db.all
|
||||
console.log(value)
|
||||
}
|
||||
createDb()
|
||||
|
99
index.html
99
index.html
@ -17,24 +17,20 @@
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<button onclick="showBike()"> Locate your Bike!</button>
|
||||
<button onclick="displayRoute()"> Show last travelled route</button>
|
||||
<div>
|
||||
<button onclick="showBike()"> Locate your Bike!</button>
|
||||
<button onclick="displayLastRoute()"> Show last travelled route</button>
|
||||
</div>
|
||||
<!-- <button onclick="createlistitem()"> create route</button> -->
|
||||
|
||||
<ul id="list">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div id="map"></div>
|
||||
<!-- The MAP-->
|
||||
<div style="position: relative; float:left;" id="map"></div>
|
||||
|
||||
<script type="text/javascript" src="lib/orbitdb.js" charset="utf-8"></script>
|
||||
|
||||
@ -51,85 +47,16 @@
|
||||
async function prepare_time(){
|
||||
var currentime = await getCurrentTime();
|
||||
return currentime
|
||||
} //document.write(getCurrentTime())
|
||||
// var currentime = prepare_time()
|
||||
//document.getElementById("time").innerHTML = currentime
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
<style> #map { height: 600px; width: 600px; margin: auto }</style>
|
||||
<style>
|
||||
/*
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
background: #d4d1d1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel {
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
background: #e68a43;
|
||||
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.10);
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 30px;
|
||||
height: 60px;
|
||||
background: rgb(241, 239, 239);
|
||||
}
|
||||
<!-- Buttons for Route-->
|
||||
<div class="routes">
|
||||
<button onclick="showRoutes()"> Show Routes </button>
|
||||
</div>
|
||||
<style>
|
||||
|
||||
.title {
|
||||
color: #5E6977;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
display: flex;
|
||||
height: 340px;
|
||||
}
|
||||
.categories {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex-basis: 25%;
|
||||
padding: 39px 0px 41px 26px;
|
||||
}
|
||||
.category {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.category span:first-child {
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
opacity: 0.6;
|
||||
color: #fff;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.category span:last-child {
|
||||
font-size: 32px;
|
||||
font-weight: 300;
|
||||
color: #fff;
|
||||
}
|
||||
.chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 2;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
281
index.html~
281
index.html~
@ -1,281 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.8.0/dist/leaflet.css"
|
||||
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ=="
|
||||
crossorigin=""/>
|
||||
<script src="https://unpkg.com/leaflet@1.8.0/dist/leaflet.js"
|
||||
integrity="sha512-BB3hKbKWOc9Ez/TAwyWxNXeoV9c1v6FIeYiBieIWkpLjauysF18NzgR1MBNBXf8/KABdlkX68nAhlwcDFLGPCQ=="
|
||||
crossorigin=""></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<title>Track your bike</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container d-flex justify-content-center">
|
||||
|
||||
<ul class="list-group mt-5 text-white">
|
||||
<li class="list-group-item d-flex justify-content-between align-content-center">
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
|
||||
<div class="ml-2">
|
||||
<h4 class="mb-0">Route 1</h4>
|
||||
<div class="about">
|
||||
|
||||
<span>Jan 21, 2020</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
<li class="list-group-item d-flex justify-content-between align-content-center">
|
||||
|
||||
<div class="d-flex flex-row">
|
||||
<div class="ml-2">
|
||||
<h4 class="mb-0">Route 2</h4>
|
||||
<div class="about">
|
||||
|
||||
<span>Jan 22, 2020</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="map"></div>
|
||||
<div class="wrapper">
|
||||
<div class="panel">
|
||||
<div class="panel-header">
|
||||
<h3 class="title">Statistics</h3>
|
||||
|
||||
<div class="routes">
|
||||
<span>Route X</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="categories">
|
||||
<div class="category">
|
||||
<span>kilometers traveled</span>
|
||||
<span>2 Km</span>
|
||||
</div>
|
||||
<div class="category">
|
||||
<span>traveled time</span>
|
||||
<span>2 min</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="chart">
|
||||
<div class="operating-systems">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="example.js"></script>
|
||||
<script type="text/javascript" src="lib/orbitdb.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="lib/ipfs.js" charset="utf-8"></script>
|
||||
<script type="text/javascript" src="functions.js">
|
||||
<!--<script src="https://unpkg.com/ipfs@0.35.0/dist/index.min.js"></script> -->
|
||||
<script src="https://www.unpkg.com/orbit-db/dist/orbitdb.min.js"></script>
|
||||
<script>
|
||||
</script>
|
||||
<script>
|
||||
//const initIPFS = async (IPFS, ORBITDB) => {
|
||||
|
||||
// Create IPFS instance
|
||||
// const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
|
||||
// Create OrbitDB instance
|
||||
//const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
|
||||
//}
|
||||
//initIPFS()
|
||||
|
||||
// async function createDb(){
|
||||
// Create database instance
|
||||
|
||||
// Create IPFS instance
|
||||
//const ipfsOptions = { repo: '/orbitdb/examples/browser/new/ipfs/0.33.1.2', }
|
||||
//const ipfs = await Ipfs.create(ipfsOptions)
|
||||
//const orbitdb = await OrbitDB.createInstance(ipfs)
|
||||
//const db = await orbitdb.keyvalue('first-database')
|
||||
// const address = db.address
|
||||
// console.log(address)
|
||||
//console.log(db.address.toString())
|
||||
//await db.put('timestamp', '4.9123123/-8.1231')
|
||||
//const value = db.get('timestamp')
|
||||
//console.log(value)
|
||||
//}
|
||||
initIPFS()
|
||||
//createDb()
|
||||
var map = L.map('map').setView([49.416075235, 8.6722049], 13);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
zoom: 44,
|
||||
attribution: '© OpenStreetMap'
|
||||
}).addTo(map);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// Start the example
|
||||
//main()
|
||||
</script>
|
||||
<style> #map { height: 800px; width: 1400px; }</style>
|
||||
<style>
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-family: 'Roboto', sans-serif;
|
||||
background: #d4d1d1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel {
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
background: #e68a43;
|
||||
box-shadow: 1px 2px 3px 0px rgba(0,0,0,0.10);
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.panel-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 30px;
|
||||
height: 60px;
|
||||
background: rgb(241, 239, 239);
|
||||
}
|
||||
|
||||
.title {
|
||||
color: #5E6977;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.panel-body {
|
||||
display: flex;
|
||||
height: 340px;
|
||||
}
|
||||
.categories {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex-basis: 25%;
|
||||
padding: 39px 0px 41px 26px;
|
||||
}
|
||||
.category {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.category span:first-child {
|
||||
font-weight: 300;
|
||||
font-size: 14px;
|
||||
opacity: 0.6;
|
||||
color: #fff;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
.category span:last-child {
|
||||
font-size: 32px;
|
||||
font-weight: 300;
|
||||
color: #fff;
|
||||
}
|
||||
.chart {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-grow: 2;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.operating-systems {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
width: 215px;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 50px;
|
||||
}
|
||||
|
||||
.android-os span {
|
||||
background: #80B354;
|
||||
}
|
||||
.ios-os span {
|
||||
background: #F5A623;
|
||||
}
|
||||
.windows-os span {
|
||||
background: #F8E71C;
|
||||
}
|
||||
.calendar-views span:hover {
|
||||
border: 2px solid #BDC6CF;
|
||||
cursor: pointer;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<style>
|
||||
body{
|
||||
background: #e68a43;
|
||||
}
|
||||
ul{
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.list-group{
|
||||
width: 250px !important;
|
||||
|
||||
}
|
||||
|
||||
.list-group-item{
|
||||
margin-top:16px;
|
||||
border-radius: none;
|
||||
background: #e68a43;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
|
||||
.list-group-item:hover{
|
||||
transform: scaleX(1.1);
|
||||
}
|
||||
|
||||
.check{
|
||||
opacity: 0;
|
||||
transition: all 0.6s ease-in-out;
|
||||
}
|
||||
|
||||
.list-group-item:hover .check {
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
|
||||
.about span{
|
||||
font-size: 16px;
|
||||
margin-right: 10px;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
</body>
|
||||
</html>
|
39
map.js
39
map.js
@ -7,26 +7,39 @@ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
|
||||
// helper function for displayRoute()
|
||||
async function prepare(){
|
||||
var allcoordinates = getAllCoordinates('coordinates');
|
||||
return allcoordinates;
|
||||
console.log("prepare")
|
||||
var route = getAllRoutes('coordinates');
|
||||
return route;
|
||||
}
|
||||
|
||||
async function displayRoute() {
|
||||
var allcoordinates = await prepare();
|
||||
console.log(allcoordinates);
|
||||
//var marker = L.marker([49.41607523,8.67220049]).addTo(map);
|
||||
var polyline = L.polyline(allcoordinates, {color: 'red'}).addTo(map);
|
||||
|
||||
var currentime = await getCurrentTime()
|
||||
var ul = document.getElementById("list");
|
||||
var li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode("Last travelled route on: " +currentime+""));
|
||||
async function displayLastRoute() {
|
||||
clearMap()
|
||||
//color theming
|
||||
let color = ["blue","red","green","purple","cyan","yellow"];
|
||||
var i = Math.floor(Math.random() * 5) ;
|
||||
let current = await prepare();
|
||||
console.log("Length:")
|
||||
console.log(current.length);
|
||||
var len = current.length - 1;
|
||||
const current_route = current[len];
|
||||
//var marker = L.marker([49.41607523,8.67220049]).addTo(map);
|
||||
polyline = L.polyline(current_route, {color: color[i]}).addTo(map);
|
||||
var currentime = await getCurrentTime();
|
||||
// does stuff ??
|
||||
var ul = document.getElementById("list");
|
||||
var li = document.createElement("li");
|
||||
li.appendChild(document.createTextNode("Last travelled route on: " + currentime + "" ));
|
||||
ul.appendChild(li);
|
||||
//important for maps
|
||||
map.fitBounds(polyline.getBounds());
|
||||
map.fitBounds(polyline.getBounds())
|
||||
return currentime
|
||||
map.fitBounds(polyline.getBounds());
|
||||
|
||||
return currentime;
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function showBike(){
|
||||
var current_cord = await getCurrentCoordinate()
|
||||
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
|
||||
|
87
new.csv~
87
new.csv~
@ -1,87 +0,0 @@
|
||||
time,lat,lon
|
||||
2022-07-01T10:49:07.000Z,49.41185089,8.67646861
|
||||
2022-07-01T10:49:12.660Z,49.41166303,8.67652893
|
||||
2022-07-01T10:49:20.000Z,49.41123636,8.67652849
|
||||
2022-07-01T10:49:25.693Z,49.41084041,8.67651128
|
||||
2022-07-01T10:49:31.870Z,49.41049801,8.67656948
|
||||
2022-07-01T10:49:38.053Z,49.4102198,8.67658131
|
||||
2022-07-01T10:49:44.222Z,49.40982577,8.67668618
|
||||
2022-07-01T10:49:50.379Z,49.4095211,8.6767495
|
||||
2022-07-01T10:49:59.000Z,49.40881224,8.67658343
|
||||
2022-07-01T10:50:06.000Z,49.4083738,8.67664092
|
||||
2022-07-01T10:50:13.000Z,49.4080936,8.676667
|
||||
2022-07-01T10:50:20.000Z,49.40797358,8.67662421
|
||||
2022-07-01T10:50:27.000Z,49.40791573,8.67663151
|
||||
2022-07-01T10:50:32.673Z,49.40795257,8.6766228
|
||||
2022-07-01T10:50:41.000Z,49.40798433,8.67665855
|
||||
2022-07-01T10:50:46.645Z,49.4079701,8.67669428
|
||||
2022-07-01T10:50:52.804Z,49.40799444,8.67669857
|
||||
2022-07-01T10:51:01.000Z,49.40789121,8.6766631
|
||||
2022-07-01T10:51:08.000Z,49.40755973,8.67658864
|
||||
2022-07-01T10:51:17.000Z,49.40689473,8.67677555
|
||||
2022-07-01T10:51:25.000Z,49.40620921,8.67697955
|
||||
2022-07-01T10:51:33.000Z,49.40555543,8.67708163
|
||||
2022-07-01T10:51:42.000Z,49.40499466,8.67692979
|
||||
2022-07-01T10:51:47.669Z,49.40458895,8.67694948
|
||||
2022-07-01T10:51:53.840Z,49.40416906,8.67702318
|
||||
2022-07-01T10:52:00.005Z,49.40382355,8.67724113
|
||||
2022-07-01T10:52:06.176Z,49.40350553,8.67751751
|
||||
2022-07-01T10:52:12.341Z,49.40314888,8.67785638
|
||||
2022-07-01T10:52:18.508Z,49.40273859,8.67812989
|
||||
2022-07-01T10:52:24.674Z,49.40232416,8.67848992
|
||||
2022-07-01T10:52:30.833Z,49.40220921,8.67911913
|
||||
2022-07-01T10:52:36.988Z,49.40197856,8.67962545
|
||||
2022-07-01T10:52:45.000Z,49.40163851,8.68023891
|
||||
2022-07-01T10:52:50.662Z,49.40129879,8.68054592
|
||||
2022-07-01T10:53:07.000Z,49.40050412,8.68132096
|
||||
2022-07-01T10:53:12.700Z,49.40034406,8.68167395
|
||||
2022-07-01T10:53:20.000Z,49.40029889,8.68197948
|
||||
2022-07-01T10:53:27.000Z,49.4000934,8.68233753
|
||||
2022-07-01T10:53:34.000Z,49.39977873,8.68282787
|
||||
2022-07-01T10:53:39.676Z,49.39954051,8.68310713
|
||||
2022-07-01T10:53:45.836Z,49.39926802,8.68338566
|
||||
2022-07-01T10:53:52.006Z,49.39909119,8.68379701
|
||||
2022-07-01T10:54:00.000Z,49.39877088,8.68459149
|
||||
2022-07-01T10:54:05.692Z,49.39865451,8.68498273
|
||||
2022-07-01T10:54:13.000Z,49.39838235,8.68510378
|
||||
2022-07-01T10:54:20.000Z,49.39808397,8.6851097
|
||||
2022-07-01T10:54:25.684Z,49.39778037,8.68529797
|
||||
2022-07-01T10:54:33.000Z,49.39735536,8.6855275
|
||||
2022-07-01T10:54:40.000Z,49.39701056,8.68558536
|
||||
2022-07-01T10:54:49.000Z,49.39683103,8.6859003
|
||||
2022-07-01T10:54:56.000Z,49.39672644,8.68651683
|
||||
2022-07-01T10:55:03.000Z,49.3964463,8.68696265
|
||||
2022-07-01T10:55:12.000Z,49.39620133,8.68741868
|
||||
2022-07-01T10:55:19.000Z,49.39597341,8.6874125
|
||||
2022-07-01T10:55:29.000Z,49.39537879,8.68760769
|
||||
2022-07-01T10:55:37.000Z,49.3949609,8.68750202
|
||||
2022-07-01T10:55:48.000Z,49.39423945,8.6877149
|
||||
2022-07-01T10:55:55.000Z,49.39378364,8.68773376
|
||||
2022-07-01T10:56:03.000Z,49.39340213,8.68778782
|
||||
2022-07-01T10:56:10.000Z,49.39303098,8.68791288
|
||||
2022-07-01T10:56:15.653Z,49.39268479,8.68795369
|
||||
2022-07-01T10:56:21.852Z,49.39248838,8.68813889
|
||||
2022-07-01T10:56:28.021Z,49.3921367,8.68808023
|
||||
2022-07-01T10:56:34.192Z,49.39168962,8.68813309
|
||||
2022-07-01T10:56:43.000Z,49.39117231,8.68814905
|
||||
2022-07-01T10:56:50.000Z,49.39076199,8.68818273
|
||||
2022-07-01T10:56:59.000Z,49.39058452,8.68776805
|
||||
2022-07-01T10:57:04.656Z,49.39048152,8.68746322
|
||||
2022-07-01T10:57:10.827Z,49.39009475,8.68742468
|
||||
2022-07-01T10:57:18.000Z,49.38966856,8.68741891
|
||||
2022-07-01T10:57:26.000Z,49.3896966,8.68683682
|
||||
2022-07-01T10:57:34.000Z,49.38985798,8.68647962
|
||||
2022-07-01T11:00:12.000Z,49.38983544,8.68654936
|
||||
2022-07-01T11:00:19.000Z,49.38982943,8.68686349
|
||||
2022-07-01T11:00:24.649Z,49.38988557,8.68711804
|
||||
2022-07-01T11:00:32.000Z,49.38975355,8.68742027
|
||||
2022-07-01T11:00:39.000Z,49.38968475,8.68789061
|
||||
2022-07-01T11:00:47.000Z,49.38968741,8.68864464
|
||||
2022-07-01T11:00:56.000Z,49.38981096,8.68935897
|
||||
2022-07-01T11:01:03.000Z,49.38991498,8.6898232
|
||||
2022-07-01T11:01:13.000Z,49.39008687,8.69005123
|
||||
2022-07-01T11:01:20.000Z,49.39012705,8.69004198
|
||||
2022-07-01T11:01:42.000Z,49.39012273,8.69044973
|
||||
2022-07-01T11:03:13.000Z,49.39020013,8.69013153
|
||||
2022-07-01T11:03:37.000Z,49.3902416,8.69011779
|
||||
2022-07-01T11:06:03.000Z,49.39010871,8.68987621
|
Loading…
Reference in New Issue
Block a user