Home > other >  GPS 3 to 2 points in the direction of the direction for the car, calculate the third point in the cu
GPS 3 to 2 points in the direction of the direction for the car, calculate the third point in the cu

Time:09-16

Consult a algorithm, data is a bit dizzy,

Know GPS three coordinates of points A, B, C.

A point of interest, B for A pass, before the location of the point C for the current car,

Direction is the direction of B to C (this is the front direction), for the point of view of A point relative to the C (not in true north, for reference, the equivalent of car is in the "north"),

Simple use of azimuth is presupposed, and dealing with negative, found that many wrong, experienced warrior, trouble to algorithm implementation, enumerated too much, dizzy, but found that actually may be a

Within the triangle, each feeling get out fast, just can't think out, really have a headache, and can only give up,

CodePudding user response:

Computing Angle cosine value, then the triangle calculation point of view,

CodePudding user response:

According to the law of cosines, first calculate the size of the Angle ACB, then calculate segment CB and C car direction Angle, according to the two can calculate accumulated Angle, but the judgment of the situation is quite likely to be among them,

CodePudding user response:

Using vector calculation is simpler,
A, B, C are described in vector; ABC are world coordinates,

Is: B - C for the current direction of D, C - for the car with A point of interest of migration, O O D and O the dot product, can obtain Angle,
  • Related