Skip to content

glaarg-robert/N1CCKCallsignToolkit

 
 

Repository files navigation

Callsign Toolkit by N1CCK

A collection of tools for amateur radio operators to look up and display calsign and callbook return information in a standardized manner

Basic usage

Option 1

using CallsignToolkit;
BaseLookup lookup = new HamCallDevLookup("w1aw");
lookup.PerformLookup();
Console.WriteLine(lookup.Serialize()); 

Option 2:

using CallsignToolkit;
BaseLookup lookup = new HamCallDevLookup();
(HamCallDevLookup)lookup.PerformLookup("w1aw");
Console.WriteLine(lookup.Serialize()); 

Option 3:

using CallsignToolkit;
HamCallDevLookup lookup = new("w1aw");
lookup.PerformLookup();
Console.WriteLine(lookup.Serialize());

Option 4:

using CallsignToolkit;
HamCallDevLookup lookup = new();
lookup.PerformLookup("w1aw");
Console.WriteLine(lookup.Serialize());

Example output:

{
  "License": {
    "DMRID": [
      3109478,
      310938
    ],
    "FRN": 4511143,
    "FileNumber": 9324023,
    "LicenseKey": 780866,
    "GrantDate": "2020-12-08T00:00:00",
    "EffectiveDate": "2020-12-08T00:00:00",
    "ExpirationDate": "2031-02-26T00:00:00",
    "Callsign": "w1aw",
    "LicenseClass": ""
  },
  "AmateurName": {
    "FullName": "ARRL HQ OPERATORS CLUB",
    "FirstName": "ARRL HQ OPERATORS CLUB",
    "MiddleInitial": "",
    "LastName": null,
    "FullNameReverse": ""
  },
  "QSLMethods": {
    "LastLOTWUpload": "0001-01-01T00:00:00",
    "QSLManager": "",
    "UseEQSL": false,
    "UseLOTW": false,
    "UsePaperQSL": false
  },
  "Address": {
    "Address1": "225 MAIN ST",
    "Address2": "",
    "POBoxNumber": "",
    "City": "NEWINGTON",
    "State": "CT",
    "PostalCode": "06111"
  }
}

Base Class

The base class is CallSignToolkit.LookupDetails. It is not intended to be used directly, as it does not have any lookup methods built in.

Provided Properties

  • License : CallsignToolkit.License
  • AmateurName : CallsignToolkit.Utilities.Name
  • Address : CallsignToolkit.Utilities.Address

Provided Method

  • Serialize() : string - returns a JSON formatted serialization of all public properties on the object

Abstract Methods

  • PerformLookup() : Task - Performs a lookup on the callsign and populates the object with the results
  • PerformLookup(string callsign) : Task - Clears the existing object, then performs a lookup on the passed callsign and populates the object with the results
  • ClearResults() : void - Clears all results from the object and resets the callsign

Base Helper Classes

The base helper classes are objects to support serialization and standardization of the lookup properties. They are contained as objects on the base class, but could be used seperately if needed or desired.

CallsignToolkit.License

Provided Properties

  • Callsign : string
  • LicenseClass : string

Provided Methods

  • License() : constructor
  • License(string callsign) : constructor
  • License(string callsign, string LicenseClass) : constructor
  • IsValidUSCall() : bool - Uses a regex to validate the callsign is potentially a valid US callsign. Does not validate against any authoritative database

CallsignToolkit.Utilities.Address

Provided Properties

  • Address1 : string
  • Address2 : string
  • POBoxNumber : string
  • City : string
  • State : string
  • PostalCode : string
  • Country : string
  • Coordinates : CallsignToolkit.Utilities.LatLong

Provided Methods

  • Address() : constructor
  • Address(string address1, string city, string state, string postalCode, string country) : constructor
  • GetCoordinates() : CallsignToolkit.Utilities.LatLong - uses the API provided by maps.co to convert an address to latitude and longitude.

CallsignToolkit.Utilities.LatLong

Provided Properties

  • Latitude : double
  • Longitude : double

Provided Methods

  • LatLong() : constructor
  • LatLong(double latitude, double longitude) : constructor
  • LatLong(string latitude, string longitude) : constructor

CallsignToolkit.Utilities.Locators

Provided Properties

  • GeoCoordinates : CallsignToolkit.Utilities.LatLong
  • GridSquare : string

Provided Methods

None yet.

CallsignToolkit.Utilities.Name

Provided Properties

  • FirstName : string
  • LastName : string
  • FullName : string - If not set directly, returns concatenation of "FirstName LastName"
  • FullNameReverse : string - readonly; returns concatenation of "LastName, FirstName"

Provided Methods

None yet.

HamCallDevLookup : CallSignToolkit.LookupDetails

Extends the base lookup class to provide a lookup method for the API provided by HamCall.dev. This API is free and loads quickly, but currently provides only US based callsign lookups.

Extended properties

HamCallDevLicense : CallsignToolkit.License

  • DMRID : List - List of DMR ID's associated with the callsign
  • FRN : int - The FCC FRN associated with the callsign
  • FileNumber : int - The ULS File number associated with the callsign
  • LicenseKey : int - The ULS License Key associated with the callsign
  • GrantDate : DateTime - The date the license was granted
  • EffectiveDate : DateTime - The date the last change to the license was effective
  • ExpirationDate : DateTime - The date the license expires

HamCallDevName : CallsignToolkit.Utilities.Name

  • FullName : string - The full name of the licensee, including middle initial (if available)
  • MiddleInitial : string - The middle initial of the licensee (if available)

HamCallDevQSL : CallsignToolkit.Utilities.QSLMethods

  • LastLOTWUpload : DateTime - The date of the last upload to LoTW

Extended Methods

  • HamCallDevLoookup() : constructor
  • HamCallDevLookup(string callsign) : constructor

QRZLookup : CallSignToolkit.LookupDetails

Extends the base lookup class to provide a lookup method for the API provided by QRZ. This is a paid service, and provides callbook details for most countries offering amateur radio licenses.

Extended properties

QRZLookup : CallsignToolkit.LookupDetails

  • Aliases : List - List of other callsigns associated with the licensee.
  • ImageURL : Uri - URL to the QRZ.com image of the licensee

QRZAddress : CallsignToolkit.Utilities.Address

  • Attention : string - Attention to line
  • County : string - County
  • Country : string - Full country name
  • EmailAddress : MailAddress - Email address object. Sets email and display name.
  • WebAddress : Uri - Web address object.

QRZLicense : CallsignToolkit.License

  • GrantDate : DateTime - The date the license was granted
  • ExpirationDate : DateTime - The date the license expires
  • ServiceCodes : string - The FCC service codes associated with the license grant

QRZLocators : CallsignToolkit.Utilities.Locators

  • FIPSCode : string - The FIPS code associated with the county of the callsign address
  • DXCC : string - The DXCC entity associated with the callsign address
  • TeleAreaCode : string - The telephone area code associated with the callsign address
  • CQZone : string - The CQ Zone associated with the callsign address
  • IOTA : string - The IOTA code associated with the callsign address

QRZName : CallsignToolkit.Utilities.Name

  • Nickname : string - The nickname of the licensee shown on QRZ

QRZCQLookup : CallSignToolkit.LookupDetails

Not yet implemented.

Ham365Lookup : CallSignToolkit.LookupDetails

Not yet implemented.

HamQTHLookup : CallSignToolkit.LookupDetails

Not yet implemented.

Contributors

This work is licensed under the RPL v. 1.5, and welcomes use and upstream fixes.

Thank you to the following for their contributions to this project.

Primary Author and Maintainer

  • Nick Booth (N1CCK)

Additional Contributions

About

The N1CCK Callsign Toolkit

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%