Skip to content

Using Haversine formulae to calculate distance between Weather Station to Rain Gauge Stations and output to JSON format. Distance comparison can be defined by user.

Notifications You must be signed in to change notification settings

maxng07/Distance_RainGauge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

Correlation Mapping Using Coordinates

Program to correlate between Weather Forecast Station and Rain Gauge Station in Singapore, based on distance derived from Coordinates (Latitude, Longitude) published using Haversine formulae.

User can input a distance of their choice for comparison in the CLI. The program will then retrieve 2 sets of data from Meterological Service Station in Govtech API end points and perform a calculation between Weather Forecast station and Rain Gauge (measuring near real-time rainfall) Stations based on distance computed using Coordinates. If the distance is within the radius distance specified by the user, the results will be output on stdout /on-screen in JSON format. This can then be copied into a JSON file using a standard text editor. For example, a user might want to know within 5km all the Rain Gauge readings from the Weather Forecast station.

The JSON file must be named stations.json to be used together with SG_Weather_GO app.

#Usage
-d defined the distance in Km to be used for comparison.
-h the help menu of the program

Latest software and release notes here

Coordinates (Latitude and Longitude) provided by Meterological Service Singapore from 2 Hour Weather Forecast and Near Real Time Rainfall

Licensing

The Haversine part of the code is adapted and modified from Usman Haversine GO library into a single codebase integrated for use.

About

Using Haversine formulae to calculate distance between Weather Station to Rain Gauge Stations and output to JSON format. Distance comparison can be defined by user.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published