SlideShare a Scribd company logo
1 of 28
Aviation and Erlang
        Thomas Karsten
  barcamp Shanghai, 2010-06-12
About me
• Thomas Karsten
• Hometown: Berlin, Germany
• Current location: Shanghai, China
• Developer and scrum master at The
  NetCircle

• Aviation, long distance cycling
Introduction
• Aviation
 •   Wind Correction Angle

 •   Glidepath

• Erlang Server
 •   TCP Connection

 •   Erlang Interface

• Aviation and Erlang
• Storage Application
1 Aviation


• All about aircrafts
• Design, Operation, Navigation
1 Aviation
 Wind Correction Angle (wca)
1 Aviation
 Wind Correction Angle (wca)
1 Aviation
 Wind Correction Angle (wca)
                 vw




                    v
1 Aviation
 Wind Correction Angle (wca)
                 vw




                    v
1 Aviation
 Wind Correction Angle (wca)
                         vw




                    wca

                    v
1 Aviation
  Wind Correction Angle (wca)
                          vw



wca=atan(vw/v)
with v=150kt, vw=20kt:
wca=7.6
                         wca

                         v
1 Aviation
 Wind Correction Angle (wca)
                    vw




                    v
1 Aviation
 Wind Correction Angle (wca)
                    vw




                    v
1 Aviation
  Wind Correction Angle (wca)
                     vw
                         vw90
vw90=sin(wta)*vw


                     v
1 Aviation
  Wind Correction Angle (wca)
                     vw
                         vw90
wca=atan(vw90/v)


                     v
1 Aviation
 Glidepath
1 Aviation
 Glidepath




 120kt=120nm/h=2nm/min
 t=10.3nm/2nm/min
 t=5.15min
1 Aviation
 Glidepath




 5000ft/5.15min=971ft/min
1 Aviation
 Glidepath




 5000ft/5.15min=971ft/min
1 Aviation
 Glidepath




 (5000ft-1416ft)/5.15min=696ft/min
1 Aviation
2 Erlang Server
  Erlang


• Developed at Ericsson 1986
• Open source since 1998
• Distributed, fault-tolerant applications
• Processes are lightweight
• RabbitMQ, ejabberd
2 Erlang Server
 TCP Connection
 -module(server).
 -export([start/0, stop/0]).
 -export([listen/0]).


 listen() ->
    case gen_tcp:listen(Port, ?TCP_OPTIONS) of
        {ok, LSocket} ->
               NewState=State#state{lsocket=LSocket},
               case gen_tcp:accept(LSocket) of
                     {ok, Socket} ->
                         do_something(Socket),
                     {error, Reason} ->
                         {error, Reason}
               end


               {ok, NewState};
        {error, Reason} ->
               {stop, Reason}
    end.
2 Erlang Server
 Erlang Interface
 -module(listen).
 -export([start/0, stop/0]).
 -export([listen/0]).


 start() ->
    register(?MODULE, spawn(fun() -> listen() end)).


 stop() ->
    ?MODULE ! stop.


 listen() ->
    receive
        {Pid, Request} ->
               io:format("From: ~p~nReceived: ~p~n", [Pid, Request]);
        Any ->
               io:format("Received: ~p~n", [Any])
    end.
2 Erlang Server
 Erlang Interface
 int main(int ac, char** av)
 {
     erl_init(NULL, 0);
     if (erl_connect_init(1, cookie, 0) == -1)
        erl_err_quit("err_connect_init");
     if ((fd=erl_connect(node)) < 0)
        erl_err_quit("erl_connect: Cannot connect to node");


     tuple=create_tuple();
     erl_reg_send(fd, RECIPIENT, tuple);


     return 0;
 }
3 Aviation and Erlang
 Code examples
4 Storage Application
 Code examples
Lessons learned


• How to land an airplane in cross-wind
• Different communication types in Erlang
• How to program a server in Erlang
Aviation and Erlang


 Thank you very much for listening

 Any questions?

More Related Content

What's hot

REBO unloading-components-roro 2014-10-02
REBO unloading-components-roro 2014-10-02REBO unloading-components-roro 2014-10-02
REBO unloading-components-roro 2014-10-02reboostende
 
Original Mosfet MC33151DR2G 33151 MC33151 SOP-8 New
Original Mosfet MC33151DR2G 33151 MC33151 SOP-8 NewOriginal Mosfet MC33151DR2G 33151 MC33151 SOP-8 New
Original Mosfet MC33151DR2G 33151 MC33151 SOP-8 NewAUTHELECTRONIC
 
Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler React London 2017
 
GNAT GPL For Mindstorms
GNAT GPL For MindstormsGNAT GPL For Mindstorms
GNAT GPL For MindstormsAdaCore
 
Ovl by example
Ovl by exampleOvl by example
Ovl by examplealexgn1
 
Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...
Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...
Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...thenickdude
 

What's hot (7)

REBO unloading-components-roro 2014-10-02
REBO unloading-components-roro 2014-10-02REBO unloading-components-roro 2014-10-02
REBO unloading-components-roro 2014-10-02
 
Original Mosfet MC33151DR2G 33151 MC33151 SOP-8 New
Original Mosfet MC33151DR2G 33151 MC33151 SOP-8 NewOriginal Mosfet MC33151DR2G 33151 MC33151 SOP-8 New
Original Mosfet MC33151DR2G 33151 MC33151 SOP-8 New
 
Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler Weapons grade React by Ken Wheeler
Weapons grade React by Ken Wheeler
 
GNAT GPL For Mindstorms
GNAT GPL For MindstormsGNAT GPL For Mindstorms
GNAT GPL For Mindstorms
 
Ovl by example
Ovl by exampleOvl by example
Ovl by example
 
Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...
Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...
Codecraft Dunedin, 2015-03-04, Blackbox feature for Cleanflight, Nicholas She...
 
Appsec obfuscator reloaded
Appsec obfuscator reloadedAppsec obfuscator reloaded
Appsec obfuscator reloaded
 

Viewers also liked

Viewers also liked (7)

McConnell family020505
McConnell family020505McConnell family020505
McConnell family020505
 
5340 Wasrag May 2010
5340 Wasrag May 20105340 Wasrag May 2010
5340 Wasrag May 2010
 
Ciclos biogeoq
Ciclos biogeoqCiclos biogeoq
Ciclos biogeoq
 
Engagement, change, empowerment to harness opportunity & creatively manage ch...
Engagement, change, empowerment to harness opportunity & creatively manage ch...Engagement, change, empowerment to harness opportunity & creatively manage ch...
Engagement, change, empowerment to harness opportunity & creatively manage ch...
 
Chapter04
Chapter04Chapter04
Chapter04
 
5 simple rules to Twitter
5 simple rules to Twitter5 simple rules to Twitter
5 simple rules to Twitter
 
Compclassification0708
Compclassification0708Compclassification0708
Compclassification0708
 

Similar to Aviation and Erlang

PWM wave generator using microcontroller
 PWM wave generator using microcontroller  PWM wave generator using microcontroller
PWM wave generator using microcontroller Swapnil2515
 
swift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientswift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientShinya Mochida
 
Take Off And Landing Performance
Take Off And Landing PerformanceTake Off And Landing Performance
Take Off And Landing Performanceahmad bassiouny
 
「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPT「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPTTsuyoshi Horigome
 
Flyback Converter using PWM IC(LTspice Version)
Flyback Converter using PWM IC(LTspice Version)Flyback Converter using PWM IC(LTspice Version)
Flyback Converter using PWM IC(LTspice Version)Tsuyoshi Horigome
 
Writing Docker monitoring agent with Go
Writing Docker monitoring agent with GoWriting Docker monitoring agent with Go
Writing Docker monitoring agent with GoNaoki AINOYA
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor ConcurrencyAlex Miller
 
Cdd Dual Sample Pulse width modulation Flow Chart Diagram.pptx
Cdd Dual Sample Pulse width modulation Flow Chart Diagram.pptxCdd Dual Sample Pulse width modulation Flow Chart Diagram.pptx
Cdd Dual Sample Pulse width modulation Flow Chart Diagram.pptxRajSingh616745
 
Lego: A brick system build by scala
Lego: A brick system build by scalaLego: A brick system build by scala
Lego: A brick system build by scalalunfu zhong
 
How to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsHow to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsDigitalOcean
 
PWM Buck Converter using Average Model
PWM Buck Converter using Average ModelPWM Buck Converter using Average Model
PWM Buck Converter using Average ModelTsuyoshi Horigome
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in GolangBo-Yi Wu
 
The Joy of ServerSide Swift Development
The Joy  of ServerSide Swift DevelopmentThe Joy  of ServerSide Swift Development
The Joy of ServerSide Swift DevelopmentGiordano Scalzo
 
The Joy of Server Side Swift Development
The Joy  of Server Side Swift DevelopmentThe Joy  of Server Side Swift Development
The Joy of Server Side Swift DevelopmentGiordano Scalzo
 

Similar to Aviation and Erlang (20)

PWM wave generator using microcontroller
 PWM wave generator using microcontroller  PWM wave generator using microcontroller
PWM wave generator using microcontroller
 
Pwm wave
Pwm wave Pwm wave
Pwm wave
 
swift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClientswift-nio のアーキテクチャーと RxHttpClient
swift-nio のアーキテクチャーと RxHttpClient
 
Take Off And Landing Performance
Take Off And Landing PerformanceTake Off And Landing Performance
Take Off And Landing Performance
 
Akka http 2
Akka http 2Akka http 2
Akka http 2
 
「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPT「SPICEの活用方法」セミナー資料(28JAN2011) PPT
「SPICEの活用方法」セミナー資料(28JAN2011) PPT
 
Flyback Converter using PWM IC(LTspice Version)
Flyback Converter using PWM IC(LTspice Version)Flyback Converter using PWM IC(LTspice Version)
Flyback Converter using PWM IC(LTspice Version)
 
Writing Docker monitoring agent with Go
Writing Docker monitoring agent with GoWriting Docker monitoring agent with Go
Writing Docker monitoring agent with Go
 
Erlang/OTP in Riak
Erlang/OTP in RiakErlang/OTP in Riak
Erlang/OTP in Riak
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Cdd Dual Sample Pulse width modulation Flow Chart Diagram.pptx
Cdd Dual Sample Pulse width modulation Flow Chart Diagram.pptxCdd Dual Sample Pulse width modulation Flow Chart Diagram.pptx
Cdd Dual Sample Pulse width modulation Flow Chart Diagram.pptx
 
Lego: A brick system build by scala
Lego: A brick system build by scalaLego: A brick system build by scala
Lego: A brick system build by scala
 
Hexapod ppt
Hexapod pptHexapod ppt
Hexapod ppt
 
How to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking NeedsHow to Leverage Go for Your Networking Needs
How to Leverage Go for Your Networking Needs
 
15757597 (1).ppt
15757597 (1).ppt15757597 (1).ppt
15757597 (1).ppt
 
PWM Buck Converter using Average Model
PWM Buck Converter using Average ModelPWM Buck Converter using Average Model
PWM Buck Converter using Average Model
 
Job Queue in Golang
Job Queue in GolangJob Queue in Golang
Job Queue in Golang
 
The Joy of ServerSide Swift Development
The Joy  of ServerSide Swift DevelopmentThe Joy  of ServerSide Swift Development
The Joy of ServerSide Swift Development
 
The Joy of Server Side Swift Development
The Joy  of Server Side Swift DevelopmentThe Joy  of Server Side Swift Development
The Joy of Server Side Swift Development
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Aviation and Erlang

  • 1. Aviation and Erlang Thomas Karsten barcamp Shanghai, 2010-06-12
  • 2. About me • Thomas Karsten • Hometown: Berlin, Germany • Current location: Shanghai, China • Developer and scrum master at The NetCircle • Aviation, long distance cycling
  • 3. Introduction • Aviation • Wind Correction Angle • Glidepath • Erlang Server • TCP Connection • Erlang Interface • Aviation and Erlang • Storage Application
  • 4. 1 Aviation • All about aircrafts • Design, Operation, Navigation
  • 5. 1 Aviation Wind Correction Angle (wca)
  • 6. 1 Aviation Wind Correction Angle (wca)
  • 7. 1 Aviation Wind Correction Angle (wca) vw v
  • 8. 1 Aviation Wind Correction Angle (wca) vw v
  • 9. 1 Aviation Wind Correction Angle (wca) vw wca v
  • 10. 1 Aviation Wind Correction Angle (wca) vw wca=atan(vw/v) with v=150kt, vw=20kt: wca=7.6 wca v
  • 11. 1 Aviation Wind Correction Angle (wca) vw v
  • 12. 1 Aviation Wind Correction Angle (wca) vw v
  • 13. 1 Aviation Wind Correction Angle (wca) vw vw90 vw90=sin(wta)*vw v
  • 14. 1 Aviation Wind Correction Angle (wca) vw vw90 wca=atan(vw90/v) v
  • 16. 1 Aviation Glidepath 120kt=120nm/h=2nm/min t=10.3nm/2nm/min t=5.15min
  • 17. 1 Aviation Glidepath 5000ft/5.15min=971ft/min
  • 18. 1 Aviation Glidepath 5000ft/5.15min=971ft/min
  • 19. 1 Aviation Glidepath (5000ft-1416ft)/5.15min=696ft/min
  • 21. 2 Erlang Server Erlang • Developed at Ericsson 1986 • Open source since 1998 • Distributed, fault-tolerant applications • Processes are lightweight • RabbitMQ, ejabberd
  • 22. 2 Erlang Server TCP Connection -module(server). -export([start/0, stop/0]). -export([listen/0]). listen() -> case gen_tcp:listen(Port, ?TCP_OPTIONS) of {ok, LSocket} -> NewState=State#state{lsocket=LSocket}, case gen_tcp:accept(LSocket) of {ok, Socket} -> do_something(Socket), {error, Reason} -> {error, Reason} end {ok, NewState}; {error, Reason} -> {stop, Reason} end.
  • 23. 2 Erlang Server Erlang Interface -module(listen). -export([start/0, stop/0]). -export([listen/0]). start() -> register(?MODULE, spawn(fun() -> listen() end)). stop() -> ?MODULE ! stop. listen() -> receive {Pid, Request} -> io:format("From: ~p~nReceived: ~p~n", [Pid, Request]); Any -> io:format("Received: ~p~n", [Any]) end.
  • 24. 2 Erlang Server Erlang Interface int main(int ac, char** av) { erl_init(NULL, 0); if (erl_connect_init(1, cookie, 0) == -1) erl_err_quit("err_connect_init"); if ((fd=erl_connect(node)) < 0) erl_err_quit("erl_connect: Cannot connect to node"); tuple=create_tuple(); erl_reg_send(fd, RECIPIENT, tuple); return 0; }
  • 25. 3 Aviation and Erlang Code examples
  • 26. 4 Storage Application Code examples
  • 27. Lessons learned • How to land an airplane in cross-wind • Different communication types in Erlang • How to program a server in Erlang
  • 28. Aviation and Erlang Thank you very much for listening Any questions?

Editor's Notes