Presentation is loading. Please wait.

Presentation is loading. Please wait.

Arne Bartels Shadow prediction: SQL 2017 spatial data types and astronomy well mixed.

Similar presentations


Presentation on theme: "Arne Bartels Shadow prediction: SQL 2017 spatial data types and astronomy well mixed."— Presentation transcript:

1 Arne Bartels Shadow prediction: SQL 2017 spatial data types and astronomy well mixed

2 Thanks to all Sponsors

3 SQL 2017 spatial data types and astronomy well mixed

4 Agenda Whois Vestas Whoami Motivation Examples How to model? What is needed? Demo1: Drawing circles or Introduction to spatial datatypes Tools 1: Tilt of coordinate system/spherical trigonometry Demo2: Paint the sun in the sky Tools 2: Azimuth, altitude, size Demo3: Add the turbine(s) Bonus : Astronomy, precise to the second

5 Who is Vestas, what are we doing

6 Vestas is currently the world biggest wind turbine manufacturer
Surveillance of plants with turbines Supercomputer Mindstorm 16848 cores 41600GB Memory TFlop/s currently Rank 441 Datawarehouse/Data Mart server Six servers Dev/Test/Prod ETL(”DSA”) DM(”DPA”) SQL 2016 (2017 soon) Prod and Test 40core 3.5GHz 1.5TB Memory Dev 20core 3GHz 256GB Memory Storage raw 160TB, all SSD, 800TB effective capacity Hardware located in Copenhagen DK Core Team of a handful SQL/SSIS-Developers from five countries mainly in Aarhus DK New design center in Porto (No column name) (No column name)

7 Whoami Arne Bartels Working for Vestas Wind Systems A/S in Aarhus DK. Since approx as Lead Software Development Engineer Software developer in wind industry since 2001 Physicist by education, programmer by profession Worked in C/C++,Pascal, Linux scripts/PHP, MySQL… Recent: T-SQL, SSIS, C# LinkedIn

8 Motivation Inspired by real world challenge Encourage to use unusual combination of methods Introduce spatial data types i.e. GEOGRAPHY A shift of perspective might give new ideas Show what Management Studio/SQLServer can do Show off what I can do

9 How to model? Assume worst case i.e. turbine is always pointed into the sun, then the turbine can be modeled as a sphere on top of the tower. The radius is the blade length or a bit more. The house in the shadow can be encompassed by a sphere where no shadow is allowed. Then the sensitive areas can be projected as circles in the sphere, that represents the sky seen from the house Compare to path of the sun seen from the house => simple drawings of circles with GEOGRAPHY are usable

10 What is needed? Path of the sun -> formulas known for ages Turbine picture in the sky -> basic (?) geometry

11 Demo 1

12 Drawing circles or Introduction to spatial datatypes
Goal: introduce the necessary datatypes and operators Necessary tools: Minimum SQL2012, here 2017 SQL Management studio Any Database Imagination…

13 Tools 1: Tilt of coordinate system/spherical geometry
There seem to no way to move GEOGRAPHY elements in SQL directly. Possible solution: parse as XML, recalculate and recreate. How do lat and lon change if we tilt by angle ? Believe me, check here for yourself, or look into the appendix sin 𝑙𝑎 𝑡 ′ = cos 𝜗 sin 𝑙𝑎𝑡− sin 𝜗 cos 𝑙𝑎𝑡 cos 𝑙𝑜𝑛 tan 𝑙𝑜𝑛′ = sin 𝑙𝑜𝑛 cos 𝜗 cos 𝑙𝑜𝑛+ sin 𝜗 tan 𝑙𝑎𝑡

14 Demo 2

15 Model the sun’s area in the sky for different latitudes
Paint the sun in the sky Goal: Model the sun’s area in the sky for different latitudes Subtract the part obscured by the ground, aka night

16 Tools 2: Azimuth, altitude, size

17 Azimuth Precise solution: tan 𝛼= sin 𝑙𝑜𝑛 𝑇 − 𝑙𝑜𝑛 𝑃 tan 𝑙𝑎𝑡 𝑇 cos 𝑙𝑎𝑡 𝑃 − sin 𝑙𝑎𝑡 𝑃 cos 𝑙𝑜𝑛 𝑇 − 𝑙𝑜𝑛 𝑃 Short distance aproximation: tan 𝛼= cos 𝑙𝑎𝑡 𝑇 𝑙𝑜𝑛 𝑇 − 𝑙𝑜𝑛 𝑃 𝑙𝑎𝑡 𝑇 − 𝑙𝑎𝑡 𝑃

18 Altitude Horizontal distance d from .STDistance()
Slant distance 𝑑 𝑠 = 𝑑 ℎ 𝑇 − ℎ 𝑃 2 Assume flat geometry plus horizontal dip 𝜑 2 = 𝑑 2𝑅 Altitude for short distances:𝛼′= tan −1 ℎ 𝑇 − ℎ 𝑝 𝑑 − 𝑑 2𝑅

19 Size Add both radiuses Add sun radius full or partially
𝛿= sin −1 𝑟 𝑇+ 𝑟 𝑃 𝑑 𝑠 °

20 Demo 3

21 Add turbine(s) and houses in the mix
ISEP and a (virtual) turbine

22 Bonus

23 Astronomy, precise to the second

24 Thanks for your attention!


Download ppt "Arne Bartels Shadow prediction: SQL 2017 spatial data types and astronomy well mixed."

Similar presentations


Ads by Google