diff --git a/CMakeLists.txt b/CMakeLists.txt index e42256c80..5eb89eb14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.13) project(S2E LANGUAGES CXX DESCRIPTION "S2E: Spacecraft Simulation Environment" - VERSION 7.2.7 + VERSION 7.2.8 ) # build config @@ -109,7 +109,7 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES}) ## cspice library if(APPLE) - if(APPLE_SILICON) + if(APPLE_SILICON) # APPLE Silicon set(CSPICE_LIB_DIR ${CSPICE_DIR}/cspice_apple_silicon64/lib) else() @@ -151,7 +151,7 @@ endif() ## nrlmsise00 library if(CYGWIN) SET (CMAKE_FIND_LIBRARY_SUFFIXES ".a") - find_library(NRLMSISE00_LIB + find_library(NRLMSISE00_LIB NAMES libnrlmsise00.a PATHS ${NRLMSISE00_DIR}/lib) elseif(UNIX) @@ -167,11 +167,11 @@ elseif(UNIX) elseif(WIN32) SET (CMAKE_FIND_LIBRARY_SUFFIXES ".lib") if(BUILD_64BIT) - find_library(NRLMSISE00_LIB + find_library(NRLMSISE00_LIB NAMES libnrlmsise00.lib PATHS ${NRLMSISE00_DIR}/lib64) else() - find_library(NRLMSISE00_LIB + find_library(NRLMSISE00_LIB NAMES libnrlmsise00.lib PATHS ${NRLMSISE00_DIR}/lib) endif() diff --git a/scripts/Plot/Pipfile b/scripts/Plot/Pipfile index 38356acf7..4b2737a08 100644 --- a/scripts/Plot/Pipfile +++ b/scripts/Plot/Pipfile @@ -8,7 +8,7 @@ basemap = "==1.4.1" matplotlib = "==3.7.2" numpy = "==1.24.3" pandas = "==2.0.3" -numpy-stl = "==3.0.1" +numpy-stl = "==3.1.2" numpy-quaternion = "==2023.0.4" python-utils = "==3.5.2" diff --git a/scripts/Plot/Pipfile.lock b/scripts/Plot/Pipfile.lock index 7a98a2a8a..426831690 100644 --- a/scripts/Plot/Pipfile.lock +++ b/scripts/Plot/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f4ca1dee72da4042d6b1600578b0e579b9f98edbac9f1bd220a102f936f25c76" + "sha256": "c94693aa0122b4dd9d16b46736bce49f6d7b910a0b1765e86dc1ba5b3274bd8a" }, "pipfile-spec": 6, "requires": { @@ -81,7 +81,6 @@ "sha256:5a1e7645bc0ec61a09e26c36f6106dd4cf40c6db3a1fb6352b0244e7fb057c7b", "sha256:c198e21b1289c2ab85ee4e67bb4b4ef3ead0892059901a8d5b622f24a1101e90" ], - "index": "pypi", "markers": "python_version >= '3.6'", "version": "==2024.7.4" }, @@ -153,51 +152,51 @@ }, "fonttools": { "hashes": [ - "sha256:099634631b9dd271d4a835d2b2a9e042ccc94ecdf7e2dd9f7f34f7daf333358d", - "sha256:0c555e039d268445172b909b1b6bdcba42ada1cf4a60e367d68702e3f87e5f64", - "sha256:1e677bfb2b4bd0e5e99e0f7283e65e47a9814b0486cb64a41adf9ef110e078f2", - "sha256:2367d47816cc9783a28645bc1dac07f8ffc93e0f015e8c9fc674a5b76a6da6e4", - "sha256:28d072169fe8275fb1a0d35e3233f6df36a7e8474e56cb790a7258ad822b6fd6", - "sha256:31f0e3147375002aae30696dd1dc596636abbd22fca09d2e730ecde0baad1d6b", - "sha256:3e0ad3c6ea4bd6a289d958a1eb922767233f00982cf0fe42b177657c86c80a8f", - "sha256:45b4afb069039f0366a43a5d454bc54eea942bfb66b3fc3e9a2c07ef4d617380", - "sha256:4a2a6ba400d386e904fd05db81f73bee0008af37799a7586deaa4aef8cd5971e", - "sha256:4f520d9ac5b938e6494f58a25c77564beca7d0199ecf726e1bd3d56872c59749", - "sha256:52a6e0a7a0bf611c19bc8ec8f7592bdae79c8296c70eb05917fd831354699b20", - "sha256:5a4788036201c908079e89ae3f5399b33bf45b9ea4514913f4dbbe4fac08efe0", - "sha256:6b4f04b1fbc01a3569d63359f2227c89ab294550de277fd09d8fca6185669fa4", - "sha256:715b41c3e231f7334cbe79dfc698213dcb7211520ec7a3bc2ba20c8515e8a3b5", - "sha256:73121a9b7ff93ada888aaee3985a88495489cc027894458cb1a736660bdfb206", - "sha256:74ae2441731a05b44d5988d3ac2cf784d3ee0a535dbed257cbfff4be8bb49eb9", - "sha256:7d6166192dcd925c78a91d599b48960e0a46fe565391c79fe6de481ac44d20ac", - "sha256:7f193f060391a455920d61684a70017ef5284ccbe6023bb056e15e5ac3de11d1", - "sha256:907fa0b662dd8fc1d7c661b90782ce81afb510fc4b7aa6ae7304d6c094b27bce", - "sha256:93156dd7f90ae0a1b0e8871032a07ef3178f553f0c70c386025a808f3a63b1f4", - "sha256:93bc9e5aaa06ff928d751dc6be889ff3e7d2aa393ab873bc7f6396a99f6fbb12", - "sha256:95db0c6581a54b47c30860d013977b8a14febc206c8b5ff562f9fe32738a8aca", - "sha256:973d030180eca8255b1bce6ffc09ef38a05dcec0e8320cc9b7bcaa65346f341d", - "sha256:9cd7a6beec6495d1dffb1033d50a3f82dfece23e9eb3c20cd3c2444d27514068", - "sha256:9fe9096a60113e1d755e9e6bda15ef7e03391ee0554d22829aa506cdf946f796", - "sha256:a209d2e624ba492df4f3bfad5996d1f76f03069c6133c60cd04f9a9e715595ec", - "sha256:a239afa1126b6a619130909c8404070e2b473dd2b7fc4aacacd2e763f8597fea", - "sha256:ba9f09ff17f947392a855e3455a846f9855f6cf6bec33e9a427d3c1d254c712f", - "sha256:bb7273789f69b565d88e97e9e1da602b4ee7ba733caf35a6c2affd4334d4f005", - "sha256:bd5bc124fae781a4422f61b98d1d7faa47985f663a64770b78f13d2c072410c2", - "sha256:bff98816cb144fb7b85e4b5ba3888a33b56ecef075b0e95b95bcd0a5fbf20f06", - "sha256:c4ee5a24e281fbd8261c6ab29faa7fd9a87a12e8c0eed485b705236c65999109", - "sha256:c93ed66d32de1559b6fc348838c7572d5c0ac1e4a258e76763a5caddd8944002", - "sha256:d1a24f51a3305362b94681120c508758a88f207fa0a681c16b5a4172e9e6c7a9", - "sha256:d8f191a17369bd53a5557a5ee4bab91d5330ca3aefcdf17fab9a497b0e7cff7a", - "sha256:daaef7390e632283051e3cf3e16aff2b68b247e99aea916f64e578c0449c9c68", - "sha256:e40013572bfb843d6794a3ce076c29ef4efd15937ab833f520117f8eccc84fd6", - "sha256:eceef49f457253000e6a2d0f7bd08ff4e9fe96ec4ffce2dbcb32e34d9c1b8161", - "sha256:ee595d7ba9bba130b2bec555a40aafa60c26ce68ed0cf509983e0f12d88674fd", - "sha256:ef50ec31649fbc3acf6afd261ed89d09eb909b97cc289d80476166df8438524d", - "sha256:fa1f3e34373aa16045484b4d9d352d4c6b5f9f77ac77a178252ccbc851e8b2ee", - "sha256:fca66d9ff2ac89b03f5aa17e0b21a97c21f3491c46b583bb131eb32c7bab33af" + "sha256:02569e9a810f9d11f4ae82c391ebc6fb5730d95a0657d24d754ed7763fb2d122", + "sha256:0679a30b59d74b6242909945429dbddb08496935b82f91ea9bf6ad240ec23397", + "sha256:10f5e6c3510b79ea27bb1ebfcc67048cde9ec67afa87c7dd7efa5c700491ac7f", + "sha256:2af40ae9cdcb204fc1d8f26b190aa16534fcd4f0df756268df674a270eab575d", + "sha256:32f029c095ad66c425b0ee85553d0dc326d45d7059dbc227330fc29b43e8ba60", + "sha256:35250099b0cfb32d799fb5d6c651220a642fe2e3c7d2560490e6f1d3f9ae9169", + "sha256:3b3c8ebafbee8d9002bd8f1195d09ed2bd9ff134ddec37ee8f6a6375e6a4f0e8", + "sha256:4824c198f714ab5559c5be10fd1adf876712aa7989882a4ec887bf1ef3e00e31", + "sha256:5ff7e5e9bad94e3a70c5cd2fa27f20b9bb9385e10cddab567b85ce5d306ea923", + "sha256:651390c3b26b0c7d1f4407cad281ee7a5a85a31a110cbac5269de72a51551ba2", + "sha256:6e08f572625a1ee682115223eabebc4c6a2035a6917eac6f60350aba297ccadb", + "sha256:6ed170b5e17da0264b9f6fae86073be3db15fa1bd74061c8331022bca6d09bab", + "sha256:73379d3ffdeecb376640cd8ed03e9d2d0e568c9d1a4e9b16504a834ebadc2dfb", + "sha256:75a157d8d26c06e64ace9df037ee93a4938a4606a38cb7ffaf6635e60e253b7a", + "sha256:791b31ebbc05197d7aa096bbc7bd76d591f05905d2fd908bf103af4488e60670", + "sha256:7b6b35e52ddc8fb0db562133894e6ef5b4e54e1283dff606fda3eed938c36fc8", + "sha256:84ec3fb43befb54be490147b4a922b5314e16372a643004f182babee9f9c3407", + "sha256:8959a59de5af6d2bec27489e98ef25a397cfa1774b375d5787509c06659b3671", + "sha256:9dfdae43b7996af46ff9da520998a32b105c7f098aeea06b2226b30e74fbba88", + "sha256:9e6ceba2a01b448e36754983d376064730690401da1dd104ddb543519470a15f", + "sha256:9efd176f874cb6402e607e4cc9b4a9cd584d82fc34a4b0c811970b32ba62501f", + "sha256:a1c7c5aa18dd3b17995898b4a9b5929d69ef6ae2af5b96d585ff4005033d82f0", + "sha256:aae7bd54187e8bf7fd69f8ab87b2885253d3575163ad4d669a262fe97f0136cb", + "sha256:b21952c092ffd827504de7e66b62aba26fdb5f9d1e435c52477e6486e9d128b2", + "sha256:b96cd370a61f4d083c9c0053bf634279b094308d52fdc2dd9a22d8372fdd590d", + "sha256:becc5d7cb89c7b7afa8321b6bb3dbee0eec2b57855c90b3e9bf5fb816671fa7c", + "sha256:bee32ea8765e859670c4447b0817514ca79054463b6b79784b08a8df3a4d78e3", + "sha256:c6e7170d675d12eac12ad1a981d90f118c06cf680b42a2d74c6c931e54b50719", + "sha256:c818c058404eb2bba05e728d38049438afd649e3c409796723dfc17cd3f08749", + "sha256:c8696544c964500aa9439efb6761947393b70b17ef4e82d73277413f291260a4", + "sha256:c9cd19cf4fe0595ebdd1d4915882b9440c3a6d30b008f3cc7587c1da7b95be5f", + "sha256:d4d0096cb1ac7a77b3b41cd78c9b6bc4a400550e21dc7a92f2b5ab53ed74eb02", + "sha256:d92d3c2a1b39631a6131c2fa25b5406855f97969b068e7e08413325bc0afba58", + "sha256:da33440b1413bad53a8674393c5d29ce64d8c1a15ef8a77c642ffd900d07bfe1", + "sha256:e013aae589c1c12505da64a7d8d023e584987e51e62006e1bb30d72f26522c41", + "sha256:e128778a8e9bc11159ce5447f76766cefbd876f44bd79aff030287254e4752c4", + "sha256:e54f1bba2f655924c1138bbc7fa91abd61f45c68bd65ab5ed985942712864bbb", + "sha256:e5b708073ea3d684235648786f5f6153a48dc8762cdfe5563c57e80787c29fbb", + "sha256:e8bf06b94694251861ba7fdeea15c8ec0967f84c3d4143ae9daf42bbc7717fe3", + "sha256:f08df60fbd8d289152079a65da4e66a447efc1d5d5a4d3f299cdd39e3b2e4a7d", + "sha256:f1f8758a2ad110bd6432203a344269f445a2907dc24ef6bccfd0ac4e14e0d71d", + "sha256:f677ce218976496a587ab17140da141557beb91d2a5c1a14212c994093f2eae2" ], "markers": "python_version >= '3.8'", - "version": "==4.53.0" + "version": "==4.53.1" }, "importlib-resources": { "hashes": [ @@ -457,19 +456,19 @@ }, "numpy-stl": { "hashes": [ - "sha256:cd2c4b0032756bb1488559d507825b0dd8d5c2ac4a68638c2145387b2f804691", - "sha256:dd4da1a379d2632f168518be8dcd9cddd7edc6c3238094fd8d21476b3586a0bc" + "sha256:72b46950dfa3642df1c7b873cfa78a548533724b907478c567db42fdf57ee3d2", + "sha256:a55288340c837378bf44753a1c595c6823312995acda97f27ed04db4ff1d25f3" ], "index": "pypi", "markers": "python_version >= '3.7'", - "version": "==3.0.1" + "version": "==3.1.2" }, "packaging": { "hashes": [ "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5", "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7" ], - "markers": "python_version >= '3.7'", + "markers": "python_version >= '3.5'", "version": "==23.2" }, "pandas": { @@ -506,78 +505,89 @@ }, "pillow": { "hashes": [ - "sha256:048ad577748b9fa4a99a0548c64f2cb8d672d5bf2e643a739ac8faff1164238c", - "sha256:048eeade4c33fdf7e08da40ef402e748df113fd0b4584e32c4af74fe78baaeb2", - "sha256:0ba26351b137ca4e0db0342d5d00d2e355eb29372c05afd544ebf47c0956ffeb", - "sha256:0ea2a783a2bdf2a561808fe4a7a12e9aa3799b701ba305de596bc48b8bdfce9d", - "sha256:1530e8f3a4b965eb6a7785cf17a426c779333eb62c9a7d1bbcf3ffd5bf77a4aa", - "sha256:16563993329b79513f59142a6b02055e10514c1a8e86dca8b48a893e33cf91e3", - "sha256:19aeb96d43902f0a783946a0a87dbdad5c84c936025b8419da0a0cd7724356b1", - "sha256:1a1d1915db1a4fdb2754b9de292642a39a7fb28f1736699527bb649484fb966a", - "sha256:1b87bd9d81d179bd8ab871603bd80d8645729939f90b71e62914e816a76fc6bd", - "sha256:1dfc94946bc60ea375cc39cff0b8da6c7e5f8fcdc1d946beb8da5c216156ddd8", - "sha256:2034f6759a722da3a3dbd91a81148cf884e91d1b747992ca288ab88c1de15999", - "sha256:261ddb7ca91fcf71757979534fb4c128448b5b4c55cb6152d280312062f69599", - "sha256:2ed854e716a89b1afcedea551cd85f2eb2a807613752ab997b9974aaa0d56936", - "sha256:3102045a10945173d38336f6e71a8dc71bcaeed55c3123ad4af82c52807b9375", - "sha256:339894035d0ede518b16073bdc2feef4c991ee991a29774b33e515f1d308e08d", - "sha256:412444afb8c4c7a6cc11a47dade32982439925537e483be7c0ae0cf96c4f6a0b", - "sha256:4203efca580f0dd6f882ca211f923168548f7ba334c189e9eab1178ab840bf60", - "sha256:45ebc7b45406febf07fef35d856f0293a92e7417ae7933207e90bf9090b70572", - "sha256:4b5ec25d8b17217d635f8935dbc1b9aa5907962fae29dff220f2659487891cd3", - "sha256:4c8e73e99da7db1b4cad7f8d682cf6abad7844da39834c288fbfa394a47bbced", - "sha256:4e6f7d1c414191c1199f8996d3f2282b9ebea0945693fb67392c75a3a320941f", - "sha256:4eaa22f0d22b1a7e93ff0a596d57fdede2e550aecffb5a1ef1106aaece48e96b", - "sha256:50b8eae8f7334ec826d6eeffaeeb00e36b5e24aa0b9df322c247539714c6df19", - "sha256:50fd3f6b26e3441ae07b7c979309638b72abc1a25da31a81a7fbd9495713ef4f", - "sha256:51243f1ed5161b9945011a7360e997729776f6e5d7005ba0c6879267d4c5139d", - "sha256:5d512aafa1d32efa014fa041d38868fda85028e3f930a96f85d49c7d8ddc0383", - "sha256:5f77cf66e96ae734717d341c145c5949c63180842a545c47a0ce7ae52ca83795", - "sha256:6b02471b72526ab8a18c39cb7967b72d194ec53c1fd0a70b050565a0f366d355", - "sha256:6fb1b30043271ec92dc65f6d9f0b7a830c210b8a96423074b15c7bc999975f57", - "sha256:7161ec49ef0800947dc5570f86568a7bb36fa97dd09e9827dc02b718c5643f09", - "sha256:72d622d262e463dfb7595202d229f5f3ab4b852289a1cd09650362db23b9eb0b", - "sha256:74d28c17412d9caa1066f7a31df8403ec23d5268ba46cd0ad2c50fb82ae40462", - "sha256:78618cdbccaa74d3f88d0ad6cb8ac3007f1a6fa5c6f19af64b55ca170bfa1edf", - "sha256:793b4e24db2e8742ca6423d3fde8396db336698c55cd34b660663ee9e45ed37f", - "sha256:798232c92e7665fe82ac085f9d8e8ca98826f8e27859d9a96b41d519ecd2e49a", - "sha256:81d09caa7b27ef4e61cb7d8fbf1714f5aec1c6b6c5270ee53504981e6e9121ad", - "sha256:8ab74c06ffdab957d7670c2a5a6e1a70181cd10b727cd788c4dd9005b6a8acd9", - "sha256:8eb0908e954d093b02a543dc963984d6e99ad2b5e36503d8a0aaf040505f747d", - "sha256:90b9e29824800e90c84e4022dd5cc16eb2d9605ee13f05d47641eb183cd73d45", - "sha256:9797a6c8fe16f25749b371c02e2ade0efb51155e767a971c61734b1bf6293994", - "sha256:9d2455fbf44c914840c793e89aa82d0e1763a14253a000743719ae5946814b2d", - "sha256:9d3bea1c75f8c53ee4d505c3e67d8c158ad4df0d83170605b50b64025917f338", - "sha256:9e2ec1e921fd07c7cda7962bad283acc2f2a9ccc1b971ee4b216b75fad6f0463", - "sha256:9e91179a242bbc99be65e139e30690e081fe6cb91a8e77faf4c409653de39451", - "sha256:a0eaa93d054751ee9964afa21c06247779b90440ca41d184aeb5d410f20ff591", - "sha256:a2c405445c79c3f5a124573a051062300936b0281fee57637e706453e452746c", - "sha256:aa7e402ce11f0885305bfb6afb3434b3cd8f53b563ac065452d9d5654c7b86fd", - "sha256:aff76a55a8aa8364d25400a210a65ff59d0168e0b4285ba6bf2bd83cf675ba32", - "sha256:b09b86b27a064c9624d0a6c54da01c1beaf5b6cadfa609cf63789b1d08a797b9", - "sha256:b14f16f94cbc61215115b9b1236f9c18403c15dd3c52cf629072afa9d54c1cbf", - "sha256:b50811d664d392f02f7761621303eba9d1b056fb1868c8cdf4231279645c25f5", - "sha256:b7bc2176354defba3edc2b9a777744462da2f8e921fbaf61e52acb95bafa9828", - "sha256:c78e1b00a87ce43bb37642c0812315b411e856a905d58d597750eb79802aaaa3", - "sha256:c83341b89884e2b2e55886e8fbbf37c3fa5efd6c8907124aeb72f285ae5696e5", - "sha256:ca2870d5d10d8726a27396d3ca4cf7976cec0f3cb706debe88e3a5bd4610f7d2", - "sha256:ccce24b7ad89adb5a1e34a6ba96ac2530046763912806ad4c247356a8f33a67b", - "sha256:cd5e14fbf22a87321b24c88669aad3a51ec052eb145315b3da3b7e3cc105b9a2", - "sha256:ce49c67f4ea0609933d01c0731b34b8695a7a748d6c8d186f95e7d085d2fe475", - "sha256:d33891be6df59d93df4d846640f0e46f1a807339f09e79a8040bc887bdcd7ed3", - "sha256:d3b2348a78bc939b4fed6552abfd2e7988e0f81443ef3911a4b8498ca084f6eb", - "sha256:d886f5d353333b4771d21267c7ecc75b710f1a73d72d03ca06df49b09015a9ef", - "sha256:d93480005693d247f8346bc8ee28c72a2191bdf1f6b5db469c096c0c867ac015", - "sha256:dc1a390a82755a8c26c9964d457d4c9cbec5405896cba94cf51f36ea0d855002", - "sha256:dd78700f5788ae180b5ee8902c6aea5a5726bac7c364b202b4b3e3ba2d293170", - "sha256:e46f38133e5a060d46bd630faa4d9fa0202377495df1f068a8299fd78c84de84", - "sha256:e4b878386c4bf293578b48fc570b84ecfe477d3b77ba39a6e87150af77f40c57", - "sha256:f0d0591a0aeaefdaf9a5e545e7485f89910c977087e7de2b6c388aec32011e9f", - "sha256:fdcbb4068117dfd9ce0138d068ac512843c52295ed996ae6dd1faf537b6dbc27", - "sha256:ff61bfd9253c3915e6d41c651d5f962da23eda633cf02262990094a18a55371a" + "sha256:02a2be69f9c9b8c1e97cf2713e789d4e398c751ecfd9967c18d0ce304efbf885", + "sha256:030abdbe43ee02e0de642aee345efa443740aa4d828bfe8e2eb11922ea6a21ea", + "sha256:06b2f7898047ae93fad74467ec3d28fe84f7831370e3c258afa533f81ef7f3df", + "sha256:0755ffd4a0c6f267cccbae2e9903d95477ca2f77c4fcf3a3a09570001856c8a5", + "sha256:0a9ec697746f268507404647e531e92889890a087e03681a3606d9b920fbee3c", + "sha256:0ae24a547e8b711ccaaf99c9ae3cd975470e1a30caa80a6aaee9a2f19c05701d", + "sha256:134ace6dc392116566980ee7436477d844520a26a4b1bd4053f6f47d096997fd", + "sha256:166c1cd4d24309b30d61f79f4a9114b7b2313d7450912277855ff5dfd7cd4a06", + "sha256:1b5dea9831a90e9d0721ec417a80d4cbd7022093ac38a568db2dd78363b00908", + "sha256:1d846aea995ad352d4bdcc847535bd56e0fd88d36829d2c90be880ef1ee4668a", + "sha256:1ef61f5dd14c300786318482456481463b9d6b91ebe5ef12f405afbba77ed0be", + "sha256:297e388da6e248c98bc4a02e018966af0c5f92dfacf5a5ca22fa01cb3179bca0", + "sha256:298478fe4f77a4408895605f3482b6cc6222c018b2ce565c2b6b9c354ac3229b", + "sha256:29dbdc4207642ea6aad70fbde1a9338753d33fb23ed6956e706936706f52dd80", + "sha256:2db98790afc70118bd0255c2eeb465e9767ecf1f3c25f9a1abb8ffc8cfd1fe0a", + "sha256:32cda9e3d601a52baccb2856b8ea1fc213c90b340c542dcef77140dfa3278a9e", + "sha256:37fb69d905be665f68f28a8bba3c6d3223c8efe1edf14cc4cfa06c241f8c81d9", + "sha256:416d3a5d0e8cfe4f27f574362435bc9bae57f679a7158e0096ad2beb427b8696", + "sha256:43efea75eb06b95d1631cb784aa40156177bf9dd5b4b03ff38979e048258bc6b", + "sha256:4b35b21b819ac1dbd1233317adeecd63495f6babf21b7b2512d244ff6c6ce309", + "sha256:4d9667937cfa347525b319ae34375c37b9ee6b525440f3ef48542fcf66f2731e", + "sha256:5161eef006d335e46895297f642341111945e2c1c899eb406882a6c61a4357ab", + "sha256:543f3dc61c18dafb755773efc89aae60d06b6596a63914107f75459cf984164d", + "sha256:551d3fd6e9dc15e4c1eb6fc4ba2b39c0c7933fa113b220057a34f4bb3268a060", + "sha256:59291fb29317122398786c2d44427bbd1a6d7ff54017075b22be9d21aa59bd8d", + "sha256:5b001114dd152cfd6b23befeb28d7aee43553e2402c9f159807bf55f33af8a8d", + "sha256:5b4815f2e65b30f5fbae9dfffa8636d992d49705723fe86a3661806e069352d4", + "sha256:5dc6761a6efc781e6a1544206f22c80c3af4c8cf461206d46a1e6006e4429ff3", + "sha256:5e84b6cc6a4a3d76c153a6b19270b3526a5a8ed6b09501d3af891daa2a9de7d6", + "sha256:6209bb41dc692ddfee4942517c19ee81b86c864b626dbfca272ec0f7cff5d9fb", + "sha256:673655af3eadf4df6b5457033f086e90299fdd7a47983a13827acf7459c15d94", + "sha256:6c762a5b0997f5659a5ef2266abc1d8851ad7749ad9a6a5506eb23d314e4f46b", + "sha256:7086cc1d5eebb91ad24ded9f58bec6c688e9f0ed7eb3dbbf1e4800280a896496", + "sha256:73664fe514b34c8f02452ffb73b7a92c6774e39a647087f83d67f010eb9a0cf0", + "sha256:76a911dfe51a36041f2e756b00f96ed84677cdeb75d25c767f296c1c1eda1319", + "sha256:780c072c2e11c9b2c7ca37f9a2ee8ba66f44367ac3e5c7832afcfe5104fd6d1b", + "sha256:7928ecbf1ece13956b95d9cbcfc77137652b02763ba384d9ab508099a2eca856", + "sha256:7970285ab628a3779aecc35823296a7869f889b8329c16ad5a71e4901a3dc4ef", + "sha256:7a8d4bade9952ea9a77d0c3e49cbd8b2890a399422258a77f357b9cc9be8d680", + "sha256:7c1ee6f42250df403c5f103cbd2768a28fe1a0ea1f0f03fe151c8741e1469c8b", + "sha256:7dfecdbad5c301d7b5bde160150b4db4c659cee2b69589705b6f8a0c509d9f42", + "sha256:812f7342b0eee081eaec84d91423d1b4650bb9828eb53d8511bcef8ce5aecf1e", + "sha256:866b6942a92f56300012f5fbac71f2d610312ee65e22f1aa2609e491284e5597", + "sha256:86dcb5a1eb778d8b25659d5e4341269e8590ad6b4e8b44d9f4b07f8d136c414a", + "sha256:87dd88ded2e6d74d31e1e0a99a726a6765cda32d00ba72dc37f0651f306daaa8", + "sha256:8bc1a764ed8c957a2e9cacf97c8b2b053b70307cf2996aafd70e91a082e70df3", + "sha256:8d4d5063501b6dd4024b8ac2f04962d661222d120381272deea52e3fc52d3736", + "sha256:8f0aef4ef59694b12cadee839e2ba6afeab89c0f39a3adc02ed51d109117b8da", + "sha256:930044bb7679ab003b14023138b50181899da3f25de50e9dbee23b61b4de2126", + "sha256:950be4d8ba92aca4b2bb0741285a46bfae3ca699ef913ec8416c1b78eadd64cd", + "sha256:961a7293b2457b405967af9c77dcaa43cc1a8cd50d23c532e62d48ab6cdd56f5", + "sha256:9b885f89040bb8c4a1573566bbb2f44f5c505ef6e74cec7ab9068c900047f04b", + "sha256:9f4727572e2918acaa9077c919cbbeb73bd2b3ebcfe033b72f858fc9fbef0026", + "sha256:a02364621fe369e06200d4a16558e056fe2805d3468350df3aef21e00d26214b", + "sha256:a985e028fc183bf12a77a8bbf36318db4238a3ded7fa9df1b9a133f1cb79f8fc", + "sha256:ac1452d2fbe4978c2eec89fb5a23b8387aba707ac72810d9490118817d9c0b46", + "sha256:b15e02e9bb4c21e39876698abf233c8c579127986f8207200bc8a8f6bb27acf2", + "sha256:b2724fdb354a868ddf9a880cb84d102da914e99119211ef7ecbdc613b8c96b3c", + "sha256:bbc527b519bd3aa9d7f429d152fea69f9ad37c95f0b02aebddff592688998abe", + "sha256:bcd5e41a859bf2e84fdc42f4edb7d9aba0a13d29a2abadccafad99de3feff984", + "sha256:bd2880a07482090a3bcb01f4265f1936a903d70bc740bfcb1fd4e8a2ffe5cf5a", + "sha256:bee197b30783295d2eb680b311af15a20a8b24024a19c3a26431ff83eb8d1f70", + "sha256:bf2342ac639c4cf38799a44950bbc2dfcb685f052b9e262f446482afaf4bffca", + "sha256:c76e5786951e72ed3686e122d14c5d7012f16c8303a674d18cdcd6d89557fc5b", + "sha256:cbed61494057c0f83b83eb3a310f0bf774b09513307c434d4366ed64f4128a91", + "sha256:cfdd747216947628af7b259d274771d84db2268ca062dd5faf373639d00113a3", + "sha256:d7480af14364494365e89d6fddc510a13e5a2c3584cb19ef65415ca57252fb84", + "sha256:dbc6ae66518ab3c5847659e9988c3b60dc94ffb48ef9168656e0019a93dbf8a1", + "sha256:dc3e2db6ba09ffd7d02ae9141cfa0ae23393ee7687248d46a7507b75d610f4f5", + "sha256:dfe91cb65544a1321e631e696759491ae04a2ea11d36715eca01ce07284738be", + "sha256:e4d49b85c4348ea0b31ea63bc75a9f3857869174e2bf17e7aba02945cd218e6f", + "sha256:e4db64794ccdf6cb83a59d73405f63adbe2a1887012e308828596100a0b2f6cc", + "sha256:e553cad5179a66ba15bb18b353a19020e73a7921296a7979c4a2b7f6a5cd57f9", + "sha256:e88d5e6ad0d026fba7bdab8c3f225a69f063f116462c49892b0149e21b6c0a0e", + "sha256:ecd85a8d3e79cd7158dec1c9e5808e821feea088e2f69a974db5edf84dc53141", + "sha256:f5b92f4d70791b4a67157321c4e8225d60b119c5cc9aee8ecf153aace4aad4ef", + "sha256:f5f0c3e969c8f12dd2bb7e0b15d5c468b51e5017e01e2e867335c81903046a22", + "sha256:f7baece4ce06bade126fb84b8af1c33439a76d8a6fd818970215e0560ca28c27", + "sha256:ff25afb18123cea58a591ea0244b92eb1e61a1fd497bf6d6384f09bc3262ec3e", + "sha256:ff337c552345e95702c5fde3158acb0625111017d0e5f24bf3acdb9cc16b90d1" ], "markers": "python_version >= '3.8'", - "version": "==10.3.0" + "version": "==10.4.0" }, "pyparsing": { "hashes": [ diff --git a/src/components/real/cdh/c2a_communication.hpp b/src/components/real/cdh/c2a_communication.hpp new file mode 100644 index 000000000..c749d90e3 --- /dev/null +++ b/src/components/real/cdh/c2a_communication.hpp @@ -0,0 +1,26 @@ +/* + * @file c2a_communication.h + * @brief C2A communication functions + */ + +#ifndef C2A_COMMUNICATION_H_ +#define C2A_COMMUNICATION_H_ + +// If the character encoding of C2A is UTF-8, the following functions are not necessary, +// and users can directory use SendFromObc_C2A and ReceivedByObc_C2A UART +// TODO: Delete these functions since C2A is changed to use UTF-8 + +// C2A communication functions +int OBC_C2A_SendFromObc(int port_id, unsigned char* buffer, int offset, int length); +int OBC_C2A_ReceivedByObc(int port_id, unsigned char* buffer, int offset, int length); + +// I2C +int OBC_C2A_I2cWriteCommand(int port_id, const unsigned char i2c_address, const unsigned char* data, const unsigned char length); +int OBC_C2A_I2cWriteRegister(int port_id, const unsigned char i2c_address, const unsigned char* data, const unsigned char length); +int OBC_C2A_I2cReadRegister(int port_id, const unsigned char i2c_address, unsigned char* data, const unsigned char length); + +// GPIO +int OBC_C2A_GpioWrite(int port_id, const bool is_high); +bool OBC_C2A_GpioRead(int port_id); // return false when the port_id is not used + +#endif // C2A_COMMUNICATION_H_ diff --git a/src/components/real/cdh/on_board_computer_with_c2a.hpp b/src/components/real/cdh/on_board_computer_with_c2a.hpp index c194f70e4..bc9cc22e8 100644 --- a/src/components/real/cdh/on_board_computer_with_c2a.hpp +++ b/src/components/real/cdh/on_board_computer_with_c2a.hpp @@ -8,6 +8,7 @@ #include +#include "c2a_communication.hpp" #include "on_board_computer.hpp" /* @@ -55,7 +56,7 @@ class ObcWithC2a : public OnBoardComputer { */ int ConnectComPort(int port_id, int tx_buffer_size, int rx_buffer_size) override; /** - * @fn ConnectComPort + * @fn CloseComPort * @brief Close UART communication port between OnBoardComputer and a component * @param [in] port_id: Port ID * @return -1: error, 0: success @@ -270,21 +271,4 @@ class ObcWithC2a : public OnBoardComputer { static std::map gpio_ports_c2a_; //!< GPIO ports }; -// If the character encoding of C2A is UTF-8, the following functions are not necessary, -// and users can directory use SendFromObc_C2A and ReceivedByObc_C2A UART -// TODO: Delete these functions since C2A is changed to use UTF-8 - -// C2A communication functions -int OBC_C2A_SendFromObc(int port_id, unsigned char* buffer, int offset, int length); -int OBC_C2A_ReceivedByObc(int port_id, unsigned char* buffer, int offset, int length); - -// I2C -int OBC_C2A_I2cWriteCommand(int port_id, const unsigned char i2c_address, const unsigned char* data, const unsigned char length); -int OBC_C2A_I2cWriteRegister(int port_id, const unsigned char i2c_address, const unsigned char* data, const unsigned char length); -int OBC_C2A_I2cReadRegister(int port_id, const unsigned char i2c_address, unsigned char* data, const unsigned char length); - -// GPIO -int OBC_C2A_GpioWrite(int port_id, const bool is_high); -bool OBC_C2A_GpioRead(int port_id); // return false when the port_id is not used - #endif // S2E_COMPONENTS_REAL_CDH_OBC_C2A_HPP_ diff --git a/src/components/real/power/power_control_unit.hpp b/src/components/real/power/power_control_unit.hpp index 94d66e7d6..3e77101c2 100644 --- a/src/components/real/power/power_control_unit.hpp +++ b/src/components/real/power/power_control_unit.hpp @@ -61,7 +61,8 @@ class PowerControlUnit : public Component, public ILoggable { * @brief Return power port information * @param port_id: Power port ID */ - inline PowerPort* GetPowerPort(const int port_id) { return power_ports_[port_id]; }; + inline PowerPort* GetPowerPort(const int port_id) { return power_ports_.at(port_id); }; + inline const PowerPort* GetPowerPort(const int port_id) const { return power_ports_.at(port_id); }; // Port control functions /** diff --git a/src/logger/logger.cpp b/src/logger/logger.cpp index 2a847b286..f4795d537 100644 --- a/src/logger/logger.cpp +++ b/src/logger/logger.cpp @@ -7,41 +7,40 @@ #include #include -#ifdef _WIN32 -#include -#else -#include -#endif std::vector log_list_; bool Logger::is_directory_created_ = false; -Logger::Logger(const std::string &file_name, const std::string &data_path, const std::string &ini_file_name, const bool is_ini_save_enabled, +namespace fs = std::filesystem; + +Logger::Logger(const std::string &file_name, const fs::path &data_path, const fs::path &ini_file_name, const bool is_ini_save_enabled, const bool is_enabled) : is_enabled_(is_enabled), is_ini_save_enabled_(is_ini_save_enabled) { is_file_opened_ = false; if (is_enabled_ == false) return; - // Get current time to append it to the filename + // Set current time to filename prefix time_t timer = time(NULL); struct tm *now; now = localtime(&timer); char start_time_c[64]; strftime(start_time_c, 64, "%y%m%d_%H%M%S", now); + const auto file_prefix = std::string(start_time_c) + "_"; + // Create directory if (is_ini_save_enabled_ == true || is_directory_created_ == false) { directory_path_ = CreateDirectory(data_path, start_time_c); } else { directory_path_ = data_path; } + // Create File - std::stringstream file_path; - file_path << directory_path_ << start_time_c << "_" << file_name; + fs::path file_path = directory_path_ / (file_prefix + file_name); if (is_enabled_) { - csv_file_.open(file_path.str()); + csv_file_.open(file_path.string()); is_file_opened_ = csv_file_.is_open(); - if (!is_file_opened_) std::cerr << "Error opening log file: " << file_path.str() << std::endl; + if (!is_file_opened_) std::cerr << "Error opening log file: " << file_path << std::endl; } // Copy SimBase.ini @@ -82,50 +81,25 @@ void Logger::AddLogList(ILoggable *loggable) { log_list_.push_back(loggable); } void Logger::ClearLogList() { log_list_.clear(); } -std::string Logger::CreateDirectory(const std::string &data_path, const std::string &time) { - std::string directory_path_tmp_ = data_path + "/logs_" + time + "/"; - // Make directory - int rtn_mkdir = 0; -#ifdef WIN32 - rtn_mkdir = _mkdir(directory_path_tmp_.c_str()); -#else - rtn_mkdir = mkdir(directory_path_tmp_.c_str(), 0777); -#endif - if (rtn_mkdir == 0) { - } else { - std::cerr << "Error making directory: " << directory_path_tmp_ << std::endl; - return data_path; - } - is_directory_created_ = true; - return directory_path_tmp_; -} +fs::path Logger::CreateDirectory(const fs::path &data_path, const std::string &time) { + fs::path log_dir_ = data_path; + log_dir_.append(std::string("logs_") + time); -void Logger::CopyFileToLogDirectory(const std::string &ini_file_name) { - using std::ios; + fs::create_directories(log_dir_); - if (is_ini_save_enabled_ == false) return; - // Copy files to the directory - std::string file_name = GetFileName(ini_file_name); - std::string to_file_name = directory_path_ + file_name; - std::ifstream is(ini_file_name, ios::in | ios::binary); - std::ofstream os(to_file_name, ios::out | ios::binary); - os << is.rdbuf(); - - return; + return log_dir_; } -std::string Logger::GetFileName(const std::string &path) { - size_t pos1; - - pos1 = path.rfind('\\'); - if (pos1 != std::string::npos) { - return path.substr(pos1 + 1, path.size() - pos1 - 1); - } +void Logger::CopyFileToLogDirectory(const fs::path &ini_file_name) { + if (is_ini_save_enabled_ == false) return; + // Copy files to the directory + fs::path to_file_name = directory_path_ / ini_file_name.filename(); - pos1 = path.rfind('/'); - if (pos1 != std::string::npos) { - return path.substr(pos1 + 1, path.size() - pos1 - 1); + if (fs::exists(to_file_name)) { + std::cout << "File " << to_file_name << " already exists. Skip copy from" << ini_file_name << std::endl; + return; } - return path; + fs::copy_file(ini_file_name, to_file_name); + return; } diff --git a/src/logger/logger.hpp b/src/logger/logger.hpp index 375f76962..e9ac5b1f0 100644 --- a/src/logger/logger.hpp +++ b/src/logger/logger.hpp @@ -8,6 +8,7 @@ #define _CRT_SECURE_NO_WARNINGS +#include #include #include #include @@ -29,8 +30,8 @@ class Logger { * @param [in] is_ini_save_enabled: Enable flag to save ini files * @param [in] is_enabled: Enable flag for logging */ - Logger(const std::string &file_name, const std::string &data_path, const std::string &ini_file_name, const bool is_ini_save_enabled, - const bool is_enabled = true); + Logger(const std::string &file_name, const std::filesystem::path &data_path, const std::filesystem::path &ini_file_name, + const bool is_ini_save_enabled, const bool is_enabled = true); /** * @fn ~Logger * @brief Destructor @@ -72,7 +73,7 @@ class Logger { * @brief Copy a file (e.g., ini file) into the log directory * @param [in] ini_file_name: The path to the target file to copy */ - void CopyFileToLogDirectory(const std::string &ini_file_name); + void CopyFileToLogDirectory(const std::filesystem::path &ini_file_name); // Getter /** @@ -84,7 +85,7 @@ class Logger { * @fn GetLogPath * @brief Return the path to the directory for log files */ - inline std::string GetLogPath() const { return directory_path_; } + inline std::filesystem::path GetLogPath() const { return directory_path_; } private: std::ofstream csv_file_; //!< CSV file stream @@ -93,8 +94,8 @@ class Logger { static bool is_directory_created_; //!< Is the log output directory is created in the scenario std::vector log_list_; //!< Log list - bool is_ini_save_enabled_; //!< Enable flag to save ini files - std::string directory_path_; //!< Path to the directory for log files + bool is_ini_save_enabled_; //!< Enable flag to save ini files + std::filesystem::path directory_path_; //!< Path to the directory for log files /** * @fn Write @@ -117,15 +118,7 @@ class Logger { * @param[in] time: Time stamp (YYYYMMDD_hhmmss) * @return Path to the created directory */ - std::string CreateDirectory(const std::string &data_path, const std::string &time); - - /** - * @fn GetFileName - * @brief Extract the file name from the name with directory path - * @param [in] path: Directory path including the file name - * @return The extracted file name - */ - std::string GetFileName(const std::string &path); + std::filesystem::path CreateDirectory(const std::filesystem::path &data_path, const std::string &time); }; #endif // S2E_LIBRARY_LOGGER_LOGGER_HPP_