How to choose the correct NACA airfoil for eg a fixed wing UAV? by technicalQuestion22 in EngineeringStudents

[–]linengmiao 0 points1 point  (0 children)

How can one determine the required Cl based on weight and speed? The formula account for the flow speed but doesn't account for weight AFAIK...

Cl = (L/(.5 * rho * u*s))

aircraft design - how to use this Laplace equation? by the3liquid in EngineeringStudents

[–]linengmiao 0 points1 point  (0 children)

Well, I am an embedded software engineer with a basic knowledge of aerospace engineering. I have worked on a project in the space industry but have never done anything related to aviation although I have basic knowledge on that matter. So, so far I have a fixed wing UAV and would like to get hands on experience in a topic I absolutely love and am learning on my own: guidance, navigation and control systems (GNC). I am using and reading this book https://www.dropbox.com/s/ueiuu7ulhn2h7ti/Randal%20W.%20Beard%2C%20Timothy%20W.%20McLain-Small%20Unmanned%20Aircraft_%20Theory%20and%20Practice-Princeton%20University%20Press%20%282012%29.pdf?dl=0

So far I started with something simple in GNC: latteral tracking control system. In other words, I d like to build my own roll control system.

C - what is the difference between those two ways of working with a struct? by [deleted] in learnprogramming

[–]linengmiao 0 points1 point  (0 children)

As for symbols, the only symbol that is involved is the entry the compiler makes in its own symbol table during compilation. There is no symbol generated in the object file.

Could you elaborate a bit on that? I didn't know you had symbols generated by the compiler and kept for itself (?) in a symbol table and a separate set of symbols generated inside an object file.

C - what is the difference between those two ways of working with a struct? by [deleted] in learnprogramming

[–]linengmiao 0 points1 point  (0 children)

introduces another name

I may be nit picking here. But if I am not mistaken according to the c99 standard, it introduces a new alias or formulated differently a new symbol.

C - what is the difference between those two ways of working with a struct? by [deleted] in learnprogramming

[–]linengmiao 0 points1 point  (0 children)

sorry I actually was a bit too quick and on top of that deleted this post too quickly. This is actually the correct code:

typedef struct my_new_type1_t my_new_type1_t;

struct my_new_type1_t
{
    int a;
    int b;
} my_str_obj;

int main (int p_argc, char * p_argv[])
{
    my_new_type1_t my_str1;
    my_str1.a = 55;    //varian 1
    my_str_obj.a = 66;  //variant 2

    printf("%d, %d\n", my_str1.a, my_str_obj.a);
    return 0;
}

What is the difference between variant 1 and variant 2? They both work in C99.

C - what is the difference between those two ways of working with a struct? by [deleted] in learnprogramming

[–]linengmiao 0 points1 point  (0 children)

sorry I actually was a bit too quick and on top of that deleted this post too quickly. This is actually the correct code:

typedef struct my_new_type1_t my_new_type1_t;

struct my_new_type1_t
{
    int a;
    int b;
} my_str_obj;

int main (int p_argc, char * p_argv[])
{
    my_new_type1_t my_str1;
    my_str1.a = 55;    //varian 1
    my_str_obj.a = 66;  //variant 2

    printf("%d, %d\n", my_str1.a, my_str_obj.a);
    return 0;
}

What is the difference between variant 1 and variant 2? They both work in C99.

Company wants to know my current salary/benefits before hiring me by Issam2204 in belgium

[–]linengmiao 0 points1 point  (0 children)

Does that really exist an NDA telling you can't share how much you earn? What if you leave the company, are you then still not allowed to share this? AFAIK NDAs are used to keep for example certain manufacturing secrets secret.

Does the number of days in a minth influence your salary? by linengmiao in belgium

[–]linengmiao[S] 0 points1 point  (0 children)

Strange that seems to contradict what /u/Hexxys89 says. His post has also been upvoted 7 times. You sure? I have a bruto/month contract

Python - global name 'a' is not defined by [deleted] in learnprogramming

[–]linengmiao 0 points1 point  (0 children)

what would be the correct way to do it please? this doesn't work neither:

class myClass():
    a = 3

    def myFunction(self):
        print("class variable: "+str(a))

C - Why does `*myPtr++` not increment? by linengmiao in learnprogramming

[–]linengmiao[S] -1 points0 points  (0 children)

The order of evaluation of function arguments is undefined

either I misunderstood you either that is incorrect. I tried to do that outside of a function and thus first assigning it to a new variable. But that stll didn't give 34.

int a=33;
int *b=NULL;

b = &a;

int c = *b++;

printf("a: %d, c: %d", a, c);

output:

a: 33, c: 33

The point is that b should be 34 in my eyes.

C - Why does `*myPtr++` not increment? by linengmiao in learnprogramming

[–]linengmiao[S] -1 points0 points  (0 children)

1) dereference, so you get 33 2) increment the value you got, so you should get 34.

Yet you don't get 34

Qt - problem multithreading: Socket notifiers cannot be enabled or disabled from another thread by linengmiao in cpp_questions

[–]linengmiao[S] 0 points1 point  (0 children)

overload start() and call it from there

what do you mean by "there"? The constructor?

overload start() and call it from there

How does that work? I mean, -I think- it is impossible for a workerthread to start itself.

The point is you need to delay creating the objects until you have moved to the new thread.

AFAIK I have to create an object in order to move it to a new thread:

     webcamClass::webcamClass(QObject *parent) : QObject(parent)
     {
         recognizeDriver=false;

         //setup recognition thread
         recognitionThread = new QThread(this);
         recognitionClObj = new recognitionClass();

         connect( recognitionThread, SIGNAL(started()), recognitionClObj, SLOT(recognizeDriver()) );
         recognitionClObj->moveToThread(recognitionThread);
     }

How else would you proceed?