let's check this out cool and that's us coming in live and the notifications should go out and we are recording this and we are going to be uploading this to both bit shooting youtube so just to give you guys a lowdown of what we just did we just finished the current events live stream well for we're doing it for a couple of hours and yesterday we did a meditation live stream where we talked about I sort of shared a sort of a shigong standing meditation that I learned like 20 years ago 22 years ago or so that a friend of mine was a tai chi shigong instructor sort of incorporated that those lives showed me this meditation technique and I learned how to do it about 20 22 years ago or so and every now and then in the last couple of decades I've tried to start up again I do it for a few days and I stop and whatnot and it's sort of a meditation that you want to incorporate into your life and do on a daily basis so we did the live stream on it yesterday and we liked it it was fun and it felt really good doing it and we had a current events live stream set up for today and we just finished our current events live stream and I mentioned that we're going to just follow this up with another meditation live stream just a quick one so what we're going to do is wait until the notifications goes out on discord and twitch and as soon as people start rolling in I'm going to give a little quick recap intro of how this standing meditation is done and I'm tweaking a little bit based on what I did yesterday right there was something that was mentioned Cheryl mentioned that my elbow should have been a little bit lower and the chin you're going to be sort of tucking in it lifts your head and I'm just going to go through the posture again just making sure that the people that roll in because we had a whole bunch of people that were there during the current events live stream and know some people wanted to come down for this so let me see where we're at let me see where we're at we see if notifications go out nice view chill space and it's a phenomenal meditation technique style to do and yesterday I actually went around and show people the lanterns as well that we have we had a little downtime discussion on what the meditation was like and we have another angle here as well that we're going to turn on I'm going to turn on right now let me just check the chat yeah people are slowly rolling in so let me turn on this as well that that that that elder god I got a discord notification you got the discord notification awesome good let's turn on this guy as well this angle as well we'll give it another couple of minutes two or three four minutes because I know some people were planning on coming here Cheryl ride a long time don't see awesome awesome long time don't see I really looking forward to I was like seriously I wanted to do the meditation earlier today but there's nothing wrong with doing it twice in one day but I wanted to do it as soon as possible but I'm glad we're doing it now chicho the gold the gold tea the gold tea chicho your calves I know dude they do I need to I need to do my I need to do I need to get into doing weights I played a lot of soccer so I've been riding that wave for last few decades and I did a lot of weights but I need to hit the gym I need to start doing weights yeah I bet brother I bet I bet actually I need to kick it up a notch I've been lazy I've been lazy I was surprised I was able to hold this this standing meditation for as long as I did but gang should we do let's do this meditation okay I'm gonna go through the intro for it speedy Gonzales stop okay so for those that were here don't know what I'm gonna go through it's gonna be pretty quick for those that weren't there isn't much to this look it's a it's I believe it's called a shigong standing meditation I don't know if there's an official name for it so what you end up doing is you're gonna stand in this position you're gonna point your toes forward with your knees right you're not going to stand like this you're not going to stand like this you're not going to stand like this you're not going to stand like this you're standing straight with your toes pointing forward and you want your feet to be as wide as your shoulder so you're you're not going to go wide like this right that's too wide and you're not going to stand tight like this. What you want to do is position your feet like there as wide as your shoulders. Okay. Then what you need to do is you bend your knees slightly and basically the general just is we're going to bring our arms up like this and you're going to hold this position. Okay. Now sideways when you look at it you're going to point your toes forward and you're going to bend your knees. Now when you're bending your knees make sure your knees don't go past your toes. You don't want to do this right. You want to bend your knees but be solid enough right that you're going to do this basically. Now what you're imagining is that you're hanging from the top of your head by a string. Okay.  You don't do this one that way because you're not lifting weights right you're trying to stretch your spine so when you go into your position here I'm going to go here when you go into your position right what you want to do is visualize yourself hanging from the string and what's that going to do is going to push your chin in a little bit right you're not going to be like this you don't want your head to be out like this right you want to be like this right your arms up and your hips you want to drop as Cheryl told us that's a good term for it you want you don't want your hips to be like this right you want them to be like this right you want it to drop and you're going to be standing sort of stretching out your spine hanging from a string right and you're going to drop your elbows you don't want your elbows to be here like this you want them to be comfortable okay and your hands you're going to be sort of chilling on the same level as your shoulders right you don't want to go up too high you don't want to be too low you sort of want to be within this range okay and that's basically a standing meditation we're going to do and it's difficult at first okay a lot of people when I first did this 20 years ago 22 years ago I could barely hold it more than three minutes like two minutes three minutes four minutes yesterday I was able to do it more I think mainly because I've done it before in the past and some of those muscles are still there right so what you want to do you want to make this meditation do this meditation on a daily basis okay I've been told it's good to do it in the morning because it energizes you so it's a good way to start your day right for me I mainly did this meditate this meditation at night before I was you know during the time when I was winding down from the day and just before I was going to sleep so do this meditation in general and then just do the nightly stuff and go to sleep right and for me it really amplified my dreams a lot it did energize me but it calmed me down and it rejuvenated me and I woke up very energetic okay so it's really up to you when you want to do this but one thing you want to do is you want to do this on a daily basis for as long as you can all right the longest I've lasted is like 35 days okay and holding this posture for anywhere between 45 minutes to an hour you want to go you want to ideally do this meditation for at least 100 days an hour a day right and what you're going to find is that you're going to start you're going to be able to hold this position longer and longer and longer and that's exactly what you're going for and slowly what you're going to feel is your spine your body doing adjustments little minor adjustments you might get shakes happening in different places okay and if you want a more detailed explanation of this meditation we did the live stream yesterday and that video will be up so this is just a follow up because what I'm going to I'm going to modify my posture a little bit and it's going to be trying to do this the first time getting the proper posture is going to be difficult but so don't be too hard on yourself if you miss posture and if you're filming yourself fantastic you can replay the film you can take a look at yourself and go oh yeah I was doing this wrong I was doing this wrong so for me the adjustment I'm making to my posture from yesterday I had my elbows a little too high so I'm going to drop my elbows and I'm going to make sure my chin is tucked in not like this but just enough that it does feel like that the top of my head is I'm being I'm hanging from a rope from the top of my head okay okay now that's the instructions okay and what I'm going to do is I'm going to hold this for as long as I can and I'm not going to when I break my stance if you're still doing your stance continue your stance okay and I'm just going to chill and just pull up a chair and just relax a little bit we're not going to go extremely long in this live stream we're talking about too many other things just want to have a routine where we're doing this okay so don't break your stance if you're holding it longer than I am keep it going keep it going now what you want to do is focus on a point ahead of you and if you're this is your first time doing this or second time or the first few times you're doing this don't necessarily close your eyes because you may lose your balance okay and you should feel burning on your thighs here and a few other places I just read the app when I come in 13 minutes I've never been in live chats before what is he doing he's uh it was a shigong practicing shigong standing meditation love the widespread bookshop thank you I built it okay gotcha never heard of that before dang I had to pause like three times but I jumped back and gg awesome awesome dr. p now free a saunch free a saunch free a saunch so how long did we go 14 minutes 44 seconds I broke sweat yeah I'm sweating as well for sure but maybe I was sitting really low in my stance yeah the lower you go in your stance the harder it is right like I'm I'm going like my leg is shaking right now right so today I went a little lower than yesterday okay longer than yesterday awesome it happens um Cheryl ask for your question um it felt better it it felt looser with my elbows down more so I had my my weakness is my the right shoulder right so it was a little bit less shaking um and it didn't feel as tight so it was nicer lowered down and I did try to go down with the knees a little bit lower uh this time I played defense and ice hockey for 10 years awesome yeah it was better so yesterday's when I was my elbows were higher it was too much and they needed to be lower more natural and like again you can see it when this is higher and it's lower the I think the elbow socket is looser it's better it flows how can you meditate uh with standing and holding your arms up I thought you needed complete relaxation to let your mind kind of free up uh you actually what you end up doing is you're holding a position right in the right form and you're imagining yourself hanging from a rope from the top of your head so you're trying to elongate your spine and you're doing a little hip drop right and that elongates your lower spine as well now what you do when you hold one position you're putting your body into tension there's no doubt about it right but what you're doing is you're forcing your body to try to adjust right minor adjustments to balance out the weight of your body right so there's a lot of meditation for yoga as well when people are doing yoga you're not relaxed in yoga you're tight in yoga where you're tightening up certain muscles and you're getting into a position and you're holding that position now what that does it I don't know the technicals of it but it your body sort of does the minor adjustments it needs to to get the energy flowing in the right direction do let go of the body you do let go of the body you're hold you're you're holding a position are you letting the body adjust to that position right like there's a walking copy copy there's walking meditations that you can do as well so it's not just about becoming completely relaxed it's about getting yourself into a state of mind may it be just being rigid walking relaxing whatever it is right so almost 15 minutes for me how long there might be people still holding the position which is fantastic walking med is a busy area it's so fun walking meditation yeah so fun I love it dr. p you bring a whole different temp to the rhythm you bring a whole different temp to the rhythm I love walking meditation just it's amazing it's amazing and I went down lower this time for myself so I could feel the thighs burning very nicely very nicely my hate can keep me static for quite some time but it's a 2020 phenomenon you think ASMR is a form of meditation it can be yeah sure it's also a way to relax it's also a way to learn right it's it helps it relieves anxiety so once you relieve anxiety it's you're more receptive to information so ASMR is an amazing way a state of mind to be to to tune into if you want to learn something new especially mathematics right dr. p yeah I've been out of the yoga studios for about a month plus now uh due to a foot injury almost ready to get back also it's the only time I feel like I've ever been put into a trance cool in a better in better dancing as well dancing can definitely throw you into a trance there's no doubt about it and rhythmic walking rhythmic anything really gang how long we up time 37 minutes cool I think what we'll do is legs hot legs hot awesome feels good hey dr. p feels fantastic yeah yeah it felt good for me yesterday when I did it when I woke up this morning it was like at the body it it felt like I did a workout it it felt like I did a serious workout and by the way gang thank you for the follows thank you for the support so feels good awesome awesome good gang let's call the stream speedy gonzalez style and what we'll do is I want to try to do this on a daily basis and peace and love indeed and once I get into a rhythm I think we're going to do I might even set scheduled streams where we do this meditation because this was fantastic or I just do them randomly maybe this setup maybe other setups okay aside from that mods thank you for taking care of business gank thank you for the follows thank you for the subs thank you for the discussion thank you for participating in this meditation Cheryl thank you for the feedback in the direction really appreciate it really that would be excellent I think so too Cheryl I think it's it's something I want to incorporate into my life I know it's going to improve my life and if we can share fantastic I think that's one way of making you know supporting each other because it's the motivation aspect of it right so I think it'll be a good thing to do it'll be a good thing to do hello god actually chichou I started timing you when timing when you went completely still 15 minutes could be recorded on this dance okay thanks brother but that means I have to hold it longer on the next one right so it actually puts pressure on the next stance but I'm what I'm going to do is I'll record myself next time if we're not doing a live stream inspiration for sure accountability as well be here and do it be here and do it exactly right and I'll reach out to my friend who taught me this and see see what he's up to he's on the east coast so maybe we because he's he's talked about live streaming as well and trying to start off some kind of daily ritual thing so ritual meditation so all once I upload these I'll talk to him and see where he's at and see what we can do I gotcha tai chi streamer on twitch as well awesome awesome and he's a good instructor my friend I've learned a lot from him gang I hope you have a fantastic evening fantastic morning fantastic afternoon we're gonna do I'm gonna let you know right now most likely we're doing a live stream December 24th and one on December 25th okay one of them most likely is going to be jarring honey and the other one's going to be playing our 10 by 10 puzzle most likely but I'll let you know for sure in like two or three days once I get my rhythm in okay aside from that gang I hope you have a fantastic fantastic next few days bye everyone


Welcome everyone for my talk about interfacing sensor with Zafir for IoT devices before getting into the topic. I would like to have a quick question for everybody. So how many of you already use Zafir in one way or another probably use for development developing a custom some sample application or something towards Zafir. So how many of you already worked on Zafir? Yeah, that's more than two-third of a crowd. Thank you. So then let's get started. So I am Dinesh Kumar K and embedded software engineer at Linemus. At Linemus we primarily focus on embedded Linux as well as Zafir Autos related developments for our customers and various customer hardware developments. So I myself primarily work with Zafir in terms of board support drivers and as well as to some extent for SOCs and we also support our customers in terms of application development let's say for both IoT devices or non IoT devices technically edge computing or battery powered and other various cases. So I also work with embedded Linux development in certain aspects technically providing software services for board support packages, UBoat and also we deliver the product solution in the Yachto. I also work with OTA solution like Rao, SW update together with set of UI application in the back end which we have at Linemus. So I myself live in down south part of India in Cointur. So let's get started with our actual flow of our talk today. So before getting into the actual talk about how sensors of system are lied in Zafir Autos and those talk we briefly go through what a sensor is how it can be classified and so on with some basic info not much of it. Then we'll see how sensors of system in Zafir Autos is and see how it interfaces with the application and so on. Then we'll see how to add a new sensor in Zafir probably you might be interested with this particular topic because you might already have a sensor with you and then you'd like to add this sensor to add this support to the Zafir in sample application and to like to have a play around with the sensor. And finally we speak also about some key insights which I explored in our software development cycle for sensor and Zafir and some key tips and tricks which can be useful for your application development or a driver development for sensors and Zafir. So before going to going to anything what technically a sensor is? So as a Wikipedia says sensor is a physical device which sensors reach the physical world environment or physical data which can be responded or recorded that could potentially be a sensor. So it can either reach the data like temperature, humidity or pressure or acceleration those steps in terms of reading information from the sensor in the physical world or it could provide technical events like reading more than a threshold limit something like pressure limit which is more than certain value more probably we can detect something like methane or carbon emission which is more than a certain level in a factory or a manufacturing unit or so. So those kind of steps which we can interface with the physical microcontroller platform and observe it. So those are all the part of sensor classification so now we know that what a sensor is? So how do we classify this into a broader category sensor can either be a analog sensor or it could be a digital sensor. So analog sensor is a output and analog signal which will be varying in accordance with time and then we need to capture those signal in a ADC block and analog to digital converter block in a microcontroller and sample it and make it as a useful information after sampling at a certain acquisition rate and so on. Where in the digital part of it we have the value straight away comes from the sensor in a form of a digital values meaning we can get a temperature value out of it directly from the sensor or acceleration value directly from the sensor. So technically this information will be a shadow the serial peripheral interface which could be a SQC, SPI or any sort of a serial communication like a CAN bus or also even considering into this matter as it is a serial interface also. So then what is potentially a potential role or a vital role the sensor can play in IoT devices. So an IoT device in any form you can think about capturing some X or Y parameter or a data and process it or sends this information to cloud or the server where we get a process and some extent in the server side and have a data visualization platform in the back end. So the data are captured and controlled we are using a control logic like a PID logic and so on. We could also speak about fleet management manufacturing and there could be n number of possibilities in terms of IoT devices to use a sensor and make use of its functionality to achieve their end use cases. So now that we know what a sensor is and then like now we have to speak about how sensor is laid out in Zafir. So people who come from the operating systems like Linux or free autos or embedded or any kind of operating system for that matter you might already know what a driver model or a device model in one way or another way so like say device model as in the devices will be connected over the bus and then it could be a physical bus and then the physical bus is virtually represented back in the software side of it. Then we have the connection of the devices and like we have a drivers or compiler during the run time of a system whereas in this Zafir case the devices are made in the compile time. Also we see some detail in such insights about how is a Zafir sensor system specifically and how it will be interfaced with internal IO bus or external IO bus which we will see in a moment. So also we speak about certain sensors of system APIs which will be useful in developing an application or your own drivers in the upcoming steps. So what a driver model or the device model specifically in Zafir is like we have various devices in this particular block over there from device A to device D where the couple of devices device A, device B connected to I square C, device C and device D connected to spy everything is connected to a single line of bus and the devices are enumerated and placed over there from the devices perspective the devices created and then user application communicate through the physical peripheral through this generated devices. So the whole point about the device model representation is just to showcase some insights like say there is no bus for each and every independent group of platform like in Linux. So as a first thing in Zafir how does a device look like? So struct device is almost everything in terms of representing the device as well as the whole operation of a driver as well. So we use this struct device everywhere in terms of like driver in terms of application side for consuming this particular device. So struct device is almost everything like when I say a device model which has only one single bus and all these devices are treated as a single device. So every device is represented with this particular struct device and what exactly we have within this particular struct device maybe we will go in detail in the following slides but in brief summary we will have a name for each device and then also configuration instances or configuration details which will be like a device specific configuration and also we will have a data the private data which will usually call and like a driver private data specifically in any other operation system we can say a driver's private data. So that would be kept and will be used during the run time of a driver where the configuration part which will be used for the configuration certain aspects let's say in case of you want you control the flow control or the you control our board rate or so on dynamically those all comes into the configuration part whereas the data part where we feed some data from the physical device which is a serial device to get the serial data from the FIFO of the IP block and then get the data off of it. So such things come under data block of this struct device. So in some of the cases like we need synchronization mechanism we will use some logging mechanism those initialization parts are also come into the data part and apart from the config part and data part there is a one other important thing which is a API which is a most important thing for any specific drivers in software which will have more details about how the devices operate and how do we differentiate one subsystem from another in the later upcoming slides. So we will see more about the API part in the later upcoming slides so that is one of the important aspects which I missed is power management. So in every sensor nowadays IoT devices, edge devices or node devices they are probably powered with very low power cells like coin cell, 3-volt cell and etc. So those things needs to be have a power efficient stuff. So in those cases we need a device power management. So such things need to be handled specifically in the device specific section. So that is why we have a PM device so anyways we will have some following explanation about power management in the following upcoming slides. So as I said like earlier the device model is generic and super generic in a way it is represented by a struct device. So that is as I said struct device is everything we deal with this particular struct device and it is all the device model it is L phase we will see how it is binding together and then how the device is laid out and how the driver and other things are binding together. But then struct device is everything as a part of a device so what else what more we have it here. So we have an unit level any sequence of devices which are all instance based one they are only differ by a level and a priority meaning you will have a UR device and then you will have a sensors connected to a UR and then you will have I2C as a bus then sensors like accelerometer connected to the bus then I2C device must be initialized before the accelerometer sensor itself initialized. So at that moment unit and level are most important when we consider it. So there is also a device API which defines the nature of a subsystem which means we do not have a struct I2C struct spy device or a struct PGA device struct so on so on and so forth. We do not have a device dedicated device for each and every class of it we only have a devices for all the category which is a struct device and how do we really differentiate from one device to another technically speaking device API is the only thing matter which differentiates every other subsystem sir like if you take a UR subsystem you will have an UR FIFO read FIFO write and so on like if you take an I2C subsystem you will have I2C transfer I2C read and write so that is where the devices like that is where the driver APIs are differentiated. So that is a basic differentiation but each and every subsystem will have its own representation of the API. So if we go back to this previous slide we will see an const void point API which meaning it is a void point API which is a type independent data type where we represent specific subsystem or each and every subsystem so it is not a type specific thing so on the device we have a subsystem API which is not specific to any of which do not specific to any of the peripheral devices so but then devices are so statically reserved for every device tree node at a compile time meaning every device objects are coming together and device tree nodes are put together at a compile time and later it can be taken out and used for various purposes in drivers as well as application side of it. So then now that we know what how device model will look like we need to know how to define a device driver in a define a device in a driver so how do we do that we need which we so how we can do that we need to use this API and oppose the parameters required for those API like instance number, unit function where the device specific initialization should be happening this particular function call back or function itself will call by the initialization code of a driver or the kernel before it even comes into the main function it will be done at the kernel run time so let's say if a temperature sensor needs to be initialized or the set of resistance needs to be initialized to specific state and so on not assuming this particular sensor is connected but it is connected to SDA but it is not connected with the SCL line so those kind of sanity checks and also initial configuration needs to be done in the unit function of it so such functionality implement needs to be implemented in unit function then we have a PM device I will come to the PM device later and then we have a data pointer which stores a private data of device specific thing where like in our device will have something like synchronization logs and device specific buffers and so many things those definitions of a private data should be come into this data pointer and as I said earlier configuration pointer where the configuration of the devices should be stored and the references of that device specific configuration will be possible to that configuration pointer then we will have a level and a priority which are the most important things here like level is something like a group before the whole zephyr or something like you will have a pre kernel one pre kernel to post kernel and application level so these are like groupings where let's say five of a subsystem is grouped under pre kernel meaning this needs to be done or initialized before the kernel let's say timer clock and so on needs to be initialized before the scheduler so that the scheduler and other things can function properly let's say we need to do I2C spy which can be initialized under pre kernel to level because those subsystems are not like super critical like clock or timer so that needs to be initialized under pre kernel to level then comes our sensor driver where those things are happened in a post kernel level which needs those configuration from the pre kernel one and the pre kernel two levels so we have this multiple levels in zephyr and we have a priority under it so under each of the levels the priority may vary so like there will be a priority for I2C priority we have a spy priority we have a ur priority and so on like if you want to connect I2C sensor then we have to initialize that I2C subsystem driver before initializing our I2C sensor driver so this is how those parameters are possible to this device DT in defined API and then the most important thing is API pointer which is as I said earlier this is how the every subsystem is differentiating like API pointer here mentions like if we are using sensor API those device specific API's we created under sensor driver will be referenced will be given as a reference to this API pointer so what are the things which we can like we discussed so far how do we define this particular device as an instance here as a driver so as you can see in this particular code snippet device DT in defined is the one which needs to be used with all the parameters which we discussed earlier where you can say index is like it's an integer based on from zero to n minus one based on the compatibility property we are we are using and how many compatibility property we are going to use in our device in order and then the device specific unit function which I show which will be look like this here you can see the device specific unit function where the UR devices is get using those pointers and there is an API device is ready which is used for a sanity check like the device gate function will like here we get the UR device by device DT get DT inst bus that device driver API. So this device driver API is going to this unit function and device is ready API is check for the actual device is in it or not initialized or not so as I said earlier those synchronization mechanisms are have to be initialized in the unit functions of a driver so that also happening in this level. So then if you are having a interrupt like the sensor provides the physical sensor provides an interrupt which also needs to be initialized rarely like moving into the applications level. So this is how the device is initialized for this particular sensor those compatible name is hudseygrove.com which is an fingerprint sensor so this is how we define a device this is how the unit function of that of this particular device will look like and then so coming back to this slide where you have the map file which shows a unit level and you can see the lot of addresses mentioned and what actually it depicts is like how the resources are initialized and what in what levels the services the resources are initialized. So like if you see at the top level of the table you can see ESP32 clock and the kernel heap services here why it is ESP32 is because I use ESP32 as my development environment. So the clock and the heap services are initialized with the maximum priority of 30 under a pre kernel one and then followed by GPIO followed by serial and then you will see at pre kernel level 2 there is a timer initialized. So this shows that clock is in so only after clock is initialized timer can be initialized then coming to our device level it initialized under a post kernel level with a priority of 90. So then the next thing is a device so as I said before device creation itself is like a reservation during a compile time there is no concept of a device creation on the fly during a runtime based on whatsoever like device DR or whatever. So in Zephyr we don't create devices during runtime we created we create device during the compile time as a decision. If you look at the same device mapping files in the Zephyr map I got from the build you can say see like a group of items listed here from the device start to device end you can see at device pre kernel one start there is a device mentioned at device DTS odd 27 which is a device initialized which is a device created for a clock and you can see from the fifth line from the bottom you can see device DTS odd 64 where our sensor driver is initialized and it assigned with the name device DTS odd 64. So this is how the devices are created and looks like in the map file you can see it when you build a sample of it. So we define a device using a device API in a device driver so how do we define a device in a device tree node this is how our device will be look like inside a device tree node there is a UART node which is a primary node then we are going to connect a sensor which is based on UART which will be comes into the UART main node. So you can see as you can see there is this node called node with a label FPS and you can see the compatible property you can see the reg property and integer pavo property. So here you can look at the compatible property that is the main property which creates the instantiation part of it. So this is how the device node will look like so basically what this device tree will happen to this device tree is all the DTS and overlay files are converted into Zephyde or DTS in the build time and then using the YAML file which is a description of the sensor we are going to use with the combination of YAML file and the DTS file we created those are parsed into a C headers which will be look like this for this particular sensor the generator C headers will be look like the processes here as in this image and the C headers which are going to created will be look like this. You can find this also in say the build directory of the of your sample. So we can we already see how we define a device in a device driver how we define a device in a device tree node. Now we are going to see how to obtain a device in application. So this is the code snippet which shows how we can get a device from application. So device dt get1 which is a major which is an important API used here which is going to give the reference of a struct device which is going to be created for that particular compatible property. As I say as you see this only the compatible properties has to grow from 0 to here. So we are going to get the device through this compatible property using the API device dt get1. So that is not the only API available to get the device. You can see there are four other multiple ways we can get the devices. So instantiation part so now we have the device instantiation here in this slide. This is how the multiple instantiation will going to happen. We are having a physical sensor device sensor A and sensor B which is connected to the one single bus and then that sensor A and sensor B both are having both are same sensor and they are having the same peripheral you got so those devices so those physical sensor are only differentiated through the struct device. You can see the overlay will be look like this and from those overlay the devices are going to be created like this. So as I said struct device is everything this is how the device is created and from those device to you overlay. So we have the device instantiation part and all other things now we now spoke about how the sensor subsystem in Zafir is laid out. So as I mentioned earlier we do not have a virtual bus or for each and every IO peripheral or serial peripheral. So where in I2C the spy and you got everything is a simple IO bus here and which will be directly consumed by the sensor subsystem over there that being like own exception which I can compare right now here is this like there is no bus meaning probably the sensor itself is connected to the SOC itself certain cases like Nordic and where you have a temperature sensor which is connected directly to the CPU bus which is a exposing set of register to read a temperature value from it. So that is how sensor on SOC IP will look like and those the peripherals are connected to that IO bus. So but from the perspective of Zafir like I2C mosfet are in the slave will be connected externally so spy mosfet that is slave will be connected externally. So such things will be handled by the I2C subsystem spy subsystem you got subsystem respectively. So the peripherals are communicated those actual physical peripherals are communicated to the sensor subsystem through this respective individual subsystem like I2C subsystem spy subsystem only you got subsystem. The actual sensor going to get the data from the higher level device driver API given out from the sensor subsystem and there is an optional layer called external sensor SDK as you can see there is an option there is a probability like Woot electronic having this external sensor SDK where all the data getting from the sensor readings are happening at the code level in the external SDK. So we are going to export that external SDK into the Zafir as a module and then we are going to use that external SDK for getting the data through this peripheral subsystem API and sensor subsystem API. So that is how we can import the external SDK into Zafir. So this is the overall view of the sensor subsystem and Zafir looks like. So then now coming to the sensor subsystem like in Zafir it provides various operations like sensor sample phase channel get attribute get these are the APIs provided by Zafir for a sensor subsystem. These are classified into basic two operations like reading a sensor data like when we are going to read a sensor data we are going to use those respective APIs and for asynchronous call back or like say when you are having interrupts like you need a data on getting a particular interrupt so that comes over another API called sensor trigger set. So these are the APIs provided by Zafir for a sensor subsystem. And so let's speak each and every API individually. So that's how we need to implement this for our own sensor. So what is a sample phase? Basically a sample phase needs to be implemented on a sensor to fetch all the channels or data from all the channels. So what is basically a channel? Channel is like if you have an IMU sensor which is providing gyro, acero and other things like velocity and so on and every parameter is considered to be a channel. Each accelerometer it's having an X, Y and Z axis. So those X, Y and Z axis are considered as a channel. So this is how the channel sensor is classified a sensor can have multiple channels for example if you take a BMP 288, 280 which is a sensor which measure pressure, ambient temperature and humidity. Those pressure, ambient temperature and humidity are the sensor channels from those we will get data from the sensor to our device driver. As I said earlier device driver have a device private data that's where the channels, that's where the sensor readings are going to be stored. So then with the channel gate API we are going to get those fetched data from the device driver private data to our actual application through this channel gate API. Attributes are nothing but like if you have an accelerometer you would like to have a threshold. Let's say if the threshold reaches more than 100G then you have a 20G or 100G like you need to have an alert or even an event which will be triggered. So for such configuration need to be set we will be having an attribute. So that's where the attribute comes into the place. So sampling frequency those things can be set accordingly in the attributes and get the attributes data from the application user perspective. So and then the final part is a trigger which is an event or you can say interrupt physically underlying. So when we set a threshold how does the device speak back to us? So that's about the call back functionality you can register with and then you have an interrupt fired then you have then you will be handling the interrupt accordingly. Let's say if you can acquire a data with a FIFO or so on that's it like data acquisition. The whole thing can happen here and also that just an event it could be just like a fall detection or a double tap detection. Those are just like an events can be forwarded to the application side. So make sure that the one thing is common across any operating system like for this matter you do not sleep on an interrupt handler. So you do not need a large set of operation under interrupt handler. So these things can be offloaded using the Zephyr API like Zephyr has an work queue. So those interrupt handling parts can be submitted to the other thread. So these are the APIs provided for the sensor in Zephyr. So these are the channels and these are the sensor attributes which are already presented at the Zephyr for various devices like as I said accelerometer having the channel sensor channel X like as I said sensor attribute has a sensor attribute low threshold up threshold. So these are the sensor channels and the sensor attributes available at the Zephyr. So again these are the sensor triggers available at the Zephyr for user to communicate with the actual sensor. So now that we spoke about whole part of like how the sensor subsystem is, how the APIs are arranged in Zephyr. So now we can move into how to add a sensor in Zephyr. So compatibility the first thing. So this is the most important thing most common thing let's say if you have a PCAL driver I mean I'm speaking about sensor driver like any form of driver if you have a driver called a PCAL then like it could be PCA 96 or whatsoever. But then you already have a PCA 95 double X support in Zephyr. Then you have to add up to the existing driver. So these are the possibilities you can add a sensor support in Zephyr. If a sensor have multiple serial interfaces like I2C or SPI they can be offloaded in separate way and the common sensor getting parameters are put into the sensor driver. So these are the ways you can add a sensor in Zephyr. So addition to the driver you can add a device or a shield to contribute to the Zephyr. So when you are going to develop a driver you have to best practice is to have a sample and test cases so that Zephyr is going to other people are going to use it under Zephyr CAs having no issues with it. So this is how you can add a device in Zephyr. So tips and tricks are I land my own driver about it. So always prefer even based application over polling. Like if you are having a sensor with inter-property use an event other than polling. And avoid Memcopy within the driver in all possible ways. So as you can see these are the tips and tricks I have used on developing my sensor. Then so what's here about save nature sensor providing specific power management API. This is the state diagram of power management API which can provide from the Zephyr. So Zephyr provides actually two power management activities like system power management and device power management. We are going to use device power management in the sensor use cases where device runtime power management can be handled from the user application like when to put the sensor into sleep or when to put the kid back the sensor into the active state. So these can be done with power management API probably with a sensor. So these are the ways sensor interfacing with IOD devices. So nowadays battery operated edge nodes are more common in usage. So sensors have to be in low power mode and active sampling need to happen with micro controller activities. So these are the references I have taken. So there are a lot of things mentioned from earlier in the Zephyr developer summit on the ELC presentation. So thank you.


Hey guys it's Camille and today something a little bit different you notice I'm not in the kitchen but I am actually with the orthodontist getting braces after having braces as a teenager I didn't wear my retainers at night who loves to our retainers not me and also just all from having four babies my teeth moved with every baby so much these teeth are starting to all move forward and I have an underbite and overbite problem I'm dealing with I've got all kinds of problems going on and so I was looking into different orthodontists in my area found an orthodontist who specializes in this life so I'm excited I'm nervous and I decided I'd take you along and kind of show you what you can expect as an adult doing a visa line so I met the Fay Orthodontics they are in Caseville Utah they also have an office in Farmington Utah so if you're familiar with Northern Utah this is a really good name that you're going to want to know okay so I think it's about time for my appointment I don't want to be late come with me and we'll get started once you get all checked in at the computer they'll take you on the tour of their beautiful office to kind of show you around this also includes a stop at the adult waiting area which does include a massage chair uninterrupted TV and some nice beverages next they're going to want to take some pictures kind of feels a little like a mugshot but they're going to take pictures of your teeth and your jaw from every angle these spreaders are a little bit uncomfortable but they definitely get the job done you have to make sure you have lots of chapstick on today yeah like I said pictures from every angle so happy to be here today this is happening these teeth gonna be so straight so do you remember those goopy impressions those mouth molds we used to have to do no more this 3d digital scanner takes care of it it scans each tooth and sends the results over to the orthodontist so we can talk about which treatment is going to be best for me oh after having that camera in my mouth I've got my scans back which came so fast like that's crazy there's my mouth there's my teeth here's the work that needs to be done so I'm here with Cherokee she's gonna kind of walk me through yes perfect so and what we're gonna do is I can kind of talk to you about a little bit of the options that dr. if they will present to you okay and what are like your main concerns and questions with treatment and going through the treatment again the main thing and the thing why I've waited so long to come and see someone is because I don't want to wear all the braces again and so the more I've heard about them this line the more I thought okay that seems more like something I could really do oh absolutely yeah it's it's a pretty amazing product and when you're deciding which treatment option works for you you're just going to decide with your lifestyle kind of what works and dr. if they will go through all of that with you okay so as I was kind of researching orthodontics yeah and the best one for me to go to and that was convenient um I saw so much about dr. DeFey that he like specializes in visible line and as you're looking for somebody who's going to do invisible line what are the things you might look for so when you're looking for specifically an invisible line provider and there's a few things to look for so for instance in this line has different tiers of providers which means that they do more production okay basically they treat more patients they do more cases per year um and so they have different tiers so I do know that like dr. Fay is an elite provider which is the highest tier that you can be at crazy you're kind of one of them so he does a lot yes we do a ton okay that's awesome yeah which it's it makes a big difference um because you can I mean if you do a few cases a year you're not going to be familiar with the product so he really kind of mastered how to digitally plan these because it is a software so you do have to get familiar with it so and we were the first to I know hit that status in like the Davis County area so we've really kind of mastered and cued in our process for all of this so so you're saying I'm in good hands yes okay good that might be fine but you know I think you are and um but it's good because it is you know a free console you can kind of make that decision you know for yourself does this work for you so um that's definitely something I would look for when you're kind of searching for providers okay so what I'll do is go ahead and go get dr. de Fay bring him in and what he'll do is he'll do an exam really quick and then he'll sit down and actually go through things with you and go through you know what the design is kind of how the product works and answer any of those other questions all right okay okay thank you no problem well welcome milver so uh excited that you've uh decided to you know come in and and have your teeth looked at here um this is a pretty easy process okay first thing what we'll do is just uh take a look in your mouth put some measurements in the computer and then once we're done there we'll come on over the desk and kind of talk through some things and go through those photos that we took of you okay so it's good all right my teeth twice all right okay so you'll get a good score and this is good after looking at my teeth and taking some really flattering pictures tell me how bad it is so here's uh here's where we are and you came in you let us know you know there's I've noticed my teeth have been moving if I remember right you've had some orthodontic treatment before right two years two years of braces and then maybe sometimes those retainers uh just uh they get lost they get lost over time right and this is not uncommon we see uh we see folks like you all the time we really see most of our adult patients with the mizoline now so we'll kind of talk about that in a second but um so you can see these lower teeth have crowded up some um so uh that's going to be probably the thing that you were most interested in yeah definitely um and you know on the upper two we can see that things have started crowding and there's kind of a narrow front teeth are kind of turning right I totally noticed that especially like just that's where food gets caught right what happens usually is the the bite will deepen over time so without a retainer in uh vertically the top teeth start overlapping the bottom teeth more and that puts pressure on those lower teeth and causes them to crowd like this right um front to back uh the teeth line up pretty close to where we need them to but we may need to have you wear some of those fun rubber bands uh through your treatment hopefully just at night yeah exactly so um so that's that's kind of it we've taken an x-ray here and that gives me an idea of uh some measurements of your upper lower jaw and the angle the teeth are at and uh nice big brain here so that's plenty of room for all my smarts you did that scan earlier and so this is a view here of your teeth now on the left and on the right the computer's just done a quick simulation of a way that we could align the teeth so so much of Invisalign is all done via computer yeah digitally yeah this is crazy yeah so that's that's really changed things drastically in in orthodontics over the past few years and you know Invisalign when it first came out it was a really a great idea but it it really wasn't that effective until more recently so you've timed this at a good time yeah but now we have that ability to to use our you know education to give those teeth where we want them so like for example this tooth me looks like it's tipped a little and so even though the computer liked that I'm not really satisfied with that so we're going to go in and and do some some changes here um and so the aligners that I wear are going to turn my teeth right exactly so so what we do is we're we order a whole set series of aligners so say in your case it might be you know 30 sets of aligners and and then we have you switch them out once per week and so we'll give you a series of maybe 10 at a time and you'd wear those aligners and we have an example of those here actually okay cool so this is the aligners so you can see they're just a flexible plastic material yeah so super thin super light that's nuts yep so I mean it's super light yeah and the plastic has changed in the past few years too the first plastic that they used was very rigid and so it didn't adapt to the teeth as well didn't move the teeth as efficiently so now it's it's it's really comfortable and it works really well so I don't know if you can see this but there's some little tooth colored bumps on those teeth you can feel those if you want come here and so those also make the the treatment much more effective so if you just have a slip cover over the teeth it's likely not going to move those teeth as if we're not going to be able to have control over the root of the teeth and those things that really make the the result a nice finish and so we put those attachments on they're they're customized to every individual case but that's that's something that will be stuck onto your teeth okay so the consultation ended up going really well and I was just really impressed with the entire office with just all of the state of the art technology um and just the way that they answered all of my questions and all of my concerns so I ended up going forward and um I'm gonna do and this align and so be sure to tune in next week because I'm gonna go get the aligners put on get the brackets put on my teeth and um just start this process and I'm excited to share how it goes excited to share my results um when I'm all said and done be sure to tune in next week and see as I get started so have a good day you guys we'll see you later


So, we will have a look at the two chapters of the two lectures that we covered. The first one was basically on introduction to propulsion system. So, it is an introduction. So, on that I do not want to do any numericals. We will do numericals based on level flight. So, the first question is a analytical question. You have to derive something and that question is about estimation of the velocity that is to be used for level flight. So, here is the first question. There is an aircraft with wing loading W by S. That means the aircraft weight is W and the wing area is S. It is cruising at a fixed altitude. So, that means rho is constant. And also the pilot flies it at an angle of attack at that velocity to ensure that its CL by CD is maximum. Given this condition, what should be the velocity of the aircraft to maintain the steady level flight or the cruise flight assuming a parabolic drag polar. That is CD is equal to CG0 plus KCL square. Remember that the parabolic drag polar is only an assumption. In real life the drag polar or the drag variation of the aircraft is not parabolic. Typically we see CD0 plus K1 CL square plus K2 CL. There is a K into CL term also.  So, now the question is open to you. You have to derive the condition for V, the velocity for cruise such that CL by CD is maximum. And what is that velocity in terms of W by S in terms of CG0 and in K. So, your answer should contain a formula V for minimum CL by CD is equal to a function of W by S K and CD0. So, can you please derive the expression? So, the way to do this is first you get the condition for CL by CD maximum. What is the value of CL or V at which CL by CD is maximum? Does anybody know the answer already? What is the condition for CL by CD to be maximum? Yes please. CD is 0. That is clarified where is equal to 2 and 2 is equal to 1. Ok that is great. So, when the two drag terms are going to be equal that means when CD0 when CD0 is equal to K that is the condition. But can you derive this condition? So, to derive the condition what you will do is you will say that CD0, CD is equal to CD0 plus KCL square. Take a partial derivative with respect to CL such that CL by CD is maximum. Because you can easily derive it. So, ultimately as we heard the condition you will get will be CD0 is equal to K.  Let us assume that the optimum condition for CL by CD to be maximum is CD0 is equal to K. If that is the case now it is very simple to derive the expression for velocity. So, please do that. Ultimately I should get an expression which says V is equal to a function of W by S, CD0 and K. So, whenever somebody gets the answer you just raise your hand. What is your answer? V is equal to you have to take K. I told you I want the answer in terms of only CD0, K, W by S and may be rho. That is all. I do not want to see anything else in the expression. W by S, rho, CD0 and K all of it is power 1 by 4. Then you do it. If you have something like square, square and power 4, 1 by 4 you do it make it little bit more elegant. Your answer may not be wrong but you can reform it slightly. It is actually very straight forward you have to just say lift equal to weight. Therefore, W is equal to half rho V square SCL. So, take S on the denominator on the left hand side. You get W by S is equal to half rho V square CL and CL is nothing but root of CD0 by K. So, that is it. It is a very straight forward expression. So that means if you know the drag polar of the aircraft that means if you know CD0 and K and if you know it is wing loading W by S, for a given altitude you can calculate what is the true airspeed required such that the CL by CD is maximum and if CL by CD is maximum then that is the condition corresponding to thrust required is minimum because we got it from drag required is equal to minimum. So, it is a nice elegant expression which can be very handy in calculating at what speed should you fly an aircraft so that the thrust required is minimum. Just look at the W by S which is easily available for every aircraft CD0, K and rho. Moving on, the next question is to try and get a variation of thrust available and thrust required at sea level for an actual aircraft and to do this exercise I have chosen this very beautiful aircraft called as the Fertile Republic A10 or also called as the Warthog. I say it is a beautiful aircraft but many people find it very ugly. But as I always say in war in combat we do not have a beauty contest, we have a contest of capability. So, let me present to you my friends, Fertile Republic in a war scenario. See how this aircraft can be used to create havoc. I have a question, as this aircraft is drifting away or peeling away it is throwing out some things. Can you see that? There are some white things coming out from the aircraft. Have you observed? What are these? What are these white things which the aircraft is shedding as it goes into a turn? Yes, smoke, smoke flare. What is the smoke flare for? Is the aircraft a smoker? Before going for a fight let me have a smoke. What is it for? It is not a smoke flare, there is a better word for it. You are near the point but not exactly. Anybody else? Maybe this side somebody. Yes. Afterburner is afterburner behind the engine, this is ahead of the engine. See once again, see where is it coming from and why will it come in pulses? Afterburner will be a continuous, you see it is coming out in pulses, so it is not a pulse jet but it is coming in pulses, okay. Anybody else? This is active under missile called flares. Correct. Not any under missiles, only the heat seeking missile, correct. So an aircraft that flies low and in the enemy territory for attack is always going to be under the radar of heat seeking missiles. So these are called as magnesium flares. These are a kind of a safety or a counter measure. So to confuse the infrared heat seeking missiles, you throw out magnesium flares. It is also called as a CHAF, C-H-A-F-F, CHAF dispensers. So you create very high heat source so the missile can be misguided, okay.  So the aircraft has peeled off and now you are going to combat. The Air Force wants to buy the new aircraft F-35 which is very expensive. As you saw to buy 50 F-35, they have to cancel or retire 300 of these aircraft and this is very effective. It is doing a lot of good work. So therefore, Senator John McCain says I will not support this activity of encouraging F-35 and downgrading or retiring A-10. So they have got a new lease of life, they have been refurbished and they are still being used. So there are several interesting design features of this aircraft but our question today is on performance. Okay. So we will look at a very, very boring thing that is a steady level flight of Warthouse. No combat, no bombs, no missiles, okay. So we are going to look at this particular aircraft and these are some of the key characteristics, the wing reference area, the aspect ratio and zero lift drag coefficient. Notice that the value of CDO is very high, it is 0.032 whereas the value is normally of the order of 0.02 or even 0.01815 for very smooth aircraft. So this is not a very smooth looking aircraft. It has got lots of appendages which come out because it carries armament. It is meant to carry a lot of armament. So it is not a very pretty aircraft, not aerodynamically very smooth but does not matter, okay. It has extremely powerful engines and not one but two of them form reliability point of view. So two jet engines, each of them giving you approximately 40 kilo Newtons of static thrust at sea level. So 80 kilo Newtons of thrust available at sea level from two engines. The weight of the aircraft is 103,000 Newtons. Our job is two-fold. We have to plot the power required curve at sea level and also we have to plot the power available curve at sea level and hence get the value of the maximum velocity at sea level, okay. That is our job today, okay. So to do this, first thing you do is please note down these four or five important things somewhere in your notebook, SW47 square meters, AR of wing 6.5, CD0 0.032, the Oswald Efficiency Factor or E as it is called 0.87, W103047 Newton and T will be 4298 Newton. These numbers please note down, okay. So how do we do this? We look at some velocities, say 100 meter per second. Is this a realistic number for an aircraft of this type, 100 meter per second some people are saying no. What is the problem? Is it too high, yes? But maybe it can fly at this speed, okay. It is not too high, it is not beyond the expected Vmax. We will know very soon whether it can fly or not depend on whether the thrust available is equal to thrust required or power available equal to power required or more, okay. Let us choose a number 100 meter per second, okay. So dynamic pressure at sea level for an aircraft which has got a speed of 100 meter per second is half rho V square. Now this is the first place where many students make a mistake. Observe and notice carefully. You are putting density in kg per meter cube which is 1.225 at sea level. You are putting velocity in meters per second. When you put these numbers, although the density is in kg per meter cube, the answer q infinity will not come in kg per meter square, it will come in Newton per meter square. The reason for that is units have to be balanced on both sides, okay. So q is dynamic pressure, it could be kg per meter square, it could be n per meter square. But you check density is kg per meter cube, velocity is meter per second. So this is kg per meter cube into meter square per second square. When you cancel the various units, you will find that g or meter per second square remains. So therefore the answer that you will get will be in Newton per meter square. Many people make this mistake because they have taken kg per meter cube, they think the answer is in kg per meter square. But be careful about these things, okay. So 6125 n by n square is the dynamic pressure at sea level at this velocity. Now the lift coefficient Cl for level flight is W by Qs because lift has to be equal to weight. W is in Newton's 103, 047, Q is 6125, S is 47, these numbers are not going to change. W and S are going to remain the same. So therefore Cl will be 0.358. This is a very appropriate number, Cl in level flight normally tends to be approximately between 0.3 to 0.4. So that is a right ballpark between 0.3 to 0.4 is the expected value of Cl for level flight. Once you know the Cl, then you know the value of E which is 0.87 AR which is 0.5. So therefore you can get the value of CD. Once you know the value of CD, you can get the value of D drag and thrust equal to drag. So the thrust required will be W by Cl by CD. Okay, remember there was a mistake in my notes, in my notes I had shown this thing little bit differently I think. So Tr is W by Cl by CD. So that is 103, 047 by CD, Cl by CD which is 9.13 which is 11287 Newtons. The thrust required is only 11287 Newtons, the thrust available is actually 40,000 into 2, quite a lot. So we are comfortable at this speed, we have much more thrust than required. Power required will be thrust into velocity, velocity is 100 meter per second, thrust required is 11287. So the power required will be 112900, so it will be in watts, 1.129 internal time power 6 watts or 1129 kilowatts okay. So now in a graph paper or in a sketch against 100 meter per second on x axis you have to mark a point 1129 kilowatts on the y axis, simple. This is how you get the power required at a given speed for study level flight. So we have used two conditions here, lift equal to weight, thrust equal to drag. Power available is basically the thrust available into the velocity, thrust available is going to be given to you, two engines each of 40298, so therefore it will be 80596 into V infinity in watts which will be 80.596 kilowatts, I have just divided by 1000. So total power available is 80 kilowatts. So at 100 meter per second, the velocity of 100 will give you 8059 kilowatts. Required 1127 available 8059, required is only one eighth of available, so absolutely no problem okay. So now we need to repeat this for other velocities. So I will just show you what we have already obtained for one particular speed correct. So now we have to take a guess, at this speed power available is 8 times power required roughly and the power required is proportional to V cube, so we need to take a guess up to what number we can go but we do not know a priory, our job is to find out where is the maximum. So what we can do is take some rough numbers, so I have just taken numbers 130, 160, 190. So now each one of you, you have a choice of any two velocities, just write down on your notebook the number, choose any number between 130, 160, 190, 220, 250, 280, 310. You can choose some other number also but then you cannot verify, because for these I have the values, so you can verify okay. So pick up any two numbers, any two numbers, any two velocities of your choice and what you do is fill up this table for your aircraft or sorry for your operating condition. Also there is one more column to be put which is the power available. At sea level we assume that the power available is not going to change much with the velocity, power available will be changed, sorry it will be proportional to velocity. So it is a sea level, so the maximum value remains the same, just multiply by the velocity you have chosen. So put one more column where you have P available in kilowatts okay, so this is a exercise for individuals but you have a choice of two velocities, whatever number you like, the first thing you need to calculate is dynamic pressure for which density is the same but velocities are different. So see what velocities have you chosen, 310 okay, that is it, one velocity, so I said choose two velocities. So at 310 do you get power required more than power available which means that you have crossed the maximum speed. So we have one hint from Sushil, if his calculations are right which I assume will be then the maximum velocity is below 310 okay, so Sushil take 280 maybe because 310 is more than what your aircraft can handle, 310 m per second would be almost near Mach 1, Mach 1 is 330 or 340 okay, so 330 and 310 means you are almost near Mach number 1, in other words it seems that this aircraft cannot fly supersonic at sea level but please note this is not an exact calculation, this is a small example, small example for the classroom purposes, so do not take it literally that these numbers are perfectly correct. Also remember one more thing that CD equal to CD0 plus k2l square is actually a parabolic approximation, if you reach very high Mach numbers near one for example, there will be other drag terms which will come into play, you will have probably a critical Mach number much before 0.9, so therefore this particular simplistic calculation may not be applicable but nevertheless we want to use it for the classroom purposes, okay anybody else have you finished two velocities, which one have you chosen, 220 and 310 okay, so you have for three velocities now, so are you confirming to me that the aircraft can fly at 280, power approximate, so which is more, PA is more which means the maximum velocity is slightly more than 280, no more than 280, no more than 280, does anybody know what is the maximum velocity, you cannot, it will be more than 280 less than 310 unless somebody does for 300, okay, so let us see the table now, okay, look at the numbers, I have the numbers only for power required, power available I do not have the numbers here, so check for the numbers against the velocity which you have chosen, if the numbers are not matching then please look at your calculations, so is there anybody who has a difference of opinion, so are these numbers okay, at least for your velocity, they seem to be okay, so we notice that the CL by CD is actually maximum at 100 itself amongst the numbers given as the velocity increases beyond 100, CL by CD is reducing, so it may be worthwhile to try 80 meter per second as a velocity, maybe at that velocities you may have a CL by CD higher than 9.13, we do not know, it is a matter of just calculating, okay, so this is something you can try out yourself, in fact what you can do write a small code and using that code you can calculate the value of power available and power required and then plot the graph, what will be nice if somebody can upload on Moodle, the value of p required p available for velocities from say 10 meter per second that will be too less I think, something like say 25 meter per second to the maximum value at C level, okay, so whoever wants to do it just to brush up their knowledge can do it and upload, so this is the, yes, yes there is a question. Can we assume that rag is called the maximum velocity can provide and then do it from behind? You can do that also but how do you know, you can do that to get the value but then you will get two answers, you will get a lower value and the higher value, so you can take the higher of the two, yes you can do that, if your question is just to find the velocity at which you can fly max, you do not have to do all this, you can do it directly by a single equation but I wanted to see the plot because I want to look at many more things, for example I also want to know what is the velocity to fly at which thrust required is minimum, what is the velocity required at which the power required is minimum, I want to confirm that CL by CD is actually minimum and I am more curious, I also want to plot CL 3 by 2 by CD and I want to confirm that CL 3 by 2 by CD is also maximum or minimum at a particular value, okay, so that is why I want you to do this, so here is the graph for power available versus power required for this example, for speeds below 100 we have not drawn it because we have not taken it up but you could do it and with that we get the intersection at around 295 meter per second, so by this very simplistic calculation the maximum speed of the aircraft at sea level will be 295 meter per second, actual value will be less than this because the drag will increase very rapidly, maybe this velocity is more than the critical Mach number, so therefore the drag will rise rapidly, so roughly this value can be considered, okay, let us look at what happens to the same thing at a higher altitude, so question number 3 is everything else remaining same just change the altitude of operation as 5000 meters, so earlier you had a thrust required and thrust available at sea level, now we want thrust required and available at a height of 5000 meters, so to do this we need to know 2 things, one thing we need to know is what is the density of air at 5000 meters, now this is the number which you can actually calculate because if you assume ISA conditions which we have to assume unless it is stated explicitly in the question you can assume the conditions to be ISA, okay, whenever there is a question if not mentioned you have to assume ISA, so under ISA conditions how will you find density of air at 5000 meters, what is the procedure you will follow? Sir we know that the temperature is 565 degrees per kilometer, okay under ISA conditions I agree that temperature drops at the rate of 6.5 degrees per kilometer, fine. So this whole formula just to memorize it under ISA conditions it becomes T by T naught to the power 5.258, yeah, so what is T1, what is T naught, how much T naught at sea level? 288 degree Kelvin, and density? 1.225 or 1.2256 kg per meter cube, correct, very good, so you know T naught, you know rho naught, you can get T1 by subtracting 6.5 degrees per kilometer and this subtraction is acceptable till 11 kilometers, from 1125 it remains constant, above that do not bother, it is not aeronautical, it is space, okay, so it is very simple, up to 11 kilometers reduce 6.5 degree per kilometer and T by T naught to the power 5.256 will give you the value of density, so that number comes to, you can just cross check this please quickly, 288.16 minus 6.5 into 5 upon 288.16 to the power 5.258 should be 0.7634, no, that should, that will give you the ratio and that ratio into 1.2256 should give you 1.73, just check it, right, so density of air at sea level is known, so 5 kilometers is known. Now we have to assume, you have to assume something now, we have to assume some variation of power required, velocity and temperature, so temperature we do not have to assume, we know it is the variation like this, now you may not need this, you can say I do not want to worry, I will take the value of, I will take the value of v true at some altitude and calculate the value of C L, then K, then C D, then T and then P, okay.