ARTSAT API
2.7.1
メインページ
クラス
ファイル
ファイル一覧
ファイルメンバ
全て
クラス
ファイル
関数
変数
型定義
列挙型
列挙型の値
マクロ定義
ページ
ofxEasyCubeSAT.h
説明を見る。
1
/*
2
** ARTSAT Project
3
**
4
** Original Copyright (C) 2011 - 2012 HORIGUCHI Junshi.
5
** http://iridium.jp/
6
** zap00365@nifty.com
7
** Portions Copyright (C) <year> <author>
8
** <website>
9
** <e-mail>
10
** Version openFrameworks
11
** Website http://artsat.jp/
12
** E-mail info@artsat.jp
13
**
14
** This source code is for Xcode.
15
** Xcode 4.2 (LLVM compiler 3.0)
16
**
17
** ofxEasyCubeSAT.h
18
**
19
** ------------------------------------------------------------------------
20
**
21
** THE SOURCE CODE AND THE BINARY OF ARTSAT API IS DISTRIBUTED UNDER THE MIT LICENSE WRITTEN BELOW.
22
** THE LICENSE OF ANY DATA GOTTEN THROUGH ARTSAT API FOLLOWS PROVIDED LICENSE ON EACH SATELLITE.
23
**
24
** ARTSAT API のソースコードとバイナリは下記に示す MIT ライセンスの元で配布されます。
25
** ARTSAT API を通して取得できるデータのライセンスに関してはデータの提供元となる各衛星の定めるライセンスに準じます。
26
**
27
** The MIT License (MIT)
28
**
29
** Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
30
** associated documentation files (the "Software"), to deal in the Software without restriction,
31
** including without limitation the rights to use, copy, modify, merge, publish, distribute,
32
** sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
33
** furnished to do so, subject to the following conditions:
34
** The above copyright notice and this permission notice shall be included in all copies or
35
** substantial portions of the Software.
36
** THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
37
** BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
38
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
39
** WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
40
** OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41
**
42
** 以下に定める条件に従い、本ソフトウェアおよび関連文書のファイル(以下「ソフトウェア」)の複製を
43
** 取得するすべての人に対し、ソフトウェアを無制限に扱うことを無償で許可します。
44
** これには、ソフトウェアの複製を使用、複写、変更、結合、掲載、頒布、サブライセンス、および、または販売する権利、
45
** およびソフトウェアを提供する相手に同じことを許可する権利も無制限に含まれます。
46
** 上記の著作権表示および本許諾表示を、ソフトウェアのすべての複製または重要な部分に記載するものとします。
47
** ソフトウェアは「現状のまま」で、明示であるか暗黙であるかを問わず、何らの保証もなく提供されます。
48
** ここでいう保証とは、商品性、特定の目的への適合性、および権利非侵害についての保証も含みますが、それに限定されるものではありません。
49
** 作者または著作権者は、契約行為、不法行為、またはそれ以外であろうと、ソフトウェアに起因または関連し、
50
** あるいはソフトウェアの使用またはその他の扱いによって生じる一切の請求、損害、その他の義務について何らの責任も負わないものとします。
51
*/
52
53
#ifndef __OFX_EASYCUBESAT_H
54
#define __OFX_EASYCUBESAT_H
55
61
#include "
ofxSATType.h
"
62
#include "
ofxSAT.h
"
63
65
157
class
ofxEasyCubeSAT
:
public
ofxSAT
,
private
ofxSAT::Notifier
{
158
public
:
162
typedef
ofxEasyCubeSAT
self
;
166
typedef
ofxSAT
super
;
167
168
public
:
173
enum
SensorEnum
{
175
SENSOR_POWER_SOLARPX
=
super::SENSOR_LIMIT
,
177
SENSOR_POWER_SOLARMX
,
179
SENSOR_POWER_SOLARPY
,
181
SENSOR_POWER_SOLARMY
,
183
SENSOR_POWER_SOLARPZ
,
185
SENSOR_POWER_SOLARMZ
,
187
SENSOR_POWER_BATTERY
,
189
SENSOR_TEMPERATURE_PX
,
191
SENSOR_TEMPERATURE_MX
,
193
SENSOR_TEMPERATURE_PY
,
195
SENSOR_TEMPERATURE_MY
,
197
SENSOR_TEMPERATURE_PZ
,
199
SENSOR_TEMPERATURE_MZ
,
201
SENSOR_TEMPERATURE_BATTERY
,
203
SENSOR_GYRO_X
,
205
SENSOR_GYRO_Y
,
207
SENSOR_GYRO_Z
,
209
SENSOR_MAGNETOMETER_X
,
211
SENSOR_MAGNETOMETER_Y
,
213
SENSOR_MAGNETOMETER_Z
,
214
// default
216
SENSOR_LIMIT
217
};
222
enum
ModelEnum
{
224
MODEL_INVADER
,
225
#ifdef __USE_NAKASUKALAB
226
227
MODEL_XIIV,
229
MODEL_XIV,
230
#endif
231
// default
233
MODEL_LIMIT
234
};
235
236
public
:
238
struct
TableRec {
239
FormatEnum
format;
240
UnitEnum
unit;
241
};
243
244
private
:
245
ofxSAT
* _sat;
246
ModelEnum
_model;
247
248
public
:
253
explicit
ofxEasyCubeSAT
(
void
);
258
virtual
~ofxEasyCubeSAT
(
void
);
266
ofxSATError
setModel
(
ModelEnum
param);
271
ModelEnum
getModel
(
void
)
const
;
284
virtual
ofxSATError
getAvailableCount
(
int
* result)
const
;
300
virtual
ofxSATError
getAvailableCount
(
ofxSATTime
const
& begin,
ofxSATTime
const
& end,
int
* result)
const
;
328
virtual
ofxSATError
getAvailableTime
(std::vector<ofxSATTime>* result)
const
;
365
virtual
ofxSATError
getAvailableTime
(
ofxSATTime
const
& begin,
ofxSATTime
const
& end, std::vector<ofxSATTime>* result)
const
;
375
virtual
ofxSATError
getSensorFormat
(
SensorType
sensor,
FormatEnum
* result)
const
;
385
virtual
ofxSATError
getSensorUnit
(
SensorType
sensor,
UnitEnum
* result)
const
;
399
virtual
ofxSATError
getSensorMinimum
(
SensorType
sensor,
void
* result,
int
size)
const
;
413
virtual
ofxSATError
getSensorMaximum
(
SensorType
sensor,
void
* result,
int
size)
const
;
471
virtual
ofxSATError
getSensorData
(
SensorType
sensor,
ofxSATTime
const
& time,
void
* result,
int
size,
bool
* simulation = NULL)
const
;
495
ofxSATError
getSensorPowerSolarPX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
519
ofxSATError
getSensorPowerSolarMX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
543
ofxSATError
getSensorPowerSolarPY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
567
ofxSATError
getSensorPowerSolarMY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
591
ofxSATError
getSensorPowerSolarPZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
615
ofxSATError
getSensorPowerSolarMZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
639
ofxSATError
getSensorPowerBattery
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
663
ofxSATError
getSensorTemperaturePX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
687
ofxSATError
getSensorTemperatureMX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
711
ofxSATError
getSensorTemperaturePY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
735
ofxSATError
getSensorTemperatureMY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
759
ofxSATError
getSensorTemperaturePZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
783
ofxSATError
getSensorTemperatureMZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
807
ofxSATError
getSensorTemperatureBattery
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
831
ofxSATError
getSensorGyroX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
855
ofxSATError
getSensorGyroY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
879
ofxSATError
getSensorGyroZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
903
ofxSATError
getSensorMagnetometerX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
927
ofxSATError
getSensorMagnetometerY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
951
ofxSATError
getSensorMagnetometerZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation = NULL)
const
;
959
virtual
ofxSATError
setup
(
void
);
964
virtual
void
cleanup
(
void
);
972
virtual
ofxSATError
update
(
ofxSATTime
const
& time =
ofxSATTime::currentTime
());
973
private
:
974
virtual
void
onNotifyTLE (TLERec
const
& tle,
ofxSATTime
const
& time);
975
virtual
void
onNotifyData (
ofxSATTime
const
& time);
976
virtual
void
onNotifyFinish (
ofxSATError
const
& error);
977
private
:
978
ofxEasyCubeSAT
(
ofxEasyCubeSAT
const
&);
979
ofxEasyCubeSAT
& operator= (
ofxEasyCubeSAT
const
&);
980
};
981
982
/*public */
inline
ofxEasyCubeSAT::ModelEnum
ofxEasyCubeSAT::getModel
(
void
)
const
983
{
984
return
_model;
985
}
986
987
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerSolarPX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
988
{
989
return
getSensorData
(
SENSOR_POWER_SOLARPX
, time, result,
sizeof
(*result), simulation);
990
}
991
992
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerSolarMX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
993
{
994
return
getSensorData
(
SENSOR_POWER_SOLARMX
, time, result,
sizeof
(*result), simulation);
995
}
996
997
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerSolarPY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
998
{
999
return
getSensorData
(
SENSOR_POWER_SOLARPY
, time, result,
sizeof
(*result), simulation);
1000
}
1001
1002
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerSolarMY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1003
{
1004
return
getSensorData
(
SENSOR_POWER_SOLARMY
, time, result,
sizeof
(*result), simulation);
1005
}
1006
1007
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerSolarPZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1008
{
1009
return
getSensorData
(
SENSOR_POWER_SOLARPZ
, time, result,
sizeof
(*result), simulation);
1010
}
1011
1012
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerSolarMZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1013
{
1014
return
getSensorData
(
SENSOR_POWER_SOLARMZ
, time, result,
sizeof
(*result), simulation);
1015
}
1016
1017
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorPowerBattery
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1018
{
1019
return
getSensorData
(
SENSOR_POWER_BATTERY
, time, result,
sizeof
(*result), simulation);
1020
}
1021
1022
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperaturePX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1023
{
1024
return
getSensorData
(
SENSOR_TEMPERATURE_PX
, time, result,
sizeof
(*result), simulation);
1025
}
1026
1027
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperatureMX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1028
{
1029
return
getSensorData
(
SENSOR_TEMPERATURE_MX
, time, result,
sizeof
(*result), simulation);
1030
}
1031
1032
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperaturePY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1033
{
1034
return
getSensorData
(
SENSOR_TEMPERATURE_PY
, time, result,
sizeof
(*result), simulation);
1035
}
1036
1037
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperatureMY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1038
{
1039
return
getSensorData
(
SENSOR_TEMPERATURE_MY
, time, result,
sizeof
(*result), simulation);
1040
}
1041
1042
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperaturePZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1043
{
1044
return
getSensorData
(
SENSOR_TEMPERATURE_PZ
, time, result,
sizeof
(*result), simulation);
1045
}
1046
1047
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperatureMZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1048
{
1049
return
getSensorData
(
SENSOR_TEMPERATURE_MZ
, time, result,
sizeof
(*result), simulation);
1050
}
1051
1052
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorTemperatureBattery
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1053
{
1054
return
getSensorData
(
SENSOR_TEMPERATURE_BATTERY
, time, result,
sizeof
(*result), simulation);
1055
}
1056
1057
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorGyroX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1058
{
1059
return
getSensorData
(
SENSOR_GYRO_X
, time, result,
sizeof
(*result), simulation);
1060
}
1061
1062
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorGyroY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1063
{
1064
return
getSensorData
(
SENSOR_GYRO_Y
, time, result,
sizeof
(*result), simulation);
1065
}
1066
1067
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorGyroZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1068
{
1069
return
getSensorData
(
SENSOR_GYRO_Z
, time, result,
sizeof
(*result), simulation);
1070
}
1071
1072
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorMagnetometerX
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1073
{
1074
return
getSensorData
(
SENSOR_MAGNETOMETER_X
, time, result,
sizeof
(*result), simulation);
1075
}
1076
1077
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorMagnetometerY
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1078
{
1079
return
getSensorData
(
SENSOR_MAGNETOMETER_Y
, time, result,
sizeof
(*result), simulation);
1080
}
1081
1082
/*public */
inline
ofxSATError
ofxEasyCubeSAT::getSensorMagnetometerZ
(
ofxSATTime
const
& time,
double
* result,
bool
* simulation)
const
1083
{
1084
return
getSensorData
(
SENSOR_MAGNETOMETER_Z
, time, result,
sizeof
(*result), simulation);
1085
}
1086
1087
#endif
src
ofxEasyCubeSAT.h
ARTSAT APIに対してSat Dec 15 2012 01:33:47に生成されました。
1.8.2