Skip to content

An F# library that given a latitude and logitude record will return the direction of the Kaaba, also known as the Qibla.

License

Notifications You must be signed in to change notification settings

doniseferi/qibladirection

Repository files navigation

GitHub Workflow Status GitHub top language License Coveralls GitHub last commit GitHub issues

An F# library that given a latitude and logitude record will return the direction of the Kaaba, also known as the Qibla. The algorithm is based on The Correct Qibla by S. Kamal Abdali.

Install

dotnet add package QiblaDirection

or from Visual Studios package manager console

Install-Package QiblaDirection -ProjectName YOUR_PROJECT_NAME

Example

open QiblaDirection

(*
  Case: Ok,
  trueNorth: Degrees 118.93071604419522
*)
GetQiblaDirectionHandler.qiblaDirectionQueryHandler' { lat = 51.522079; lon = -0.191380 }
open QiblaDirection

(* Output:
  Case: Error
    [
      {
        message: "Please provide a latitude value between -90 to 90"
        invalidField: "latitude"
      },
      {
        message: "Please provide a longitude value between -180 to 180"
        invalidField: "longitude"
      }
    ]
*)
GetQiblaDirectionHandler.qiblaDirectionQueryHandler'{ lat = 90.0012; lon = 180.0121 }

About

An F# library that given a latitude and logitude record will return the direction of the Kaaba, also known as the Qibla.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages