try stuff with map

This commit is contained in:
unknown 2020-11-26 10:46:00 +01:00
parent fc1998976f
commit 7f7af3ebac
4 changed files with 1143 additions and 15694 deletions

41
.idea/workspace.xml generated
View File

@ -24,12 +24,10 @@
<component name="ChangeListManager">
<list default="true" id="99c957e4-aa42-481d-843d-3fbc901e0f79" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/index.html" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/chart.js" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/chart.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/hike.geo.json" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/hike.geo.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/map.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/scripts/websocket.js" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/websocket.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/server.go" beforeDir="false" afterPath="$PROJECT_DIR$/server.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/hyperimu.json" beforeDir="false" afterPath="$PROJECT_DIR$/hyperimu.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/static/scripts/hike.geo.json" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/hike.geo.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/static/scripts/map.js" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/map.js" afterDir="false" />
<change beforePath="$PROJECT_DIR$/static/scripts/websocket.js" beforeDir="false" afterPath="$PROJECT_DIR$/static/scripts/websocket.js" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -97,17 +95,6 @@
</key>
</component>
<component name="RunManager" selected="JavaScript Debug.index.html">
<configuration default="true" type="ArquillianJUnit" factoryName="" nameIsGenerated="true">
<option name="arquillianRunConfiguration">
<value>
<option name="containerStateName" value="" />
</value>
</option>
<option name="TEST_OBJECT" value="class" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="go build git.timovolkmann.de/gyrogpsc/serial" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true" nameIsGenerated="true">
<module name="gyrogpsc" />
<working_directory value="$PROJECT_DIR$" />
@ -134,6 +121,7 @@
<recent_temporary>
<list>
<item itemvalue="JavaScript Debug.index.html" />
<item itemvalue="Go Build.go build server.go" />
<item itemvalue="JavaScript Debug.Index1.html" />
</list>
</recent_temporary>
@ -157,6 +145,9 @@
<workItem from="1606230402424" duration="7000" />
<workItem from="1606234182736" duration="2404000" />
<workItem from="1606292037599" duration="5100000" />
<workItem from="1606334443454" duration="578000" />
<workItem from="1606347411314" duration="2000" />
<workItem from="1606382549020" duration="989000" />
</task>
<task id="LOCAL-00001" summary="initial working version">
<created>1604747925521</created>
@ -279,44 +270,44 @@
<screen x="0" y="23" width="1680" height="1027" />
</state>
<state width="1638" height="346" key="GridCell.Tab.-1.right/0.23.1680.1027/0.-1417.2560.1417@0.23.1680.1027" timestamp="1604750445987" />
<state width="1877" height="348" key="GridCell.Tab.0.bottom" timestamp="1605997889830">
<state width="1877" height="282" key="GridCell.Tab.0.bottom" timestamp="1606334333228">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1638" height="273" key="GridCell.Tab.0.bottom/0.-1417.2560.1417/0.23.1680.1027@0.-1417.2560.1417" timestamp="1604948042531" />
<state width="1877" height="348" key="GridCell.Tab.0.bottom/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1605997889830" />
<state width="1877" height="282" key="GridCell.Tab.0.bottom/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1606334333228" />
<state width="1638" height="273" key="GridCell.Tab.0.bottom/0.23.1680.1027/0.-1417.2560.1417@0.-1417.2560.1417" timestamp="1604913985770" />
<state width="1638" height="273" key="GridCell.Tab.0.bottom/0.23.1680.1027/0.-1417.2560.1417@0.23.1680.1027" timestamp="1604760252890" />
<state width="1638" height="273" key="GridCell.Tab.0.bottom/0.23.1680.1027@0.23.1680.1027" timestamp="1604933111805" />
<state width="1638" height="273" key="GridCell.Tab.0.bottom/0.23.1920.1116@0.23.1920.1116" timestamp="1605380018474" />
<state width="1638" height="330" key="GridCell.Tab.0.bottom/0.23.1920.1177/0.-1417.2560.1417@0.23.1920.1177" timestamp="1605641533913" />
<state width="1638" height="273" key="GridCell.Tab.0.bottom/0.23.1920.1177@0.23.1920.1177" timestamp="1605533225921" />
<state width="1877" height="348" key="GridCell.Tab.0.center" timestamp="1605997889830">
<state width="1877" height="282" key="GridCell.Tab.0.center" timestamp="1606334333228">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1638" height="273" key="GridCell.Tab.0.center/0.-1417.2560.1417/0.23.1680.1027@0.-1417.2560.1417" timestamp="1604948042530" />
<state width="1877" height="348" key="GridCell.Tab.0.center/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1605997889830" />
<state width="1877" height="282" key="GridCell.Tab.0.center/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1606334333228" />
<state width="1638" height="273" key="GridCell.Tab.0.center/0.23.1680.1027/0.-1417.2560.1417@0.-1417.2560.1417" timestamp="1604913985769" />
<state width="1638" height="273" key="GridCell.Tab.0.center/0.23.1680.1027/0.-1417.2560.1417@0.23.1680.1027" timestamp="1604760252890" />
<state width="1638" height="273" key="GridCell.Tab.0.center/0.23.1680.1027@0.23.1680.1027" timestamp="1604933111805" />
<state width="1638" height="273" key="GridCell.Tab.0.center/0.23.1920.1116@0.23.1920.1116" timestamp="1605380018473" />
<state width="1638" height="330" key="GridCell.Tab.0.center/0.23.1920.1177/0.-1417.2560.1417@0.23.1920.1177" timestamp="1605641533912" />
<state width="1638" height="273" key="GridCell.Tab.0.center/0.23.1920.1177@0.23.1920.1177" timestamp="1605533225920" />
<state width="1877" height="348" key="GridCell.Tab.0.left" timestamp="1605997889830">
<state width="1877" height="282" key="GridCell.Tab.0.left" timestamp="1606334333228">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1638" height="273" key="GridCell.Tab.0.left/0.-1417.2560.1417/0.23.1680.1027@0.-1417.2560.1417" timestamp="1604948042530" />
<state width="1877" height="348" key="GridCell.Tab.0.left/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1605997889830" />
<state width="1877" height="282" key="GridCell.Tab.0.left/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1606334333228" />
<state width="1638" height="273" key="GridCell.Tab.0.left/0.23.1680.1027/0.-1417.2560.1417@0.-1417.2560.1417" timestamp="1604913985768" />
<state width="1638" height="273" key="GridCell.Tab.0.left/0.23.1680.1027/0.-1417.2560.1417@0.23.1680.1027" timestamp="1604760252889" />
<state width="1638" height="273" key="GridCell.Tab.0.left/0.23.1680.1027@0.23.1680.1027" timestamp="1604933111805" />
<state width="1638" height="273" key="GridCell.Tab.0.left/0.23.1920.1116@0.23.1920.1116" timestamp="1605380018472" />
<state width="1638" height="330" key="GridCell.Tab.0.left/0.23.1920.1177/0.-1417.2560.1417@0.23.1920.1177" timestamp="1605641533911" />
<state width="1638" height="273" key="GridCell.Tab.0.left/0.23.1920.1177@0.23.1920.1177" timestamp="1605533225919" />
<state width="1877" height="348" key="GridCell.Tab.0.right" timestamp="1605997889830">
<state width="1877" height="282" key="GridCell.Tab.0.right" timestamp="1606334333228">
<screen x="0" y="0" width="1920" height="1040" />
</state>
<state width="1638" height="273" key="GridCell.Tab.0.right/0.-1417.2560.1417/0.23.1680.1027@0.-1417.2560.1417" timestamp="1604948042531" />
<state width="1877" height="348" key="GridCell.Tab.0.right/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1605997889830" />
<state width="1877" height="282" key="GridCell.Tab.0.right/0.0.1920.1040/-1440.113.1440.860@0.0.1920.1040" timestamp="1606334333228" />
<state width="1638" height="273" key="GridCell.Tab.0.right/0.23.1680.1027/0.-1417.2560.1417@0.-1417.2560.1417" timestamp="1604913985770" />
<state width="1638" height="273" key="GridCell.Tab.0.right/0.23.1680.1027/0.-1417.2560.1417@0.23.1680.1027" timestamp="1604760252890" />
<state width="1638" height="273" key="GridCell.Tab.0.right/0.23.1680.1027@0.23.1680.1027" timestamp="1604933111805" />

View File

@ -1,65 +1,15 @@
{
"os": "hyperimu",
"pocket": [0, 0, 0],
"tmd3702_rgb rgb sensor": [3542, 344, 161],
"sns_tilt": [0, 0, 0],
"pickup": [0, 1, 0],
"game rotation vector": [
0.015651894733309746,
0.008504520170390606,
0.7119147181510925
],
"lsm6ds3c accelerometer-uncalibrated": [
0.0958355963230133,
0.33526939153671265,
9.70869255065918
],
"lsm6ds3c accelerometer": [
0.0958355963230133,
0.33526939153671265,
9.70869255065918
],
"sns_smd": [0, 0, 0],
"motion_detect_": [0, 0, 0],
"pedometer": [0, 0, 0],
"sns_geomag_rv": [
0.011661887168884277,
-0.01352102030068636,
-0.5377604365348816
],
"stationary_detect_": [0, 0, 0],
"op_motion_detect": [0, 0, 0],
"orientation": [71.09732055664062, -1.9538215398788452, 0.5922810435295105],
"dpc": [0, 0, 0],
"ak0991x magnetometer-uncalibrated": [
56.32729721069336,
-55.112823486328125,
-213.12313842773438
],
"ak0991x magnetometer": [
-11.573108673095703,
6.1475372314453125,
-25.809066772460938
],
"gravity": [0.10144591331481934, 0.3342645764350891, 9.800426483154297],
"rotation vector": [
0.01086709089577198,
-0.014117014594376087,
-0.581230103969574
],
"sx9324_sar": [0, 0, 0],
"linear_acceleration_": [0, 0, 0],
"tmd3702_light ambient light sensor": [11, 0, 0],
"lsm6ds3c gyroscope": [
-7.216770900413394E-4,
4.0413951501250267E-4,
-1.3968441635370255E-5
],
"device_orient": [0, 0, 0],
"lsm6ds3c gyroscope-uncalibrated": [
-0.0023666713386774063,
0.0014509651809930801,
-0.005396670661866665
],
"tmd3702_proximity proximity sensor": [5, 0, 0]
"smartphone": {
"os": "hyperimu",
"Timestamp": 1606308915986,
"orientation": [99.6939697265625, -36.261940002441406, 4.91012716293335],
"lsm6ds3c gyroscope": [0.5955139398574829, -0.031028389930725098, 1.511426329612732],
"GPS": [49.12283027, 9.19640999, 212.3125],
"NMEA": [" ", " ", " "]
},
"serial": {
"timestamp": 37539672354,
"position": [0, 0, 0],
"orientation": [0, 0, 0]
}
}

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ var map = new mapboxgl.Map({
style: 'mapbox://styles/mapbox/streets-v11',
zoom: 0
});
var emptyjson = {
var empty = {
type: "FeatureCollection",
features: [
{
@ -20,23 +20,763 @@ map.on('load', function () {
// We use D3 to fetch the JSON here so that we can parse and use it separately
// from GL JS's use in the added source. You can use any request method (library
// or otherwise) that you want.
d3.json(
'static/scripts/hike.geo.json',
function (err, data) {
if (err) throw err;
//d3.json(
//'static/scripts/hike.geo.json',
//function (err, data) {
//if (err) throw err;
// save full coordinate list for later
var coordinates = data.features[0].geometry.coordinates;
//var coordinates = data.features[0].geometry.coordinates;
// start by showing just the first coordinate
data.features[0].geometry.coordinates = [coordinates[0]];
//data.features[0].geometry.coordinates = [coordinates[0]];
// add it to the map
map.addSource('trace', { type: 'geojson', data: data });
//map.addSource('trace', { type: 'geojson', data: data });
map.addSource('route', { 'type': 'geojson', 'data': {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "LineString",
"coordinates": [
[
9.196275472640991,
49.12280972701122
],
[
9.19629693031311,
49.122757066649065
],
[
9.196267426013947,
49.1227219597099
],
[
9.196237921714783,
49.12268685274588
],
[
9.196205735206604,
49.122642969005895
],
[
9.196168184280396,
49.12259908522708
],
[
9.196090400218964,
49.122556956762885
],
[
9.196015298366547,
49.12252536039125
],
[
9.195816814899445,
49.122421794365344
],
[
9.19578731060028,
49.12246041223081
],
[
9.195752441883085,
49.122495519355134
],
[
9.195720255374908,
49.1225306264546
],
[
9.195685386657715,
49.12257099958827
],
[
9.195658564567566,
49.122602595930815
],
[
9.195634424686432,
49.12263419225324
],
[
9.195604920387268,
49.12266052250654
],
[
9.19557273387909,
49.12268334204809
],
[
9.195548593997955,
49.12271318297122
],
[
9.195532500743866,
49.12273951318259
],
[
9.195497632026672,
49.12276057734161
],
[
9.19557273387909,
49.12281850373281
],
[
9.195524454116821,
49.12285712128936
],
[
9.195497632026672,
49.12287818539843
],
[
9.195476174354553,
49.122904515522194
],
[
9.195586144924162,
49.12300983587742
],
[
9.195840954780579,
49.1232152099268
],
[
9.19605016708374,
49.1233942532759
],
[
9.196152091026306,
49.1235346789797
],
[
9.196280837059021,
49.12368212554077
],
[
9.196393489837646,
49.12382606104651
],
[
9.196511507034302,
49.123924358225025
],
[
9.196581244468689,
49.12404371882266
],
[
9.196720719337463,
49.124173610911306
],
[
9.196838736534119,
49.12435967195905
],
[
9.196951389312744,
49.124501850213676
],
[
9.197013080120087,
49.1245896143649
],
[
9.19705867767334,
49.12465280445759
],
[
9.19714719057083,
49.12476865275172
],
[
9.197292029857635,
49.12495120102961
],
[
9.197361767292023,
49.12506529336202
],
[
9.197455644607544,
49.125175874910624
],
[
9.197522699832916,
49.12529347723932
],
[
9.197605848312378,
49.12543565281655
],
[
9.197745323181152,
49.125690163634275
],
[
9.197841882705688,
49.12584989044582
],
[
9.19790893793106,
49.12598328826778
],
[
9.197978675365448,
49.12612195141281
],
[
9.198064506053925,
49.12627290072483
],
[
9.19819325208664,
49.126525652032335
],
[
9.198254942893982,
49.12668011053043
],
[
9.198305904865265,
49.12679770929164
],
[
9.198405146598816,
49.12695743253551
],
[
9.198488295078278,
49.12716981099699
],
[
9.198619723320007,
49.12720315959838
],
[
9.198799431324005,
49.127229487425765
],
[
9.199027419090271,
49.12716630061657
],
[
9.19931173324585,
49.127129441607394
],
[
9.199504852294922,
49.12708556179883
],
[
9.19965773820877,
49.12704870272959
],
[
9.199883043766022,
49.12700482284956
],
[
9.200116395950317,
49.1269732293119
],
[
9.200357794761658,
49.12690653177737
],
[
9.200548231601715,
49.12688546937944
],
[
9.20065551996231,
49.126911797375485
],
[
9.200770854949951,
49.12695743253551
],
[
9.200899600982666,
49.12702061961085
],
[
9.20103371143341,
49.12706800986451
],
[
9.201240241527557,
49.12711891045688
],
[
9.20141190290451,
49.12714874871086
],
[
9.2015540599823,
49.127191750868846
],
[
9.201587587594986,
49.127187362895256
],
[
9.201736450195312,
49.1271601574503
],
[
9.201810210943222,
49.127157524664504
],
[
9.201871901750565,
49.12715313668789
],
[
9.201933592557907,
49.12710925690026
],
[
9.202055633068085,
49.12697498450896
],
[
9.20224204659462,
49.12691530777389
],
[
9.20237347483635,
49.126887224579605
],
[
9.202480763196945,
49.126842466955814
],
[
9.20254647731781,
49.12681613892294
],
[
9.202671200037003,
49.126769626030736
],
[
9.202869683504105,
49.126692396981234
],
[
9.202970266342163,
49.12665729282806
],
[
9.203054755926132,
49.12662218865002
],
[
9.203156679868698,
49.12659147247387
],
[
9.203227758407593,
49.126569532336404
],
[
9.203289449214935,
49.126551980219446
],
[
9.203341752290726,
49.12653179527724
],
[
9.203158020973206,
49.126483526903876
],
[
9.203088283538818,
49.12646334193381
],
[
9.203002452850342,
49.12644140173965
],
[
9.202857613563538,
49.12640278697433
],
[
9.202712774276733,
49.126357151303814
],
[
9.202632308006287,
49.126325557353475
],
[
9.202412366867065,
49.12626236939239
],
[
9.202256798744202,
49.126213223144774
],
[
9.202122688293455,
49.12616758729978
],
[
9.201961755752563,
49.12612546186714
],
[
9.2018061876297,
49.12607982594142
],
[
9.201698899269104,
49.126037700434225
],
[
9.201596975326538,
49.125999085354515
],
[
9.20129120349884,
49.125883239934964
],
[
9.201119542121887,
49.125827072361396
],
[
9.200921058654785,
49.12578143616102
],
[
9.200685024261473,
49.125676121692166
],
[
9.200513362884521,
49.12560591192202
],
[
9.200336337089539,
49.12554623353922
],
[
9.199842810630798,
49.125360176943595
],
[
9.199681878089905,
49.12527592467067
],
[
9.1995370388031,
49.12522677744532
],
[
9.199456572532654,
49.12518816173411
],
[
9.19932246208191,
49.12513199337321
],
[
9.199220538139343,
49.12508635653314
],
[
9.199113249778748,
49.125023166992925
],
[
9.199016690254211,
49.12496699844514
],
[
9.198925495147705,
49.1248932771296
],
[
9.198732376098633,
49.12480551351584
],
[
9.198582172393799,
49.124721260300475
],
[
9.198474884033203,
49.124647538619605
],
[
9.198367595672607,
49.12459839077146
],
[
9.198265671730042,
49.12455626400573
],
[
9.198126196861267,
49.124542221742516
],
[
9.198099374771118,
49.12450360549822
],
[
9.198126196861267,
49.12441584119478
],
[
9.198174476623533,
49.12433509789843
],
[
9.19828176498413,
49.12430701324279
],
[
9.19831931591034,
49.12427190740087
],
[
9.198254942893982,
49.12420871682283
],
[
9.198115468025208,
49.124149036758475
],
[
9.197981357574463,
49.124085846023824
],
[
9.197836518287659,
49.124026165811614
],
[
9.197707772254944,
49.12395595370529
],
[
9.197557568550108,
49.12386467781845
],
[
9.197487831115723,
49.12381201857656
],
[
9.197385907173157,
49.123717231800214
],
[
9.197214245796204,
49.12367510428589
],
[
9.197010397911072,
49.123566274708274
],
[
9.196908473968506,
49.123474998104186
],
[
9.196704626083374,
49.123401274570526
],
[
9.196602702140808,
49.123348614836544
],
[
9.196484684944153,
49.123260848488954
],
[
9.196339845657349,
49.12319414596088
],
[
9.196216464042664,
49.12313095400942
],
[
9.196135997772217,
49.12306776197748
],
[
9.19607162475586,
49.12299754851418
],
[
9.195937514305115,
49.12295893106699
],
[
9.195835590362549,
49.12289222813283
],
[
9.195733666419983,
49.12282903579667
],
[
9.195638447999954,
49.122754433629495
],
[
9.195600226521492,
49.12273293063105
],
[
9.195574074983597,
49.122708355764296
],
[
9.195574074983597,
49.12269431297779
],
[
9.195623695850372,
49.1226412136555
],
[
9.195666611194609,
49.12260961733753
],
[
9.195688739418983,
49.12258021519025
],
[
9.195733666419983,
49.12253106529318
],
[
9.19575646519661,
49.12250034658276
],
[
9.195783287286758,
49.12247269972715
],
[
9.195801392197609,
49.12244988008865
],
[
9.195815473794937,
49.122438470265486
],
[
9.195830225944519,
49.12242047784666
],
[
9.195859730243683,
49.122431887674
],
[
9.195901304483414,
49.122448563570735
],
[
9.195931479334831,
49.12246787249679
],
[
9.195965006947517,
49.12248367070343
],
[
9.195998534560204,
49.122498152388445
],
[
9.19603407382965,
49.12251307290797
],
[
9.196063578128815,
49.12253501484029
],
[
9.196093752980232,
49.122546424641236
],
[
9.196127280592918,
49.1225600286313
],
[
9.19615812599659,
49.12258109286655
],
[
9.196201711893082,
49.12261927177015
],
[
9.196238592267036,
49.12267237111598
],
[
9.196262061595917,
49.12270045669739
],
[
9.196281507611275,
49.122722837383684
],
[
9.196305647492409,
49.122746534569934
],
[
9.196302965283394,
49.1227693540719
],
[
9.196292236447334,
49.12279392890845
],
[
9.196286201477049,
49.122811482355665
],
[
9.19628955423832,
49.12282815812477
],
[
9.196309000253677,
49.1228479057388
]
]
}
}
]
}
});
map.addLayer({
'id': 'trace',
'id': 'route',
'type': 'line',
'source': 'trace',
'source': 'route',
'paint': {
'line-color': 'yellow',
'line-opacity': 0.75,
@ -62,6 +802,6 @@ map.on('load', function () {
window.clearInterval(timer);
}
}, 10);
}
);
//}
//);
})