Hacker Newsnew | past | comments | ask | show | jobs | submit | Amithv's commentslogin

I created this web app originally for designing Pookkalams, which are intricate floral designs made during the Onam festival in Kerala, India. Pookkalams are made using various types of flowers and are laid out in beautiful, symmetrical patterns on the ground.


I think you used standard bus route search with JFK and Heathrow. OpenStreetMap suggests Lisbon since the departure and destination are on different continents, providing a route in close proximity to the destination with access to the sea.

If you prefer the flight path, you can visit dev.sitinshade.com/flight [beta].


It considers the bus's movement, orientation and the changes in time.


Calculation based on azimuth of bus and sun considering change in time and movement of bus.


Backend: Node.js Calculations are performed based on the azimuth of the sun and the bus, taking into account the movement of the bus and change in time.


Thanks for the suggestion.

Time selection relies on the default settings of the browser/system.


Right, locale is set to 24h but I do use US English as a language. I don’t see AM/PM anywhere, but on your site.


The hard part was obtaining information such as solar azimuth, altitude, declination, hour angle, etc without using external APIs. Spent around 5 days implementing backend.


Way too late now, but to help others this fancy Excel sheet provided by NOAA is awesome! It implements all of these equations in Excel and is pretty easily portable to your programming language of choice. https://gml.noaa.gov/grad/solcalc/calcdetails.html

P.S. Using this has made it clear to me how bad most sunrise/sunset calculators actually are.


> P.S. Using this has made it clear to me how bad most sunrise/sunset calculators actually are.

That may just be a function of how you define "sunrise" and "sunset". It is never as simple as "when the sun hits the horizon", but something about some number of arc minutes from something something.


Dependent on the refractive index, which depends on air density and temperature and humidity too; and we have to integrate over the region between the horizon and the upper atmosphere (diagonally, of course)…


Haha, thanks ,yep. I learned all this when I lived in the Yukon and sunset takes about 2 hours...


To be clear I was complaining that basically everyone calculates “sunrise” and “sunset” differently. If you check half a dozen different “sunset” calculators you will get a surprisingly wide variation in the times they provide. At least where I live the error seems to average 5-10 minutes.


> At least where I live the error seems to average 5-10 minutes

And what I meant was you are not seeing "error", it's just a difference in definition.


Calculating the solar position is also pretty important when simulating power production of photovoltaics plants. So, the Python library pvlib has nice functions for working with this: https://pvlib-python.readthedocs.io/en/stable/reference/sola...


I'm not sure what you mean by external APIs but is there a reason you're not using SunCalc[1] on the client to process the route after it's returned from the routing engine?

[1] https://www.npmjs.com/package/suncalc


For anyone wanting to do this calculation yourself, this site is really good: https://www.aa.quae.nl/en/reken/zonpositie.html

I've previously used the formulas on this site to calculate the altitude/azimuth of the Sun and all the planets from a given lat/long/time on Earth.


Yes,OpenStreetMap has


Thanks for the suggestion. That would be a great addition.


Currently OpenStreetMap routing API, would have to be replaced with the Google Maps Transit API.


OpenStreetMap routing API should provide routing with Car, Bicycle and Foot profiles. You might have to modify the API call to change the profile.

PS: There might be other free alternatives to using the main osm.org API which will be more reliable.


Would be great to offer this as an option, even if we would have to fill in our own API key. The train tracks in my country differ quite somewhat from the roads when I try it out. Also. busses take defined routes and not the shortest path. Google Maps provides all these routes.


May I suggest creating an option to add waypoints which should help recreate bus routes?


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: