Giter Club home page Giter Club logo

pathfinding's Introduction

pathfinding's People

Contributors

honzaap avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pathfinding's Issues

[Feature] Pathfinding using Q* Approach

What I will be doing -

  • Based on recent paper on Q*, I will apply the algorithm to find the shortest path
  • I will add links to relevant articles which mentions the working of algorithm

A* Algorithm correction on distance calculations

Hi,

I'm working on a version to specifically visualise the A star algorithm with similar data and noticed that the results where sometimes very different, even when I removed the additional weights I added based on maxSpeed & disregarded one way edges.

That's when I realised you are currently using the Math.hypot() on the difference in longitude and latitude between two nodes. The thing is that the distance in meters between the latitude lines is always the same, the distance in longitude changes.

Around the equator, 1 degree longitude and latitude is basically the same in distance, for which Math.hypot() will give you the correct distance between two points.
In Finland on the other hand, moving 1 degree left or right (east or west) we only move half the distance of moving 1 degree up or down (north or south).

=>
This is why the A* algorithm will heavily favour any movement left or right.
Using current Math.hypot() for the distance from Point A(Lat 0, Lon 0) & Point B(Lat 0, Lon 1) is the same as the distance between Point A(Lat 88, Lon 88) & Point B(Lat 88, Lon 89), although the actual distance is 348 times bigger.

To fix this you should scale by the cosine of the latitude

Don't forget to attribute OpenStreetMap

Hey, very cool project btw!
I think your project is using OSM, right?
Don't forget to add a little text box in the bottom right to make it clear that the tiles (and I assume the map data for the routing as well?) is OpenStreetMap

(I think you're using mapbox, which uses Openstreetmap and usually automatically puts a textbox there, so not sure what you need to do to make it appear correctly)

It does not render the Map on Firefox

Basically everything work, but the map just does not load in Firefox

Trying the url with Chromium works, so I assume its a Browser compatibility problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.