0

good day guys. i was studying a particular block of code and came across an operator: ->. im not exactly sure what it does. i found some notes saying that ptr-> is equivalent to(*ptr). for the life of me i just cant see how that applies here. care to help? thanks

void init_Gyro1DKalman(struct Gyro1DKalman *filterdata, float Q_angle, float Q_gyro, float R_angle)
{
	filterdata->Q_angle = Q_angle;         
	filterdata->Q_gyro  = Q_gyro;
	filterdata->R_angle = R_angle;
}

and here's the structure of gyro1dkalman

struct Gyro1DKalman
{
	float x_angle,
	      x_bias;

	float P_00,
	      P_01,
	      P_10,
	      P_11;	
	
	float Q_angle, Q_gyro;

	float R_angle;
};
3
Contributors
4
Replies
6
Views
7 Years
Discussion Span
Last Post by iwanttolearnc
0
filterdata->Q_angle = Q_angle;

thank you for replying sir. so what does this operation do?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.