SuperDARN / pydarn

Python library for visualizing SuperDARN Data
GNU Lesser General Public License v3.0
28 stars 12 forks source link

Altitude values SuperDARNRadars file #23

Closed mts299 closed 4 years ago

mts299 commented 4 years ago

From @aburrell request on PR #19 to add altitude values to the list.

@DannoPeters can you list out some steps on how to do this or possible options?

DannoPeters commented 4 years ago

The current SuperDARN GPS resolution in the superdarn_radars.py data structure is only 1.1km. @mts299 is there a more accurate source for location data?

I would utilize either Google Earth 90m resolution/30m accuracy data set or the Space Shuttle LiDAR 30m resolution/16m accuracy data set. Unless we are able to get more accurate GPS points this would only be useful in areas without large vertical variation such as Saskatchewan.

Through some internet sleuthing I found a Python library which can parse the Shuttle LiDAR: https://github.com/tkrajina/srtm.py Then you could add the elevation data directly to the existing python structure.

It would be best to also know the element heights of the Radars (how high the radar is above the ground). I think the only way to git this data would be from the host institutions directly. I haven't seen anything like this listed on the VT or Dartmouth websites.

DannoPeters commented 4 years ago

It may be worthwhile to also consider how the GPS coordinates are stored. As an example a database of approximate GPS locations of each range gate could be created for ease in plotting data.

One of the industry standards for moving GPS data between programs is GPX (Global Positioning eXchange). This is XML and not the most reader friendly. But there are many free tools available which work well with manipulating this data. GPX can be created from python using: https://pypi.org/project/gpxpy/

Example GPX of current data:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx  creator="DannoPeters.ca" version="1.1" >
  <metadata>
    <link href="https://superdarn.ca/">
      <text>SuperDARN Canada</text>
    </link>
    <time>2019-12-04T17:08:43Z</time>
  </metadata>
  <trk>
    <name>SuperDARN GPS Locations</name>
    <trkseg>
      <trkpt lat="51.88" lon="-176.63">
        <name>Adak Island East</name>
      </trkpt>
      <trkpt lat="51.88" lon="-176.63">
        <name>Adak Island West</name>
      </trkpt>

Then an application utilizing the google maps API can be used to add fields such as elevation, magnetic variation and geoid height. There are many free applications such as GPS Visualizer which can be used to do this. https://www.gpsvisualizer.com/convert To add elevation data, select the elevation source from the drop down at the bottom. I believe the NASA SRTM1 data set covers all of our radar sites.

Yields:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<gpx version="1.1" creator="GPS Visualizer https://www.gpsvisualizer.com/" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
  <name>SuperDARN GPS Locations</name>
  <trkseg>
    <trkpt lat="51.88" lon="-176.63">
      <ele>6.9</ele>
      <name>Adak Island East</name>
    </trkpt>
    <trkpt lat="51.88" lon="-176.63">
      <ele>6.9</ele>
      <name>Adak Island West</name>
    </trkpt>
    <trkpt lat="37.1" lon="-77.95">
      <ele>118.925</ele>
      <name>Blackstone</name>
    </trkpt>
  </trkseg>
</trk>
</gpx>
egthomas commented 4 years ago

The VT radar table has been known to be incorrect many times in the past due to its reliance on manual updates. The definitive source of radar latitude, longitude, and altitudes are the hdw.dat files, which provide altitude to an accuracy of a tenth of a meter (although you may only want to trust it to the nearest meter or so depending on the radar). Furthermore, the geomagnetic latitudes/longitudes/boresites in the VT radar table are most certainly incorrect as those were found using the 2005 epoch of AACGM coefficients, which have been shown to be inaccurate by Shepherd [2014].

mts299 commented 4 years ago

Thanks, @egthomas. We will probably just remove the coordinate stuff then and use the hardware files in the future for getting any of that information. I just needed number of beams and a list of radars for my plotting code.

mts299 commented 4 years ago

Now using hardware files for all radar specifications.