scifir-units 2.0.0
scifir-units is a library of units of measurement, angles, coordinates, fields, and related data, all lightweight, that help in the development of scientific software and scientific machines
Loading...
Searching...
No Matches
coordinates_3dr.hpp
Go to the documentation of this file.
1#ifndef SCIFIR_UNITS_COORDINATES_COORDINATES_3DR_HPP_INCLUDED
2#define SCIFIR_UNITS_COORDINATES_COORDINATES_3DR_HPP_INCLUDED
3
4#include "../meca_number/angle.hpp"
6#include "../units/base_units.hpp"
7
8#include <iostream>
9#include <string>
10#include <vector>
11
12using namespace std;
13
14namespace scifir
15{
16 template<typename T = length>
18 {
19 public:
20 coordinates_3dr() : x(),y(),z(),theta(),phi()
21 {}
22
25
28
31
36
41
46
47 template<typename U>
50
51 template<typename U>
54
59
61 {
63 y = x_coordinates.y;
64 z = x_coordinates.z;
65 theta = x_coordinates.theta;
66 phi = x_coordinates.phi;
67 return *this;
68 }
69
71 {
72 x = std::move(x_coordinates.x);
73 y = std::move(x_coordinates.y);
74 z = std::move(x_coordinates.z);
75 theta = std::move(x_coordinates.theta);
76 phi = std::move(x_coordinates.phi);
77 return *this;
78 }
79
81 {
83 y = x_coordinates.y;
84 z = x_coordinates.z;
85 return *this;
86 }
87
89 {
90 x = std::move(x_coordinates.x);
91 y = std::move(x_coordinates.y);
92 z = std::move(x_coordinates.z);
93 return *this;
94 }
95
101
108
109 T get_p() const
110 {
111 return T(scifir::sqrt(scifir::pow(x,2) + scifir::pow(y,2)));
112 }
113
115 {
116 return scifir::atan(float(y/x));
117 }
118
119 T get_r() const
120 {
121 return T(scifir::sqrt(scifir::pow(x,2) + scifir::pow(y,2) + scifir::pow(z,2)));
122 }
123
125 {
127 }
128
130 {
131 return ECEF_to_LLA_latitude(x,y,z);
132 }
133
135 {
136 return ECEF_to_LLA_longitude(x,y,z);
137 }
138
140 {
141 return ECEF_to_LLA_altitude(x,y,z);
142 }
143
145 {
146 if (x == direction::LEFT)
147 {
148 theta = 270.0f;
149 phi = 90.0f;
150 }
151 else if(x == direction::RIGHT)
152 {
153 theta = 90.0f;
154 phi = 90.0f;
155 }
156 else if(x == direction::TOP)
157 {
158 theta = 0.0f;
159 phi = 0.0f;
160 }
161 else if(x == direction::BOTTOM)
162 {
163 theta = 0.0f;
164 phi = 180.0f;
165 }
166 else if(x == direction::LEFT_TOP)
167 {
168 theta = 270.0f;
169 phi = 45.0f;
170 }
171 else if(x == direction::RIGHT_TOP)
172 {
173 theta = 90.0f;
174 phi = 45.0f;
175 }
176 else if(x == direction::RIGHT_BOTTOM)
177 {
178 theta = 90.0f;
179 phi = 135.0f;
180 }
181 else if(x == direction::LEFT_BOTTOM)
182 {
183 theta = 270.0f;
184 phi = 135.0f;
185 }
186 else if(x == direction::FRONT)
187 {
188 theta = 0.0f;
189 phi = 90.0f;
190 }
191 else if(x == direction::BACK)
192 {
193 theta = 180.0f;
194 phi = 90.0f;
195 }
196 else if(x == direction::LEFT_FRONT)
197 {
198 theta = 315.0f;
199 phi = 90.0f;
200 }
201 else if(x == direction::RIGHT_FRONT)
202 {
203 theta = 45.0f;
204 phi = 90.0f;
205 }
206 else if(x == direction::TOP_FRONT)
207 {
208 theta = 0.0f;
209 phi = 45.0f;
210 }
211 else if(x == direction::BOTTOM_FRONT)
212 {
213 theta = 0.0f;
214 phi = 135.0f;
215 }
216 else if(x == direction::LEFT_BACK)
217 {
218 theta = 225.0f;
219 phi = 90.0f;
220 }
221 else if(x == direction::RIGHT_BACK)
222 {
223 theta = 135.0f;
224 phi = 90.0f;
225 }
226 else if(x == direction::TOP_BACK)
227 {
228 theta = 180.0f;
229 phi = 45.0f;
230 }
231 else if(x == direction::BOTTOM_BACK)
232 {
233 theta = 180.0f;
234 phi = 135.0f;
235 }
236 else if(x == direction::LEFT_TOP_FRONT)
237 {
238 theta = 315.0f;
239 phi = 45.0f;
240 }
241 else if(x == direction::RIGHT_TOP_FRONT)
242 {
243 theta = 45.0f;
244 phi = 45.0f;
245 }
247 {
248 theta = 315.0f;
249 phi = 135.0f;
250 }
252 {
253 theta = 45.0f;
254 phi = 135.0f;
255 }
256 else if(x == direction::LEFT_TOP_BACK)
257 {
258 theta = 225.0f;
259 phi = 45.0f;
260 }
261 else if(x == direction::RIGHT_TOP_BACK)
262 {
263 theta = 135.0f;
264 phi = 45.0f;
265 }
267 {
268 theta = 225.0f;
269 phi = 135.0f;
270 }
272 {
273 theta = 135.0f;
274 phi = 135.0f;
275 }
276 }
277
279 {
280 x = new_x;
281 y = new_y;
282 z = new_z;
283 }
284
286 {
287 new_z.change_dimensions(new_p);
290 z = new_z;
291 }
292
299
306
314
322
330
332 {
333 x += x_displacement.x_projection();
334 y += x_displacement.y_projection();
335 z += x_displacement.z_projection();
336 }
337
339 {
340 x += new_x;
341 y += new_y;
342 z += new_z;
343 }
344
346 {
347 new_z.change_dimensions(new_p);
350 z += new_z;
351 }
352
359
361 {
362 return T(scifir::sqrt(scifir::pow(x,2) + scifir::pow(y,2) + scifir::pow(z,2)));
363 }
364
365 string display_cartesian() const
366 {
368 out << "(" << x << "," << y << "," << z << ";" << theta << "," << phi << ")";
369 return out.str();
370 }
371
372 string display_cylindrical() const
373 {
375 out << "(" << get_p() << "," << get_spherical_theta() << "," << z << ";" << theta << "," << phi << ")";
376 return out.str();
377 }
378
379 string display_spherical() const
380 {
382 out << "(" << get_r() << "," << get_spherical_theta() << "," << get_spherical_phi() << ";" << theta << "," << phi << ")";
383 return out.str();
384 }
385
386 string display_geographical() const
387 {
389 out << "(" << get_latitude() << "," << get_longitude() << "," << get_altitude() << ";" << theta << "," << phi << ")";
390 return out.str();
391 }
392
398
399 private:
401 {
405 if (init_coordinates_3dr.front() == '(')
406 {
407 init_coordinates_3dr.erase(0,1);
408 }
409 if (init_coordinates_3dr.back() == ')')
410 {
412 }
413 boost::split(init_coordinates,init_coordinates_3dr,boost::is_any_of(";"));
414 if (init_coordinates.size() > 0)
415 {
416 boost::split(init_values,init_coordinates[0],boost::is_any_of(","));
417 }
418 if (init_coordinates.size() > 1)
419 {
420 boost::split(init_angles,init_coordinates[1],boost::is_any_of(","));
421 }
422 if (init_values.size() == 3 and init_angles.size() == 2)
423 {
424 if (is_latitude(init_values[0]))
425 {
427 {
428 if (!is_angle(init_values[2]))
429 {
431 }
432 }
433 }
434 else
435 {
436 if (is_angle(init_values[1]))
437 {
438 if (is_angle(init_values[2]))
439 {
441 }
442 else
443 {
445 }
446 }
447 else
448 {
449 if (!is_angle(init_values[2]))
450 {
452 }
453 }
454 }
455 theta = angle(init_angles[0]);
456 phi = angle(init_angles[1]);
457 }
458 }
459 };
460
461 template<>
463 {
464 public:
465 coordinates_3dr() : x(),y(),z(),theta(),phi()
466 {}
467
470
473
475 {}
476
481
486
491
494
497
502
504 {
505 x = x_coordinates.x;
506 y = x_coordinates.y;
507 z = x_coordinates.z;
508 theta = x_coordinates.theta;
509 phi = x_coordinates.phi;
510 return *this;
511 }
512
514 {
515 x = std::move(x_coordinates.x);
516 y = std::move(x_coordinates.y);
517 z = std::move(x_coordinates.z);
518 theta = std::move(x_coordinates.theta);
519 phi = std::move(x_coordinates.phi);
520 return *this;
521 }
522
524 {
525 x = x_coordinates.x;
526 y = x_coordinates.y;
527 z = x_coordinates.z;
528 return *this;
529 }
530
532 {
533 x = std::move(x_coordinates.x);
534 y = std::move(x_coordinates.y);
535 z = std::move(x_coordinates.z);
536 return *this;
537 }
538
544
545 float get_p() const
546 {
547 return float(std::sqrt(std::pow(x,2) + std::pow(y,2)));
548 }
549
551 {
552 return scifir::atan(float(y/x));
553 }
554
555 float get_r() const
556 {
557 return float(std::sqrt(std::pow(x,2) + std::pow(y,2) + std::pow(z,2)));
558 }
559
561 {
562 return angle(scifir::acos_degree(float(z/std::sqrt(std::pow(x,2) + std::pow(y,2) + std::pow(z,2)))));
563 }
564
566 {
567 return ECEF_to_LLA_latitude(x,y,z);
568 }
569
571 {
572 return ECEF_to_LLA_longitude(x,y,z);
573 }
574
575 float get_altitude() const
576 {
577 return ECEF_to_LLA_altitude(x,y,z);
578 }
579
581 {
582 if (x == direction::LEFT)
583 {
584 theta = 270.0f;
585 phi = 90.0f;
586 }
587 else if(x == direction::RIGHT)
588 {
589 theta = 90.0f;
590 phi = 90.0f;
591 }
592 else if(x == direction::TOP)
593 {
594 theta = 0.0f;
595 phi = 0.0f;
596 }
597 else if(x == direction::BOTTOM)
598 {
599 theta = 0.0f;
600 phi = 180.0f;
601 }
602 else if(x == direction::LEFT_TOP)
603 {
604 theta = 270.0f;
605 phi = 45.0f;
606 }
607 else if(x == direction::RIGHT_TOP)
608 {
609 theta = 90.0f;
610 phi = 45.0f;
611 }
612 else if(x == direction::RIGHT_BOTTOM)
613 {
614 theta = 90.0f;
615 phi = 135.0f;
616 }
617 else if(x == direction::LEFT_BOTTOM)
618 {
619 theta = 270.0f;
620 phi = 135.0f;
621 }
622 else if(x == direction::FRONT)
623 {
624 theta = 0.0f;
625 phi = 90.0f;
626 }
627 else if(x == direction::BACK)
628 {
629 theta = 180.0f;
630 phi = 90.0f;
631 }
632 else if(x == direction::LEFT_FRONT)
633 {
634 theta = 315.0f;
635 phi = 90.0f;
636 }
637 else if(x == direction::RIGHT_FRONT)
638 {
639 theta = 45.0f;
640 phi = 90.0f;
641 }
642 else if(x == direction::TOP_FRONT)
643 {
644 theta = 0.0f;
645 phi = 45.0f;
646 }
647 else if(x == direction::BOTTOM_FRONT)
648 {
649 theta = 0.0f;
650 phi = 135.0f;
651 }
652 else if(x == direction::LEFT_BACK)
653 {
654 theta = 225.0f;
655 phi = 90.0f;
656 }
657 else if(x == direction::RIGHT_BACK)
658 {
659 theta = 135.0f;
660 phi = 90.0f;
661 }
662 else if(x == direction::TOP_BACK)
663 {
664 theta = 180.0f;
665 phi = 45.0f;
666 }
667 else if(x == direction::BOTTOM_BACK)
668 {
669 theta = 180.0f;
670 phi = 135.0f;
671 }
672 else if(x == direction::LEFT_TOP_FRONT)
673 {
674 theta = 315.0f;
675 phi = 45.0f;
676 }
677 else if(x == direction::RIGHT_TOP_FRONT)
678 {
679 theta = 45.0f;
680 phi = 45.0f;
681 }
683 {
684 theta = 315.0f;
685 phi = 135.0f;
686 }
688 {
689 theta = 45.0f;
690 phi = 135.0f;
691 }
692 else if(x == direction::LEFT_TOP_BACK)
693 {
694 theta = 225.0f;
695 phi = 45.0f;
696 }
697 else if(x == direction::RIGHT_TOP_BACK)
698 {
699 theta = 135.0f;
700 phi = 45.0f;
701 }
703 {
704 theta = 225.0f;
705 phi = 135.0f;
706 }
708 {
709 theta = 135.0f;
710 phi = 135.0f;
711 }
712 }
713
714 void set_position(float new_x,float new_y,float new_z)
715 {
716 x = new_x;
717 y = new_y;
718 z = new_z;
719 }
720
721 void set_position(float new_p,const angle& new_theta,float new_z)
722 {
725 z = new_z;
726 }
727
734
741
743 {
744 float y_coord = y;
745 float z_coord = z;
748 }
749
751 {
752 float x_coord = x;
753 float z_coord = z;
756 }
757
759 {
760 float x_coord = x;
761 float y_coord = y;
764 }
765
767 {
768 x += float(x_displacement.x_projection());
769 y += float(x_displacement.y_projection());
770 z += float(x_displacement.z_projection());
771 }
772
773 void move(float new_x,float new_y,float new_z)
774 {
775 x += new_x;
776 y += new_y;
777 z += new_z;
778 }
779
780 void move(float new_p,const angle& new_theta,float new_z)
781 {
784 z += new_z;
785 }
786
793
794 float distance_to_origin() const
795 {
796 return float(std::sqrt(std::pow(x,2) + std::pow(y,2) + std::pow(z,2)));
797 }
798
799 string display_cartesian() const
800 {
802 out << "(" << display_float(x) << "," << display_float(y) << "," << display_float(z) << ";" << theta << "," << phi << ")";
803 return out.str();
804 }
805
806 string display_cylindrical() const
807 {
809 out << "(" << display_float(get_p()) << "," << get_spherical_theta() << "," << display_float(z) << ";" << theta << "," << phi << ")";
810 return out.str();
811 }
812
813 string display_spherical() const
814 {
816 out << "(" << display_float(get_r()) << "," << get_spherical_theta() << "," << get_spherical_phi() << ";" << theta << "," << phi << ")";
817 return out.str();
818 }
819
820 string display_geographical() const
821 {
823 out << "(" << get_latitude() << "," << get_longitude() << "," << display_float(get_altitude()) << ";" << theta << "," << phi << ")";
824 return out.str();
825 }
826
827 float x;
828 float y;
829 float z;
832
833 private:
835 {
839 if (init_coordinates_3dr.front() == '(')
840 {
841 init_coordinates_3dr.erase(0,1);
842 }
843 if (init_coordinates_3dr.back() == ')')
844 {
846 }
847 boost::split(init_coordinates,init_coordinates_3dr,boost::is_any_of(";"));
848 if (init_coordinates.size() > 0)
849 {
850 boost::split(init_values,init_coordinates[0],boost::is_any_of(","));
851 }
852 if (init_coordinates.size() > 1)
853 {
854 boost::split(init_angles,init_coordinates[1],boost::is_any_of(","));
855 }
856 if (init_values.size() == 3 and init_angles.size() == 2)
857 {
858 if (init_values[0] == "" or init_values[1] == "" or init_values[2] == "" or init_angles[0] == "" or init_angles[1] == "")
859 {
860 return;
861 }
862 if (is_latitude(init_values[0]))
863 {
865 {
866 if (!is_angle(init_values[2]))
867 {
869 }
870 }
871 }
872 else
873 {
874 if (is_angle(init_values[1]))
875 {
876 if (is_angle(init_values[2]))
877 {
879 }
880 else
881 {
883 }
884 }
885 else
886 {
887 if (!is_angle(init_values[2]))
888 {
890 }
891 }
892 }
893 theta = angle(init_angles[0]);
894 phi = angle(init_angles[1]);
895 }
896 }
897 };
898
899 template<typename T>
901 {
902 return x.display_cartesian();
903 }
904
905 string to_string(const coordinates_3dr<float>& x);
906
907 template<typename T,typename U>
909 {
910 return T(scifir::sqrt(scifir::pow(x.x - y.x,2) + scifir::pow(x.y - y.y,2) + scifir::pow(x.z - y.z,2)));
911 }
912
913 float distance(const coordinates_3dr<float>& x,const coordinates_3dr<float>& y);
914
915 template<typename T,typename U>
917 {
918 return T(scifir::sqrt(scifir::pow(x.x - y.x,2) + scifir::pow(x.y - y.y,2) + scifir::pow(x.z - y.z,2)));
919 }
920
921 float distance(const coordinates_3dr<float>& x,const coordinates_3d<float>& y);
922
923 template<typename T,typename U>
925 {
926 return T(scifir::sqrt(scifir::pow(x.x - y.x,2) + scifir::pow(x.y - y.y,2) + scifir::pow(x.z - y.z,2)));
927 }
928
929 float distance(const coordinates_3d<float>& x,const coordinates_3dr<float>& y);
930}
931
932template<typename T,typename U>
934{
935 if (x.x == y.x and x.y == y.y and x.z == y.z and x.theta == y.theta and x.phi == y.phi)
936 {
937 return true;
938 }
939 else
940 {
941 return false;
942 }
943}
944
945template<typename T,typename U>
947{
948 return !(x == y);
949}
950
951template<typename T,typename U>
953{
954 if (x.x == y.x and x.y == y.y and x.z == y.z)
955 {
956 return true;
957 }
958 else
959 {
960 return false;
961 }
962}
963
964template<typename T,typename U>
966{
967 return !(x == y);
968}
969
970template<typename T,typename U>
972{
973 if (x.x == y.x and x.y == y.y and x.z == y.z)
974 {
975 return true;
976 }
977 else
978 {
979 return false;
980 }
981}
982
983template<typename T,typename U>
985{
986 return !(x == y);
987}
988
989template<typename T>
990bool operator ==(const scifir::coordinates_3dr<T>& x, const string& init_coordinates_3dr)
991{
992 scifir::coordinates_3dr<T> y(init_coordinates_3dr);
993 return (x == y);
994}
995
996template<typename T>
997bool operator !=(const scifir::coordinates_3dr<T>& x, const string& init_coordinates_3dr)
998{
999 return !(x == init_coordinates_3dr);
1000}
1001
1002template<typename T>
1003bool operator ==(const string& init_coordinates_3dr, const scifir::coordinates_3dr<T>& x)
1004{
1005 scifir::coordinates_3dr<T> y(init_coordinates_3dr);
1006 return (x == y);
1007}
1008
1009template<typename T>
1010bool operator !=(const string& init_coordinates_3dr, const scifir::coordinates_3dr<T>& x)
1011{
1012 return !(init_coordinates_3dr == x);
1013}
1014
1015template<typename T>
1017{
1018 x += to_string(y);
1019}
1020
1021template<typename T>
1022string operator +(const string& x,const scifir::coordinates_3dr<T>& y)
1023{
1024 return x + to_string(y);
1025}
1026
1027template<typename T>
1028string operator +(const scifir::coordinates_3dr<T>& x,const string& y)
1029{
1030 return to_string(x) + y;
1031}
1032
1033template<typename T>
1034ostream& operator <<(ostream& os, const scifir::coordinates_3dr<T>& x)
1035{
1036 return os << to_string(x);
1037}
1038
1039ostream& operator <<(ostream& os,const scifir::coordinates_3dr<float>& x);
1040
1041template<typename T>
1043{
1044 char a[256];
1045 is.getline(a, 256);
1046 string b(a);
1047 boost::trim(b);
1049 return is;
1050}
1051
1052#endif // SCIFIR_UNITS_COORDINATES_COORDINATES_3DR_HPP_INCLUDED
Class that allows to work with angles. Each angle sizes 4 bytes. Initialization string example: "20°"...
Definition angle.hpp:77
string display_cartesian() const
void move(const scalar_unit &x_value)
void set_position(float new_p, const angle &new_theta, float new_z)
coordinates_3dr(coordinates_3d< float > &&x_coordinates, const angle &new_theta, const angle &new_phi)
void set_position(const angle &new_latitude, const angle &new_longitude, float new_altitude)
void move(float new_x, float new_y, float new_z)
coordinates_3dr(float new_p, const angle &new_cylindrical_theta, float new_z, const angle &new_theta, const angle &new_phi)
coordinates_3dr(float new_r, const angle &new_spherical_theta, const angle &new_spherical_phi, const angle &new_theta, const angle &new_phi)
void set_position(float new_r, const angle &new_theta, const angle &new_phi)
coordinates_3dr(const angle &new_latitude, const angle &new_longitude, float new_altitude, const angle &new_theta, const angle &new_phi)
coordinates_3dr(float new_x, float new_y, float new_z, const angle &new_theta, const angle &new_phi)
coordinates_3dr(const coordinates_3d< float > &x_coordinates, const angle &new_theta, const angle &new_phi)
coordinates_3dr(coordinates_3dr< float > &&x_coordinates)
void rotate_in_z(const angle &x_angle)
void move(const displacement_3d &x_displacement)
void set_position(float new_x, float new_y, float new_z)
void move(float new_p, const angle &new_theta, float new_z)
void rotate_in_y(const angle &x_angle)
coordinates_3dr(const string &init_coordinates_3dr)
void rotate_in_x(const angle &x_angle)
void move(float new_r, const angle &new_theta, const angle &new_phi)
void initialize_from_string(string init_coordinates_3dr)
coordinates_3dr(const coordinates_3dr< float > &x_coordinates)
coordinates_3dr(coordinates_3dr< T > &&x_coordinates)
coordinates_3dr(const coordinates_3dr< T > &x_coordinates)
void rotate_in_x(const angle &x_angle)
static coordinates_3dr< T > origin(const coordinates_3dr< T > &origin, const coordinates_3dr< T > &coordinates)
void move(const scalar_unit &new_x, const scalar_unit &new_y, const scalar_unit &new_z)
coordinates_3dr(const scalar_unit &new_p, const angle &new_cylindrical_theta, scalar_unit new_z, const angle &new_theta, const angle &new_phi)
scalar_unit get_altitude() const
string display_cylindrical() const
string display_geographical() const
latitude get_latitude() const
void move(const scalar_unit &new_p, const angle &new_theta, scalar_unit new_z)
coordinates_3dr(coordinates_3d< U > &&x_coordinates, const angle &new_theta, const angle &new_phi)
void set_position(const scalar_unit &new_r, const angle &new_theta, const angle &new_phi)
void set_position(const angle &new_latitude, const angle &new_longitude, const scalar_unit &new_altitude)
coordinates_3dr(const string &init_coordinates_3dr)
void point_to(direction::name x)
void rotate_in_z(const angle &x_angle)
coordinates_3dr< T > & operator=(const coordinates_3dr< T > &x_coordinates)
void set_position(const scalar_unit &new_p, const angle &new_theta, scalar_unit new_z)
coordinates_3dr(const coordinates_3d< U > &x_coordinates, const angle &new_theta, const angle &new_phi)
coordinates_3dr(const scalar_unit &new_r, const angle &new_spherical_theta, const angle &new_spherical_phi, const angle &new_theta, const angle &new_phi)
void move(const displacement_3d &x_displacement)
longitude get_longitude() const
coordinates_3dr(const angle &new_latitude, const angle &new_longitude, const scalar_unit &new_altitude, const angle &new_theta, const angle &new_phi)
void set_position(const scalar_unit &new_x, const scalar_unit &new_y, const scalar_unit &new_z)
coordinates_3dr(const scalar_unit &new_x, const scalar_unit &new_y, const scalar_unit &new_z, const angle &new_theta, const angle &new_phi)
void move(const scalar_unit &new_r, const angle &new_theta, const angle &new_phi)
void initialize_from_string(string init_coordinates_3dr)
void rotate_in_y(const angle &x_angle)
Class that allows to create scalar units, which are composed of a value (as a float) and dimensions....
string operator+(const string &x, const scifir::coordinates_3dr< T > &y)
istream & operator>>(istream &is, scifir::coordinates_3dr< T > &x)
bool operator==(const scifir::coordinates_3dr< T > &x, const scifir::coordinates_3dr< U > &y)
ostream & operator<<(ostream &os, const scifir::coordinates_3dr< T > &x)
void operator+=(string &x, const scifir::coordinates_3dr< T > &y)
bool operator!=(const scifir::coordinates_3dr< T > &x, const scifir::coordinates_3dr< U > &y)
The namespace scifir contains all scifir-units, excepting the string literals, which are outside.
Definition address.cpp:6
bool is_latitude(const string &init_latitude)
Definition latitude.cpp:199
scalar_unit ECEF_to_LLA_altitude(const scalar_unit &x, scalar_unit y, const scalar_unit &z)
float cos(const angle &x)
Calculates the cos of angle x. It uses the cos() function of the standard library of C++,...
Definition angle.cpp:431
scalar_unit pow(const scalar_unit &x, int exponent)
Exponentiates a scalar_unit to some numeric type, the dimensions are also exponentiated.
bool is_longitude(const string &init_longitude)
longitude ECEF_to_LLA_longitude(const scalar_unit &x, scalar_unit y, const scalar_unit &z)
string to_string(const aid &x)
Creates a string representation of aid, it's for aid equivalent to the display() function of aid.
Definition aid.cpp:582
float distance(const coordinates_1d< float > &x, const coordinates_1d< float > &y)
angle atan(float x)
Calculates the atan of some value x and returns the result as angle in degrees.
Definition angle.cpp:451
string display_float(const float &value, int number_of_decimals)
Definition types.cpp:36
float acos_degree(float x)
Calculates the acos receiving x in degrees. It uses the acos() function of the standard library of C+...
Definition angle.hpp:247
latitude ECEF_to_LLA_latitude(const scalar_unit &x, scalar_unit y, const scalar_unit &z)
float sin(const angle &x)
Calculates the sin of angle x. It uses the sin() function of the standard library of C++,...
Definition angle.cpp:426
angle sqrt(const angle &x)
Calculates the square root of the angle x and returns that new angle.
Definition angle.cpp:416
bool is_angle(const string &init_angle)
Checks if some string is an initialization string of an angle.
Definition angle.cpp:336