musa
This commit is contained in:
@@ -99,6 +99,7 @@ sub matlabCalc {
|
||||
$ENV{"HOME"} = "/" . $ENV{"HOME"};
|
||||
chdir($matlab_func_dir)
|
||||
or die "cannot change: $!\n";
|
||||
print getTimeStamp("log") . " - pid $$ >> current dir: $matlab_func_dir\n";
|
||||
my @args = ( 'timeout', $matlab_timeout, $matlab_cmd, $matlab_rt, $unit, $tool);
|
||||
if (system(@args) != 0) {
|
||||
my $exit_value = $? >> 8;
|
||||
@@ -177,7 +178,7 @@ sub trxelab {
|
||||
select ToolNameID, EventDate, EventTime, NodeNum, NodeType, NodeDepth,
|
||||
XShift, YShift, ZShift , X, Y, Z, HShift, HShiftDir, HShift_local,
|
||||
speed, speed_local, acceleration, acceleration_local, T_node, water_level, pressure, load_value, AlfaX, AlfaY, calcerr
|
||||
from ElabDataView
|
||||
from elabdataview
|
||||
where UnitName = '$unit' and ToolNameID = '$tool' and updated_at > '$matlab_timestamp'
|
||||
order by ToolNameID DESC, EventDate, EventTime, convert(`NodeNum`, UNSIGNED INTEGER) DESC
|
||||
) resulting_set
|
||||
@@ -454,18 +455,36 @@ while ( my $line = <FILE> ) {
|
||||
|
||||
#$NodeData =~ s/\r\n\z//;
|
||||
|
||||
if ( $tooltype eq "MUX" or $tooltype eq "MUSA" ) {
|
||||
if ( $tooltype eq "MUX" ) {
|
||||
|
||||
#$NodeData =~ s/Dis\./N\/A/g;
|
||||
@NewData = grep /\S/, split( /\||;/, $NodeData );
|
||||
|
||||
my $idx = 0;
|
||||
|
||||
$CSVData[ $idx++ ] = join( ';', splice( @NewData, 0, 2 ) );
|
||||
foreach my $ch (@channels) {
|
||||
$CSVData[ $idx++ ] =
|
||||
join( ';', splice( @NewData, 0, $ch ) );
|
||||
}
|
||||
|
||||
#print Dumper \@CSVData;
|
||||
}elsif ( $tooltype eq "MUSA" ) {
|
||||
|
||||
#$NodeData =~ s/Dis\./N\/A/g;
|
||||
my @tmpData = grep /\S/, split( /\||;/, $NodeData );
|
||||
my $tmpBatt = shift @tmpData;
|
||||
@NewData = ($tmpBatt, $tmpData[0], @tmpData);
|
||||
|
||||
my $idx = 0;
|
||||
|
||||
$CSVData[ $idx++ ] = join( ';', splice( @NewData, 0, 2 ) );
|
||||
foreach my $ch (@channels) {
|
||||
$CSVData[ $idx++ ] =
|
||||
join( ';', splice( @NewData, 0, $ch ) );
|
||||
}
|
||||
|
||||
print Dumper \@CSVData;
|
||||
#print Dumper \@channels;
|
||||
#print Dumper \@din;
|
||||
|
||||
}elsif ( $tooltype eq "LOC" ) {
|
||||
|
||||
Reference in New Issue
Block a user