You are not logged in.

#1 2020-05-24 08:29:51

fra5
New Member
Registered: 2020-05-24
Posts: 1

Trace gps en animation

Bonjour,

Je programme un micro contrôleur ESP32 connecté à un GPS et une carte SD.
J'ai le choix de faire un fichier kml ou un fichier gpx et comme d'habitude les deux me plaisent s'ils avaient les mêmes capacités.

Je voudrais placer plusieurs exemplaires de tracker chacun dans un mobile (vélo, voiture, randonneur, bateau, etc...) et que l'enregistrement s'affiche quelque part sur le web (s'il le faut sur un site perso).

Jusque là aucun problème...
- mais je voudrais que la trace change de couleur suivant la vitesse du mobile : je sais faire en mettant du code dans le kml

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.2">
  <Document>
    <name>Regate</name>
       <Placemark>
            <Style>
				<LineStyle>
					<color>ff0000ff</color>
					<width>2</width>
				</LineStyle>
			</Style>
      <LineString>
        <tessellate>1</tessellate>
        <altitudeMode>absolute</altitudeMode>
        <coordinates>55.374000,-4.640000 55.405000,-4.579000 55.393000,-4.654000 55.367000,-4.655000 55.388000,-4.655000 55.388000,-4.658000 55.193000,-4.585000 55.266000,-4.575000 55.235000,-4.563000 55.219000,-4.563000 55.070000,-4.472000 55.089000,-4.449000 55.089000,-4.449000 55.096000,-4.445000 54.900000,-4.331000 54.858000,-4.326000 54.868000,-4.297000 54.647000,-4.203000 54.607000,-4.184000 54.596000,-4.180000 54.607000,-4.184000 54.436000,-4.094000 54.427000,-4.084000 54.405000,-4.050000 54.405000,-4.044000 54.000000,-3.710000 53.989000,-3.689000 53.515000,-3.290000 53.502000,-3.211000 53.371000,-2.997000 53.311000,-2.920000 53.117000,-2.637000 53.087000,-2.576000 53.074000,-2.573000 52.808000,-2.193000 52.787000,-2.168000 52.494000,-1.909000 52.438000,-1.857000 52.131000,-1.714000 51.914000,-1.637000 51.901000,-1.623000 51.445000,-1.603000 51.443000,-1.612000 51.417000,-1.611000 51.341000,-1.685000 51.332000,-1.688000 51.329000,-1.794000 51.337000,-1.827000 51.399000,-1.918000 51.358000,-1.988000 51.317000,-1.919000 51.337000,-1.905000 51.268000,-1.705000 51.240000,-1.391000 51.111000,-1.111000 51.062000,-1.065000 50.843000,-0.832000 50.800000,-0.770000 50.592000,-0.479000 
		</coordinates></LineString></Placemark>
		<Placemark><Style><LineStyle><color>ff0ff000</color>
		<width>2</width></LineStyle></Style><LineString><tessellate>2</tessellate>
        <altitudeMode>absolute</altitudeMode><coordinates>50.592000,-0.479000
		50.242000,0.060000 50.241000,0.019000 49.960000,0.312000 49.684000,0.676000 49.652000,0.728000 49.486000,1.011000 49.470000,1.023000 49.472000,1.302000 49.450000,1.352000 49.485000,1.494000 49.465000,1.522000 49.458000,1.624000 49.446000,1.663000 49.477000,1.731000 49.492000,1.739000 49.573000,1.700000 49.748000,1.656000 49.993000,1.596000 50.269000,1.468000 50.295000,1.448000 50.620000,1.370000 51.759000,1.504000 52.401000,1.995000 52.867000,2.557000 52.947000,2.648000 52.975000,2.687000 53.412000,3.037000 53.476000,3.067000 54.025000,3.225000 54.155000,3.236000 54.685000,3.199000 54.766000,3.186000 55.369000,3.057000 55.907000,2.894000 55.994000,2.872000 56.396000,2.648000 56.854000,2.135000 56.956000,2.029000 58.106000,1.118000 58.190000,1.077000 58.258000,1.041000 58.790000,0.799000 58.877000,0.756000 59.549000,0.682000 59.747000,0.673000 
		</coordinates></LineString></Placemark>
		<Placemark><Style><LineStyle><color>ff0ff0ff</color>
		<width>3</width></LineStyle></Style><LineString><tessellate>3</tessellate>
        <altitudeMode>absolute</altitudeMode><coordinates>59.747000,0.673000
		60.405000,0.711000 60.628000,0.721000 61.315000,0.804000 61.503000,0.846000 62.183000,1.034000 62.128400,1.195000 63.061000,1.231000 63.061000,1.231000 63.822000,1.382000 64.556000,1.424000 64.708000,1.416000 65.469000,1.347000 66.157000,1.278000 66.245000,1.246000 66.936000,1.152000 67.066000,1.133000 67.823000,1.027000 68.056000,0.985000 68.955000,0.802000 69.125000,0.772000 70.213000,0.584000 70.298000,0.580000 71.342000,0.440000 71.611000,0.388000 72.684000,0.201000 73.706000,0.093000 73.930000,0.119000 74.545000,0.019000 74.640000,0.035000 75.469000,0.425000 75.600000,0.117000 76.698000,0.092000 76.963000,0.061000 77.975000,0.149000 78.130000,0.202000 79.056000,0.532000 79.234000,0.584000 80.468000,1.119000 81.449000,1.506000 81.731000,1.586000 82.696000,1.772000 82.800000,1.797000 83.685000,1.866000 83.822000,1.834000 84.586000,1.666000 84.700000,1.646000 85.356000,1.415000 85.504000,1.356000 86.000000,1.105000 86.093000,1.077000 86.470000,0.997000 87.065000,1.094000</coordinates>
      </LineString>
    </Placemark>
  </Document>
</kml>

- mais aussi avoir la possibilité de visualiser toutes les traces ensemble ou en sélectionnant certaines et surtout en créant une animation qui permettrait en fonction de la variable time intégrée au fichier d'afficher la position de chacun au fur et à mesure.

J'ai trouvé que le site https://www.mygpsfiles.com/app/ permettait ces deux solutions mais il fonctionne en gpx et donc il perd la couleur "vitesse" contenue dans l'affichage en kml https://www.mygpsfiles.com/app/#tBkfShE

Offline

Board footer

Powered by FluxBB