WARNING! This code is kludged together, it is not idiomatic in any way and was born purely out of immediate necessity.
- ensure internect connectivity
- ensure you have "a recent" nodejs/npm installed
git clone git@github.com:m7xer/handy.git
cd handy
npm install
Generate CSV for CHIRP programming, with the 60 most local UK repeaters with access tones, and a bunch of satellites with Doppler adjusted downlinks.
Usage: Pass in your UK Maidenhead locator to obtain the nearest 2M and 70CM analogue voice repeaters for you. Satellite data will be augmented before the final CSV is generated. Modify the script for more features as YMMV!
./scripts/generateChirpCSV <yourMaidenheadLocator>
3 files will be saved to the /scratchpad directory with names like:
allRepeaters_1609502323518.json
(contains all voice repeater info converted from csv here https://ukrepeater.net/csvfiles.htm)suitableRepeaters_1609498800900.json
(filtered and sorted 2M/70CM analogue voice repeaters, the nearest 60 as calculated from the provided Maidenhead locator)stationsAndSatellites_1609498800901.csv
(the final CSV file for use within CHIRP, containing filtered repeaters and doppler adjusted satellite channels)
Sample Output:
$ ./scripts/generateChirpCSV IO92BL
#####
UK Maidenhead locator required for best results! for example:
./scripts/generateChirpCSV IO92BL
home location calculated from IO92BL as {"lat":52.458333333333336,"lon":-1.9166666666666667}
allRepeaters 623
SAVED to scratchpad/allRepeaters_1609499026963.json:
[{"repeater":"GB3AA","band":"2M","channel":"RV53","TX":"145.6625","RX":"145.0625","mode":"AV","QTHR":"IO81RO","where":"BRISTOL","region":"SW","code":"94.8","keeper":"G4CJZ","lat":"51.59","lon":"-2.54","":""},{"repeater":"GB3AB","band":"70CM","channel":"RB0
...SNIPPED...
r":"M0JBR","lat":"50.87","lon":"0.56","":""},{"repeater":"GB7ZP","band":"70CM","channel":"DVU39","TX":"439.4875","RX":"430.4875","mode":"DSTAR","QTHR":"JO01GQ","where":"CHELMSFORD","region":"SE","code":"","keeper":"G6JYB","lat":"51.71","lon":"0.50","":""}]
suitableRepeaters 60
SAVED to scratchpad/suitableRepeaters_1609499026968.json:
[{"repeater":"GB3CB","band":"70CM","channel":"RB14","TX":"433.3500","RX":"434.9500","mode":"AV","QTHR":"IO92BL","where":"BIRMINGHAM","region":"MIDL","code":"67","keeper":"G8NDT","lat":"52.46","lon":"-1.89","":"","distance":1816.2539887041903},{"repeater":"
...SNIPPED...
1.61854566132},{"repeater":"GB3AB","band":"70CM","channel":"RB07","TX":"433.1750","RX":"434.7750","mode":"AV","QTHR":"IO93FK","where":"SHEFFIELD","region":"NOR","code":"82.5","keeper":"M0GAV","lat":"53.42","lon":"-1.54","":"","distance":109870.7957133422}]
SAVED to scratchpad/stationsAndSatellites_1609499026969.csv:
Location,Name,Frequency,Duplex,Offset,Tone,rToneFreq,cToneFreq,DtcsCode,DtcsPolarity,Mode,TStep,Skip,Comment,URCALL,RPT1CALL,RPT2CALL,DVCODE
0,GB3CB,433.3500,split,434.9500,Tone,67,67.0,023,NN,FM,5.00,,,,,,
1,GB3BM,145.7125,split,145.1125,Tone,67.0,67.0,02
...SNIPPED...
,ISS-3,437.8,split,145.99,Tone,67,67.0,023,NN,FM,5.00,,,,,,
113,ISS-2,437.7975,split,145.99,Tone,67,67.0,023,NN,FM,5.00,,,,,,
114,ISS-1,437.795,split,145.99,Tone,67,67.0,023,NN,FM,5.00,,,,,,
115,ISS-0,437.7925,split,145.99,Tone,67,67.0,023,NN,FM,5.00,,,,,,
Satellites included as of 01/01/21 are: AO91 AO92 SO50 PO101 CAS3H IO86 AO27 ISS
Suggested workflow for your radio:
- open CHIRP
- download from radio
- backup *.img file
- run
./scripts/generateChirpCSV <yourMaidenheadLocator>
- import the CSV file (eg.
stationsAndSatellites_1609498800901.csv
) - load into default rows (or modify if you know what you're doing)
- save the new *.img file
- upload to radio
- profit
Displays repeaters on a zoomable open street map in a way that is somewhat more printable than others available. This is a handy reference when trying to identify repeater positions to contact from your newly programmed radio.
- 2M repeaters = blue, above the marker line
- 70CM repeaters = dark red, below the marker line
Station names are given in truncated form and with their zero-based index as they appear in the json (such as that generated by generateChirpCSV which is sorted by ascending distance from the maidenhead lat-lon).
ie. The 70CM repeater GB3EH which was the 20th nearest (and so will be on channel 19 in your radio) becomes:
----x----
3EH(19)
Usage:
open html/repeaterMap.html
Advanced usage:
- paste the output from generateChirpCSV suitableRepeaters or allRepeaters json into the repeaters var at the bottom of repeaterMap.html
- modify
center: [52.458333333333336, -1.9166666666666667]
at the top to see a custom view, save and refresh. - modify to display any other repeaters or areas of interest.
csv generator for repeatersoffer ukrepeater info as json (can be found in allRepeaters json output from running generateChirpCSV)printable local repeater map- spit out a repeaterMap from generateChirpCSV into /scratchpad
- allow for custom output folder for all the csv/json
- calendar with local net info
- generate elevation LOS graphs for repeaters using https://developers.google.com/maps/documentation/elevation/overview?hl=ru
- refactor so it's more maintainable, use ramda for neater list processing, make js adhere to standard.
- grc files for various flows (maybe in a different sdr project)