A method and device for displaying a simulated aircraft in a three-dimensional earth model

By establishing the Northeast sky coordinate system in a three-dimensional earth model and directly assigning attitude angles, the problem of complex conversion in the existing technology resulting in high computing resource consumption is solved, and a more efficient simulation aircraft display is achieved.

CN119166087BActive Publication Date: 2025-05-09BEIJING GLOBAL CROWN JINYANG TECH DEV CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411324168.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-05-09
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

The existing way of converting attitude angles to Euler angles is relatively complex, which results in the need to consume more computing resources when displaying simulated aircraft on a three-dimensional earth model.

Method used

By establishing a Northeast sky coordinate system with the location of the simulated aircraft as the origin, and setting the simulated aircraft as the child unit of the parent object of the Northeast sky coordinate system, the posture angle of the simulated aircraft is directly assigned to the Euler angle.

Benefits of technology

The amount of computation when determining the Euler angle is significantly reduced, and the computing resource consumption when displaying simulated aircraft on a three-dimensional earth model is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166087B_ABST
    Figure CN119166087B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for displaying a simulated aircraft in a three-dimensional earth model, the method comprising: obtaining coordinate data of the simulated aircraft in a target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, the target coordinate system being a coordinate system with the center of the sphere of the three-dimensional earth model as the origin; determining a northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft; setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, and assigning Euler angles of the simulated aircraft based on the attitude angle data of the simulated aircraft; and displaying the simulated aircraft on the three-dimensional earth model based on the assigned Euler angles and coordinate data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of three-dimensional display technology, and in particular to a method and device for displaying a simulated aircraft in a three-dimensional earth model. Background Art

[0002] In flight simulation software, a computer device sometimes needs to display a three-dimensional earth model and display a simulated aircraft with a specific attitude at a specific position on the three-dimensional earth model. The attitude of the simulated aircraft is generally represented by the attitude angles of the simulated aircraft relative to the three-dimensional earth model, that is, the pitch angle, roll angle and yaw angle. When displaying the simulated aircraft based on these attitude angles, these attitude angles need to be converted into the Euler angles of the simulated aircraft itself.

[0003] The existing method of converting attitude angles into Euler angles is relatively complicated, resulting in the consumption of more computing resources when displaying a simulated aircraft on a three-dimensional earth model. Summary of the invention

[0004] To this end, this application discloses the following technical solutions:

[0005] The first aspect of the present application provides a method for displaying a simulated aircraft in a three-dimensional earth model, comprising:

[0006] According to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, coordinate data of the simulated aircraft in a target coordinate system is obtained, wherein the target coordinate system is a coordinate system with the center of the three-dimensional earth model as the origin;

[0007] Determine a northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft;

[0008] Setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, and assigning a value to the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft;

[0009] Based on the assigned Euler angles and the coordinate data, the simulated aircraft is displayed on the three-dimensional earth model.

[0010] Optionally, determining a northeast celestial coordinate system with a location of the simulated aircraft as an origin according to the coordinate data of the simulated aircraft includes:

[0011] Subtract the coordinate data from the center of the three-dimensional earth model to obtain a first vector pointing from the coordinate data to the center of the sphere, and determine the direction of the first vector as the y-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin;

[0012] determining a second vector pointing from the coordinate data to the North Pole of the three-dimensional earth model;

[0013] Determine the z-axis of the northeast celestial coordinate system according to the projection of the second vector on a plane with the y-axis of the northeast celestial coordinate system as a normal;

[0014] The x-axis of the northeast celestial coordinate system is determined according to the y-axis of the northeast celestial coordinate system and the z-axis of the northeast celestial coordinate system.

[0015] Optionally, the attitude angle data includes an angle between a body coordinate system of the simulated aircraft and a ground inertial coordinate system of the three-dimensional earth model.

[0016] Optionally, assigning the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft includes:

[0017] Assigning the opposite of the roll angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the z-axis of the northeast celestial coordinate system;

[0018] Assigning the yaw angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the y-axis of the northeast celestial coordinate system;

[0019] The opposite number of the pitch angle of the simulated aircraft is assigned to the Euler angle of the aircraft corresponding to the x-axis of the northeast celestial coordinate system.

[0020] Optionally, obtaining coordinate data of the simulated aircraft in a target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model includes:

[0021] Obtaining radius data of the three-dimensional earth model;

[0022] The coordinate data of the simulated aircraft in the target coordinate system are calculated based on the longitude and latitude data and the radius data of the simulated aircraft relative to the three-dimensional earth model.

[0023] A second aspect of the present application provides a device for displaying a simulated aircraft in a three-dimensional earth model, comprising:

[0024] an obtaining unit, for obtaining coordinate data of the simulated aircraft in a target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, wherein the target coordinate system is a coordinate system with the center of the three-dimensional earth model as its origin;

[0025] A determination unit, used for determining a northeast celestial coordinate system with a position of the simulated aircraft as an origin according to the coordinate data of the simulated aircraft;

[0026] an assignment unit, used for setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, and assigning a value to the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft;

[0027] A display unit is used to display the simulated aircraft on the three-dimensional earth model based on the assigned Euler angles and the coordinate data.

[0028] Optionally, when the determination unit determines the northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft, it is specifically used to:

[0029] Subtract the coordinate data from the center of the three-dimensional earth model to obtain a first vector pointing from the coordinate data to the center of the sphere, and determine the direction of the first vector as the y-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin;

[0030] determining a second vector pointing from the coordinate data to the North Pole of the three-dimensional earth model;

[0031] Determine the z-axis of the northeast celestial coordinate system according to the projection of the second vector on a plane with the y-axis of the northeast celestial coordinate system as a normal;

[0032] The x-axis of the northeast celestial coordinate system is determined according to the y-axis of the northeast celestial coordinate system and the z-axis of the northeast celestial coordinate system.

[0033] Optionally, the attitude angle data includes an angle between a body coordinate system of the simulated aircraft and a ground inertial coordinate system of the three-dimensional earth model.

[0034] Optionally, when the assignment unit assigns the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft, it is specifically used to:

[0035] Assigning the opposite of the roll angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the z-axis of the northeast celestial coordinate system;

[0036] Assigning the yaw angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the y-axis of the northeast celestial coordinate system;

[0037] The opposite number of the pitch angle of the simulated aircraft is assigned to the Euler angle of the aircraft corresponding to the x-axis of the northeast celestial coordinate system.

[0038] Optionally, when the obtaining unit obtains the coordinate data of the simulated aircraft in the target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, it is specifically used to:

[0039] Obtaining radius data of the three-dimensional earth model;

[0040] The coordinate data of the simulated aircraft in the target coordinate system are calculated based on the longitude and latitude data and the radius data of the simulated aircraft relative to the three-dimensional earth model.

[0041] The beneficial effects of this solution are:

[0042] After establishing a northeast celestial coordinate system with the location of the simulated aircraft as the origin and setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, this scheme can directly assign the attitude angle of the simulated aircraft to the Euler angle of the simulated aircraft. Compared with the existing conversion method, this direct assignment method can obviously significantly reduce the amount of calculation when determining the Euler angle, thereby reducing the computing resources consumed when displaying the simulated aircraft on the three-dimensional earth model. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0044] Figure 1 is a flow chart of a method for displaying a simulated aircraft in a three-dimensional earth model provided by an embodiment of the present application;

[0045] Figure 2 is a schematic diagram of a northeast celestial coordinate system with a simulated aircraft as the origin provided by an embodiment of the present application;

[0046] Figure 3 is a schematic diagram of determining the z-axis of the northeast celestial coordinate system provided in an embodiment of the present application;

[0047] Figure 4 is a schematic diagram of a simulated aircraft attitude angle provided in an embodiment of the present application;

[0048] Figure 5 It is a structural schematic diagram of a device for displaying a simulated aircraft in a three-dimensional earth model provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] The present application embodiment provides a method for displaying a simulated aircraft in a three-dimensional earth model, see Figure 1 , is a flow chart of the method, and the method may include the following steps.

[0051] S101, obtaining coordinate data of the simulated aircraft in a target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, wherein the target coordinate system is a coordinate system with the center of the three-dimensional earth model as the origin.

[0052] The display method provided in this embodiment can be executed by any electronic device that needs to display a three-dimensional earth model and a corresponding simulated aircraft.

[0053] The target coordinate system may be a three-dimensional rectangular coordinate system with the center of the three-dimensional earth model as the origin. For example, the target coordinate system may be referred to Figure 2 , Figure 2 X in ecef , Y ecef and Z ecef Represent the x-axis, y-axis and z-axis of the target coordinate system respectively.

[0054] Based on the above target coordinate system, in step S101, the electronic device can obtain the coordinate data of the simulated aircraft in the following manner:

[0055] Obtain radius data of a three-dimensional earth model;

[0056] The coordinate data of the simulated aircraft in the target coordinate system are calculated based on the latitude and longitude data and radius data of the simulated aircraft relative to the three-dimensional earth model.

[0057] The radius data of the three-dimensional earth model can be directly read from the attribute information of the three-dimensional earth model.

[0058] The longitude and latitude data of the simulated aircraft relative to the three-dimensional earth model can be generated by a related program in the electronic device for controlling the movement of the simulated aircraft, and the program can generate the longitude and latitude data according to the control operation of the simulated aircraft by the user of the electronic device. The longitude and latitude data may include the longitude and latitude of the simulated aircraft relative to the three-dimensional earth model. The longitude and latitude data can characterize the position of the simulated aircraft on the surface of the three-dimensional earth model.

[0059] After obtaining the longitude, latitude and radius data, the electronic device can calculate the coordinate data of the simulated aircraft according to the following code.

[0060] floatk = Earth radius * Mathf.Cos(latitude * Mathf.Deg2Rad);

[0061] floatx = k*Mathf.Sin(longitude*Mathf.Deg2Rad);

[0062] float z = -k*Mathf.Cos(longitude*Mathf.Deg2Rad);

[0063] floaty = radius data * Mathf.Sin (latitude * Mathf.Deg2Rad).

[0064] In the above code, Mathf.Cos and Mathf.Sin represent the cosine function and sine function respectively, and Mathf.Deg2Rad represents the constant used to convert the angle value into the radian value. Multiplying the latitude by the constant can get the radian system corresponding to the latitude, and the same is true for the longitude.

[0065] The floating-point data x, y and z respectively represent the x-axis coordinate value, y-axis coordinate value and z-axis coordinate value of the simulated aircraft position in the target coordinate system. The combination of the three (x, y, z) is the coordinate data of the simulated aircraft in the target coordinate system obtained in step S101.

[0066] S102, determining a northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft.

[0067] Determining the northeast celestial coordinate system may specifically include determining an x-axis, a y-axis, and a z-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin.

[0068] In this embodiment, the northeast celestial coordinate system can be established based on the left-handed coordinate system. As an example, the northeast celestial coordinate system established in step S102 can be referred to Figure 2 The z-axis of the northeast celestial coordinate system can point from the simulated aircraft location to the true north direction of the three-dimensional earth model surface, for example, Figure 2 The north N axis in the northeast sky coordinate system can point from the simulated aircraft location to the three-dimensional earth model, perpendicular to the ground of the three-dimensional earth model and point to the sky, for example, Figure 2 The x-axis of the northeast celestial coordinate system can point from the location of the simulated aircraft to the east of the three-dimensional earth model, for example, Figure 2 East E axis shown.

[0069] In this embodiment, the electronic device can determine the y-axis, z-axis and x-axis of the northeast celestial coordinate system one by one according to the following steps, thereby obtaining the northeast celestial coordinate system with the position of the simulated aircraft as the origin in S102:

[0070] A1, subtract the coordinate data from the center of the sphere of the three-dimensional earth model to obtain a first vector pointing from the coordinate data to the center of the sphere, and determine the direction of the first vector as the y-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin;

[0071] A2, determining a second vector pointing from the coordinate data to the North Pole of the three-dimensional earth model;

[0072] A3, determining the z axis of the northeast celestial coordinate system according to the projection of the second vector on the plane with the y axis of the northeast celestial coordinate system as the normal;

[0073] A4, determine the x-axis of the northeast celestial coordinate system according to the y-axis and the z-axis of the northeast celestial coordinate system.

[0074] In step A1, the electronic device can determine a vector pointing from the center of the three-dimensional earth model to the simulated aircraft by executing the following code, and use this vector as the y-axis of the northeast celestial coordinate system.

[0075] Vector3 direction = sphere center – object coordinates;

[0076] Object orientation = Quaternion.LookRotation(direction).

[0077] In this embodiment, see Figure 3 (1) The z-axis of the northeast celestial coordinate system needs to point to the due north direction of the earth's surface, that is, parallel to the north direction of the current spherical surface.

[0078] In order to determine the z-axis that satisfies this condition, it can be assumed that there is currently a z-axis that is perpendicular to the y-axis and passes through the location of the simulated aircraft, for example Figure 3 The Z axis shown in (2) can point to any direction. At this time, we only need to calculate the target axis corresponding to the z axis, that is, Figure 3 The Z2 axis shown in (2) can then determine the angle α between the Z axis and the Z2 axis, and then rotate the Z axis by the angle α to obtain the z axis of the northeast celestial coordinate system that meets the above conditions. Figure 3 (2) can be in Figure 3 The view obtained when looking at the three-dimensional earth model from the opposite direction of the Y axis based on (1).

[0079] As described in step A2, it can be seen that the Z2 axis is actually the vector pointing from the simulated aircraft to the North Pole of the 3D Earth model, that is, Figure 3 The projection of the vector with the North Pole as its end point on the plane where the z-axis lies in (1).

[0080] Therefore, you can first determine the position of the Z2 axis by executing the following code:

[0081] mCurrentPitchAngle: current angle

[0082] PitchTransform: Serves as the parent object of the northeast sky coordinate system.

[0083] mCurrentPitchAngle=PitchTransform.localEulerAngles.x;

[0084] if(mCurrentPitchAngle>180)

[0085] {

[0086] mCurrentPitchAngle=-(360-mCurrentPitchAngle);

[0087] }

[0088] mPitchTarget: The vector to the North Pole, mapped to the normal vector on its own yz plane, that is, the Z2 axis

[0089] TargetTransform: North Pole coordinates

[0090] mPitchTarget=Vector3.ProjectOnPlane(TargetTransform.position-PitchTransform.position, PitchTransform.right).normalized.

[0091] In the above code, mCurrentPitchAngle is used to represent the angle corresponding to the current z-axis, which can be a randomly generated angle. TargetTransform.position-PitchTransform.position represents the vector pointing from the current position of the simulated aircraft to the North Pole (i.e., the second vector in step A2). The Vector3.ProjectOnPlane() function is used to project the vector onto the plane where the z-axis is located, that is, the plane with the y-axis of the northeast celestial coordinate system as the normal and passing through the coordinate data of the simulated aircraft. The output of this function, mPitchTarget, is Figure 3 The angle of the target axis Z2 in (2).

[0092] After determining the angle of the target axis Z2 in the above manner, the following code may be executed to calculate the angle α between the current z-axis and the target axis Z2.

[0093] mPitchAngleOffset: Calculate the angle between the current Z axis direction and the Z2 axis direction;

[0094] mPitchAngleOffset=Vector3.Angle(PitchTransform.forward, mPitchTarget).

[0095] The mPitchAngleOffset in the above code is Figure 3 The angle α shown in (2).

[0096] After obtaining the angle, it can be determined whether the angle is 0. If the angle is 0, it means that the randomly determined z-axis coincides with the target axis Z2 that meets the above conditions. At this time, there is no need to continue the calculation, and the randomly determined z-axis is directly determined as the z-axis of the northeast sky coordinate system (i.e. Figure 2 In this case, the following code can be executed.

[0097] if(mPitchAngleOffset==0)

[0098] {return mCurrentPitchAngle;}

[0099] If the angle is not 0, the randomly determined z-axis needs to be rotated to the position of the target axis Z2. This rotation can be achieved by the following code:

[0100] mPitchCross: Calculates the cross product of two vectors to determine the left and right relationship of the vectors

[0101] mPitchCross=Vector3.Cross(mPitchTarget,PitchTransform.forward).normalized;

[0102] Determine whether it is on the left or right, and add or subtract the current angle.

[0103] if(mPitchCross==PitchTransform.right)

[0104] {

[0105] returnmCurrentPitchAngle-mPitchAngleOffset;

[0106] }

[0107] else if(mPitchCross!=PitchTransform.right)

[0108] {

[0109] returnmCurrentPitchAngle+mPitchAngleOffset;

[0110] }

[0111] return mCurrentPitchAngle.

[0112] In the above code, mPitchCross represents the result of the cross product of the current z-axis and the target axis Z2 vectors. Based on this result, we can determine whether the current z-axis is on the left or right side of the target axis Z2. Figure 3 The situation shown in (2) is the situation where the z-axis is located on the left side of the target axis Z2.

[0113] Then, depending on whether the z-axis is on the left or right side of the target axis Z2, different methods can be used to rotate the z-axis by angle α. Specifically, if it is on the right side, subtract the angle α from the current angle of the z-axis, and the result is the angle corresponding to the z-axis of the northeast celestial coordinate system. If it is on the left side, add the angle α to the current angle of the z-axis, and the result is the angle corresponding to the z-axis of the northeast celestial coordinate system. The z-axis of the northeast celestial coordinate system can be determined in this way.

[0114] In step A4, the direction perpendicular to the y-axis and the z-axis of the northeast celestial coordinate system can be directly determined as the x-axis of the northeast celestial coordinate system.

[0115] S103, setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, and assigning Euler angles of the simulated aircraft based on the attitude angle data of the simulated aircraft.

[0116] In this embodiment, the attitude angle data may include the angle between the body coordinate system of the simulated aircraft and the ground inertial coordinate system of the three-dimensional earth model.

[0117] by Figure 4 For example, attitude angle data may include roll angle, pitch angle and yaw angle, wherein the roll angle represents the angle between the aircraft's symmetry plane and the vertical plane passing through the aircraft's longitudinal axis, with right roll being positive; the pitch angle represents the angle between the aircraft's axis and the ground plane (horizontal plane), with the aircraft's nose tilted to the right being positive; the yaw angle represents the angle between the projection of the aircraft's axis on the horizontal plane and the ground axis, with the nose tilted to the right being positive.

[0118] In step S104, the simulated aircraft can be placed under the parent object of the northeast celestial coordinate system through the Unity engine (or other three-dimensional rendering engine), that is, the simulated aircraft can be set as a child unit of the parent object of the northeast celestial coordinate system. In this embodiment, the parent object of the northeast celestial coordinate system can be a three-dimensional earth model.

[0119] After completing the above operations, the roll angle, pitch angle and yaw angle of the simulated aircraft will be able to coincide with the Euler angle rotation of the simulated aircraft itself. Specifically, if the front of the aircraft is set as the Z axis, the top as the Y axis, and the right as the X axis, then the roll angle can coincide with the Euler angle rotation of the aircraft corresponding to the z-axis of the northeast celestial coordinate system, the yaw angle can coincide with the Euler angle rotation of the aircraft corresponding to the y-axis of the northeast celestial coordinate system, and the pitch can coincide with the Euler angle rotation of the aircraft corresponding to the x-axis of the northeast celestial coordinate system.

[0120] Among them, since the northeast celestial coordinate system of this embodiment adopts a left-handed coordinate system, which is different from the right-handed coordinate system of the three-dimensional earth model, it is necessary to negate the roll angle and the pitch angle and assign them to the corresponding Euler angle, that is, assign the opposite of the roll angle and the pitch angle to the corresponding Euler angle.

[0121] Therefore, the implementation of step S103 may include:

[0122] Assign the opposite of the roll angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the z-axis of the northeast celestial coordinate system;

[0123] Assign the yaw angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the y-axis of the northeast celestial coordinate system;

[0124] Assign the opposite of the pitch angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the x-axis of the northeast celestial coordinate system.

[0125] The above implementation can be represented by the following code:

[0126] The aircraft's own Euler angle = newVector3 (-pitch, yaw, -roll).

[0127] The code provided in any embodiment of the present application can be executed by the Unity engine or by other three-dimensional rendering engines.

[0128] The attitude angle data in step S103 may be generated by a related program for controlling the movement of the simulated aircraft according to the user's operation.

[0129] S104, displaying the simulated aircraft on the three-dimensional earth model based on the assigned Euler angles and coordinate data.

[0130] After determining the Euler angles of the simulated aircraft in the above manner, the electronic device can render a simulated aircraft having the posture indicated by the above Euler angles at the position indicated by the coordinate data of the simulated aircraft through the Unity engine or other three-dimensional rendering engines.

[0131] As the user operates, the relevant program for controlling the movement of the simulated aircraft can generate coordinate data and attitude angle data of the simulated aircraft in real time at certain time intervals. Therefore, the electronic device can assign the real-time generated attitude angle data to the Euler angle of the simulated aircraft through the method of this embodiment, and then continuously render the simulated aircraft in the three-dimensional earth model based on the real-time coordinate data and the real-time assigned Euler angle, thereby displaying the image of the simulated aircraft flying in the three-dimensional earth model.

[0132] The beneficial effects of this solution are:

[0133] After establishing a northeast celestial coordinate system with the location of the simulated aircraft as the origin and setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, this scheme can directly assign the attitude angle of the simulated aircraft to the Euler angle of the simulated aircraft. Compared with the existing conversion method, this direct assignment method can obviously significantly reduce the amount of calculation when determining the Euler angle, thereby reducing the computing resources consumed when displaying the simulated aircraft on the three-dimensional earth model.

[0134] Furthermore, this embodiment simplifies the process of obtaining Euler angles by performing complex numerical conversion based on attitude angle data in the prior art into a simple assignment process by constructing the northeast celestial coordinate system as an intermediate connection method, thereby saving computing resources consumed when displaying a simulated aircraft in a three-dimensional earth model.

[0135] On the other hand, this embodiment simulates the roll angle, yaw angle and pitch angle of the aircraft and overlaps them with the Euler angle of the aircraft, and can directly assign values, so that the flight effect is intuitively displayed, making it convenient for relevant users to observe the flight attitude and confirm the validity of the data.

[0136] The present application also provides a device for displaying a simulated aircraft in a three-dimensional earth model, see Figure 5 , the device may include the following units.

[0137] The obtaining unit 501 is used to obtain the coordinate data of the simulated aircraft in the target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, and the target coordinate system takes the center of the three-dimensional earth model as the origin;

[0138] A determination unit 502 is used to determine a northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft;

[0139] The assignment unit 503 is used to set the simulated aircraft as a child unit of the parent object of the northeast sky coordinate system, and assign the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft;

[0140] The display unit 504 is used to display the simulated aircraft on the three-dimensional earth model based on the assigned Euler angles and coordinate data.

[0141] Optionally, when the determination unit 502 determines the northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft, it is specifically used to:

[0142] Subtract the coordinate data from the center of the sphere of the three-dimensional earth model to obtain a first vector pointing from the coordinate data to the center of the sphere, and determine the direction of the first vector as the y-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin;

[0143] determining a second vector from the coordinate data to the North Pole of the three-dimensional earth model;

[0144] Determine the z-axis of the northeast celestial coordinate system according to the projection of the second vector on the plane with the y-axis of the northeast celestial coordinate system as the normal direction;

[0145] The x-axis of the northeast celestial coordinate system is determined according to the y-axis and the z-axis of the northeast celestial coordinate system.

[0146] Optionally, the attitude angle data includes an angle between a body coordinate system of the simulated aircraft and a ground inertial coordinate system of the three-dimensional earth model.

[0147] Optionally, when the assignment unit 503 assigns the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft, it is specifically used to:

[0148] Assign the opposite of the roll angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the z-axis of the northeast celestial coordinate system;

[0149] Assign the yaw angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the y-axis of the northeast celestial coordinate system;

[0150] Assign the opposite of the pitch angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the x-axis of the northeast celestial coordinate system.

[0151] Optionally, when the obtaining unit 501 obtains the coordinate data of the simulated aircraft in the target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, it is specifically used to:

[0152] Obtain radius data of a three-dimensional earth model;

[0153] The coordinate data of the simulated aircraft in the target coordinate system are calculated based on the latitude and longitude data and radius data of the simulated aircraft relative to the three-dimensional earth model.

[0154] The working principle of the device for displaying a simulated aircraft in a three-dimensional earth model provided in this embodiment can be referred to the relevant steps of the method for displaying a simulated aircraft in a three-dimensional earth model provided in any embodiment of the present application, and will not be repeated here.

[0155] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0156] For the convenience of description, the above system or device is described by dividing it into various modules or units according to its functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0157] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.

[0158] Finally, it should be noted that, in this article, relational terms such as first, second, third and fourth are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0159] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for displaying a simulated aircraft in a three-dimensional earth model, characterized in that: include: According to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, coordinate data of the simulated aircraft in a target coordinate system is obtained, wherein the target coordinate system is a coordinate system with the center of the three-dimensional earth model as the origin; Determine a northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft; Setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, and assigning a value to the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft; Based on the assigned Euler angles and the coordinate data, displaying the simulated aircraft on the three-dimensional earth model; The assigning of the Euler angles of the simulated aircraft based on the attitude angle data of the simulated aircraft comprises: Assigning the opposite of the roll angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the z-axis of the northeast celestial coordinate system; Assigning the yaw angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the y-axis of the northeast celestial coordinate system; Assigning the opposite of the pitch angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the x-axis of the northeast celestial coordinate system; Determining the northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft includes: Subtract the coordinate data from the center of the three-dimensional earth model to obtain a first vector pointing from the coordinate data to the center of the sphere, and determine the direction of the first vector as the y-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin; determining a second vector pointing from the coordinate data to the North Pole of the three-dimensional earth model; Determine the z-axis of the northeast celestial coordinate system according to the projection of the second vector on a plane with the y-axis of the northeast celestial coordinate system as a normal; The x-axis of the northeast celestial coordinate system is determined according to the y-axis of the northeast celestial coordinate system and the z-axis of the northeast celestial coordinate system.

2. The method according to claim 1, characterized in that The attitude angle data includes the angle between the body coordinate system of the simulated aircraft and the ground inertial coordinate system of the three-dimensional earth model.

3. The method according to claim 1, characterized in that The step of obtaining coordinate data of the simulated aircraft in a target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model includes: Obtaining radius data of the three-dimensional earth model; The coordinate data of the simulated aircraft in the target coordinate system are calculated based on the longitude and latitude data and the radius data of the simulated aircraft relative to the three-dimensional earth model.

4. A device for displaying a simulated aircraft in a three-dimensional earth model, characterized in that: include: an obtaining unit, for obtaining coordinate data of the simulated aircraft in a target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, wherein the target coordinate system is a coordinate system with the center of the three-dimensional earth model as its origin; A determination unit, used for determining a northeast celestial coordinate system with a position of the simulated aircraft as an origin according to the coordinate data of the simulated aircraft; an assignment unit, used for setting the simulated aircraft as a child unit of the parent object of the northeast celestial coordinate system, and assigning a value to the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft; A display unit, configured to display the simulated aircraft on the three-dimensional earth model based on the assigned Euler angles and the coordinate data; When the assignment unit assigns the Euler angle of the simulated aircraft based on the attitude angle data of the simulated aircraft, it is specifically used to: Assigning the opposite of the roll angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the z-axis of the northeast celestial coordinate system; Assigning the yaw angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the y-axis of the northeast celestial coordinate system; Assigning the opposite of the pitch angle of the simulated aircraft to the Euler angle of the aircraft corresponding to the x-axis of the northeast celestial coordinate system; When the determining unit determines the northeast celestial coordinate system with the position of the simulated aircraft as the origin according to the coordinate data of the simulated aircraft, it is specifically used to: Subtract the coordinate data from the center of the three-dimensional earth model to obtain a first vector pointing from the coordinate data to the center of the sphere, and determine the direction of the first vector as the y-axis of the northeast celestial coordinate system with the position of the simulated aircraft as the origin; determining a second vector pointing from the coordinate data to the North Pole of the three-dimensional earth model; Determine the z-axis of the northeast celestial coordinate system according to the projection of the second vector on a plane with the y-axis of the northeast celestial coordinate system as a normal; The x-axis of the northeast celestial coordinate system is determined according to the y-axis of the northeast celestial coordinate system and the z-axis of the northeast celestial coordinate system.

5. The device according to claim 4, characterized in that The attitude angle data includes the angle between the body coordinate system of the simulated aircraft and the ground inertial coordinate system of the three-dimensional earth model.

6. The device according to claim 4, characterized in that When the obtaining unit obtains the coordinate data of the simulated aircraft in the target coordinate system according to the latitude and longitude data of the simulated aircraft relative to the three-dimensional earth model, it is specifically used to: Obtaining radius data of the three-dimensional earth model; The coordinate data of the simulated aircraft in the target coordinate system are calculated based on the longitude and latitude data and the radius data of the simulated aircraft relative to the three-dimensional earth model.

Citation Information

Patent Citations

  • Three-dimensional model attitude adjustment control method based on flight path

    CN111026139A

  • Target angular velocity resolving method and device based on photoelectric turret

    CN111649743A