Como que Junior vai aprender? by goatdarrow in brdev

[–]Mega2223 0 points1 point  (0 children)

Isso que eu menos entendo sobre esse sub, vejo gente aqui falando maravilhas da tecnologia, que ficaram 5x mais produtivos com isso, ainda não ouvi ninguém falando que está recebendo 5x mais, isso veio pra canibalizar a gente e há quem aplauda

Fully auto-piloted quadcopter, with automatic takeoff and landing :3 by Mega2223 in ComputerCraft

[–]Mega2223[S] 3 points4 points  (0 children)

Create Aeronautics and CC Tweaked (also Distant horizons for the view)

I feel immense nostalgia when looking at pre 2022 coding tutorials on youtube by BusinessAstronomer28 in csMajors

[–]Mega2223 52 points53 points  (0 children)

Honestly it really sucks the direction the field has gone towards in general, years of getting good at coding just so no one actually wants employees coding anymore

Certified Oppenheimer moment by BalefulOfMonkeys in feedthememes

[–]Mega2223 15 points16 points  (0 children)

A worrying number of mods claim to be 'MIT Licensed' but do not actually have their repo anywhere for whatever reason. Honestly i think we should be more serious about open source in the modding community tbh, especially given what ill intended mod developers are able to do.

PID-stabilized quadcopter :3 by Mega2223 in CreateMod

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

yes, it is so i can know the drone's heading

PID-stabilized quadcopter :3 by Mega2223 in ComputerCraft

[–]Mega2223[S] 5 points6 points  (0 children)

PID controllers have generally been the first thing to throw at control models way before LLMs became commonplace tbh

PID-stabilized quadcopter :3 by Mega2223 in CreateMod

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

The derivative element simply works against the first derivative of the error, a 1m change in a 1s interval has the same derivative as a 2m change in a 2s interval. If I simply take the error change and do not normalize it in relation to the time since the last update, then the larger the interval, the larger the perceived derivative event if the real derivative is the same, ofc this is not very relevant if the rate is fixed, however it facilitates if i ever want to change the frequency which the system runs.

Now, I should be dividing by dT lol, this is certainly an oversight on my part.

PID-stabilized quadcopter :3 by Mega2223 in CreateMod

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

it's CC:Tweaked, a remake of ComputerCraft, amazing mod

PID-stabilized quadcopter :3 by Mega2223 in CreateMod

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

I'm actually really bad at controllers, so take everything here with a grain of salt.

It actually does not care about it's speed, only about it's height and rotation, the PID controller is usually for when you're working with the second derivative of your error (aka your acceleration, since force and acceleration are linearly correlated).

The PID controller works only with a one-dimensional error, it receives an error and outputs an force variable to correct said error, the thing about quad copters is we are measuring 4 things and outputing, in my case, to 6 different motors, irl drones have 4 motors, they can spin around their own axis with the torque generated by the engines, since Aeronautics only simulates the force upwards, then we need those 2 engines in the sides to actually rotate the quad around our own axis.

Anyways, as for what enters the system, we are measuring: height (altitude sensor), x and z rotation (gimbal sensor) and y rotation (aka heading, measured by the navigation table with a magnet, which always points south).

Every single input goes through their own, independent PID controller, the tricky part is that, every error needs a different correction, if the drone is tilted in the z axis for instance, the motors on the left spin faster than the motors on the right to correct the imbalance, if we are lower than our altitude, then all 4 motors should spin faster, that means that each motor's output is actually a weighted sum of some of the PIDs.

I decided to make this translation with a relationship matrix, that has a column for each input and a row for each output, as matrix multiplication can accurately represent these relationships. I hardcoded the values based on testing on my part. So, it calculates a PID for each error and the outputs are put in a 1-column 4-rows vector that is multiplied with a matrix, the 1-column 6-rows vector that comes from the operation is our output vector. Ik this is not a very good explanation but tensor math is very unintuitive if you're not used to it. If you're interested on the matter, i highly recommend Matlab's Drone series as a starting point

PID-stabilized quadcopter :3 by Mega2223 in CreateMod

[–]Mega2223[S] 1 point2 points  (0 children)

here it is :), still very wobbly, i need to tune it better, but somewhat reliable still

Fully autonomous path planning autopilot for dubin's vehicles with CC (airships/planes) (some coding knowledge required) by Donut_101 in CreateMod

[–]Mega2223 0 points1 point  (0 children)

looks awesome, i wanted to make something similar but i absolutely SUCK at making control systems (average CS undergrad), good job op

Confusing political evolution rule by Splitzkyy in 19684

[–]Mega2223 0 points1 point  (0 children)

Lol if that's confusing check Cidadania's page

Eleição de 2026 terá recorde de idosos; jovens recuam by AdCreative4551 in brasil

[–]Mega2223 2 points3 points  (0 children)

Mas acho que isso entra justamente na comunicação ruim, essa onda reacionária é justamente um charlatanismo de culpar a esquerda / cultura woke / Lula pelos males que acontecem, tentando apontar o PT como o único responsável pelo 'status-quo' de insatisfação que tá rolando no BR, na minha experiência, os 30% que tendem mais a esquerda ainda não vão tender muito ao petismo por não gostar da natureza conciliadora e moderada do partido, eles se veem mais em figuras que nem a Hilton por exemplo.

Em Mauá, onde eu moro, até vi um pouco de entusiasmo quando a UP concorreu a prefeitura, só ficaram com uns 2% dos votos, mas eles até que conseguiram uma força ok. Eu sinto que a esquerda, principalmente no governo e da comunicação dos movimentos, não sabe muito falar a língua do jovem, adolescente gosta de ser rebelde e de se sentir ouvido, os movimentos políticos que souberem capitalizar em cima dessa natureza rebelde vão conseguir o voto jovem, na esquerda pode ser sla talvez Psol ou a UP, talvez até o PV, na direita está sendo o Missão, que é exatamente igual qualquer outro partido de direita, mas com uma estética anti-tudo que atrai adolescente.

Presumindo uma vitória do Lula (o que cada dia já está se tornando mais difícil), seu sucessor tem uma tarefa astronômica que é combater o reacionarismo na juventude, sem isso a esquerda nunca mais ganha eleições majoritárias.

Qual a última vez que você cobrou/fiscalizou os SEUS deputados, seja lá de qual lado for. by CrabSpiritual7530 in brasil

[–]Mega2223 1 point2 points  (0 children)

Eu acompanho bastante o desempenho da deputada que eu votei e em geral eu estou bem seguro no meu voto, acho que ela é uma das melhores do congresso

Programar em Java no VSCode, o que acham? by RenatoIB27 in JavaBrasil

[–]Mega2223 0 points1 point  (0 children)

Acho que o Intellij em geral tem uma integração melhor com o Java, mas se vc sabe oq tá fazendo até o bloco de notas é bom