Optimaze with new mbed os for study

Dependencies:   TS_DISCO_F746NG BSP_DISCO_F746NG Graphics

Committer:
ngtkien
Date:
Fri Aug 23 16:59:22 2019 +0000
Revision:
5:64cafb3c6e7b
Parent:
1:5e49b46de1b0
KienNgo optimaze

Who changed what in which revision?

UserRevisionLine numberNew contents of line
karpent 1:5e49b46de1b0 1 /*
karpent 1:5e49b46de1b0 2 Location.h - class defines 3D location in cartesian and angular coordinations.
karpent 1:5e49b46de1b0 3
karpent 1:5e49b46de1b0 4 Copyright(c) 2016 karpent at gmail.com, MIT License
karpent 1:5e49b46de1b0 5
karpent 1:5e49b46de1b0 6 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the "Software"),
karpent 1:5e49b46de1b0 7 to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
karpent 1:5e49b46de1b0 8 and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
karpent 1:5e49b46de1b0 9
karpent 1:5e49b46de1b0 10 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
karpent 1:5e49b46de1b0 11
karpent 1:5e49b46de1b0 12 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
karpent 1:5e49b46de1b0 13 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
karpent 1:5e49b46de1b0 14 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
karpent 1:5e49b46de1b0 15 THE USE OR OTHER DEALINGS IN THE SOFTWARE.
karpent 1:5e49b46de1b0 16 */
karpent 0:d8b9955d2b36 17
karpent 0:d8b9955d2b36 18 #pragma once
karpent 0:d8b9955d2b36 19
karpent 1:5e49b46de1b0 20 /**
karpent 1:5e49b46de1b0 21 * @brief Class defines 3D location in cartesian and angular coordinations.
karpent 1:5e49b46de1b0 22 */
karpent 0:d8b9955d2b36 23 class Location
karpent 0:d8b9955d2b36 24 {
karpent 0:d8b9955d2b36 25 public:
karpent 0:d8b9955d2b36 26 Location();
karpent 0:d8b9955d2b36 27 Location(float x, float y, float height);
karpent 0:d8b9955d2b36 28
karpent 0:d8b9955d2b36 29 /// <summary>
karpent 0:d8b9955d2b36 30 /// Sets the location.
karpent 0:d8b9955d2b36 31 /// </summary>
karpent 0:d8b9955d2b36 32 /// <param name="x">The x position win world coordinates in [km].</param>
karpent 0:d8b9955d2b36 33 /// <param name="y">The y position win world coordinates in [km].</param>
karpent 0:d8b9955d2b36 34 /// <param name="height">Target height in [km].</param>
karpent 0:d8b9955d2b36 35 void SetLocation(float x, float y, float height);
karpent 0:d8b9955d2b36 36
karpent 0:d8b9955d2b36 37 /// <summary>
karpent 0:d8b9955d2b36 38 /// Sets the location angular.
karpent 0:d8b9955d2b36 39 /// </summary>
karpent 0:d8b9955d2b36 40 /// <param name="distance">The distance.</param>
karpent 0:d8b9955d2b36 41 /// <param name="azimuth">The azimuth.</param>
karpent 0:d8b9955d2b36 42 /// <param name="elevation">The elevation.</param>
karpent 0:d8b9955d2b36 43 void SetLocationAngular(float distance, float azimuth, float elevation);
karpent 0:d8b9955d2b36 44
karpent 0:d8b9955d2b36 45 float GetX();
karpent 0:d8b9955d2b36 46 float GetY();
karpent 0:d8b9955d2b36 47 float GetHeight();
karpent 0:d8b9955d2b36 48
karpent 0:d8b9955d2b36 49 float GetDistance();
karpent 0:d8b9955d2b36 50 float GetAzimuth();
karpent 0:d8b9955d2b36 51 float GetElevation();
karpent 0:d8b9955d2b36 52
karpent 0:d8b9955d2b36 53 void ToAngular();
karpent 0:d8b9955d2b36 54 void ToCartesian();
karpent 0:d8b9955d2b36 55
karpent 0:d8b9955d2b36 56 private:
karpent 0:d8b9955d2b36 57 float _x;
karpent 0:d8b9955d2b36 58 float _y;
karpent 0:d8b9955d2b36 59 float _h;
karpent 0:d8b9955d2b36 60 float _distance;
karpent 0:d8b9955d2b36 61 float _azimuth;
karpent 0:d8b9955d2b36 62 float _elevation;
karpent 0:d8b9955d2b36 63 };
karpent 0:d8b9955d2b36 64