I would like to use GPS data as measurement input for an extended kalman filter. Therefore I need to convert from GPS longitude and lattitude to x and y coordinate. I found information about the equirectangular projection given these formulas: $$\ X = r_{earth} \cdot \lambda \cdot cos(\phi_0) $$ $$\ Y = r_{earth} \cdot \phi $$
However I think these formulas are only for use when the axis x- and y-axis of my local frame are parallel to north and south axis of the earth.
But my vehicle is starting in my local reference frame in the origin and heading straight in y-direction. In whatever compas angle I put my vehicle, this should always be the starting position.
I can measure the angle $ \alpha $ to north with a compass on my vehicle.
Now what is the relationship between (longitude,lattitude) an (x,y) of my local frame?