google earth 에서 데이터 분석 - cchamchi/cansat GitHub Wiki

캔위성의 비행 경로 GPS 데이터를 구글 earth에서 분석해 보자

구글 earth에 위치정보를 입력할수 있는 KML(Keyhole Markup Language)파일은 여러가지 기능을 할수 있고 다양한 문법이 존재한다.

자세한 설명은 여기를 참고하세요

그중에서 시간 및 애니메이션 기능과 경로 기능을 이용해서 비행 경로를 분석해 본다.

경로를 따라 이동하는 위치 지점 표시

KML root

아래와 같은 KML root 속에 내용을 넣으면 된다.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
  내용....
  내용....
  </Document>
</kml>

kml 이름 정하기

<name>Points with TimeStamps</name>

Icon style 정하기

 <Style id="hiker-icon">
  <IconStyle>
    <Icon>
      <href>http://maps.google.com/mapfiles/kml/pal4/icon49.png</href>
    </Icon>
    <hotSpot x="0" y=".5" xunits="fraction" yunits="fraction"/>
  </IconStyle>
</Style>

Icon을 지정한 위치에 표시하기

<Placemark>
  <TimeStamp>
    <when>2007-01-14T21:05:43Z</when>
  </TimeStamp>
  <styleUrl>#hiker-icon</styleUrl>
  <Point>
    <coordinates>127.0653686,37.2894783,150.5</coordinates>
  </Point>
</Placemark>

longitude(경도)latutude(위도),altitude(고도) 순서이다. North, East는 양수로, 반대는 음수로 적는다.

이 예제는 실제 캔위성이 낙하는 데이터로 만들어 보았다.

TimeStamp_cansat20180623

경로

캔위성은 고도에 따라 변하는 경로를 3차원으로 보아야 하기에 위의 예제는 부족하다.

노란색 선과 녹색 벽으로 경로를 그려 보자

<Style id="yellowLineGreenPoly">
   <LineStyle>
     <color>7f00ffff</color>
     <width>4</width>
   </LineStyle>
 <PolyStyle>
     <color>7f00ff00</color>
 </PolyStyle>
</Style> 
<Placemark>
  <name>Absolute Extruded</name>
  <description>Transparent green wall with yellow outlines</description>
  <styleUrl>#yellowLineGreenPoly</styleUrl>
  <LineString>
    <extrude>1</extrude>
    <tessellate>1</tessellate>
    <altitudeMode>absolute</altitudeMode>
    <coordinates> 127.0653457,37.2894706,162.2
    127.0653686,37.2894783,150.5
    127.0653991,37.2894821,140.4
    127.0654373,37.289505,131.2
    127.0654754,37.2895202,123.7
    127.0654983,37.2895202,118
    127.0655364,37.289505,113.3
    127.0655593,37.289463,111.2
    127.0655899,37.2894172,110.1
    127.065628,37.2893867,108.3
    127.0656661,37.2893524,107
    127.0657043,37.2893257,105.7
    127.0657577,37.2893066,104
    127.0657958,37.289299,102.7
    127.0658187,37.2893142,101
    127.0657958,37.2893142,99.1
    127.0657958,37.2892837,97
    127.065834,37.2892532,95.5
    127.0658798,37.2892379,93.9
    127.0659332,37.2892303,92.4
    127.0660018,37.2892341,91.5
    127.0660247,37.2892532,90.3
    127.0660247,37.2892646,88.6
    127.0660018,37.2892532,86.7
    127.0660018,37.2892227,85.3
    127.0660018,37.2891921,83.9
    127.0660018,37.2891616,82.6
    127.0660018,37.2891387,81.4
    127.0659713,37.2891349,80
    127.0659713,37.289154,77.9
    127.0659713,37.2891845,76.3
    127.0659866,37.2892189,75.1
    127.0659866,37.2892494,73.6
    127.0659713,37.2892646,72.3
    127.0659561,37.289257,72.4
    127.0659561,37.2892608,72.6
    127.0659561,37.289257,72.5
    127.0659561,37.289257,72.3 </coordinates>
  </LineString> 
</Placemark>

최종으로 두가지 방법을 합친 xml이다 경로 + 지점

google earth에서 xml보기

google earth 를 클릭하여 웹에서 실행한다. chrome 을 쓰길 권장한다.

왼쪽 메뉴에서 My place를 선택하고 import kml file 을 눌러 업로드 한다. 처음에는 My place 밑에 보이는 setting에서 kml upload를 enable 해야 한다.

그럼 굿럭

⚠️ **GitHub.com Fallback** ⚠️