SPICE export full precision data

Saving csv files loses precision when time/data steps are smaller than
10^-6.  This switches to engineering notation when dealing with higher
precision.

Ref KiCad Services ticket 281
This commit is contained in:
Seth Hillbrand 2020-11-30 13:24:32 -08:00
parent a9b53d94e8
commit 938859f10a
1 changed files with 2 additions and 2 deletions

View File

@ -927,7 +927,7 @@ void SIM_PLOT_FRAME::menuSaveCsv( wxCommandEvent& event )
out.Write( wxString::Format( "Time%c", SEPARATOR ) );
for( double v : trace->GetDataX() )
out.Write( wxString::Format( "%f%c", v, SEPARATOR ) );
out.Write( wxString::Format( "%g%c", v, SEPARATOR ) );
out.Write( "\r\n" );
timeWritten = true;
@ -936,7 +936,7 @@ void SIM_PLOT_FRAME::menuSaveCsv( wxCommandEvent& event )
out.Write( wxString::Format( "%s%c", t.first, SEPARATOR ) );
for( double v : trace->GetDataY() )
out.Write( wxString::Format( "%f%c", v, SEPARATOR ) );
out.Write( wxString::Format( "%g%c", v, SEPARATOR ) );
out.Write( "\r\n" );
}