Sort TTN Gateways by altitude?

I currently have a TTN gateway at around ~1300m in New Zealand and I want to check and see if it’s the highest gateway in the country.

You could parse this: https://www.thethingsnetwork.org/gateway-data/

Or https://www.thethingsnetwork.org/gateway-data/country/nz (and more URLs in Determine which gateway is used by a given node).

Of course, you cannot be sure people know about Gateway Altitude parameter - value and purpose. But using curl and jq one can fetch all New Zealand gateways, sort by altitude, and select some details:

curl https://www.thethingsnetwork.org/gateway-data/country/nz | jq -r '
  [.[]] | sort_by(.location.altitude) | reverse | .[] |
  [
    .location.altitude//"-",
    .id,
    if .owner then
      "[\(.owner)](https://thethingsnetwork.org/u/\(.owner))"
    else
      "unknown"
    end,
    if .location.latitude then
      "[\(.location.latitude), \(.location.longitude)](https://www.google.com/maps/search/\(.location.latitude),\(.location.longitude))"
    else
      "unknown"
    end,
    .description
  ] |
  join(" | ")
  '

Now, it seems “the winner” is not a real gateway, but a single-channel forwarder. :frowning: These should really not be used in the shared TTN community network, and even less so on a position that high, which might make it receive uplinks from many nodes that (rightfully so) expect a fully compliant gateway.

And the winner is...
altitude id owner location description
1270 eui-d8a01dffff435854 greensladenz -44.77768132, 170.32570646 SingleChan-ESP32
702 eui-3235313229006100 netguy -43.200462, 171.444174 NUVOLA.NZ GW1014-Harper
670 eui-3235313253003700 unknown -41.80625, 172.83875 ElectricMagnetic (4VCJ5RVQ+)
656 eui-3235313226006d00 netguy -43.423907, 171.762368 NUVOLA.NZ GW1012 Bushy Stream
630 eui-3235313226005900 netguy -43.496972, 171.686705 NUVOLA.NZ GW1011 Rakaia Gorge
600 nz-wairarapa-masterton-01 jlynch -40.848946, 175.735567 Rangitumau Gateway
593 eui-3235313228002800 icepicknz -39.42236393, 175.40389674 Barry AT Devoli - nzohk-01-snowmass- AU915
566 b827ebfffe389699 jlynch -41.163211822509766, 175.65725708007812 NZ-Wairarapa-Masterton Eringa Teletronics (Port 38553)
442 eui-a840411b7e404150 netguy -43.58469406, 172.72521175 NUVOLA.NZ-GW1005 Mount Pleasant
428 b827ebfffe28b58a jlynch -40.88363265991211, 175.98118591308594 NZ-Wairarapa-Masterton Bute Teletronics (Port 46474)
327 eui-b827ebfffee2af08 opiot -45.77653027, 170.60519317 Poly_Orokonui
319 eui-a840411d19284150 netguy -42.928023, 172.668449 NUVOLA.NZ - 262219 Hawarden
310 eui-3235313264003900 wheronet -37.38, 174.78 Daff - Gateway deployed by WheroNet (AU915-928)
300 wheronet_293e4f wheronet -37.35, 174.85 Klondyke - Gateway deployed by WheroNet (AU915-928)
273 eui-3235313249007100 netguy -43.65850254, 172.63723395 NUVOLA.NZ GW1010 Teddington
250 ttng1 unknown -36.8507194519043, 174.85763549804688
250 eui-00800000a0001a7c wheronet -37.34, 174.91 Kauri - Gateway deployed by WheroNet (AU915-928)
245 eui-00800000a0000a3a wheronet -37.5, 174.87 Waikaretu - Gateway deployed by WheroNet (AU915-928)
237 eui-3235313267004400 netguy -43.625234, 172.587817 NUVOLA.NZ GW1013 Lansdowne
230 wheronet_2942bd wheronet -37.4, 174.85 Ponganui - Gateway deployed by WheroNet (AU915-928)
210 eui-3235313226005800 wheronet -37.31, 174.91 Kaipo - Gateway deployed by WheroNet (AU915-928)
197 eui-a840411b6b844150 netguy -43.58005949, 172.64072455 NUVOLA.NZ-GW1002 Cashmere
150 eui-b827ebfffeee4f4e 600andrew -43.20815544, 172.51976327 North Loburn - Raspberry Pi3
133 happybirdsnz001 happybirdsnz -43.316456, 172.364173 HappybirdsNZ- 001
131 eui-3235313235001e00 wheronet -37.34, 174.96 Hunt - Gateway deployed by WheroNet (AU915-928)
125 eui-b827ebfffea99bc5 opiot -45.91404171, 170.47811731 Poly_RAK3
125 eui-3235313228005e00 wheronet -37.39, 174.98 Fleming - Gateway deployed by WheroNet (AU915-928)
115 eui-343632384a002500 wheronet -37.37, 174.9 Lower Ponganui - Gateway deployed by WheroNet (AU915-928)
100 eui-b827ebfffefb0316 opiot -45.8827256, 170.47782094 Poly_RAK1
100 eui-b827ebfffe2b6342 opiot -45.86883041, 170.4724168 Poly_RAK6
100 ab-home akshatuoa -36.71143142, 174.67606116 At AB Home
99 salemfarms2 andyg -35.58182618, 174.21654818 Raspberry Pi rhf0m301
90 eui-b827ebfffee1f35c techoneer -36.9020957, 174.76744332 Techoneer development gateway
84 eui-60c5a8fffe74d671 sassinak -37.72801993, 175.22239515 RAK7249 Outdoor Gateway
70 eui-323531321c003a00 nelspecs -41.313765, 173.319928 Nelspecs Fringed Hill AU915
70 crayola g1234 -43.66359083, 172.5848539 India frequency plan - https://www.thethingsnetwork.org/docs/lorawan/frequency-plans.html
65 eui-a840411bcd8c4150 netguy -43.60605348, 172.72597496 NUVOLA.NZ-GW1006 Lyttelton
56 kohimarama smbunn -36.85405449, 174.83877417 Simon’s Gateway in Kohimarama Auckland, (916.8-927.5MHz)
45 eui-b827ebfffe11144e dgashby -43.385521, 172.524994 Mandeville TTN Gateway
45 eui-a840411bab9c4150 altissimo_michael -43.56495417, 172.65139202 altissimo_south
45 eui-24e124fffef0718d icepicknz -37.75050313, 176.15605667 Barry AT Devoli - nztga-01-dayna - AU915
41 eui-b827ebfffefaafec wayneji -41.17208767, 174.8214265 RAK831 - Tawa, Wellington, New Zealand
30 eui-00800000a0000c7f opiot -45.86579843, 170.51942104 Poly_Rooftop
20 eui-dca632ffff022a20 unknown -43.574188232421875, 172.61383056640625
18 eui-b827ebfffe3cb35e unknown -45.90653562, 170.30181506 Allanton Gateway 2
15 eui-b827ebfffe03be33 opiot -45.86576213, 170.51949524 Poly_RAK2
10 eui-b827ebfffe2bf907 carbon6 -43.56233869, 172.67104628 carbon6_gateway_201801
10 eui-b827ebfffe078319 alanp -43.55195725, 172.65663905 Page-tek
10 eui-3235313228006600 markuz -43.66176478, 172.55041513 Tai Tapu NZ
8 eui-b827ebfffe541724 sassinak -37.80458829, 174.88492329 RAK831 RPi
7 eui-a840411bcd3c4150 netguy -43.717179, 172.440134 NUVOLA.NZ-GW1004 Selwyn Huts
6 eui-dca632fffe0e8d81 optimho -38.14455371, 176.23515981 Rutland Gateway
6 eui-b827ebfffe049939 getunified -36.66018799, 174.56041901 Getunified Gateway #1
5 jmansloragateway unknown -43.47686516, 172.68560803 Jman’s Lora Gateway
5 eui-a840411d19f04289 bettersense-sam -36.8948823, 174.7428274 bettersense-lps8-01-akl
5 eui-60c5a8fffe761392 unknown -37.97185781, 177.06066388 RAKWireless 7258
5 eui-58a0cbfffe8018a3 wheronet -37.333, 174.906 Internal 1 - Gateway deployed by WheroNet (AU915-928)
1 eui-4c11aeffffc85d28 unknown -36.584991455078125, 174.6999969482422
0 ttngwnz01 unknown -36.86303528, 174.8564322 TTNGW1 Dev Gateway_Auckland_NZ
0 ttngwnz001 unknown -36.85934066772461, 174.8603515625
0 timarudc-gateway-02 timarudc -44.3856141, 171.24287664 Timaru District Council Gateway - Maori Hill
0 think3-office-au915 unknown -39.92928695678711, 175.0464324951172
0 ioa-palmy-gateway tairea -40.35947606, 175.65798201 IoA Gateway
0 eui-dca632fffe0ca741 donnacha -37.9700499, 177.05189462 Ohope beach
0 eui-d8a01dffff60b080 churbro -37.66346516, 176.13943406 ttgo3
0 eui-c0ee40ffff293887 xu7wong -36.8833169, 174.86868312 rg119
0 eui-b827ebfffec0d186 icepicknz -38.39157643, 176.03564904 Barry AT Devoli - nzati-01-tia - AU915
0 eui-b827ebfffeb4fc5f delphinus -45.91335908, 170.46587327 rak
0 eui-b827ebfffe830a45 andyg -35.58271097, 174.21531311 RPi with RAK2245 concentrator
0 eui-a840411d19404150 rob_w_altissimo -43.51949728, 172.63871161 altissimo_central
0 eui-a840411d18fc4150 andkiw -43.558101654052734, 172.59779357910156 Dragino Gateway
0 eui-a840411d078c4150 acutetech -34.97295108, 173.53839198 LG01-N for Acutetech development only.
0 eui-a840411cfe484150 mattway -36.8952746, 174.7015856 Econode2
0 eui-a840411c0b24ffff kandarp -36.87057158, 174.76247308 Auckland
0 eui-a840411bb1dc4150 groundednz -43.51285264, 171.84409431 Grounded Office
0 eui-a840411bace04150 busyman -43.2142776, 172.48213056 North Loburn, New Zealand Coombes gateway
0 eui-a84041180c89ffff bikki -41.244327545166016, 174.79830932617188 BBs Gateway
0 eui-a8404117ff22ffff brunonz -37.0470907, 174.93366591 Takanini B
0 eui-647fdafffe00a72f adroitnz -36.86069124, 174.74854461 Adroit Test Gateway
0 eui-60c5a8fffe76648a unknown -41.20078795, 174.89591458 RAK7258 Gateway
0 eui-60c5a8fffe766143 unknown -41.30425569, 174.83148222 karaka_bay
0 eui-60c5a8fffe760e46 sammunshi -36.88212161, 174.7624635 IoTV HQ - RAK Micro
0 eui-60c5a8fffe74d397 explorertechnz -36.85209811, 174.84085609 GW_007 / Indoor Std / AS923-25 / Neal Demo
0 eui-60c5a8fffe74d343 4inz -45.86389324, 170.51331969 4i Systems Dunedin
0 eui-5049530010417aa1 andkiw -43.5581, 172.5978
0 eui-323531324c006f00 frizzell -43.29520696, 172.19985502 Mikrotik Lora 9 Kit
0 eui-323531321d006100 soundsnet -41.00448713, 173.99605009 Soundsnet LoRa
0 eui-3235313216004e00 soundsnet -41.2766806, 174.01924204 Soundsnet Picton
0 eui-24e124fffef03f7e vangalvin -36.91569677, 174.88977499 UG87 Gateway
0 eui-24e124fffef039d5 crtag -36.80233329, 174.6997014 Disquva UG85
0 eui-00800000a000380e bettersense-sam -36.89491727, 174.74280674 bs_test_multitech-lap3
0 coldcreek-gw-1 unknown -45.91360334, 170.4672712 Cold Creek Gateway 1 with Balena
-5 eui-00800000a0003c2b maj -41.101070404052734, 173.96408081054688 Marlborough District Council - Meshed - AS923
- rg1xx29404b unknown unknown Tom Costello NZ - Laird RG191
- eui-fffeb827eba6e018 unknown unknown McQueens Valley TTN Gateway
- eui-b827ebfffede8aa7 unknown unknown Visual AG Peters Farm
- eui-b827ebfffe5cdd3a unknown unknown Moorpark & Mulberry Orchard Gateway 01
- eui-a840411b7d90ffff unknown unknown IoB-Gateway-002
- eui-a8404117faa1ffff unknown unknown DuinoTech 915 MHz LoRa & WiFi IoT Gateway (XC-4394)
- eui-60c5a8fffe761489 unknown unknown CD_RAK7249_001
- eui-60c5a8fffe761390 unknown unknown RonaBay
- eui-24e124fffef0aa0b unknown unknown A true 8 channel professional outdoor gateway!
- eui-24e124fffef07163 unknown unknown Gateway

“Winner”?, ‘Highest NZ single channel packet forwarder’ sounds more like a candidate for the Razzie Awards. :expressionless:

That’s a fair response I guess, unfortunately due to the remoteness of the location we don’t have any mains electricity. Everything up there either relies on solar or diesel-generated power.

For a few weeks I did run a RAK7243, but due to high power consumption and a lack of sunny days that was a very short lived experiment which resulted in some very unhappy batteries. I’m running an ESP32 based single channel forwarder there now because it uses much less power and is a much less expensive loss if something was to go wrong.

I’ve recently set up another internet connection a few hundred meters higher on the mountain to support a webcamera, that location has new batteries and the panels see more daylight over winter. I could potentially set up a proper gateway there, but I would need something that uses much less power than the aforementioned RAK7243…

1 Like

Recycle it for a Pi Zero or Pi A+ based gateway - that will halve the Pi’s power consumption.

RAK have an interesting feature to store packets when there is no internet connection - which is subject to debate about how to forward them on - maybe there is a middle ground where the Pi transmits once every few minutes so the mobile connection isn’t being used too frequently. Or less controvershal, use a Yagi to Yagi, LoRa to LoRa point to point to relay everything the gateway gets up & down the mountain to something that’s on the internet and can do the processing.

Because of the local environment, I have some interest in gateway (and device) altitudes.

I followed Nick’s kind advise and the results raised some questions:

No altitude: 4 951
Altitude < 0: 65
Altitude = 0: 7 073
Alt 0 to 10: 1 382
Alt 10 to 20: 924
Altitude > 20: 5 865
Totally 20260 gateways

  1. Would this seem to be correct?
  2. Can someone give some advise what the TTN documentation has to say how gateway altitude should be indicated?

Seems like a reasonable range of results for something not mandatory to enter or easily verifiable. LoRaWAN will soon cease to work if the sea levels rise to much in the near future. :wink:

No need to give advise on the TTN documentation - it’s there for all to read: https://www.thethingsnetwork.org/docs/gateways/registration.html

And the settings tab is pretty explicit about what’s expected.

What are you hoping for?

Altitude could/should be set by GPS fix, where GW has capability and connection allows, or if set through the GW TTN Console (GW Console Page -> Settings Tab -> Location-> Altitude) altitude should be set wrt sea level, though many folk look to enter height ref to local ground level which isnt very helpful over all though can be argued more useful in local area context - the higher above local ground the better the reception/coverage its true but really this should be ref to sea level (then that woudl also be consistent and would tie up with GPS enabled systems :slight_smile: Think I debated this with Arjan and other a couple of years back and we concluded the same…am too busy/lazy to do a search for appropriate link right now :rofl:

There are several altitudes for the antenna of our gateways:
above ground level AGL
above mean sea level MSL
GNSS altitudes

Which altitude would make sense? imho the first two.
For me it is not clear which altitude I should enter in the TTN Console

Which is why it was debated back in the mists of time…and conclusion was ref MSL :slight_smile:

3 Likes

Good to know. So far I have always given AGL height.